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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
|
<?php
class Services_Twilio_Auth_IpMessagingGrant implements Services_Twilio_Auth_Grant { private $serviceSid; private $endpointId; private $deploymentRoleSid; private $pushCredentialSid;
/** * Returns the service sid * * @return string the service sid */ public function getServiceSid() { return $this->serviceSid; }
/** * Set the service sid of this grant * * @param string $serviceSid service sid of the grant * * @return Services_Twilio_Auth_IpMessagingGrant updated grant */ public function setServiceSid($serviceSid) { $this->serviceSid = $serviceSid; return $this; }
/** * Returns the endpoint id of the grant * * @return string the endpoint id */ public function getEndpointId() { return $this->endpointId; }
/** * Set the endpoint id of the grant * * @param string $endpointId endpoint id of the grant * * @return Services_Twilio_Auth_IpMessagingGrant updated grant */ public function setEndpointId($endpointId) { $this->endpointId = $endpointId; return $this; }
/** * Returns the deployment role sid of the grant * * @return string the deployment role sid */ public function getDeploymentRoleSid() { return $this->deploymentRoleSid; }
/** * Set the role sid of the grant * * @param string $deploymentRoleSid role sid of the grant * * @return Services_Twilio_Auth_IpMessagingGrant updated grant */ public function setDeploymentRoleSid($deploymentRoleSid) { $this->deploymentRoleSid = $deploymentRoleSid; return $this; }
/** * Returns the push credential sid of the grant * * @return string the push credential sid */ public function getPushCredentialSid() { return $this->pushCredentialSid; }
/** * Set the credential sid of the grant * * @param string $pushCredentialSid push credential sid of the grant * * @return Services_Twilio_Auth_IpMessagingGrant updated grant */ public function setPushCredentialSid($pushCredentialSid) { $this->pushCredentialSid = $pushCredentialSid; return $this; }
/** * Returns the grant type * * @return string type of the grant */ public function getGrantKey() { return "ip_messaging"; }
/** * Returns the grant data * * @return array data of the grant */ public function getPayload() { $payload = array(); if ($this->serviceSid) { $payload['service_sid'] = $this->serviceSid; } if ($this->endpointId) { $payload['endpoint_id'] = $this->endpointId; } if ($this->deploymentRoleSid) { $payload['deployment_role_sid'] = $this->deploymentRoleSid; } if ($this->pushCredentialSid) { $payload['push_credential_sid'] = $this->pushCredentialSid; }
return $payload; }
}
|