1 | <?php
|
---|
2 | /*
|
---|
3 | * Copyright 2014 Google Inc.
|
---|
4 | *
|
---|
5 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
---|
6 | * use this file except in compliance with the License. You may obtain a copy of
|
---|
7 | * the License at
|
---|
8 | *
|
---|
9 | * http://www.apache.org/licenses/LICENSE-2.0
|
---|
10 | *
|
---|
11 | * Unless required by applicable law or agreed to in writing, software
|
---|
12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
---|
13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
---|
14 | * License for the specific language governing permissions and limitations under
|
---|
15 | * the License.
|
---|
16 | */
|
---|
17 |
|
---|
18 | namespace Google\Service\CloudIot;
|
---|
19 |
|
---|
20 | class Device extends \Google\Collection
|
---|
21 | {
|
---|
22 | protected $collection_key = 'credentials';
|
---|
23 | /**
|
---|
24 | * @var bool
|
---|
25 | */
|
---|
26 | public $blocked;
|
---|
27 | protected $configType = DeviceConfig::class;
|
---|
28 | protected $configDataType = '';
|
---|
29 | protected $credentialsType = DeviceCredential::class;
|
---|
30 | protected $credentialsDataType = 'array';
|
---|
31 | protected $gatewayConfigType = GatewayConfig::class;
|
---|
32 | protected $gatewayConfigDataType = '';
|
---|
33 | /**
|
---|
34 | * @var string
|
---|
35 | */
|
---|
36 | public $id;
|
---|
37 | /**
|
---|
38 | * @var string
|
---|
39 | */
|
---|
40 | public $lastConfigAckTime;
|
---|
41 | /**
|
---|
42 | * @var string
|
---|
43 | */
|
---|
44 | public $lastConfigSendTime;
|
---|
45 | protected $lastErrorStatusType = Status::class;
|
---|
46 | protected $lastErrorStatusDataType = '';
|
---|
47 | /**
|
---|
48 | * @var string
|
---|
49 | */
|
---|
50 | public $lastErrorTime;
|
---|
51 | /**
|
---|
52 | * @var string
|
---|
53 | */
|
---|
54 | public $lastEventTime;
|
---|
55 | /**
|
---|
56 | * @var string
|
---|
57 | */
|
---|
58 | public $lastHeartbeatTime;
|
---|
59 | /**
|
---|
60 | * @var string
|
---|
61 | */
|
---|
62 | public $lastStateTime;
|
---|
63 | /**
|
---|
64 | * @var string
|
---|
65 | */
|
---|
66 | public $logLevel;
|
---|
67 | /**
|
---|
68 | * @var string[]
|
---|
69 | */
|
---|
70 | public $metadata;
|
---|
71 | /**
|
---|
72 | * @var string
|
---|
73 | */
|
---|
74 | public $name;
|
---|
75 | /**
|
---|
76 | * @var string
|
---|
77 | */
|
---|
78 | public $numId;
|
---|
79 | protected $stateType = DeviceState::class;
|
---|
80 | protected $stateDataType = '';
|
---|
81 |
|
---|
82 | /**
|
---|
83 | * @param bool
|
---|
84 | */
|
---|
85 | public function setBlocked($blocked)
|
---|
86 | {
|
---|
87 | $this->blocked = $blocked;
|
---|
88 | }
|
---|
89 | /**
|
---|
90 | * @return bool
|
---|
91 | */
|
---|
92 | public function getBlocked()
|
---|
93 | {
|
---|
94 | return $this->blocked;
|
---|
95 | }
|
---|
96 | /**
|
---|
97 | * @param DeviceConfig
|
---|
98 | */
|
---|
99 | public function setConfig(DeviceConfig $config)
|
---|
100 | {
|
---|
101 | $this->config = $config;
|
---|
102 | }
|
---|
103 | /**
|
---|
104 | * @return DeviceConfig
|
---|
105 | */
|
---|
106 | public function getConfig()
|
---|
107 | {
|
---|
108 | return $this->config;
|
---|
109 | }
|
---|
110 | /**
|
---|
111 | * @param DeviceCredential[]
|
---|
112 | */
|
---|
113 | public function setCredentials($credentials)
|
---|
114 | {
|
---|
115 | $this->credentials = $credentials;
|
---|
116 | }
|
---|
117 | /**
|
---|
118 | * @return DeviceCredential[]
|
---|
119 | */
|
---|
120 | public function getCredentials()
|
---|
121 | {
|
---|
122 | return $this->credentials;
|
---|
123 | }
|
---|
124 | /**
|
---|
125 | * @param GatewayConfig
|
---|
126 | */
|
---|
127 | public function setGatewayConfig(GatewayConfig $gatewayConfig)
|
---|
128 | {
|
---|
129 | $this->gatewayConfig = $gatewayConfig;
|
---|
130 | }
|
---|
131 | /**
|
---|
132 | * @return GatewayConfig
|
---|
133 | */
|
---|
134 | public function getGatewayConfig()
|
---|
135 | {
|
---|
136 | return $this->gatewayConfig;
|
---|
137 | }
|
---|
138 | /**
|
---|
139 | * @param string
|
---|
140 | */
|
---|
141 | public function setId($id)
|
---|
142 | {
|
---|
143 | $this->id = $id;
|
---|
144 | }
|
---|
145 | /**
|
---|
146 | * @return string
|
---|
147 | */
|
---|
148 | public function getId()
|
---|
149 | {
|
---|
150 | return $this->id;
|
---|
151 | }
|
---|
152 | /**
|
---|
153 | * @param string
|
---|
154 | */
|
---|
155 | public function setLastConfigAckTime($lastConfigAckTime)
|
---|
156 | {
|
---|
157 | $this->lastConfigAckTime = $lastConfigAckTime;
|
---|
158 | }
|
---|
159 | /**
|
---|
160 | * @return string
|
---|
161 | */
|
---|
162 | public function getLastConfigAckTime()
|
---|
163 | {
|
---|
164 | return $this->lastConfigAckTime;
|
---|
165 | }
|
---|
166 | /**
|
---|
167 | * @param string
|
---|
168 | */
|
---|
169 | public function setLastConfigSendTime($lastConfigSendTime)
|
---|
170 | {
|
---|
171 | $this->lastConfigSendTime = $lastConfigSendTime;
|
---|
172 | }
|
---|
173 | /**
|
---|
174 | * @return string
|
---|
175 | */
|
---|
176 | public function getLastConfigSendTime()
|
---|
177 | {
|
---|
178 | return $this->lastConfigSendTime;
|
---|
179 | }
|
---|
180 | /**
|
---|
181 | * @param Status
|
---|
182 | */
|
---|
183 | public function setLastErrorStatus(Status $lastErrorStatus)
|
---|
184 | {
|
---|
185 | $this->lastErrorStatus = $lastErrorStatus;
|
---|
186 | }
|
---|
187 | /**
|
---|
188 | * @return Status
|
---|
189 | */
|
---|
190 | public function getLastErrorStatus()
|
---|
191 | {
|
---|
192 | return $this->lastErrorStatus;
|
---|
193 | }
|
---|
194 | /**
|
---|
195 | * @param string
|
---|
196 | */
|
---|
197 | public function setLastErrorTime($lastErrorTime)
|
---|
198 | {
|
---|
199 | $this->lastErrorTime = $lastErrorTime;
|
---|
200 | }
|
---|
201 | /**
|
---|
202 | * @return string
|
---|
203 | */
|
---|
204 | public function getLastErrorTime()
|
---|
205 | {
|
---|
206 | return $this->lastErrorTime;
|
---|
207 | }
|
---|
208 | /**
|
---|
209 | * @param string
|
---|
210 | */
|
---|
211 | public function setLastEventTime($lastEventTime)
|
---|
212 | {
|
---|
213 | $this->lastEventTime = $lastEventTime;
|
---|
214 | }
|
---|
215 | /**
|
---|
216 | * @return string
|
---|
217 | */
|
---|
218 | public function getLastEventTime()
|
---|
219 | {
|
---|
220 | return $this->lastEventTime;
|
---|
221 | }
|
---|
222 | /**
|
---|
223 | * @param string
|
---|
224 | */
|
---|
225 | public function setLastHeartbeatTime($lastHeartbeatTime)
|
---|
226 | {
|
---|
227 | $this->lastHeartbeatTime = $lastHeartbeatTime;
|
---|
228 | }
|
---|
229 | /**
|
---|
230 | * @return string
|
---|
231 | */
|
---|
232 | public function getLastHeartbeatTime()
|
---|
233 | {
|
---|
234 | return $this->lastHeartbeatTime;
|
---|
235 | }
|
---|
236 | /**
|
---|
237 | * @param string
|
---|
238 | */
|
---|
239 | public function setLastStateTime($lastStateTime)
|
---|
240 | {
|
---|
241 | $this->lastStateTime = $lastStateTime;
|
---|
242 | }
|
---|
243 | /**
|
---|
244 | * @return string
|
---|
245 | */
|
---|
246 | public function getLastStateTime()
|
---|
247 | {
|
---|
248 | return $this->lastStateTime;
|
---|
249 | }
|
---|
250 | /**
|
---|
251 | * @param string
|
---|
252 | */
|
---|
253 | public function setLogLevel($logLevel)
|
---|
254 | {
|
---|
255 | $this->logLevel = $logLevel;
|
---|
256 | }
|
---|
257 | /**
|
---|
258 | * @return string
|
---|
259 | */
|
---|
260 | public function getLogLevel()
|
---|
261 | {
|
---|
262 | return $this->logLevel;
|
---|
263 | }
|
---|
264 | /**
|
---|
265 | * @param string[]
|
---|
266 | */
|
---|
267 | public function setMetadata($metadata)
|
---|
268 | {
|
---|
269 | $this->metadata = $metadata;
|
---|
270 | }
|
---|
271 | /**
|
---|
272 | * @return string[]
|
---|
273 | */
|
---|
274 | public function getMetadata()
|
---|
275 | {
|
---|
276 | return $this->metadata;
|
---|
277 | }
|
---|
278 | /**
|
---|
279 | * @param string
|
---|
280 | */
|
---|
281 | public function setName($name)
|
---|
282 | {
|
---|
283 | $this->name = $name;
|
---|
284 | }
|
---|
285 | /**
|
---|
286 | * @return string
|
---|
287 | */
|
---|
288 | public function getName()
|
---|
289 | {
|
---|
290 | return $this->name;
|
---|
291 | }
|
---|
292 | /**
|
---|
293 | * @param string
|
---|
294 | */
|
---|
295 | public function setNumId($numId)
|
---|
296 | {
|
---|
297 | $this->numId = $numId;
|
---|
298 | }
|
---|
299 | /**
|
---|
300 | * @return string
|
---|
301 | */
|
---|
302 | public function getNumId()
|
---|
303 | {
|
---|
304 | return $this->numId;
|
---|
305 | }
|
---|
306 | /**
|
---|
307 | * @param DeviceState
|
---|
308 | */
|
---|
309 | public function setState(DeviceState $state)
|
---|
310 | {
|
---|
311 | $this->state = $state;
|
---|
312 | }
|
---|
313 | /**
|
---|
314 | * @return DeviceState
|
---|
315 | */
|
---|
316 | public function getState()
|
---|
317 | {
|
---|
318 | return $this->state;
|
---|
319 | }
|
---|
320 | }
|
---|
321 |
|
---|
322 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
323 | class_alias(Device::class, 'Google_Service_CloudIot_Device');
|
---|