1 | <?php |
||
18 | class WebhookInfo extends BaseType implements TypeInterface |
||
19 | { |
||
20 | /** |
||
21 | * {@inheritdoc} |
||
22 | * |
||
23 | * @var array |
||
24 | */ |
||
25 | static protected $requiredParams = ['url', 'has_custom_certificate', 'pending_update_count']; |
||
26 | |||
27 | /** |
||
28 | * {@inheritdoc} |
||
29 | * |
||
30 | * @var array |
||
31 | */ |
||
32 | static protected $map = [ |
||
33 | 'url' => true, |
||
34 | 'has_custom_certificate' => true, |
||
35 | 'pending_update_count' => true, |
||
36 | 'last_error_date' => true, |
||
37 | 'last_error_message' => true, |
||
38 | 'max_connections' => true, |
||
39 | 'allowed_updates' => true |
||
40 | ]; |
||
41 | |||
42 | /** |
||
43 | * Webhook URL, may be empty if webhook is not set up |
||
44 | * |
||
45 | * @var string |
||
46 | */ |
||
47 | protected $url; |
||
48 | |||
49 | /** |
||
50 | * True, if a custom certificate was provided for webhook certificate checks |
||
51 | * |
||
52 | * @var bool |
||
53 | */ |
||
54 | protected $hasCustomCertificate; |
||
55 | |||
56 | /** |
||
57 | * Number of updates awaiting delivery |
||
58 | * |
||
59 | * @var int |
||
60 | */ |
||
61 | protected $pendingUpdateCount; |
||
62 | |||
63 | /** |
||
64 | * Optional. Unix time for the most recent error that happened when trying to deliver an update via webhook |
||
65 | * |
||
66 | * @var int |
||
67 | */ |
||
68 | protected $lastErrorDate; |
||
69 | |||
70 | /** |
||
71 | * Optional. Error message in human-readable format for the most recent error that happened when trying to deliver |
||
72 | * an update via webhook |
||
73 | * |
||
74 | * @var string |
||
75 | */ |
||
76 | protected $lastErrorMessage; |
||
77 | |||
78 | /** |
||
79 | * Optional. Maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery |
||
80 | * |
||
81 | * @var int |
||
82 | */ |
||
83 | protected $maxConnections; |
||
84 | |||
85 | /** |
||
86 | * Optional. A list of update types the bot is subscribed to. Defaults to all update types |
||
87 | * |
||
88 | * @var array |
||
89 | */ |
||
90 | protected $allowedUpdates; |
||
91 | |||
92 | /** |
||
93 | * @return string |
||
94 | */ |
||
95 | 1 | public function getUrl() |
|
99 | |||
100 | /** |
||
101 | * @param string $url |
||
102 | */ |
||
103 | 1 | public function setUrl($url) |
|
107 | |||
108 | /** |
||
109 | * @return bool |
||
110 | */ |
||
111 | 1 | public function hasCustomCertificate() |
|
115 | |||
116 | /** |
||
117 | * @param bool $hasCustomCertificate |
||
118 | */ |
||
119 | 1 | public function setHasCustomCertificate($hasCustomCertificate) |
|
123 | |||
124 | /** |
||
125 | * @return int |
||
126 | */ |
||
127 | 1 | public function getPendingUpdateCount() |
|
131 | |||
132 | /** |
||
133 | * @param int $pendingUpdateCount |
||
134 | */ |
||
135 | 1 | public function setPendingUpdateCount($pendingUpdateCount) |
|
139 | |||
140 | /** |
||
141 | * @return int |
||
142 | */ |
||
143 | 1 | public function getLastErrorDate() |
|
147 | |||
148 | /** |
||
149 | * @param int $lastErrorDate |
||
150 | */ |
||
151 | public function setLastErrorDate($lastErrorDate) |
||
155 | |||
156 | /** |
||
157 | * @return string |
||
158 | */ |
||
159 | 1 | public function getLastErrorMessage() |
|
163 | |||
164 | /** |
||
165 | * @param string $lastErrorMessage |
||
166 | */ |
||
167 | public function setLastErrorMessage($lastErrorMessage) |
||
171 | |||
172 | /** |
||
173 | * @return int |
||
174 | */ |
||
175 | 1 | public function getMaxConnections() |
|
179 | |||
180 | /** |
||
181 | * @param int $maxConnections |
||
182 | */ |
||
183 | 1 | public function setMaxConnections($maxConnections) |
|
187 | |||
188 | /** |
||
189 | * @return array |
||
190 | */ |
||
191 | 1 | public function getAllowedUpdates() |
|
195 | |||
196 | /** |
||
197 | * @param array $allowedUpdates |
||
198 | */ |
||
199 | public function setAllowedUpdates($allowedUpdates) |
||
203 | } |
||
204 |