mentions = $mentions; } /** * @return EntityMention[] */ public function getMentions() { return $this->mentions; } /** * Metadata associated with the entity. For the metadata associated with other * entity types, see the Type table below. * * @param string[] $metadata */ public function setMetadata($metadata) { $this->metadata = $metadata; } /** * @return string[] */ public function getMetadata() { return $this->metadata; } /** * The representative name for the entity. * * @param string $name */ public function setName($name) { $this->name = $name; } /** * @return string */ public function getName() { return $this->name; } /** * For calls to AnalyzeEntitySentiment this field will contain the aggregate * sentiment expressed for this entity in the provided document. * * @param Sentiment $sentiment */ public function setSentiment(Sentiment $sentiment) { $this->sentiment = $sentiment; } /** * @return Sentiment */ public function getSentiment() { return $this->sentiment; } /** * The entity type. * * Accepted values: UNKNOWN, PERSON, LOCATION, ORGANIZATION, EVENT, * WORK_OF_ART, CONSUMER_GOOD, OTHER, PHONE_NUMBER, ADDRESS, DATE, NUMBER, * PRICE * * @param self::TYPE_* $type */ public function setType($type) { $this->type = $type; } /** * @return self::TYPE_* */ public function getType() { return $this->type; } } // Adding a class alias for backwards compatibility with the previous class name. class_alias(Entity::class, 'Google_Service_CloudNaturalLanguage_Entity');