google.cloud.dialogflow.v2.TextInput
*/
class TextInput extends \Google\Protobuf\Internal\Message
{
/**
* Required. The UTF-8 encoded natural language text to be processed.
* Text length must not exceed 256 bytes.
*
* Generated from protobuf field string text = 1;
*/
private $text = '';
/**
* Required. The language of this conversational query. See [Language
* Support](https://dialogflow.com/docs/languages) for a list of the
* currently supported language codes. Note that queries in the same session
* do not necessarily need to specify the same language.
*
* Generated from protobuf field string language_code = 2;
*/
private $language_code = '';
public function __construct() {
\GPBMetadata\Google\Cloud\Dialogflow\V2\Session::initOnce();
parent::__construct();
}
/**
* Required. The UTF-8 encoded natural language text to be processed.
* Text length must not exceed 256 bytes.
*
* Generated from protobuf field string text = 1;
* @return string
*/
public function getText()
{
return $this->text;
}
/**
* Required. The UTF-8 encoded natural language text to be processed.
* Text length must not exceed 256 bytes.
*
* Generated from protobuf field string text = 1;
* @param string $var
* @return $this
*/
public function setText($var)
{
GPBUtil::checkString($var, True);
$this->text = $var;
return $this;
}
/**
* Required. The language of this conversational query. See [Language
* Support](https://dialogflow.com/docs/languages) for a list of the
* currently supported language codes. Note that queries in the same session
* do not necessarily need to specify the same language.
*
* Generated from protobuf field string language_code = 2;
* @return string
*/
public function getLanguageCode()
{
return $this->language_code;
}
/**
* Required. The language of this conversational query. See [Language
* Support](https://dialogflow.com/docs/languages) for a list of the
* currently supported language codes. Note that queries in the same session
* do not necessarily need to specify the same language.
*
* Generated from protobuf field string language_code = 2;
* @param string $var
* @return $this
*/
public function setLanguageCode($var)
{
GPBUtil::checkString($var, True);
$this->language_code = $var;
return $this;
}
}