google.cloud.dialogflow.v2.Intent */ class Intent extends \Google\Protobuf\Internal\Message { /** * Required for all methods except `create` (`create` populates the name * automatically. * The unique identifier of this intent. * Format: `projects//agent/intents/`. * * Generated from protobuf field string name = 1; */ private $name = ''; /** * Required. The name of this intent. * * Generated from protobuf field string display_name = 2; */ private $display_name = ''; /** * Required. Indicates whether webhooks are enabled for the intent. * * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.WebhookState webhook_state = 6; */ private $webhook_state = 0; /** * Optional. The priority of this intent. Higher numbers represent higher * priorities. Zero or negative numbers mean that the intent is disabled. * * Generated from protobuf field int32 priority = 3; */ private $priority = 0; /** * Optional. Indicates whether this is a fallback intent. * * Generated from protobuf field bool is_fallback = 4; */ private $is_fallback = false; /** * Optional. Indicates whether Machine Learning is disabled for the intent. * Note: If `ml_diabled` setting is set to true, then this intent is not * taken into account during inference in `ML ONLY` match mode. Also, * auto-markup in the UI is turned off. * * Generated from protobuf field bool ml_disabled = 19; */ private $ml_disabled = false; /** * Optional. The list of context names required for this intent to be * triggered. * Format: `projects//agent/sessions/-/contexts/`. * * Generated from protobuf field repeated string input_context_names = 7; */ private $input_context_names; /** * Optional. The collection of event names that trigger the intent. * If the collection of input contexts is not empty, all of the contexts must * be present in the active user session for an event to trigger this intent. * * Generated from protobuf field repeated string events = 8; */ private $events; /** * Optional. The collection of examples/templates that the agent is * trained on. * * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase training_phrases = 9; */ private $training_phrases; /** * Optional. The name of the action associated with the intent. * * Generated from protobuf field string action = 10; */ private $action = ''; /** * Optional. The collection of contexts that are activated when the intent * is matched. Context messages in this collection should not set the * parameters field. Setting the `lifespan_count` to 0 will reset the context * when the intent is matched. * Format: `projects//agent/sessions/-/contexts/`. * * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Context output_contexts = 11; */ private $output_contexts; /** * Optional. Indicates whether to delete all contexts in the current * session when this intent is matched. * * Generated from protobuf field bool reset_contexts = 12; */ private $reset_contexts = false; /** * Optional. The collection of parameters associated with the intent. * * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Parameter parameters = 13; */ private $parameters; /** * Optional. The collection of rich messages corresponding to the * `Response` field in the Dialogflow console. * * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message messages = 14; */ private $messages; /** * Optional. The list of platforms for which the first response will be * taken from among the messages assigned to the DEFAULT_PLATFORM. * * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.Platform default_response_platforms = 15; */ private $default_response_platforms; /** * The unique identifier of the root intent in the chain of followup intents. * It identifies the correct followup intents chain for this intent. * Format: `projects//agent/intents/`. * * Generated from protobuf field string root_followup_intent_name = 16; */ private $root_followup_intent_name = ''; /** * The unique identifier of the parent intent in the chain of followup * intents. * It identifies the parent followup intent. * Format: `projects//agent/intents/`. * * Generated from protobuf field string parent_followup_intent_name = 17; */ private $parent_followup_intent_name = ''; /** * Optional. Collection of information about all followup intents that have * name of this intent as a root_name. * * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.FollowupIntentInfo followup_intent_info = 18; */ private $followup_intent_info; public function __construct() { \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); parent::__construct(); } /** * Required for all methods except `create` (`create` populates the name * automatically. * The unique identifier of this intent. * Format: `projects//agent/intents/`. * * Generated from protobuf field string name = 1; * @return string */ public function getName() { return $this->name; } /** * Required for all methods except `create` (`create` populates the name * automatically. * The unique identifier of this intent. * Format: `projects//agent/intents/`. * * Generated from protobuf field string name = 1; * @param string $var * @return $this */ public function setName($var) { GPBUtil::checkString($var, True); $this->name = $var; return $this; } /** * Required. The name of this intent. * * Generated from protobuf field string display_name = 2; * @return string */ public function getDisplayName() { return $this->display_name; } /** * Required. The name of this intent. * * Generated from protobuf field string display_name = 2; * @param string $var * @return $this */ public function setDisplayName($var) { GPBUtil::checkString($var, True); $this->display_name = $var; return $this; } /** * Required. Indicates whether webhooks are enabled for the intent. * * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.WebhookState webhook_state = 6; * @return int */ public function getWebhookState() { return $this->webhook_state; } /** * Required. Indicates whether webhooks are enabled for the intent. * * Generated from protobuf field .google.cloud.dialogflow.v2.Intent.WebhookState webhook_state = 6; * @param int $var * @return $this */ public function setWebhookState($var) { GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\Intent_WebhookState::class); $this->webhook_state = $var; return $this; } /** * Optional. The priority of this intent. Higher numbers represent higher * priorities. Zero or negative numbers mean that the intent is disabled. * * Generated from protobuf field int32 priority = 3; * @return int */ public function getPriority() { return $this->priority; } /** * Optional. The priority of this intent. Higher numbers represent higher * priorities. Zero or negative numbers mean that the intent is disabled. * * Generated from protobuf field int32 priority = 3; * @param int $var * @return $this */ public function setPriority($var) { GPBUtil::checkInt32($var); $this->priority = $var; return $this; } /** * Optional. Indicates whether this is a fallback intent. * * Generated from protobuf field bool is_fallback = 4; * @return bool */ public function getIsFallback() { return $this->is_fallback; } /** * Optional. Indicates whether this is a fallback intent. * * Generated from protobuf field bool is_fallback = 4; * @param bool $var * @return $this */ public function setIsFallback($var) { GPBUtil::checkBool($var); $this->is_fallback = $var; return $this; } /** * Optional. Indicates whether Machine Learning is disabled for the intent. * Note: If `ml_diabled` setting is set to true, then this intent is not * taken into account during inference in `ML ONLY` match mode. Also, * auto-markup in the UI is turned off. * * Generated from protobuf field bool ml_disabled = 19; * @return bool */ public function getMlDisabled() { return $this->ml_disabled; } /** * Optional. Indicates whether Machine Learning is disabled for the intent. * Note: If `ml_diabled` setting is set to true, then this intent is not * taken into account during inference in `ML ONLY` match mode. Also, * auto-markup in the UI is turned off. * * Generated from protobuf field bool ml_disabled = 19; * @param bool $var * @return $this */ public function setMlDisabled($var) { GPBUtil::checkBool($var); $this->ml_disabled = $var; return $this; } /** * Optional. The list of context names required for this intent to be * triggered. * Format: `projects//agent/sessions/-/contexts/`. * * Generated from protobuf field repeated string input_context_names = 7; * @return \Google\Protobuf\Internal\RepeatedField */ public function getInputContextNames() { return $this->input_context_names; } /** * Optional. The list of context names required for this intent to be * triggered. * Format: `projects//agent/sessions/-/contexts/`. * * Generated from protobuf field repeated string input_context_names = 7; * @param string[]|\Google\Protobuf\Internal\RepeatedField $var * @return $this */ public function setInputContextNames($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); $this->input_context_names = $arr; return $this; } /** * Optional. The collection of event names that trigger the intent. * If the collection of input contexts is not empty, all of the contexts must * be present in the active user session for an event to trigger this intent. * * Generated from protobuf field repeated string events = 8; * @return \Google\Protobuf\Internal\RepeatedField */ public function getEvents() { return $this->events; } /** * Optional. The collection of event names that trigger the intent. * If the collection of input contexts is not empty, all of the contexts must * be present in the active user session for an event to trigger this intent. * * Generated from protobuf field repeated string events = 8; * @param string[]|\Google\Protobuf\Internal\RepeatedField $var * @return $this */ public function setEvents($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); $this->events = $arr; return $this; } /** * Optional. The collection of examples/templates that the agent is * trained on. * * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase training_phrases = 9; * @return \Google\Protobuf\Internal\RepeatedField */ public function getTrainingPhrases() { return $this->training_phrases; } /** * Optional. The collection of examples/templates that the agent is * trained on. * * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase training_phrases = 9; * @param \Google\Cloud\Dialogflow\V2\Intent_TrainingPhrase[]|\Google\Protobuf\Internal\RepeatedField $var * @return $this */ public function setTrainingPhrases($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Intent_TrainingPhrase::class); $this->training_phrases = $arr; return $this; } /** * Optional. The name of the action associated with the intent. * * Generated from protobuf field string action = 10; * @return string */ public function getAction() { return $this->action; } /** * Optional. The name of the action associated with the intent. * * Generated from protobuf field string action = 10; * @param string $var * @return $this */ public function setAction($var) { GPBUtil::checkString($var, True); $this->action = $var; return $this; } /** * Optional. The collection of contexts that are activated when the intent * is matched. Context messages in this collection should not set the * parameters field. Setting the `lifespan_count` to 0 will reset the context * when the intent is matched. * Format: `projects//agent/sessions/-/contexts/`. * * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Context output_contexts = 11; * @return \Google\Protobuf\Internal\RepeatedField */ public function getOutputContexts() { return $this->output_contexts; } /** * Optional. The collection of contexts that are activated when the intent * is matched. Context messages in this collection should not set the * parameters field. Setting the `lifespan_count` to 0 will reset the context * when the intent is matched. * Format: `projects//agent/sessions/-/contexts/`. * * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Context output_contexts = 11; * @param \Google\Cloud\Dialogflow\V2\Context[]|\Google\Protobuf\Internal\RepeatedField $var * @return $this */ public function setOutputContexts($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Context::class); $this->output_contexts = $arr; return $this; } /** * Optional. Indicates whether to delete all contexts in the current * session when this intent is matched. * * Generated from protobuf field bool reset_contexts = 12; * @return bool */ public function getResetContexts() { return $this->reset_contexts; } /** * Optional. Indicates whether to delete all contexts in the current * session when this intent is matched. * * Generated from protobuf field bool reset_contexts = 12; * @param bool $var * @return $this */ public function setResetContexts($var) { GPBUtil::checkBool($var); $this->reset_contexts = $var; return $this; } /** * Optional. The collection of parameters associated with the intent. * * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Parameter parameters = 13; * @return \Google\Protobuf\Internal\RepeatedField */ public function getParameters() { return $this->parameters; } /** * Optional. The collection of parameters associated with the intent. * * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Parameter parameters = 13; * @param \Google\Cloud\Dialogflow\V2\Intent_Parameter[]|\Google\Protobuf\Internal\RepeatedField $var * @return $this */ public function setParameters($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Intent_Parameter::class); $this->parameters = $arr; return $this; } /** * Optional. The collection of rich messages corresponding to the * `Response` field in the Dialogflow console. * * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message messages = 14; * @return \Google\Protobuf\Internal\RepeatedField */ public function getMessages() { return $this->messages; } /** * Optional. The collection of rich messages corresponding to the * `Response` field in the Dialogflow console. * * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message messages = 14; * @param \Google\Cloud\Dialogflow\V2\Intent_Message[]|\Google\Protobuf\Internal\RepeatedField $var * @return $this */ public function setMessages($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Intent_Message::class); $this->messages = $arr; return $this; } /** * Optional. The list of platforms for which the first response will be * taken from among the messages assigned to the DEFAULT_PLATFORM. * * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.Platform default_response_platforms = 15; * @return \Google\Protobuf\Internal\RepeatedField */ public function getDefaultResponsePlatforms() { return $this->default_response_platforms; } /** * Optional. The list of platforms for which the first response will be * taken from among the messages assigned to the DEFAULT_PLATFORM. * * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.Platform default_response_platforms = 15; * @param int[]|\Google\Protobuf\Internal\RepeatedField $var * @return $this */ public function setDefaultResponsePlatforms($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Dialogflow\V2\Intent_Message_Platform::class); $this->default_response_platforms = $arr; return $this; } /** * The unique identifier of the root intent in the chain of followup intents. * It identifies the correct followup intents chain for this intent. * Format: `projects//agent/intents/`. * * Generated from protobuf field string root_followup_intent_name = 16; * @return string */ public function getRootFollowupIntentName() { return $this->root_followup_intent_name; } /** * The unique identifier of the root intent in the chain of followup intents. * It identifies the correct followup intents chain for this intent. * Format: `projects//agent/intents/`. * * Generated from protobuf field string root_followup_intent_name = 16; * @param string $var * @return $this */ public function setRootFollowupIntentName($var) { GPBUtil::checkString($var, True); $this->root_followup_intent_name = $var; return $this; } /** * The unique identifier of the parent intent in the chain of followup * intents. * It identifies the parent followup intent. * Format: `projects//agent/intents/`. * * Generated from protobuf field string parent_followup_intent_name = 17; * @return string */ public function getParentFollowupIntentName() { return $this->parent_followup_intent_name; } /** * The unique identifier of the parent intent in the chain of followup * intents. * It identifies the parent followup intent. * Format: `projects//agent/intents/`. * * Generated from protobuf field string parent_followup_intent_name = 17; * @param string $var * @return $this */ public function setParentFollowupIntentName($var) { GPBUtil::checkString($var, True); $this->parent_followup_intent_name = $var; return $this; } /** * Optional. Collection of information about all followup intents that have * name of this intent as a root_name. * * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.FollowupIntentInfo followup_intent_info = 18; * @return \Google\Protobuf\Internal\RepeatedField */ public function getFollowupIntentInfo() { return $this->followup_intent_info; } /** * Optional. Collection of information about all followup intents that have * name of this intent as a root_name. * * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.FollowupIntentInfo followup_intent_info = 18; * @param \Google\Cloud\Dialogflow\V2\Intent_FollowupIntentInfo[]|\Google\Protobuf\Internal\RepeatedField $var * @return $this */ public function setFollowupIntentInfo($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Intent_FollowupIntentInfo::class); $this->followup_intent_info = $arr; return $this; } }