Last active
August 13, 2021 11:12
-
-
Save fitwist/36c6d748d8130debee088cea1407121a to your computer and use it in GitHub Desktop.
DialogFlow API event query as a chat trigger on PHP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Google\Cloud\Dialogflow\V2; | |
use Google\Protobuf\Internal\GPBType; | |
use Google\Protobuf\Internal\RepeatedField; | |
use Google\Protobuf\Internal\GPBUtil; | |
class EventInput extends \Google\Protobuf\Internal\Message | |
{ | |
# Название события provideFormInfo ("обеспечить [бота] информацией из формы"). | |
private $name = 'provideFormInfo'; | |
private $parameters = { | |
Name: 'Елена Кениг', | |
Position: 'Главный бухгалтер', | |
Phone: '79219637276038', | |
GepCountry: 'IP_RU', | |
TextQuery: 'Заявка на абонемент. Мое имя Елена Кениг, компания ТК Стройтон, должность главный бухгалтер, интересует Счет-Фактура и УПД в ред. пост. 534 для БП3, БП2, УТ10.3, УТ11.1, УТ11.4, КА1, КА2 , по адресу https://infostart.ru/public/1461552/.' | |
}; | |
private $language_code = 'ru-RU'; | |
public function __construct($data = NULL) { | |
\GPBMetadata\Google\Cloud\Dialogflow\V2\Session::initOnce(); | |
parent::__construct($data); | |
} | |
public function getName() | |
{ | |
return $this->name; | |
} | |
public function setName($var) | |
{ | |
GPBUtil::checkString($var, True); | |
$this->name = $var; | |
return $this; | |
} | |
public function getParameters() | |
{ | |
return isset($this->parameters) ? $this->parameters : null; | |
} | |
public function hasParameters() | |
{ | |
return isset($this->parameters); | |
} | |
public function clearParameters() | |
{ | |
unset($this->parameters); | |
} | |
public function setParameters($var) | |
{ | |
GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); | |
$this->parameters = $var; | |
return $this; | |
} | |
public function getLanguageCode() | |
{ | |
return $this->language_code; | |
} | |
public function setLanguageCode($var) | |
{ | |
GPBUtil::checkString($var, True); | |
$this->language_code = $var; | |
return $this; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment