google.cloud.dialogflow.v2.Context */ class Context extends \Google\Protobuf\Internal\Message { /** * Required. The unique identifier of the context. Format: * `projects//agent/sessions//contexts/`. * * Generated from protobuf field string name = 1; */ private $name = ''; /** * Optional. The number of conversational query requests after which the * context expires. If set to `0` (the default) the context expires * immediately. Contexts expire automatically after 10 minutes even if there * are no matching queries. * * Generated from protobuf field int32 lifespan_count = 2; */ private $lifespan_count = 0; /** * Optional. The collection of parameters associated with this context. * Refer to [this doc](https://dialogflow.com/docs/actions-and-parameters) for * syntax. * * Generated from protobuf field .google.protobuf.Struct parameters = 3; */ private $parameters = null; public function __construct() { \GPBMetadata\Google\Cloud\Dialogflow\V2\Context::initOnce(); parent::__construct(); } /** * Required. The unique identifier of the context. Format: * `projects//agent/sessions//contexts/`. * * Generated from protobuf field string name = 1; * @return string */ public function getName() { return $this->name; } /** * Required. The unique identifier of the context. Format: * `projects//agent/sessions//contexts/`. * * 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; } /** * Optional. The number of conversational query requests after which the * context expires. If set to `0` (the default) the context expires * immediately. Contexts expire automatically after 10 minutes even if there * are no matching queries. * * Generated from protobuf field int32 lifespan_count = 2; * @return int */ public function getLifespanCount() { return $this->lifespan_count; } /** * Optional. The number of conversational query requests after which the * context expires. If set to `0` (the default) the context expires * immediately. Contexts expire automatically after 10 minutes even if there * are no matching queries. * * Generated from protobuf field int32 lifespan_count = 2; * @param int $var * @return $this */ public function setLifespanCount($var) { GPBUtil::checkInt32($var); $this->lifespan_count = $var; return $this; } /** * Optional. The collection of parameters associated with this context. * Refer to [this doc](https://dialogflow.com/docs/actions-and-parameters) for * syntax. * * Generated from protobuf field .google.protobuf.Struct parameters = 3; * @return \Google\Protobuf\Struct */ public function getParameters() { return $this->parameters; } /** * Optional. The collection of parameters associated with this context. * Refer to [this doc](https://dialogflow.com/docs/actions-and-parameters) for * syntax. * * Generated from protobuf field .google.protobuf.Struct parameters = 3; * @param \Google\Protobuf\Struct $var * @return $this */ public function setParameters($var) { GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); $this->parameters = $var; return $this; } }