-
Notifications
You must be signed in to change notification settings - Fork 581
Expand file tree
/
Copy pathMessageModels.php
More file actions
73 lines (66 loc) · 2.6 KB
/
MessageModels.php
File metadata and controls
73 lines (66 loc) · 2.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<?php
/**
* This code was generated by
* ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
*
* Twilio - Assistants
* This is the public Twilio REST API.
*
* NOTE: This class is auto generated by OpenAPI Generator.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace Twilio\Rest\Assistants\V1\Assistant;
use Twilio\Values;
abstract class MessageModels
{
/**
* @property string $identity The unique identity of user for the session.
* @property string $sessionId The unique name for the session.
* @property string $body The query to ask the assistant.
* @property string $webhook The webhook url to call after the assistant has generated a response or report an error.
* @property string $mode one of the modes 'chat', 'email' or 'voice'
*/
public static function createAssistantsV1ServiceAssistantSendMessageRequest(array $payload = []): AssistantsV1ServiceAssistantSendMessageRequest
{
return new AssistantsV1ServiceAssistantSendMessageRequest($payload);
}
}
class AssistantsV1ServiceAssistantSendMessageRequest implements \JsonSerializable
{
/**
* @property string $identity The unique identity of user for the session.
* @property string $sessionId The unique name for the session.
* @property string $body The query to ask the assistant.
* @property string $webhook The webhook url to call after the assistant has generated a response or report an error.
* @property string $mode one of the modes 'chat', 'email' or 'voice'
*/
protected $identity;
protected $sessionId;
protected $body;
protected $webhook;
protected $mode;
public function __construct(array $payload = []) {
$this->identity = Values::array_get($payload, 'identity');
$this->sessionId = Values::array_get($payload, 'session_id');
$this->body = Values::array_get($payload, 'body');
$this->webhook = Values::array_get($payload, 'webhook');
$this->mode = Values::array_get($payload, 'mode');
}
public function toArray(): array
{
return $this->jsonSerialize();
}
public function jsonSerialize(): array
{
return [
'identity' => $this->identity,
'sessionId' => $this->sessionId,
'body' => $this->body,
'webhook' => $this->webhook,
'mode' => $this->mode
];
}
}