OLD | NEW |
1 // This is a generated file (see the discoveryapis_generator project). | 1 // This is a generated file (see the discoveryapis_generator project). |
2 | 2 |
3 library googleapis.androiddeviceprovisioning.v1; | 3 library googleapis.androiddeviceprovisioning.v1; |
4 | 4 |
5 import 'dart:core' as core; | 5 import 'dart:core' as core; |
6 import 'dart:async' as async; | 6 import 'dart:async' as async; |
7 import 'dart:convert' as convert; | 7 import 'dart:convert' as convert; |
8 | 8 |
9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; | 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
10 import 'package:http/http.dart' as http; | 10 import 'package:http/http.dart' as http; |
11 | 11 |
12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show | 12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' |
13 ApiRequestError, DetailedApiRequestError; | 13 show ApiRequestError, DetailedApiRequestError; |
14 | 14 |
15 const core.String USER_AGENT = 'dart-api-client androiddeviceprovisioning/v1'; | 15 const core.String USER_AGENT = 'dart-api-client androiddeviceprovisioning/v1'; |
16 | 16 |
17 /** | 17 /// Automates reseller integration into Zero Touch Provisioning by assigning |
18 * Automates reseller integration into Zero Touch Provisioning by assigning | 18 /// devices to customers and creating device reports. |
19 * devices to customers and creating device reports. | |
20 */ | |
21 class AndroiddeviceprovisioningApi { | 19 class AndroiddeviceprovisioningApi { |
22 | |
23 final commons.ApiRequester _requester; | 20 final commons.ApiRequester _requester; |
24 | 21 |
25 OperationsResourceApi get operations => new OperationsResourceApi(_requester); | 22 OperationsResourceApi get operations => new OperationsResourceApi(_requester); |
26 PartnersResourceApi get partners => new PartnersResourceApi(_requester); | 23 PartnersResourceApi get partners => new PartnersResourceApi(_requester); |
27 | 24 |
28 AndroiddeviceprovisioningApi(http.Client client, {core.String rootUrl: "https:
//androiddeviceprovisioning.googleapis.com/", core.String servicePath: ""}) : | 25 AndroiddeviceprovisioningApi(http.Client client, |
29 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); | 26 {core.String rootUrl: "https://androiddeviceprovisioning.googleapis.com/", |
| 27 core.String servicePath: ""}) |
| 28 : _requester = |
| 29 new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT); |
30 } | 30 } |
31 | 31 |
32 | |
33 class OperationsResourceApi { | 32 class OperationsResourceApi { |
34 final commons.ApiRequester _requester; | 33 final commons.ApiRequester _requester; |
35 | 34 |
36 OperationsResourceApi(commons.ApiRequester client) : | 35 OperationsResourceApi(commons.ApiRequester client) : _requester = client; |
37 _requester = client; | |
38 | 36 |
39 /** | 37 /// Gets the latest state of a long-running operation. Clients can use this |
40 * Gets the latest state of a long-running operation. Clients can use this | 38 /// method to poll the operation result at intervals as recommended by the |
41 * method to poll the operation result at intervals as recommended by the API | 39 /// API |
42 * service. | 40 /// service. |
43 * | 41 /// |
44 * Request parameters: | 42 /// Request parameters: |
45 * | 43 /// |
46 * [name] - The name of the operation resource. | 44 /// [name] - The name of the operation resource. |
47 * Value must have pattern "^operations/.+$". | 45 /// Value must have pattern "^operations/.+$". |
48 * | 46 /// |
49 * Completes with a [Operation]. | 47 /// Completes with a [Operation]. |
50 * | 48 /// |
51 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 49 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
52 * error. | 50 /// an error. |
53 * | 51 /// |
54 * If the used [http.Client] completes with an error when making a REST call, | 52 /// If the used [http.Client] completes with an error when making a REST |
55 * this method will complete with the same error. | 53 /// call, this method will complete with the same error. |
56 */ | |
57 async.Future<Operation> get(core.String name) { | 54 async.Future<Operation> get(core.String name) { |
58 var _url = null; | 55 var _url = null; |
59 var _queryParams = new core.Map(); | 56 var _queryParams = new core.Map(); |
60 var _uploadMedia = null; | 57 var _uploadMedia = null; |
61 var _uploadOptions = null; | 58 var _uploadOptions = null; |
62 var _downloadOptions = commons.DownloadOptions.Metadata; | 59 var _downloadOptions = commons.DownloadOptions.Metadata; |
63 var _body = null; | 60 var _body = null; |
64 | 61 |
65 if (name == null) { | 62 if (name == null) { |
66 throw new core.ArgumentError("Parameter name is required."); | 63 throw new core.ArgumentError("Parameter name is required."); |
67 } | 64 } |
68 | 65 |
69 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name'); | 66 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name'); |
70 | 67 |
71 var _response = _requester.request(_url, | 68 var _response = _requester.request(_url, "GET", |
72 "GET", | 69 body: _body, |
73 body: _body, | 70 queryParams: _queryParams, |
74 queryParams: _queryParams, | 71 uploadOptions: _uploadOptions, |
75 uploadOptions: _uploadOptions, | 72 uploadMedia: _uploadMedia, |
76 uploadMedia: _uploadMedia, | 73 downloadOptions: _downloadOptions); |
77 downloadOptions: _downloadOptions); | |
78 return _response.then((data) => new Operation.fromJson(data)); | 74 return _response.then((data) => new Operation.fromJson(data)); |
79 } | 75 } |
80 | |
81 } | 76 } |
82 | 77 |
83 | |
84 class PartnersResourceApi { | 78 class PartnersResourceApi { |
85 final commons.ApiRequester _requester; | 79 final commons.ApiRequester _requester; |
86 | 80 |
87 PartnersCustomersResourceApi get customers => new PartnersCustomersResourceApi
(_requester); | 81 PartnersCustomersResourceApi get customers => |
88 PartnersDevicesResourceApi get devices => new PartnersDevicesResourceApi(_requ
ester); | 82 new PartnersCustomersResourceApi(_requester); |
| 83 PartnersDevicesResourceApi get devices => |
| 84 new PartnersDevicesResourceApi(_requester); |
89 | 85 |
90 PartnersResourceApi(commons.ApiRequester client) : | 86 PartnersResourceApi(commons.ApiRequester client) : _requester = client; |
91 _requester = client; | |
92 } | 87 } |
93 | 88 |
94 | |
95 class PartnersCustomersResourceApi { | 89 class PartnersCustomersResourceApi { |
96 final commons.ApiRequester _requester; | 90 final commons.ApiRequester _requester; |
97 | 91 |
98 PartnersCustomersResourceApi(commons.ApiRequester client) : | 92 PartnersCustomersResourceApi(commons.ApiRequester client) |
99 _requester = client; | 93 : _requester = client; |
100 | 94 |
101 /** | 95 /// A customer for Zero Touch Provisioning will be created. |
102 * List all the customers that has delegates some role to this customer. | 96 /// After a Customer is created, their admins and owners will be able to |
103 * | 97 /// manage |
104 * Request parameters: | 98 /// devices on partner.android.com/zerotouch or via their API. |
105 * | 99 /// |
106 * [partnerId] - the id of the partner. | 100 /// [request] - The metadata request object. |
107 * Value must have pattern "^[^/]+$". | 101 /// |
108 * | 102 /// Request parameters: |
109 * Completes with a [ListCustomersResponse]. | 103 /// |
110 * | 104 /// [parent] - The parent resource in format `partners/[PARTNER_ID]'. |
111 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 105 /// Value must have pattern "^partners/[^/]+$". |
112 * error. | 106 /// |
113 * | 107 /// Completes with a [Company]. |
114 * If the used [http.Client] completes with an error when making a REST call, | 108 /// |
115 * this method will complete with the same error. | 109 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
116 */ | 110 /// an error. |
| 111 /// |
| 112 /// If the used [http.Client] completes with an error when making a REST |
| 113 /// call, this method will complete with the same error. |
| 114 async.Future<Company> create( |
| 115 CreateCustomerRequest request, core.String parent) { |
| 116 var _url = null; |
| 117 var _queryParams = new core.Map(); |
| 118 var _uploadMedia = null; |
| 119 var _uploadOptions = null; |
| 120 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 121 var _body = null; |
| 122 |
| 123 if (request != null) { |
| 124 _body = convert.JSON.encode((request).toJson()); |
| 125 } |
| 126 if (parent == null) { |
| 127 throw new core.ArgumentError("Parameter parent is required."); |
| 128 } |
| 129 |
| 130 _url = |
| 131 'v1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/customers'; |
| 132 |
| 133 var _response = _requester.request(_url, "POST", |
| 134 body: _body, |
| 135 queryParams: _queryParams, |
| 136 uploadOptions: _uploadOptions, |
| 137 uploadMedia: _uploadMedia, |
| 138 downloadOptions: _downloadOptions); |
| 139 return _response.then((data) => new Company.fromJson(data)); |
| 140 } |
| 141 |
| 142 /// List the customers that are enrolled to the reseller identified by the |
| 143 /// `partnerId` argument. This list includes customers that the reseller |
| 144 /// created and customers that enrolled themselves using the portal. |
| 145 /// |
| 146 /// Request parameters: |
| 147 /// |
| 148 /// [partnerId] - The ID of the partner. |
| 149 /// Value must have pattern "^[^/]+$". |
| 150 /// |
| 151 /// Completes with a [ListCustomersResponse]. |
| 152 /// |
| 153 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 154 /// an error. |
| 155 /// |
| 156 /// If the used [http.Client] completes with an error when making a REST |
| 157 /// call, this method will complete with the same error. |
117 async.Future<ListCustomersResponse> list(core.String partnerId) { | 158 async.Future<ListCustomersResponse> list(core.String partnerId) { |
118 var _url = null; | 159 var _url = null; |
119 var _queryParams = new core.Map(); | 160 var _queryParams = new core.Map(); |
120 var _uploadMedia = null; | 161 var _uploadMedia = null; |
121 var _uploadOptions = null; | 162 var _uploadOptions = null; |
122 var _downloadOptions = commons.DownloadOptions.Metadata; | 163 var _downloadOptions = commons.DownloadOptions.Metadata; |
123 var _body = null; | 164 var _body = null; |
124 | 165 |
125 if (partnerId == null) { | 166 if (partnerId == null) { |
126 throw new core.ArgumentError("Parameter partnerId is required."); | 167 throw new core.ArgumentError("Parameter partnerId is required."); |
127 } | 168 } |
128 | 169 |
129 _url = 'v1/partners/' + commons.Escaper.ecapeVariableReserved('$partnerId')
+ '/customers'; | 170 _url = 'v1/partners/' + |
| 171 commons.Escaper.ecapeVariableReserved('$partnerId') + |
| 172 '/customers'; |
130 | 173 |
131 var _response = _requester.request(_url, | 174 var _response = _requester.request(_url, "GET", |
132 "GET", | 175 body: _body, |
133 body: _body, | 176 queryParams: _queryParams, |
134 queryParams: _queryParams, | 177 uploadOptions: _uploadOptions, |
135 uploadOptions: _uploadOptions, | 178 uploadMedia: _uploadMedia, |
136 uploadMedia: _uploadMedia, | 179 downloadOptions: _downloadOptions); |
137 downloadOptions: _downloadOptions); | |
138 return _response.then((data) => new ListCustomersResponse.fromJson(data)); | 180 return _response.then((data) => new ListCustomersResponse.fromJson(data)); |
139 } | 181 } |
140 | |
141 } | 182 } |
142 | 183 |
143 | |
144 class PartnersDevicesResourceApi { | 184 class PartnersDevicesResourceApi { |
145 final commons.ApiRequester _requester; | 185 final commons.ApiRequester _requester; |
146 | 186 |
147 PartnersDevicesResourceApi(commons.ApiRequester client) : | 187 PartnersDevicesResourceApi(commons.ApiRequester client) : _requester = client; |
148 _requester = client; | |
149 | 188 |
150 /** | 189 /// Claim the device identified by device identifier. |
151 * Claim the device identified by device identifier. | 190 /// |
152 * | 191 /// [request] - The metadata request object. |
153 * [request] - The metadata request object. | 192 /// |
154 * | 193 /// Request parameters: |
155 * Request parameters: | 194 /// |
156 * | 195 /// [partnerId] - ID of the partner. |
157 * [partnerId] - Id of the partner. | 196 /// Value must have pattern "^[^/]+$". |
158 * Value must have pattern "^[^/]+$". | 197 /// |
159 * | 198 /// Completes with a [ClaimDeviceResponse]. |
160 * Completes with a [ClaimDeviceResponse]. | 199 /// |
161 * | 200 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
162 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 201 /// an error. |
163 * error. | 202 /// |
164 * | 203 /// If the used [http.Client] completes with an error when making a REST |
165 * If the used [http.Client] completes with an error when making a REST call, | 204 /// call, this method will complete with the same error. |
166 * this method will complete with the same error. | 205 async.Future<ClaimDeviceResponse> claim( |
167 */ | 206 ClaimDeviceRequest request, core.String partnerId) { |
168 async.Future<ClaimDeviceResponse> claim(ClaimDeviceRequest request, core.Strin
g partnerId) { | |
169 var _url = null; | 207 var _url = null; |
170 var _queryParams = new core.Map(); | 208 var _queryParams = new core.Map(); |
171 var _uploadMedia = null; | 209 var _uploadMedia = null; |
172 var _uploadOptions = null; | 210 var _uploadOptions = null; |
173 var _downloadOptions = commons.DownloadOptions.Metadata; | 211 var _downloadOptions = commons.DownloadOptions.Metadata; |
174 var _body = null; | 212 var _body = null; |
175 | 213 |
176 if (request != null) { | 214 if (request != null) { |
177 _body = convert.JSON.encode((request).toJson()); | 215 _body = convert.JSON.encode((request).toJson()); |
178 } | 216 } |
179 if (partnerId == null) { | 217 if (partnerId == null) { |
180 throw new core.ArgumentError("Parameter partnerId is required."); | 218 throw new core.ArgumentError("Parameter partnerId is required."); |
181 } | 219 } |
182 | 220 |
183 _url = 'v1/partners/' + commons.Escaper.ecapeVariableReserved('$partnerId')
+ '/devices:claim'; | 221 _url = 'v1/partners/' + |
| 222 commons.Escaper.ecapeVariableReserved('$partnerId') + |
| 223 '/devices:claim'; |
184 | 224 |
185 var _response = _requester.request(_url, | 225 var _response = _requester.request(_url, "POST", |
186 "POST", | 226 body: _body, |
187 body: _body, | 227 queryParams: _queryParams, |
188 queryParams: _queryParams, | 228 uploadOptions: _uploadOptions, |
189 uploadOptions: _uploadOptions, | 229 uploadMedia: _uploadMedia, |
190 uploadMedia: _uploadMedia, | 230 downloadOptions: _downloadOptions); |
191 downloadOptions: _downloadOptions); | |
192 return _response.then((data) => new ClaimDeviceResponse.fromJson(data)); | 231 return _response.then((data) => new ClaimDeviceResponse.fromJson(data)); |
193 } | 232 } |
194 | 233 |
195 /** | 234 /// Claim devices asynchronously. |
196 * Claim devices asynchronously | 235 /// |
197 * | 236 /// [request] - The metadata request object. |
198 * [request] - The metadata request object. | 237 /// |
199 * | 238 /// Request parameters: |
200 * Request parameters: | 239 /// |
201 * | 240 /// [partnerId] - Partner ID. |
202 * [partnerId] - partner id. | 241 /// Value must have pattern "^[^/]+$". |
203 * Value must have pattern "^[^/]+$". | 242 /// |
204 * | 243 /// Completes with a [Operation]. |
205 * Completes with a [Operation]. | 244 /// |
206 * | 245 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
207 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 246 /// an error. |
208 * error. | 247 /// |
209 * | 248 /// If the used [http.Client] completes with an error when making a REST |
210 * If the used [http.Client] completes with an error when making a REST call, | 249 /// call, this method will complete with the same error. |
211 * this method will complete with the same error. | 250 async.Future<Operation> claimAsync( |
212 */ | 251 ClaimDevicesRequest request, core.String partnerId) { |
213 async.Future<Operation> claimAsync(ClaimDevicesRequest request, core.String pa
rtnerId) { | |
214 var _url = null; | 252 var _url = null; |
215 var _queryParams = new core.Map(); | 253 var _queryParams = new core.Map(); |
216 var _uploadMedia = null; | 254 var _uploadMedia = null; |
217 var _uploadOptions = null; | 255 var _uploadOptions = null; |
218 var _downloadOptions = commons.DownloadOptions.Metadata; | 256 var _downloadOptions = commons.DownloadOptions.Metadata; |
219 var _body = null; | 257 var _body = null; |
220 | 258 |
221 if (request != null) { | 259 if (request != null) { |
222 _body = convert.JSON.encode((request).toJson()); | 260 _body = convert.JSON.encode((request).toJson()); |
223 } | 261 } |
224 if (partnerId == null) { | 262 if (partnerId == null) { |
225 throw new core.ArgumentError("Parameter partnerId is required."); | 263 throw new core.ArgumentError("Parameter partnerId is required."); |
226 } | 264 } |
227 | 265 |
228 _url = 'v1/partners/' + commons.Escaper.ecapeVariableReserved('$partnerId')
+ '/devices:claimAsync'; | 266 _url = 'v1/partners/' + |
| 267 commons.Escaper.ecapeVariableReserved('$partnerId') + |
| 268 '/devices:claimAsync'; |
229 | 269 |
230 var _response = _requester.request(_url, | 270 var _response = _requester.request(_url, "POST", |
231 "POST", | 271 body: _body, |
232 body: _body, | 272 queryParams: _queryParams, |
233 queryParams: _queryParams, | 273 uploadOptions: _uploadOptions, |
234 uploadOptions: _uploadOptions, | 274 uploadMedia: _uploadMedia, |
235 uploadMedia: _uploadMedia, | 275 downloadOptions: _downloadOptions); |
236 downloadOptions: _downloadOptions); | |
237 return _response.then((data) => new Operation.fromJson(data)); | 276 return _response.then((data) => new Operation.fromJson(data)); |
238 } | 277 } |
239 | 278 |
240 /** | 279 /// Find devices by device identifier. |
241 * Find devices by device identifier. | 280 /// |
242 * | 281 /// [request] - The metadata request object. |
243 * [request] - The metadata request object. | 282 /// |
244 * | 283 /// Request parameters: |
245 * Request parameters: | 284 /// |
246 * | 285 /// [partnerId] - ID of the partner. |
247 * [partnerId] - id of the partner. | 286 /// Value must have pattern "^[^/]+$". |
248 * Value must have pattern "^[^/]+$". | 287 /// |
249 * | 288 /// Completes with a [FindDevicesByDeviceIdentifierResponse]. |
250 * Completes with a [FindDevicesByDeviceIdentifierResponse]. | 289 /// |
251 * | 290 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
252 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 291 /// an error. |
253 * error. | 292 /// |
254 * | 293 /// If the used [http.Client] completes with an error when making a REST |
255 * If the used [http.Client] completes with an error when making a REST call, | 294 /// call, this method will complete with the same error. |
256 * this method will complete with the same error. | 295 async.Future<FindDevicesByDeviceIdentifierResponse> findByIdentifier( |
257 */ | 296 FindDevicesByDeviceIdentifierRequest request, core.String partnerId) { |
258 async.Future<FindDevicesByDeviceIdentifierResponse> findByIdentifier(FindDevic
esByDeviceIdentifierRequest request, core.String partnerId) { | |
259 var _url = null; | 297 var _url = null; |
260 var _queryParams = new core.Map(); | 298 var _queryParams = new core.Map(); |
261 var _uploadMedia = null; | 299 var _uploadMedia = null; |
262 var _uploadOptions = null; | 300 var _uploadOptions = null; |
263 var _downloadOptions = commons.DownloadOptions.Metadata; | 301 var _downloadOptions = commons.DownloadOptions.Metadata; |
264 var _body = null; | 302 var _body = null; |
265 | 303 |
266 if (request != null) { | 304 if (request != null) { |
267 _body = convert.JSON.encode((request).toJson()); | 305 _body = convert.JSON.encode((request).toJson()); |
268 } | 306 } |
269 if (partnerId == null) { | 307 if (partnerId == null) { |
270 throw new core.ArgumentError("Parameter partnerId is required."); | 308 throw new core.ArgumentError("Parameter partnerId is required."); |
271 } | 309 } |
272 | 310 |
273 _url = 'v1/partners/' + commons.Escaper.ecapeVariableReserved('$partnerId')
+ '/devices:findByIdentifier'; | 311 _url = 'v1/partners/' + |
| 312 commons.Escaper.ecapeVariableReserved('$partnerId') + |
| 313 '/devices:findByIdentifier'; |
274 | 314 |
275 var _response = _requester.request(_url, | 315 var _response = _requester.request(_url, "POST", |
276 "POST", | 316 body: _body, |
277 body: _body, | 317 queryParams: _queryParams, |
278 queryParams: _queryParams, | 318 uploadOptions: _uploadOptions, |
279 uploadOptions: _uploadOptions, | 319 uploadMedia: _uploadMedia, |
280 uploadMedia: _uploadMedia, | 320 downloadOptions: _downloadOptions); |
281 downloadOptions: _downloadOptions); | 321 return _response.then( |
282 return _response.then((data) => new FindDevicesByDeviceIdentifierResponse.fr
omJson(data)); | 322 (data) => new FindDevicesByDeviceIdentifierResponse.fromJson(data)); |
283 } | 323 } |
284 | 324 |
285 /** | 325 /// Find devices by ownership. |
286 * Find devices by ownership. | 326 /// |
287 * | 327 /// [request] - The metadata request object. |
288 * [request] - The metadata request object. | 328 /// |
289 * | 329 /// Request parameters: |
290 * Request parameters: | 330 /// |
291 * | 331 /// [partnerId] - ID of the partner. |
292 * [partnerId] - id of the partner. | 332 /// Value must have pattern "^[^/]+$". |
293 * Value must have pattern "^[^/]+$". | 333 /// |
294 * | 334 /// Completes with a [FindDevicesByOwnerResponse]. |
295 * Completes with a [FindDevicesByOwnerResponse]. | 335 /// |
296 * | 336 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
297 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 337 /// an error. |
298 * error. | 338 /// |
299 * | 339 /// If the used [http.Client] completes with an error when making a REST |
300 * If the used [http.Client] completes with an error when making a REST call, | 340 /// call, this method will complete with the same error. |
301 * this method will complete with the same error. | 341 async.Future<FindDevicesByOwnerResponse> findByOwner( |
302 */ | 342 FindDevicesByOwnerRequest request, core.String partnerId) { |
303 async.Future<FindDevicesByOwnerResponse> findByOwner(FindDevicesByOwnerRequest
request, core.String partnerId) { | |
304 var _url = null; | 343 var _url = null; |
305 var _queryParams = new core.Map(); | 344 var _queryParams = new core.Map(); |
306 var _uploadMedia = null; | 345 var _uploadMedia = null; |
307 var _uploadOptions = null; | 346 var _uploadOptions = null; |
308 var _downloadOptions = commons.DownloadOptions.Metadata; | 347 var _downloadOptions = commons.DownloadOptions.Metadata; |
309 var _body = null; | 348 var _body = null; |
310 | 349 |
311 if (request != null) { | 350 if (request != null) { |
312 _body = convert.JSON.encode((request).toJson()); | 351 _body = convert.JSON.encode((request).toJson()); |
313 } | 352 } |
314 if (partnerId == null) { | 353 if (partnerId == null) { |
315 throw new core.ArgumentError("Parameter partnerId is required."); | 354 throw new core.ArgumentError("Parameter partnerId is required."); |
316 } | 355 } |
317 | 356 |
318 _url = 'v1/partners/' + commons.Escaper.ecapeVariableReserved('$partnerId')
+ '/devices:findByOwner'; | 357 _url = 'v1/partners/' + |
| 358 commons.Escaper.ecapeVariableReserved('$partnerId') + |
| 359 '/devices:findByOwner'; |
319 | 360 |
320 var _response = _requester.request(_url, | 361 var _response = _requester.request(_url, "POST", |
321 "POST", | 362 body: _body, |
322 body: _body, | 363 queryParams: _queryParams, |
323 queryParams: _queryParams, | 364 uploadOptions: _uploadOptions, |
324 uploadOptions: _uploadOptions, | 365 uploadMedia: _uploadMedia, |
325 uploadMedia: _uploadMedia, | 366 downloadOptions: _downloadOptions); |
326 downloadOptions: _downloadOptions); | 367 return _response |
327 return _response.then((data) => new FindDevicesByOwnerResponse.fromJson(data
)); | 368 .then((data) => new FindDevicesByOwnerResponse.fromJson(data)); |
328 } | 369 } |
329 | 370 |
330 /** | 371 /// Get a device. |
331 * Get a device | 372 /// |
332 * | 373 /// Request parameters: |
333 * Request parameters: | 374 /// |
334 * | 375 /// [name] - Resource name in `partners/[PARTNER_ID]/devices/[DEVICE_ID]`. |
335 * [name] - resource name in 'partners/[PARTNER_ID]/devices/[DEVICE_ID]'. | 376 /// Value must have pattern "^partners/[^/]+/devices/[^/]+$". |
336 * Value must have pattern "^partners/[^/]+/devices/[^/]+$". | 377 /// |
337 * | 378 /// Completes with a [Device]. |
338 * Completes with a [Device]. | 379 /// |
339 * | 380 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
340 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 381 /// an error. |
341 * error. | 382 /// |
342 * | 383 /// If the used [http.Client] completes with an error when making a REST |
343 * If the used [http.Client] completes with an error when making a REST call, | 384 /// call, this method will complete with the same error. |
344 * this method will complete with the same error. | |
345 */ | |
346 async.Future<Device> get(core.String name) { | 385 async.Future<Device> get(core.String name) { |
347 var _url = null; | 386 var _url = null; |
348 var _queryParams = new core.Map(); | 387 var _queryParams = new core.Map(); |
349 var _uploadMedia = null; | 388 var _uploadMedia = null; |
350 var _uploadOptions = null; | 389 var _uploadOptions = null; |
351 var _downloadOptions = commons.DownloadOptions.Metadata; | 390 var _downloadOptions = commons.DownloadOptions.Metadata; |
352 var _body = null; | 391 var _body = null; |
353 | 392 |
354 if (name == null) { | 393 if (name == null) { |
355 throw new core.ArgumentError("Parameter name is required."); | 394 throw new core.ArgumentError("Parameter name is required."); |
356 } | 395 } |
357 | 396 |
358 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name'); | 397 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name'); |
359 | 398 |
360 var _response = _requester.request(_url, | 399 var _response = _requester.request(_url, "GET", |
361 "GET", | 400 body: _body, |
362 body: _body, | 401 queryParams: _queryParams, |
363 queryParams: _queryParams, | 402 uploadOptions: _uploadOptions, |
364 uploadOptions: _uploadOptions, | 403 uploadMedia: _uploadMedia, |
365 uploadMedia: _uploadMedia, | 404 downloadOptions: _downloadOptions); |
366 downloadOptions: _downloadOptions); | |
367 return _response.then((data) => new Device.fromJson(data)); | 405 return _response.then((data) => new Device.fromJson(data)); |
368 } | 406 } |
369 | 407 |
370 /** | 408 /// Update the metadata. |
371 * Update the metadata | 409 /// |
372 * | 410 /// [request] - The metadata request object. |
373 * [request] - The metadata request object. | 411 /// |
374 * | 412 /// Request parameters: |
375 * Request parameters: | 413 /// |
376 * | 414 /// [metadataOwnerId] - The owner of the newly set metadata. Set this to the |
377 * [metadataOwnerId] - The owner of the newly set metadata. Should be partner | 415 /// partner ID. |
378 * id itself. | 416 /// Value must have pattern "^[^/]+$". |
379 * Value must have pattern "^[^/]+$". | 417 /// |
380 * | 418 /// [deviceId] - ID of the partner. |
381 * [deviceId] - id of the partner. | 419 /// Value must have pattern "^[^/]+$". |
382 * Value must have pattern "^[^/]+$". | 420 /// |
383 * | 421 /// Completes with a [DeviceMetadata]. |
384 * Completes with a [DeviceMetadata]. | 422 /// |
385 * | 423 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
386 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 424 /// an error. |
387 * error. | 425 /// |
388 * | 426 /// If the used [http.Client] completes with an error when making a REST |
389 * If the used [http.Client] completes with an error when making a REST call, | 427 /// call, this method will complete with the same error. |
390 * this method will complete with the same error. | 428 async.Future<DeviceMetadata> metadata(UpdateDeviceMetadataRequest request, |
391 */ | 429 core.String metadataOwnerId, core.String deviceId) { |
392 async.Future<DeviceMetadata> metadata(UpdateDeviceMetadataRequest request, cor
e.String metadataOwnerId, core.String deviceId) { | |
393 var _url = null; | 430 var _url = null; |
394 var _queryParams = new core.Map(); | 431 var _queryParams = new core.Map(); |
395 var _uploadMedia = null; | 432 var _uploadMedia = null; |
396 var _uploadOptions = null; | 433 var _uploadOptions = null; |
397 var _downloadOptions = commons.DownloadOptions.Metadata; | 434 var _downloadOptions = commons.DownloadOptions.Metadata; |
398 var _body = null; | 435 var _body = null; |
399 | 436 |
400 if (request != null) { | 437 if (request != null) { |
401 _body = convert.JSON.encode((request).toJson()); | 438 _body = convert.JSON.encode((request).toJson()); |
402 } | 439 } |
403 if (metadataOwnerId == null) { | 440 if (metadataOwnerId == null) { |
404 throw new core.ArgumentError("Parameter metadataOwnerId is required."); | 441 throw new core.ArgumentError("Parameter metadataOwnerId is required."); |
405 } | 442 } |
406 if (deviceId == null) { | 443 if (deviceId == null) { |
407 throw new core.ArgumentError("Parameter deviceId is required."); | 444 throw new core.ArgumentError("Parameter deviceId is required."); |
408 } | 445 } |
409 | 446 |
410 _url = 'v1/partners/' + commons.Escaper.ecapeVariableReserved('$metadataOwne
rId') + '/devices/' + commons.Escaper.ecapeVariableReserved('$deviceId') + '/met
adata'; | 447 _url = 'v1/partners/' + |
| 448 commons.Escaper.ecapeVariableReserved('$metadataOwnerId') + |
| 449 '/devices/' + |
| 450 commons.Escaper.ecapeVariableReserved('$deviceId') + |
| 451 '/metadata'; |
411 | 452 |
412 var _response = _requester.request(_url, | 453 var _response = _requester.request(_url, "POST", |
413 "POST", | 454 body: _body, |
414 body: _body, | 455 queryParams: _queryParams, |
415 queryParams: _queryParams, | 456 uploadOptions: _uploadOptions, |
416 uploadOptions: _uploadOptions, | 457 uploadMedia: _uploadMedia, |
417 uploadMedia: _uploadMedia, | 458 downloadOptions: _downloadOptions); |
418 downloadOptions: _downloadOptions); | |
419 return _response.then((data) => new DeviceMetadata.fromJson(data)); | 459 return _response.then((data) => new DeviceMetadata.fromJson(data)); |
420 } | 460 } |
421 | 461 |
422 /** | 462 /// Unclaim the device identified by the `device_id` or the |
423 * Unclaim the device identified by device_id or identifier. | 463 /// `deviceIdentifier`. |
424 * | 464 /// |
425 * [request] - The metadata request object. | 465 /// [request] - The metadata request object. |
426 * | 466 /// |
427 * Request parameters: | 467 /// Request parameters: |
428 * | 468 /// |
429 * [partnerId] - Id of the partner. | 469 /// [partnerId] - ID of the partner. |
430 * Value must have pattern "^[^/]+$". | 470 /// Value must have pattern "^[^/]+$". |
431 * | 471 /// |
432 * Completes with a [Empty]. | 472 /// Completes with a [Empty]. |
433 * | 473 /// |
434 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 474 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
435 * error. | 475 /// an error. |
436 * | 476 /// |
437 * If the used [http.Client] completes with an error when making a REST call, | 477 /// If the used [http.Client] completes with an error when making a REST |
438 * this method will complete with the same error. | 478 /// call, this method will complete with the same error. |
439 */ | 479 async.Future<Empty> unclaim( |
440 async.Future<Empty> unclaim(UnclaimDeviceRequest request, core.String partnerI
d) { | 480 UnclaimDeviceRequest request, core.String partnerId) { |
441 var _url = null; | 481 var _url = null; |
442 var _queryParams = new core.Map(); | 482 var _queryParams = new core.Map(); |
443 var _uploadMedia = null; | 483 var _uploadMedia = null; |
444 var _uploadOptions = null; | 484 var _uploadOptions = null; |
445 var _downloadOptions = commons.DownloadOptions.Metadata; | 485 var _downloadOptions = commons.DownloadOptions.Metadata; |
446 var _body = null; | 486 var _body = null; |
447 | 487 |
448 if (request != null) { | 488 if (request != null) { |
449 _body = convert.JSON.encode((request).toJson()); | 489 _body = convert.JSON.encode((request).toJson()); |
450 } | 490 } |
451 if (partnerId == null) { | 491 if (partnerId == null) { |
452 throw new core.ArgumentError("Parameter partnerId is required."); | 492 throw new core.ArgumentError("Parameter partnerId is required."); |
453 } | 493 } |
454 | 494 |
455 _url = 'v1/partners/' + commons.Escaper.ecapeVariableReserved('$partnerId')
+ '/devices:unclaim'; | 495 _url = 'v1/partners/' + |
| 496 commons.Escaper.ecapeVariableReserved('$partnerId') + |
| 497 '/devices:unclaim'; |
456 | 498 |
457 var _response = _requester.request(_url, | 499 var _response = _requester.request(_url, "POST", |
458 "POST", | 500 body: _body, |
459 body: _body, | 501 queryParams: _queryParams, |
460 queryParams: _queryParams, | 502 uploadOptions: _uploadOptions, |
461 uploadOptions: _uploadOptions, | 503 uploadMedia: _uploadMedia, |
462 uploadMedia: _uploadMedia, | 504 downloadOptions: _downloadOptions); |
463 downloadOptions: _downloadOptions); | |
464 return _response.then((data) => new Empty.fromJson(data)); | 505 return _response.then((data) => new Empty.fromJson(data)); |
465 } | 506 } |
466 | 507 |
467 /** | 508 /// Unclaim devices asynchronously. |
468 * Unclaim devices asynchronously | 509 /// |
469 * | 510 /// [request] - The metadata request object. |
470 * [request] - The metadata request object. | 511 /// |
471 * | 512 /// Request parameters: |
472 * Request parameters: | 513 /// |
473 * | 514 /// [partnerId] - Partner ID. |
474 * [partnerId] - partner id. | 515 /// Value must have pattern "^[^/]+$". |
475 * Value must have pattern "^[^/]+$". | 516 /// |
476 * | 517 /// Completes with a [Operation]. |
477 * Completes with a [Operation]. | 518 /// |
478 * | 519 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
479 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 520 /// an error. |
480 * error. | 521 /// |
481 * | 522 /// If the used [http.Client] completes with an error when making a REST |
482 * If the used [http.Client] completes with an error when making a REST call, | 523 /// call, this method will complete with the same error. |
483 * this method will complete with the same error. | 524 async.Future<Operation> unclaimAsync( |
484 */ | 525 UnclaimDevicesRequest request, core.String partnerId) { |
485 async.Future<Operation> unclaimAsync(UnclaimDevicesRequest request, core.Strin
g partnerId) { | |
486 var _url = null; | 526 var _url = null; |
487 var _queryParams = new core.Map(); | 527 var _queryParams = new core.Map(); |
488 var _uploadMedia = null; | 528 var _uploadMedia = null; |
489 var _uploadOptions = null; | 529 var _uploadOptions = null; |
490 var _downloadOptions = commons.DownloadOptions.Metadata; | 530 var _downloadOptions = commons.DownloadOptions.Metadata; |
491 var _body = null; | 531 var _body = null; |
492 | 532 |
493 if (request != null) { | 533 if (request != null) { |
494 _body = convert.JSON.encode((request).toJson()); | 534 _body = convert.JSON.encode((request).toJson()); |
495 } | 535 } |
496 if (partnerId == null) { | 536 if (partnerId == null) { |
497 throw new core.ArgumentError("Parameter partnerId is required."); | 537 throw new core.ArgumentError("Parameter partnerId is required."); |
498 } | 538 } |
499 | 539 |
500 _url = 'v1/partners/' + commons.Escaper.ecapeVariableReserved('$partnerId')
+ '/devices:unclaimAsync'; | 540 _url = 'v1/partners/' + |
| 541 commons.Escaper.ecapeVariableReserved('$partnerId') + |
| 542 '/devices:unclaimAsync'; |
501 | 543 |
502 var _response = _requester.request(_url, | 544 var _response = _requester.request(_url, "POST", |
503 "POST", | 545 body: _body, |
504 body: _body, | 546 queryParams: _queryParams, |
505 queryParams: _queryParams, | 547 uploadOptions: _uploadOptions, |
506 uploadOptions: _uploadOptions, | 548 uploadMedia: _uploadMedia, |
507 uploadMedia: _uploadMedia, | 549 downloadOptions: _downloadOptions); |
508 downloadOptions: _downloadOptions); | |
509 return _response.then((data) => new Operation.fromJson(data)); | 550 return _response.then((data) => new Operation.fromJson(data)); |
510 } | 551 } |
511 | 552 |
512 /** | 553 /// Set metadata in batch asynchronously. |
513 * Set metadata in batch asynchronously. | 554 /// |
514 * | 555 /// [request] - The metadata request object. |
515 * [request] - The metadata request object. | 556 /// |
516 * | 557 /// Request parameters: |
517 * Request parameters: | 558 /// |
518 * | 559 /// [partnerId] - Partner ID. |
519 * [partnerId] - partner id. | 560 /// Value must have pattern "^[^/]+$". |
520 * Value must have pattern "^[^/]+$". | 561 /// |
521 * | 562 /// Completes with a [Operation]. |
522 * Completes with a [Operation]. | 563 /// |
523 * | 564 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
524 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 565 /// an error. |
525 * error. | 566 /// |
526 * | 567 /// If the used [http.Client] completes with an error when making a REST |
527 * If the used [http.Client] completes with an error when making a REST call, | 568 /// call, this method will complete with the same error. |
528 * this method will complete with the same error. | 569 async.Future<Operation> updateMetadataAsync( |
529 */ | 570 UpdateDeviceMetadataInBatchRequest request, core.String partnerId) { |
530 async.Future<Operation> updateMetadataAsync(UpdateDeviceMetadataInBatchRequest
request, core.String partnerId) { | |
531 var _url = null; | 571 var _url = null; |
532 var _queryParams = new core.Map(); | 572 var _queryParams = new core.Map(); |
533 var _uploadMedia = null; | 573 var _uploadMedia = null; |
534 var _uploadOptions = null; | 574 var _uploadOptions = null; |
535 var _downloadOptions = commons.DownloadOptions.Metadata; | 575 var _downloadOptions = commons.DownloadOptions.Metadata; |
536 var _body = null; | 576 var _body = null; |
537 | 577 |
538 if (request != null) { | 578 if (request != null) { |
539 _body = convert.JSON.encode((request).toJson()); | 579 _body = convert.JSON.encode((request).toJson()); |
540 } | 580 } |
541 if (partnerId == null) { | 581 if (partnerId == null) { |
542 throw new core.ArgumentError("Parameter partnerId is required."); | 582 throw new core.ArgumentError("Parameter partnerId is required."); |
543 } | 583 } |
544 | 584 |
545 _url = 'v1/partners/' + commons.Escaper.ecapeVariableReserved('$partnerId')
+ '/devices:updateMetadataAsync'; | 585 _url = 'v1/partners/' + |
| 586 commons.Escaper.ecapeVariableReserved('$partnerId') + |
| 587 '/devices:updateMetadataAsync'; |
546 | 588 |
547 var _response = _requester.request(_url, | 589 var _response = _requester.request(_url, "POST", |
548 "POST", | 590 body: _body, |
549 body: _body, | 591 queryParams: _queryParams, |
550 queryParams: _queryParams, | 592 uploadOptions: _uploadOptions, |
551 uploadOptions: _uploadOptions, | 593 uploadMedia: _uploadMedia, |
552 uploadMedia: _uploadMedia, | 594 downloadOptions: _downloadOptions); |
553 downloadOptions: _downloadOptions); | |
554 return _response.then((data) => new Operation.fromJson(data)); | 595 return _response.then((data) => new Operation.fromJson(data)); |
555 } | 596 } |
556 | |
557 } | 597 } |
558 | 598 |
| 599 /// Request message to claim a device on behalf of a customer. |
| 600 class ClaimDeviceRequest { |
| 601 /// The customer to claim for. |
| 602 core.String customerId; |
559 | 603 |
| 604 /// The device identifier of the device to claim. |
| 605 DeviceIdentifier deviceIdentifier; |
560 | 606 |
561 /** Request message to claim a device on behalf of a customer. */ | 607 /// The section to claim. |
562 class ClaimDeviceRequest { | 608 /// Possible string values are: |
563 /** The customer to claim for. */ | 609 /// - "SECTION_TYPE_UNSPECIFIED" : Unspecified section type. |
564 core.String customerId; | 610 /// - "SECTION_TYPE_ZERO_TOUCH" : Zero touch section type. |
565 /** The device identifier of the device to claim. */ | |
566 DeviceIdentifier deviceIdentifier; | |
567 /** | |
568 * Section to claim | |
569 * Possible string values are: | |
570 * - "SECTION_TYPE_UNSPECIFIED" : Unspecified | |
571 * - "SECTION_TYPE_ZERO_TOUCH" : Zero touch | |
572 */ | |
573 core.String sectionType; | 611 core.String sectionType; |
574 | 612 |
575 ClaimDeviceRequest(); | 613 ClaimDeviceRequest(); |
576 | 614 |
577 ClaimDeviceRequest.fromJson(core.Map _json) { | 615 ClaimDeviceRequest.fromJson(core.Map _json) { |
578 if (_json.containsKey("customerId")) { | 616 if (_json.containsKey("customerId")) { |
579 customerId = _json["customerId"]; | 617 customerId = _json["customerId"]; |
580 } | 618 } |
581 if (_json.containsKey("deviceIdentifier")) { | 619 if (_json.containsKey("deviceIdentifier")) { |
582 deviceIdentifier = new DeviceIdentifier.fromJson(_json["deviceIdentifier"]
); | 620 deviceIdentifier = |
| 621 new DeviceIdentifier.fromJson(_json["deviceIdentifier"]); |
583 } | 622 } |
584 if (_json.containsKey("sectionType")) { | 623 if (_json.containsKey("sectionType")) { |
585 sectionType = _json["sectionType"]; | 624 sectionType = _json["sectionType"]; |
586 } | 625 } |
587 } | 626 } |
588 | 627 |
589 core.Map<core.String, core.Object> toJson() { | 628 core.Map<core.String, core.Object> toJson() { |
590 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 629 final core.Map<core.String, core.Object> _json = |
| 630 new core.Map<core.String, core.Object>(); |
591 if (customerId != null) { | 631 if (customerId != null) { |
592 _json["customerId"] = customerId; | 632 _json["customerId"] = customerId; |
593 } | 633 } |
594 if (deviceIdentifier != null) { | 634 if (deviceIdentifier != null) { |
595 _json["deviceIdentifier"] = (deviceIdentifier).toJson(); | 635 _json["deviceIdentifier"] = (deviceIdentifier).toJson(); |
596 } | 636 } |
597 if (sectionType != null) { | 637 if (sectionType != null) { |
598 _json["sectionType"] = sectionType; | 638 _json["sectionType"] = sectionType; |
599 } | 639 } |
600 return _json; | 640 return _json; |
601 } | 641 } |
602 } | 642 } |
603 | 643 |
604 /** Response message containing device id of the claim. */ | 644 /// Response message containing device id of the claim. |
605 class ClaimDeviceResponse { | 645 class ClaimDeviceResponse { |
606 /** the device id of the claimed device. */ | 646 /// The device ID of the claimed device. |
607 core.String deviceId; | 647 core.String deviceId; |
608 /** | 648 |
609 * the resource name of the device in | 649 /// The resource name of the device in the format |
610 * 'partners/[PARTNER_ID]/devices/[DEVICE_ID]'. | 650 /// `partners/[PARTNER_ID]/devices/[DEVICE_ID]`. |
611 */ | |
612 core.String deviceName; | 651 core.String deviceName; |
613 | 652 |
614 ClaimDeviceResponse(); | 653 ClaimDeviceResponse(); |
615 | 654 |
616 ClaimDeviceResponse.fromJson(core.Map _json) { | 655 ClaimDeviceResponse.fromJson(core.Map _json) { |
617 if (_json.containsKey("deviceId")) { | 656 if (_json.containsKey("deviceId")) { |
618 deviceId = _json["deviceId"]; | 657 deviceId = _json["deviceId"]; |
619 } | 658 } |
620 if (_json.containsKey("deviceName")) { | 659 if (_json.containsKey("deviceName")) { |
621 deviceName = _json["deviceName"]; | 660 deviceName = _json["deviceName"]; |
622 } | 661 } |
623 } | 662 } |
624 | 663 |
625 core.Map<core.String, core.Object> toJson() { | 664 core.Map<core.String, core.Object> toJson() { |
626 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 665 final core.Map<core.String, core.Object> _json = |
| 666 new core.Map<core.String, core.Object>(); |
627 if (deviceId != null) { | 667 if (deviceId != null) { |
628 _json["deviceId"] = deviceId; | 668 _json["deviceId"] = deviceId; |
629 } | 669 } |
630 if (deviceName != null) { | 670 if (deviceName != null) { |
631 _json["deviceName"] = deviceName; | 671 _json["deviceName"] = deviceName; |
632 } | 672 } |
633 return _json; | 673 return _json; |
634 } | 674 } |
635 } | 675 } |
636 | 676 |
637 /** Request to claim devices asynchronously in batch. */ | 677 /// Request to claim devices asynchronously in batch. |
638 class ClaimDevicesRequest { | 678 class ClaimDevicesRequest { |
639 /** list of claims. */ | 679 /// List of claims. |
640 core.List<PartnerClaim> claims; | 680 core.List<PartnerClaim> claims; |
641 | 681 |
642 ClaimDevicesRequest(); | 682 ClaimDevicesRequest(); |
643 | 683 |
644 ClaimDevicesRequest.fromJson(core.Map _json) { | 684 ClaimDevicesRequest.fromJson(core.Map _json) { |
645 if (_json.containsKey("claims")) { | 685 if (_json.containsKey("claims")) { |
646 claims = _json["claims"].map((value) => new PartnerClaim.fromJson(value)).
toList(); | 686 claims = _json["claims"] |
| 687 .map((value) => new PartnerClaim.fromJson(value)) |
| 688 .toList(); |
647 } | 689 } |
648 } | 690 } |
649 | 691 |
650 core.Map<core.String, core.Object> toJson() { | 692 core.Map<core.String, core.Object> toJson() { |
651 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 693 final core.Map<core.String, core.Object> _json = |
| 694 new core.Map<core.String, core.Object>(); |
652 if (claims != null) { | 695 if (claims != null) { |
653 _json["claims"] = claims.map((value) => (value).toJson()).toList(); | 696 _json["claims"] = claims.map((value) => (value).toJson()).toList(); |
654 } | 697 } |
655 return _json; | 698 return _json; |
656 } | 699 } |
657 } | 700 } |
658 | 701 |
659 /** Company */ | 702 /// Company |
660 class Company { | 703 class Company { |
661 /** company id */ | 704 /// Admin emails. |
| 705 /// Admins are able to operate on the portal. |
| 706 /// This field is a write-only field at creation time. |
| 707 core.List<core.String> adminEmails; |
| 708 |
| 709 /// Company ID. |
662 core.String companyId; | 710 core.String companyId; |
663 /** company name */ | 711 |
| 712 /// Company name. |
664 core.String companyName; | 713 core.String companyName; |
665 | 714 |
| 715 /// The API resource name of the company in the format |
| 716 /// `partners/[PARTNER_ID]/customers/[CUSTOMER_ID]`. |
| 717 core.String name; |
| 718 |
| 719 /// Owner emails. |
| 720 /// Owners are able to operate on the portal, and modify admins or other |
| 721 /// owners. This field is a write-only field at creation time. |
| 722 core.List<core.String> ownerEmails; |
| 723 |
666 Company(); | 724 Company(); |
667 | 725 |
668 Company.fromJson(core.Map _json) { | 726 Company.fromJson(core.Map _json) { |
| 727 if (_json.containsKey("adminEmails")) { |
| 728 adminEmails = _json["adminEmails"]; |
| 729 } |
669 if (_json.containsKey("companyId")) { | 730 if (_json.containsKey("companyId")) { |
670 companyId = _json["companyId"]; | 731 companyId = _json["companyId"]; |
671 } | 732 } |
672 if (_json.containsKey("companyName")) { | 733 if (_json.containsKey("companyName")) { |
673 companyName = _json["companyName"]; | 734 companyName = _json["companyName"]; |
674 } | 735 } |
| 736 if (_json.containsKey("name")) { |
| 737 name = _json["name"]; |
| 738 } |
| 739 if (_json.containsKey("ownerEmails")) { |
| 740 ownerEmails = _json["ownerEmails"]; |
| 741 } |
675 } | 742 } |
676 | 743 |
677 core.Map<core.String, core.Object> toJson() { | 744 core.Map<core.String, core.Object> toJson() { |
678 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 745 final core.Map<core.String, core.Object> _json = |
| 746 new core.Map<core.String, core.Object>(); |
| 747 if (adminEmails != null) { |
| 748 _json["adminEmails"] = adminEmails; |
| 749 } |
679 if (companyId != null) { | 750 if (companyId != null) { |
680 _json["companyId"] = companyId; | 751 _json["companyId"] = companyId; |
681 } | 752 } |
682 if (companyName != null) { | 753 if (companyName != null) { |
683 _json["companyName"] = companyName; | 754 _json["companyName"] = companyName; |
684 } | 755 } |
| 756 if (name != null) { |
| 757 _json["name"] = name; |
| 758 } |
| 759 if (ownerEmails != null) { |
| 760 _json["ownerEmails"] = ownerEmails; |
| 761 } |
685 return _json; | 762 return _json; |
686 } | 763 } |
687 } | 764 } |
688 | 765 |
689 /** Device */ | 766 /// Request message to create a customer. |
| 767 class CreateCustomerRequest { |
| 768 /// The customer to create. |
| 769 Company customer; |
| 770 |
| 771 CreateCustomerRequest(); |
| 772 |
| 773 CreateCustomerRequest.fromJson(core.Map _json) { |
| 774 if (_json.containsKey("customer")) { |
| 775 customer = new Company.fromJson(_json["customer"]); |
| 776 } |
| 777 } |
| 778 |
| 779 core.Map<core.String, core.Object> toJson() { |
| 780 final core.Map<core.String, core.Object> _json = |
| 781 new core.Map<core.String, core.Object>(); |
| 782 if (customer != null) { |
| 783 _json["customer"] = (customer).toJson(); |
| 784 } |
| 785 return _json; |
| 786 } |
| 787 } |
| 788 |
| 789 /// An Android device. |
690 class Device { | 790 class Device { |
691 /** claims */ | 791 /// Claims. |
692 core.List<DeviceClaim> claims; | 792 core.List<DeviceClaim> claims; |
693 /** Device id */ | 793 |
| 794 /// The resource name of the configuration. |
| 795 /// Only set for customers. |
| 796 core.String configuration; |
| 797 |
| 798 /// Device ID. |
694 core.String deviceId; | 799 core.String deviceId; |
695 /** Device identifier */ | 800 |
| 801 /// Device identifier. |
696 DeviceIdentifier deviceIdentifier; | 802 DeviceIdentifier deviceIdentifier; |
697 /** Device metadata */ | 803 |
| 804 /// Device metadata. |
698 DeviceMetadata deviceMetadata; | 805 DeviceMetadata deviceMetadata; |
699 /** Resource name in 'partners/[PARTNER_ID]/devices/[DEVICE_ID]'. */ | 806 |
| 807 /// Resource name in `partners/[PARTNER_ID]/devices/[DEVICE_ID]`. |
700 core.String name; | 808 core.String name; |
701 | 809 |
702 Device(); | 810 Device(); |
703 | 811 |
704 Device.fromJson(core.Map _json) { | 812 Device.fromJson(core.Map _json) { |
705 if (_json.containsKey("claims")) { | 813 if (_json.containsKey("claims")) { |
706 claims = _json["claims"].map((value) => new DeviceClaim.fromJson(value)).t
oList(); | 814 claims = _json["claims"] |
| 815 .map((value) => new DeviceClaim.fromJson(value)) |
| 816 .toList(); |
| 817 } |
| 818 if (_json.containsKey("configuration")) { |
| 819 configuration = _json["configuration"]; |
707 } | 820 } |
708 if (_json.containsKey("deviceId")) { | 821 if (_json.containsKey("deviceId")) { |
709 deviceId = _json["deviceId"]; | 822 deviceId = _json["deviceId"]; |
710 } | 823 } |
711 if (_json.containsKey("deviceIdentifier")) { | 824 if (_json.containsKey("deviceIdentifier")) { |
712 deviceIdentifier = new DeviceIdentifier.fromJson(_json["deviceIdentifier"]
); | 825 deviceIdentifier = |
| 826 new DeviceIdentifier.fromJson(_json["deviceIdentifier"]); |
713 } | 827 } |
714 if (_json.containsKey("deviceMetadata")) { | 828 if (_json.containsKey("deviceMetadata")) { |
715 deviceMetadata = new DeviceMetadata.fromJson(_json["deviceMetadata"]); | 829 deviceMetadata = new DeviceMetadata.fromJson(_json["deviceMetadata"]); |
716 } | 830 } |
717 if (_json.containsKey("name")) { | 831 if (_json.containsKey("name")) { |
718 name = _json["name"]; | 832 name = _json["name"]; |
719 } | 833 } |
720 } | 834 } |
721 | 835 |
722 core.Map<core.String, core.Object> toJson() { | 836 core.Map<core.String, core.Object> toJson() { |
723 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 837 final core.Map<core.String, core.Object> _json = |
| 838 new core.Map<core.String, core.Object>(); |
724 if (claims != null) { | 839 if (claims != null) { |
725 _json["claims"] = claims.map((value) => (value).toJson()).toList(); | 840 _json["claims"] = claims.map((value) => (value).toJson()).toList(); |
726 } | 841 } |
| 842 if (configuration != null) { |
| 843 _json["configuration"] = configuration; |
| 844 } |
727 if (deviceId != null) { | 845 if (deviceId != null) { |
728 _json["deviceId"] = deviceId; | 846 _json["deviceId"] = deviceId; |
729 } | 847 } |
730 if (deviceIdentifier != null) { | 848 if (deviceIdentifier != null) { |
731 _json["deviceIdentifier"] = (deviceIdentifier).toJson(); | 849 _json["deviceIdentifier"] = (deviceIdentifier).toJson(); |
732 } | 850 } |
733 if (deviceMetadata != null) { | 851 if (deviceMetadata != null) { |
734 _json["deviceMetadata"] = (deviceMetadata).toJson(); | 852 _json["deviceMetadata"] = (deviceMetadata).toJson(); |
735 } | 853 } |
736 if (name != null) { | 854 if (name != null) { |
737 _json["name"] = name; | 855 _json["name"] = name; |
738 } | 856 } |
739 return _json; | 857 return _json; |
740 } | 858 } |
741 } | 859 } |
742 | 860 |
743 /** containing the necessary info about a claim for a partner. */ | 861 /// Information about a device claimed for a partner. |
744 class DeviceClaim { | 862 class DeviceClaim { |
745 /** owner id */ | 863 /// Owner ID. |
746 core.String ownerCompanyId; | 864 core.String ownerCompanyId; |
747 /** | 865 |
748 * section type. | 866 /// Section type of the device claim. |
749 * Possible string values are: | 867 /// Possible string values are: |
750 * - "SECTION_TYPE_UNSPECIFIED" : Unspecified | 868 /// - "SECTION_TYPE_UNSPECIFIED" : Unspecified section type. |
751 * - "SECTION_TYPE_ZERO_TOUCH" : Zero touch | 869 /// - "SECTION_TYPE_ZERO_TOUCH" : Zero touch section type. |
752 */ | |
753 core.String sectionType; | 870 core.String sectionType; |
754 | 871 |
755 DeviceClaim(); | 872 DeviceClaim(); |
756 | 873 |
757 DeviceClaim.fromJson(core.Map _json) { | 874 DeviceClaim.fromJson(core.Map _json) { |
758 if (_json.containsKey("ownerCompanyId")) { | 875 if (_json.containsKey("ownerCompanyId")) { |
759 ownerCompanyId = _json["ownerCompanyId"]; | 876 ownerCompanyId = _json["ownerCompanyId"]; |
760 } | 877 } |
761 if (_json.containsKey("sectionType")) { | 878 if (_json.containsKey("sectionType")) { |
762 sectionType = _json["sectionType"]; | 879 sectionType = _json["sectionType"]; |
763 } | 880 } |
764 } | 881 } |
765 | 882 |
766 core.Map<core.String, core.Object> toJson() { | 883 core.Map<core.String, core.Object> toJson() { |
767 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 884 final core.Map<core.String, core.Object> _json = |
| 885 new core.Map<core.String, core.Object>(); |
768 if (ownerCompanyId != null) { | 886 if (ownerCompanyId != null) { |
769 _json["ownerCompanyId"] = ownerCompanyId; | 887 _json["ownerCompanyId"] = ownerCompanyId; |
770 } | 888 } |
771 if (sectionType != null) { | 889 if (sectionType != null) { |
772 _json["sectionType"] = sectionType; | 890 _json["sectionType"] = sectionType; |
773 } | 891 } |
774 return _json; | 892 return _json; |
775 } | 893 } |
776 } | 894 } |
777 | 895 |
778 /** DeviceIdentifiers identifies an unique device. */ | 896 /// Identifies a unique device. |
779 class DeviceIdentifier { | 897 class DeviceIdentifier { |
780 /** IMEI (either IMEI or MEID is required). */ | 898 /// IMEI number. |
781 core.String imei; | 899 core.String imei; |
782 /** | 900 |
783 * Manufacturer name to match `android.os.Build.MANUFACTURER` (required). | 901 /// Manufacturer name to match `android.os.Build.MANUFACTURER` (required). |
784 * Allowed values listed in | 902 /// Allowed values listed in |
785 * [manufacturer names](/zero-touch/resources/manufacturer-names). | 903 /// [manufacturer names](/zero-touch/resources/manufacturer-names). |
786 */ | |
787 core.String manufacturer; | 904 core.String manufacturer; |
788 /** MEID */ | 905 |
| 906 /// MEID number. |
789 core.String meid; | 907 core.String meid; |
790 /** Serial number (optional) */ | 908 |
| 909 /// Serial number (optional). |
791 core.String serialNumber; | 910 core.String serialNumber; |
792 | 911 |
793 DeviceIdentifier(); | 912 DeviceIdentifier(); |
794 | 913 |
795 DeviceIdentifier.fromJson(core.Map _json) { | 914 DeviceIdentifier.fromJson(core.Map _json) { |
796 if (_json.containsKey("imei")) { | 915 if (_json.containsKey("imei")) { |
797 imei = _json["imei"]; | 916 imei = _json["imei"]; |
798 } | 917 } |
799 if (_json.containsKey("manufacturer")) { | 918 if (_json.containsKey("manufacturer")) { |
800 manufacturer = _json["manufacturer"]; | 919 manufacturer = _json["manufacturer"]; |
801 } | 920 } |
802 if (_json.containsKey("meid")) { | 921 if (_json.containsKey("meid")) { |
803 meid = _json["meid"]; | 922 meid = _json["meid"]; |
804 } | 923 } |
805 if (_json.containsKey("serialNumber")) { | 924 if (_json.containsKey("serialNumber")) { |
806 serialNumber = _json["serialNumber"]; | 925 serialNumber = _json["serialNumber"]; |
807 } | 926 } |
808 } | 927 } |
809 | 928 |
810 core.Map<core.String, core.Object> toJson() { | 929 core.Map<core.String, core.Object> toJson() { |
811 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 930 final core.Map<core.String, core.Object> _json = |
| 931 new core.Map<core.String, core.Object>(); |
812 if (imei != null) { | 932 if (imei != null) { |
813 _json["imei"] = imei; | 933 _json["imei"] = imei; |
814 } | 934 } |
815 if (manufacturer != null) { | 935 if (manufacturer != null) { |
816 _json["manufacturer"] = manufacturer; | 936 _json["manufacturer"] = manufacturer; |
817 } | 937 } |
818 if (meid != null) { | 938 if (meid != null) { |
819 _json["meid"] = meid; | 939 _json["meid"] = meid; |
820 } | 940 } |
821 if (serialNumber != null) { | 941 if (serialNumber != null) { |
822 _json["serialNumber"] = serialNumber; | 942 _json["serialNumber"] = serialNumber; |
823 } | 943 } |
824 return _json; | 944 return _json; |
825 } | 945 } |
826 } | 946 } |
827 | 947 |
828 /** metadata */ | 948 /// A key-value pair of the device metadata. |
829 class DeviceMetadata { | 949 class DeviceMetadata { |
830 /** Metadata entries */ | 950 /// Metadata entries |
831 core.Map<core.String, core.String> entries; | 951 core.Map<core.String, core.String> entries; |
832 | 952 |
833 DeviceMetadata(); | 953 DeviceMetadata(); |
834 | 954 |
835 DeviceMetadata.fromJson(core.Map _json) { | 955 DeviceMetadata.fromJson(core.Map _json) { |
836 if (_json.containsKey("entries")) { | 956 if (_json.containsKey("entries")) { |
837 entries = _json["entries"]; | 957 entries = _json["entries"]; |
838 } | 958 } |
839 } | 959 } |
840 | 960 |
841 core.Map<core.String, core.Object> toJson() { | 961 core.Map<core.String, core.Object> toJson() { |
842 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 962 final core.Map<core.String, core.Object> _json = |
| 963 new core.Map<core.String, core.Object>(); |
843 if (entries != null) { | 964 if (entries != null) { |
844 _json["entries"] = entries; | 965 _json["entries"] = entries; |
845 } | 966 } |
846 return _json; | 967 return _json; |
847 } | 968 } |
848 } | 969 } |
849 | 970 |
850 /** Long running operation metadata. */ | 971 /// Long running operation metadata. |
851 class DevicesLongRunningOperationMetadata { | 972 class DevicesLongRunningOperationMetadata { |
852 /** Number of devices parsed in your requests. */ | 973 /// Number of devices parsed in your requests. |
853 core.int devicesCount; | 974 core.int devicesCount; |
854 /** | 975 |
855 * The overall processing status. | 976 /// The overall processing status. |
856 * Possible string values are: | 977 /// Possible string values are: |
857 * - "BATCH_PROCESS_STATUS_UNSPECIFIED" : Invalid code. Shouldn't be used. | 978 /// - "BATCH_PROCESS_STATUS_UNSPECIFIED" : Invalid code. Shouldn't be used. |
858 * - "BATCH_PROCESS_PENDING" : Pending | 979 /// - "BATCH_PROCESS_PENDING" : Pending. |
859 * - "BATCH_PROCESS_IN_PROGRESS" : In progress | 980 /// - "BATCH_PROCESS_IN_PROGRESS" : In progress. |
860 * - "BATCH_PROCESS_PROCESSED" : Processed. | 981 /// - "BATCH_PROCESS_PROCESSED" : Processed. |
861 * This doesn't mean all items were processed sucessfully, you should | 982 /// This doesn't mean all items were processed sucessfully, you should |
862 * check the `response` field for the result of every item. | 983 /// check the `response` field for the result of every item. |
863 */ | |
864 core.String processingStatus; | 984 core.String processingStatus; |
865 /** Processing progress from 0 to 100. */ | 985 |
| 986 /// Processing progress from 0 to 100. |
866 core.int progress; | 987 core.int progress; |
867 | 988 |
868 DevicesLongRunningOperationMetadata(); | 989 DevicesLongRunningOperationMetadata(); |
869 | 990 |
870 DevicesLongRunningOperationMetadata.fromJson(core.Map _json) { | 991 DevicesLongRunningOperationMetadata.fromJson(core.Map _json) { |
871 if (_json.containsKey("devicesCount")) { | 992 if (_json.containsKey("devicesCount")) { |
872 devicesCount = _json["devicesCount"]; | 993 devicesCount = _json["devicesCount"]; |
873 } | 994 } |
874 if (_json.containsKey("processingStatus")) { | 995 if (_json.containsKey("processingStatus")) { |
875 processingStatus = _json["processingStatus"]; | 996 processingStatus = _json["processingStatus"]; |
876 } | 997 } |
877 if (_json.containsKey("progress")) { | 998 if (_json.containsKey("progress")) { |
878 progress = _json["progress"]; | 999 progress = _json["progress"]; |
879 } | 1000 } |
880 } | 1001 } |
881 | 1002 |
882 core.Map<core.String, core.Object> toJson() { | 1003 core.Map<core.String, core.Object> toJson() { |
883 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1004 final core.Map<core.String, core.Object> _json = |
| 1005 new core.Map<core.String, core.Object>(); |
884 if (devicesCount != null) { | 1006 if (devicesCount != null) { |
885 _json["devicesCount"] = devicesCount; | 1007 _json["devicesCount"] = devicesCount; |
886 } | 1008 } |
887 if (processingStatus != null) { | 1009 if (processingStatus != null) { |
888 _json["processingStatus"] = processingStatus; | 1010 _json["processingStatus"] = processingStatus; |
889 } | 1011 } |
890 if (progress != null) { | 1012 if (progress != null) { |
891 _json["progress"] = progress; | 1013 _json["progress"] = progress; |
892 } | 1014 } |
893 return _json; | 1015 return _json; |
894 } | 1016 } |
895 } | 1017 } |
896 | 1018 |
897 /** Long running operation response. */ | 1019 /// Long running operation response. |
898 class DevicesLongRunningOperationResponse { | 1020 class DevicesLongRunningOperationResponse { |
899 /** | 1021 /// Processing status for each device. |
900 * processing status for each device. | 1022 /// One `PerDeviceStatus` per device. The order is the same as in your |
901 * One PerDeviceStatus per device. The order is the same as in your requests. | 1023 /// requests. |
902 */ | |
903 core.List<OperationPerDevice> perDeviceStatus; | 1024 core.List<OperationPerDevice> perDeviceStatus; |
904 /** Number of succeesfully processed ones. */ | 1025 |
| 1026 /// Number of succeesfully processed ones. |
905 core.int successCount; | 1027 core.int successCount; |
906 | 1028 |
907 DevicesLongRunningOperationResponse(); | 1029 DevicesLongRunningOperationResponse(); |
908 | 1030 |
909 DevicesLongRunningOperationResponse.fromJson(core.Map _json) { | 1031 DevicesLongRunningOperationResponse.fromJson(core.Map _json) { |
910 if (_json.containsKey("perDeviceStatus")) { | 1032 if (_json.containsKey("perDeviceStatus")) { |
911 perDeviceStatus = _json["perDeviceStatus"].map((value) => new OperationPer
Device.fromJson(value)).toList(); | 1033 perDeviceStatus = _json["perDeviceStatus"] |
| 1034 .map((value) => new OperationPerDevice.fromJson(value)) |
| 1035 .toList(); |
912 } | 1036 } |
913 if (_json.containsKey("successCount")) { | 1037 if (_json.containsKey("successCount")) { |
914 successCount = _json["successCount"]; | 1038 successCount = _json["successCount"]; |
915 } | 1039 } |
916 } | 1040 } |
917 | 1041 |
918 core.Map<core.String, core.Object> toJson() { | 1042 core.Map<core.String, core.Object> toJson() { |
919 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1043 final core.Map<core.String, core.Object> _json = |
| 1044 new core.Map<core.String, core.Object>(); |
920 if (perDeviceStatus != null) { | 1045 if (perDeviceStatus != null) { |
921 _json["perDeviceStatus"] = perDeviceStatus.map((value) => (value).toJson()
).toList(); | 1046 _json["perDeviceStatus"] = |
| 1047 perDeviceStatus.map((value) => (value).toJson()).toList(); |
922 } | 1048 } |
923 if (successCount != null) { | 1049 if (successCount != null) { |
924 _json["successCount"] = successCount; | 1050 _json["successCount"] = successCount; |
925 } | 1051 } |
926 return _json; | 1052 return _json; |
927 } | 1053 } |
928 } | 1054 } |
929 | 1055 |
930 /** | 1056 /// A generic empty message that you can re-use to avoid defining duplicated |
931 * A generic empty message that you can re-use to avoid defining duplicated | 1057 /// empty messages in your APIs. A typical example is to use it as the request |
932 * empty messages in your APIs. A typical example is to use it as the request | 1058 /// or the response type of an API method. For instance: |
933 * or the response type of an API method. For instance: | 1059 /// |
934 * | 1060 /// service Foo { |
935 * service Foo { | 1061 /// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); |
936 * rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); | 1062 /// } |
937 * } | 1063 /// |
938 * | 1064 /// The JSON representation for `Empty` is empty JSON object `{}`. |
939 * The JSON representation for `Empty` is empty JSON object `{}`. | |
940 */ | |
941 class Empty { | 1065 class Empty { |
942 | |
943 Empty(); | 1066 Empty(); |
944 | 1067 |
945 Empty.fromJson(core.Map _json) { | 1068 Empty.fromJson(core.Map _json) {} |
946 } | |
947 | 1069 |
948 core.Map<core.String, core.Object> toJson() { | 1070 core.Map<core.String, core.Object> toJson() { |
949 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1071 final core.Map<core.String, core.Object> _json = |
| 1072 new core.Map<core.String, core.Object>(); |
950 return _json; | 1073 return _json; |
951 } | 1074 } |
952 } | 1075 } |
953 | 1076 |
954 /** Request to find devices. */ | 1077 /// Request to find devices. |
955 class FindDevicesByDeviceIdentifierRequest { | 1078 class FindDevicesByDeviceIdentifierRequest { |
956 /** The device identifier to search */ | 1079 /// The device identifier to search. |
957 DeviceIdentifier deviceIdentifier; | 1080 DeviceIdentifier deviceIdentifier; |
958 /** Number of devices to show. */ | 1081 |
| 1082 /// Number of devices to show. |
959 core.String limit; | 1083 core.String limit; |
960 /** Page token */ | 1084 |
| 1085 /// Page token. |
961 core.String pageToken; | 1086 core.String pageToken; |
962 | 1087 |
963 FindDevicesByDeviceIdentifierRequest(); | 1088 FindDevicesByDeviceIdentifierRequest(); |
964 | 1089 |
965 FindDevicesByDeviceIdentifierRequest.fromJson(core.Map _json) { | 1090 FindDevicesByDeviceIdentifierRequest.fromJson(core.Map _json) { |
966 if (_json.containsKey("deviceIdentifier")) { | 1091 if (_json.containsKey("deviceIdentifier")) { |
967 deviceIdentifier = new DeviceIdentifier.fromJson(_json["deviceIdentifier"]
); | 1092 deviceIdentifier = |
| 1093 new DeviceIdentifier.fromJson(_json["deviceIdentifier"]); |
968 } | 1094 } |
969 if (_json.containsKey("limit")) { | 1095 if (_json.containsKey("limit")) { |
970 limit = _json["limit"]; | 1096 limit = _json["limit"]; |
971 } | 1097 } |
972 if (_json.containsKey("pageToken")) { | 1098 if (_json.containsKey("pageToken")) { |
973 pageToken = _json["pageToken"]; | 1099 pageToken = _json["pageToken"]; |
974 } | 1100 } |
975 } | 1101 } |
976 | 1102 |
977 core.Map<core.String, core.Object> toJson() { | 1103 core.Map<core.String, core.Object> toJson() { |
978 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1104 final core.Map<core.String, core.Object> _json = |
| 1105 new core.Map<core.String, core.Object>(); |
979 if (deviceIdentifier != null) { | 1106 if (deviceIdentifier != null) { |
980 _json["deviceIdentifier"] = (deviceIdentifier).toJson(); | 1107 _json["deviceIdentifier"] = (deviceIdentifier).toJson(); |
981 } | 1108 } |
982 if (limit != null) { | 1109 if (limit != null) { |
983 _json["limit"] = limit; | 1110 _json["limit"] = limit; |
984 } | 1111 } |
985 if (pageToken != null) { | 1112 if (pageToken != null) { |
986 _json["pageToken"] = pageToken; | 1113 _json["pageToken"] = pageToken; |
987 } | 1114 } |
988 return _json; | 1115 return _json; |
989 } | 1116 } |
990 } | 1117 } |
991 | 1118 |
992 /** Response containing found devices. */ | 1119 /// Response containing found devices. |
993 class FindDevicesByDeviceIdentifierResponse { | 1120 class FindDevicesByDeviceIdentifierResponse { |
994 /** Found devices. */ | 1121 /// Found devices. |
995 core.List<Device> devices; | 1122 core.List<Device> devices; |
996 /** Page token of next page */ | 1123 |
| 1124 /// Page token of the next page. |
997 core.String nextPageToken; | 1125 core.String nextPageToken; |
998 | 1126 |
999 FindDevicesByDeviceIdentifierResponse(); | 1127 FindDevicesByDeviceIdentifierResponse(); |
1000 | 1128 |
1001 FindDevicesByDeviceIdentifierResponse.fromJson(core.Map _json) { | 1129 FindDevicesByDeviceIdentifierResponse.fromJson(core.Map _json) { |
1002 if (_json.containsKey("devices")) { | 1130 if (_json.containsKey("devices")) { |
1003 devices = _json["devices"].map((value) => new Device.fromJson(value)).toLi
st(); | 1131 devices = |
| 1132 _json["devices"].map((value) => new Device.fromJson(value)).toList(); |
1004 } | 1133 } |
1005 if (_json.containsKey("nextPageToken")) { | 1134 if (_json.containsKey("nextPageToken")) { |
1006 nextPageToken = _json["nextPageToken"]; | 1135 nextPageToken = _json["nextPageToken"]; |
1007 } | 1136 } |
1008 } | 1137 } |
1009 | 1138 |
1010 core.Map<core.String, core.Object> toJson() { | 1139 core.Map<core.String, core.Object> toJson() { |
1011 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1140 final core.Map<core.String, core.Object> _json = |
| 1141 new core.Map<core.String, core.Object>(); |
1012 if (devices != null) { | 1142 if (devices != null) { |
1013 _json["devices"] = devices.map((value) => (value).toJson()).toList(); | 1143 _json["devices"] = devices.map((value) => (value).toJson()).toList(); |
1014 } | 1144 } |
1015 if (nextPageToken != null) { | 1145 if (nextPageToken != null) { |
1016 _json["nextPageToken"] = nextPageToken; | 1146 _json["nextPageToken"] = nextPageToken; |
1017 } | 1147 } |
1018 return _json; | 1148 return _json; |
1019 } | 1149 } |
1020 } | 1150 } |
1021 | 1151 |
1022 /** Request to find devices by customers. */ | 1152 /// Request to find devices by customers. |
1023 class FindDevicesByOwnerRequest { | 1153 class FindDevicesByOwnerRequest { |
1024 /** List of customer ids to search for. */ | 1154 /// List of customer IDs to search for. |
1025 core.List<core.String> customerId; | 1155 core.List<core.String> customerId; |
1026 /** The number of devices to show in the result. */ | 1156 |
| 1157 /// The number of devices to show in the result. |
1027 core.String limit; | 1158 core.String limit; |
1028 /** Page token */ | 1159 |
| 1160 /// Page token. |
1029 core.String pageToken; | 1161 core.String pageToken; |
1030 /** | 1162 |
1031 * The section type. | 1163 /// The section type. |
1032 * Possible string values are: | 1164 /// Possible string values are: |
1033 * - "SECTION_TYPE_UNSPECIFIED" : Unspecified | 1165 /// - "SECTION_TYPE_UNSPECIFIED" : Unspecified section type. |
1034 * - "SECTION_TYPE_ZERO_TOUCH" : Zero touch | 1166 /// - "SECTION_TYPE_ZERO_TOUCH" : Zero touch section type. |
1035 */ | |
1036 core.String sectionType; | 1167 core.String sectionType; |
1037 | 1168 |
1038 FindDevicesByOwnerRequest(); | 1169 FindDevicesByOwnerRequest(); |
1039 | 1170 |
1040 FindDevicesByOwnerRequest.fromJson(core.Map _json) { | 1171 FindDevicesByOwnerRequest.fromJson(core.Map _json) { |
1041 if (_json.containsKey("customerId")) { | 1172 if (_json.containsKey("customerId")) { |
1042 customerId = _json["customerId"]; | 1173 customerId = _json["customerId"]; |
1043 } | 1174 } |
1044 if (_json.containsKey("limit")) { | 1175 if (_json.containsKey("limit")) { |
1045 limit = _json["limit"]; | 1176 limit = _json["limit"]; |
1046 } | 1177 } |
1047 if (_json.containsKey("pageToken")) { | 1178 if (_json.containsKey("pageToken")) { |
1048 pageToken = _json["pageToken"]; | 1179 pageToken = _json["pageToken"]; |
1049 } | 1180 } |
1050 if (_json.containsKey("sectionType")) { | 1181 if (_json.containsKey("sectionType")) { |
1051 sectionType = _json["sectionType"]; | 1182 sectionType = _json["sectionType"]; |
1052 } | 1183 } |
1053 } | 1184 } |
1054 | 1185 |
1055 core.Map<core.String, core.Object> toJson() { | 1186 core.Map<core.String, core.Object> toJson() { |
1056 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1187 final core.Map<core.String, core.Object> _json = |
| 1188 new core.Map<core.String, core.Object>(); |
1057 if (customerId != null) { | 1189 if (customerId != null) { |
1058 _json["customerId"] = customerId; | 1190 _json["customerId"] = customerId; |
1059 } | 1191 } |
1060 if (limit != null) { | 1192 if (limit != null) { |
1061 _json["limit"] = limit; | 1193 _json["limit"] = limit; |
1062 } | 1194 } |
1063 if (pageToken != null) { | 1195 if (pageToken != null) { |
1064 _json["pageToken"] = pageToken; | 1196 _json["pageToken"] = pageToken; |
1065 } | 1197 } |
1066 if (sectionType != null) { | 1198 if (sectionType != null) { |
1067 _json["sectionType"] = sectionType; | 1199 _json["sectionType"] = sectionType; |
1068 } | 1200 } |
1069 return _json; | 1201 return _json; |
1070 } | 1202 } |
1071 } | 1203 } |
1072 | 1204 |
1073 /** Response containing found devices. */ | 1205 /// Response containing found devices. |
1074 class FindDevicesByOwnerResponse { | 1206 class FindDevicesByOwnerResponse { |
1075 /** Devices found. */ | 1207 /// Devices found. |
1076 core.List<Device> devices; | 1208 core.List<Device> devices; |
1077 /** Page token of next page */ | 1209 |
| 1210 /// Page token of the next page. |
1078 core.String nextPageToken; | 1211 core.String nextPageToken; |
1079 | 1212 |
1080 FindDevicesByOwnerResponse(); | 1213 FindDevicesByOwnerResponse(); |
1081 | 1214 |
1082 FindDevicesByOwnerResponse.fromJson(core.Map _json) { | 1215 FindDevicesByOwnerResponse.fromJson(core.Map _json) { |
1083 if (_json.containsKey("devices")) { | 1216 if (_json.containsKey("devices")) { |
1084 devices = _json["devices"].map((value) => new Device.fromJson(value)).toLi
st(); | 1217 devices = |
| 1218 _json["devices"].map((value) => new Device.fromJson(value)).toList(); |
1085 } | 1219 } |
1086 if (_json.containsKey("nextPageToken")) { | 1220 if (_json.containsKey("nextPageToken")) { |
1087 nextPageToken = _json["nextPageToken"]; | 1221 nextPageToken = _json["nextPageToken"]; |
1088 } | 1222 } |
1089 } | 1223 } |
1090 | 1224 |
1091 core.Map<core.String, core.Object> toJson() { | 1225 core.Map<core.String, core.Object> toJson() { |
1092 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1226 final core.Map<core.String, core.Object> _json = |
| 1227 new core.Map<core.String, core.Object>(); |
1093 if (devices != null) { | 1228 if (devices != null) { |
1094 _json["devices"] = devices.map((value) => (value).toJson()).toList(); | 1229 _json["devices"] = devices.map((value) => (value).toJson()).toList(); |
1095 } | 1230 } |
1096 if (nextPageToken != null) { | 1231 if (nextPageToken != null) { |
1097 _json["nextPageToken"] = nextPageToken; | 1232 _json["nextPageToken"] = nextPageToken; |
1098 } | 1233 } |
1099 return _json; | 1234 return _json; |
1100 } | 1235 } |
1101 } | 1236 } |
1102 | 1237 |
1103 /** Response message of all customers related to this partner. */ | 1238 /// Response message of all customers related to this partner. |
1104 class ListCustomersResponse { | 1239 class ListCustomersResponse { |
1105 /** List of customers related to this partner. */ | 1240 /// List of customers related to this partner. |
1106 core.List<Company> customers; | 1241 core.List<Company> customers; |
1107 | 1242 |
1108 ListCustomersResponse(); | 1243 ListCustomersResponse(); |
1109 | 1244 |
1110 ListCustomersResponse.fromJson(core.Map _json) { | 1245 ListCustomersResponse.fromJson(core.Map _json) { |
1111 if (_json.containsKey("customers")) { | 1246 if (_json.containsKey("customers")) { |
1112 customers = _json["customers"].map((value) => new Company.fromJson(value))
.toList(); | 1247 customers = _json["customers"] |
| 1248 .map((value) => new Company.fromJson(value)) |
| 1249 .toList(); |
1113 } | 1250 } |
1114 } | 1251 } |
1115 | 1252 |
1116 core.Map<core.String, core.Object> toJson() { | 1253 core.Map<core.String, core.Object> toJson() { |
1117 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1254 final core.Map<core.String, core.Object> _json = |
| 1255 new core.Map<core.String, core.Object>(); |
1118 if (customers != null) { | 1256 if (customers != null) { |
1119 _json["customers"] = customers.map((value) => (value).toJson()).toList(); | 1257 _json["customers"] = customers.map((value) => (value).toJson()).toList(); |
1120 } | 1258 } |
1121 return _json; | 1259 return _json; |
1122 } | 1260 } |
1123 } | 1261 } |
1124 | 1262 |
1125 /** | 1263 /// This resource represents a long-running operation that is the result of a |
1126 * This resource represents a long-running operation that is the result of a | 1264 /// network API call. |
1127 * network API call. | |
1128 */ | |
1129 class Operation { | 1265 class Operation { |
1130 /** | 1266 /// If the value is `false`, it means the operation is still in progress. |
1131 * If the value is `false`, it means the operation is still in progress. | 1267 /// If `true`, the operation is completed, and either `error` or `response` |
1132 * If true, the operation is completed, and either `error` or `response` is | 1268 /// is |
1133 * available. | 1269 /// available. |
1134 */ | |
1135 core.bool done; | 1270 core.bool done; |
1136 /** | 1271 |
1137 * This field will always be not set if the operation is created by | 1272 /// This field will always be not set if the operation is created by |
1138 * `claimAsync`, `unclaimAsync`, or `updateMetadataAsync`. In this case, error | 1273 /// `claimAsync`, `unclaimAsync`, or `updateMetadataAsync`. In this case, |
1139 * information for each device is set in | 1274 /// error information for each device is set in |
1140 * `response.perDeviceStatus.result.status`. | 1275 /// `response.perDeviceStatus.result.status`. |
1141 */ | |
1142 Status error; | 1276 Status error; |
1143 /** | 1277 |
1144 * This field will contain a `DevicesLongRunningOperationMetadata` object if | 1278 /// This field will contain a `DevicesLongRunningOperationMetadata` object if |
1145 * the operation is created by `claimAsync`, `unclaimAsync`, or | 1279 /// the operation is created by `claimAsync`, `unclaimAsync`, or |
1146 * `updateMetadataAsync`. | 1280 /// `updateMetadataAsync`. |
1147 * | 1281 /// |
1148 * The values for Object must be JSON objects. It can consist of `num`, | 1282 /// The values for Object must be JSON objects. It can consist of `num`, |
1149 * `String`, `bool` and `null` as well as `Map` and `List` values. | 1283 /// `String`, `bool` and `null` as well as `Map` and `List` values. |
1150 */ | |
1151 core.Map<core.String, core.Object> metadata; | 1284 core.Map<core.String, core.Object> metadata; |
1152 /** | 1285 |
1153 * The server-assigned name, which is only unique within the same service that | 1286 /// The server-assigned name, which is only unique within the same service |
1154 * originally returns it. If you use the default HTTP mapping, the | 1287 /// that |
1155 * `name` should have the format of `operations/some/unique/name`. | 1288 /// originally returns it. If you use the default HTTP mapping, the |
1156 */ | 1289 /// `name` should have the format of `operations/some/unique/name`. |
1157 core.String name; | 1290 core.String name; |
1158 /** | 1291 |
1159 * This field will contain a `DevicesLongRunningOperationResponse` object if | 1292 /// This field will contain a `DevicesLongRunningOperationResponse` object if |
1160 * the operation is created by `claimAsync`, `unclaimAsync`, or | 1293 /// the operation is created by `claimAsync`, `unclaimAsync`, or |
1161 * `updateMetadataAsync`. | 1294 /// `updateMetadataAsync`. |
1162 * | 1295 /// |
1163 * The values for Object must be JSON objects. It can consist of `num`, | 1296 /// The values for Object must be JSON objects. It can consist of `num`, |
1164 * `String`, `bool` and `null` as well as `Map` and `List` values. | 1297 /// `String`, `bool` and `null` as well as `Map` and `List` values. |
1165 */ | |
1166 core.Map<core.String, core.Object> response; | 1298 core.Map<core.String, core.Object> response; |
1167 | 1299 |
1168 Operation(); | 1300 Operation(); |
1169 | 1301 |
1170 Operation.fromJson(core.Map _json) { | 1302 Operation.fromJson(core.Map _json) { |
1171 if (_json.containsKey("done")) { | 1303 if (_json.containsKey("done")) { |
1172 done = _json["done"]; | 1304 done = _json["done"]; |
1173 } | 1305 } |
1174 if (_json.containsKey("error")) { | 1306 if (_json.containsKey("error")) { |
1175 error = new Status.fromJson(_json["error"]); | 1307 error = new Status.fromJson(_json["error"]); |
1176 } | 1308 } |
1177 if (_json.containsKey("metadata")) { | 1309 if (_json.containsKey("metadata")) { |
1178 metadata = _json["metadata"]; | 1310 metadata = _json["metadata"]; |
1179 } | 1311 } |
1180 if (_json.containsKey("name")) { | 1312 if (_json.containsKey("name")) { |
1181 name = _json["name"]; | 1313 name = _json["name"]; |
1182 } | 1314 } |
1183 if (_json.containsKey("response")) { | 1315 if (_json.containsKey("response")) { |
1184 response = _json["response"]; | 1316 response = _json["response"]; |
1185 } | 1317 } |
1186 } | 1318 } |
1187 | 1319 |
1188 core.Map<core.String, core.Object> toJson() { | 1320 core.Map<core.String, core.Object> toJson() { |
1189 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1321 final core.Map<core.String, core.Object> _json = |
| 1322 new core.Map<core.String, core.Object>(); |
1190 if (done != null) { | 1323 if (done != null) { |
1191 _json["done"] = done; | 1324 _json["done"] = done; |
1192 } | 1325 } |
1193 if (error != null) { | 1326 if (error != null) { |
1194 _json["error"] = (error).toJson(); | 1327 _json["error"] = (error).toJson(); |
1195 } | 1328 } |
1196 if (metadata != null) { | 1329 if (metadata != null) { |
1197 _json["metadata"] = metadata; | 1330 _json["metadata"] = metadata; |
1198 } | 1331 } |
1199 if (name != null) { | 1332 if (name != null) { |
1200 _json["name"] = name; | 1333 _json["name"] = name; |
1201 } | 1334 } |
1202 if (response != null) { | 1335 if (response != null) { |
1203 _json["response"] = response; | 1336 _json["response"] = response; |
1204 } | 1337 } |
1205 return _json; | 1338 return _json; |
1206 } | 1339 } |
1207 } | 1340 } |
1208 | 1341 |
1209 /** Operation the server received for every device. */ | 1342 /// Operation the server received for every device. |
1210 class OperationPerDevice { | 1343 class OperationPerDevice { |
1211 /** Request to claim a device. */ | 1344 /// Request to claim a device. |
1212 PartnerClaim claim; | 1345 PartnerClaim claim; |
1213 /** Processing result for every device. */ | 1346 |
| 1347 /// Processing result for every device. |
1214 PerDeviceStatusInBatch result; | 1348 PerDeviceStatusInBatch result; |
1215 /** Request to unclaim a device. */ | 1349 |
| 1350 /// Request to unclaim a device. |
1216 PartnerUnclaim unclaim; | 1351 PartnerUnclaim unclaim; |
1217 /** Request to set metadata for a device. */ | 1352 |
| 1353 /// Request to set metadata for a device. |
1218 UpdateMetadataArguments updateMetadata; | 1354 UpdateMetadataArguments updateMetadata; |
1219 | 1355 |
1220 OperationPerDevice(); | 1356 OperationPerDevice(); |
1221 | 1357 |
1222 OperationPerDevice.fromJson(core.Map _json) { | 1358 OperationPerDevice.fromJson(core.Map _json) { |
1223 if (_json.containsKey("claim")) { | 1359 if (_json.containsKey("claim")) { |
1224 claim = new PartnerClaim.fromJson(_json["claim"]); | 1360 claim = new PartnerClaim.fromJson(_json["claim"]); |
1225 } | 1361 } |
1226 if (_json.containsKey("result")) { | 1362 if (_json.containsKey("result")) { |
1227 result = new PerDeviceStatusInBatch.fromJson(_json["result"]); | 1363 result = new PerDeviceStatusInBatch.fromJson(_json["result"]); |
1228 } | 1364 } |
1229 if (_json.containsKey("unclaim")) { | 1365 if (_json.containsKey("unclaim")) { |
1230 unclaim = new PartnerUnclaim.fromJson(_json["unclaim"]); | 1366 unclaim = new PartnerUnclaim.fromJson(_json["unclaim"]); |
1231 } | 1367 } |
1232 if (_json.containsKey("updateMetadata")) { | 1368 if (_json.containsKey("updateMetadata")) { |
1233 updateMetadata = new UpdateMetadataArguments.fromJson(_json["updateMetadat
a"]); | 1369 updateMetadata = |
| 1370 new UpdateMetadataArguments.fromJson(_json["updateMetadata"]); |
1234 } | 1371 } |
1235 } | 1372 } |
1236 | 1373 |
1237 core.Map<core.String, core.Object> toJson() { | 1374 core.Map<core.String, core.Object> toJson() { |
1238 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1375 final core.Map<core.String, core.Object> _json = |
| 1376 new core.Map<core.String, core.Object>(); |
1239 if (claim != null) { | 1377 if (claim != null) { |
1240 _json["claim"] = (claim).toJson(); | 1378 _json["claim"] = (claim).toJson(); |
1241 } | 1379 } |
1242 if (result != null) { | 1380 if (result != null) { |
1243 _json["result"] = (result).toJson(); | 1381 _json["result"] = (result).toJson(); |
1244 } | 1382 } |
1245 if (unclaim != null) { | 1383 if (unclaim != null) { |
1246 _json["unclaim"] = (unclaim).toJson(); | 1384 _json["unclaim"] = (unclaim).toJson(); |
1247 } | 1385 } |
1248 if (updateMetadata != null) { | 1386 if (updateMetadata != null) { |
1249 _json["updateMetadata"] = (updateMetadata).toJson(); | 1387 _json["updateMetadata"] = (updateMetadata).toJson(); |
1250 } | 1388 } |
1251 return _json; | 1389 return _json; |
1252 } | 1390 } |
1253 } | 1391 } |
1254 | 1392 |
1255 /** Identifies one claim request. */ | 1393 /// Identifies one claim request. |
1256 class PartnerClaim { | 1394 class PartnerClaim { |
1257 /** customer id to claim for. */ | 1395 /// Customer ID to claim for. |
1258 core.String customerId; | 1396 core.String customerId; |
1259 /** Device identifier of the device. */ | 1397 |
| 1398 /// Device identifier of the device. |
1260 DeviceIdentifier deviceIdentifier; | 1399 DeviceIdentifier deviceIdentifier; |
1261 /** metadata to set at claim. */ | 1400 |
| 1401 /// Metadata to set at claim. |
1262 DeviceMetadata deviceMetadata; | 1402 DeviceMetadata deviceMetadata; |
1263 /** | 1403 |
1264 * section type to claim. | 1404 /// Section type to claim. |
1265 * Possible string values are: | 1405 /// Possible string values are: |
1266 * - "SECTION_TYPE_UNSPECIFIED" : Unspecified | 1406 /// - "SECTION_TYPE_UNSPECIFIED" : Unspecified section type. |
1267 * - "SECTION_TYPE_ZERO_TOUCH" : Zero touch | 1407 /// - "SECTION_TYPE_ZERO_TOUCH" : Zero touch section type. |
1268 */ | |
1269 core.String sectionType; | 1408 core.String sectionType; |
1270 | 1409 |
1271 PartnerClaim(); | 1410 PartnerClaim(); |
1272 | 1411 |
1273 PartnerClaim.fromJson(core.Map _json) { | 1412 PartnerClaim.fromJson(core.Map _json) { |
1274 if (_json.containsKey("customerId")) { | 1413 if (_json.containsKey("customerId")) { |
1275 customerId = _json["customerId"]; | 1414 customerId = _json["customerId"]; |
1276 } | 1415 } |
1277 if (_json.containsKey("deviceIdentifier")) { | 1416 if (_json.containsKey("deviceIdentifier")) { |
1278 deviceIdentifier = new DeviceIdentifier.fromJson(_json["deviceIdentifier"]
); | 1417 deviceIdentifier = |
| 1418 new DeviceIdentifier.fromJson(_json["deviceIdentifier"]); |
1279 } | 1419 } |
1280 if (_json.containsKey("deviceMetadata")) { | 1420 if (_json.containsKey("deviceMetadata")) { |
1281 deviceMetadata = new DeviceMetadata.fromJson(_json["deviceMetadata"]); | 1421 deviceMetadata = new DeviceMetadata.fromJson(_json["deviceMetadata"]); |
1282 } | 1422 } |
1283 if (_json.containsKey("sectionType")) { | 1423 if (_json.containsKey("sectionType")) { |
1284 sectionType = _json["sectionType"]; | 1424 sectionType = _json["sectionType"]; |
1285 } | 1425 } |
1286 } | 1426 } |
1287 | 1427 |
1288 core.Map<core.String, core.Object> toJson() { | 1428 core.Map<core.String, core.Object> toJson() { |
1289 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1429 final core.Map<core.String, core.Object> _json = |
| 1430 new core.Map<core.String, core.Object>(); |
1290 if (customerId != null) { | 1431 if (customerId != null) { |
1291 _json["customerId"] = customerId; | 1432 _json["customerId"] = customerId; |
1292 } | 1433 } |
1293 if (deviceIdentifier != null) { | 1434 if (deviceIdentifier != null) { |
1294 _json["deviceIdentifier"] = (deviceIdentifier).toJson(); | 1435 _json["deviceIdentifier"] = (deviceIdentifier).toJson(); |
1295 } | 1436 } |
1296 if (deviceMetadata != null) { | 1437 if (deviceMetadata != null) { |
1297 _json["deviceMetadata"] = (deviceMetadata).toJson(); | 1438 _json["deviceMetadata"] = (deviceMetadata).toJson(); |
1298 } | 1439 } |
1299 if (sectionType != null) { | 1440 if (sectionType != null) { |
1300 _json["sectionType"] = sectionType; | 1441 _json["sectionType"] = sectionType; |
1301 } | 1442 } |
1302 return _json; | 1443 return _json; |
1303 } | 1444 } |
1304 } | 1445 } |
1305 | 1446 |
1306 /** Identifies one unclaim request. */ | 1447 /// Identifies one unclaim request. |
1307 class PartnerUnclaim { | 1448 class PartnerUnclaim { |
1308 /** device id of the device. */ | 1449 /// Device ID of the device. |
1309 core.String deviceId; | 1450 core.String deviceId; |
1310 /** device identifier of the device. */ | 1451 |
| 1452 /// Device identifier of the device. |
1311 DeviceIdentifier deviceIdentifier; | 1453 DeviceIdentifier deviceIdentifier; |
1312 /** | 1454 |
1313 * section type to unclaim. | 1455 /// Section type to unclaim. |
1314 * Possible string values are: | 1456 /// Possible string values are: |
1315 * - "SECTION_TYPE_UNSPECIFIED" : Unspecified | 1457 /// - "SECTION_TYPE_UNSPECIFIED" : Unspecified section type. |
1316 * - "SECTION_TYPE_ZERO_TOUCH" : Zero touch | 1458 /// - "SECTION_TYPE_ZERO_TOUCH" : Zero touch section type. |
1317 */ | |
1318 core.String sectionType; | 1459 core.String sectionType; |
1319 | 1460 |
1320 PartnerUnclaim(); | 1461 PartnerUnclaim(); |
1321 | 1462 |
1322 PartnerUnclaim.fromJson(core.Map _json) { | 1463 PartnerUnclaim.fromJson(core.Map _json) { |
1323 if (_json.containsKey("deviceId")) { | 1464 if (_json.containsKey("deviceId")) { |
1324 deviceId = _json["deviceId"]; | 1465 deviceId = _json["deviceId"]; |
1325 } | 1466 } |
1326 if (_json.containsKey("deviceIdentifier")) { | 1467 if (_json.containsKey("deviceIdentifier")) { |
1327 deviceIdentifier = new DeviceIdentifier.fromJson(_json["deviceIdentifier"]
); | 1468 deviceIdentifier = |
| 1469 new DeviceIdentifier.fromJson(_json["deviceIdentifier"]); |
1328 } | 1470 } |
1329 if (_json.containsKey("sectionType")) { | 1471 if (_json.containsKey("sectionType")) { |
1330 sectionType = _json["sectionType"]; | 1472 sectionType = _json["sectionType"]; |
1331 } | 1473 } |
1332 } | 1474 } |
1333 | 1475 |
1334 core.Map<core.String, core.Object> toJson() { | 1476 core.Map<core.String, core.Object> toJson() { |
1335 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1477 final core.Map<core.String, core.Object> _json = |
| 1478 new core.Map<core.String, core.Object>(); |
1336 if (deviceId != null) { | 1479 if (deviceId != null) { |
1337 _json["deviceId"] = deviceId; | 1480 _json["deviceId"] = deviceId; |
1338 } | 1481 } |
1339 if (deviceIdentifier != null) { | 1482 if (deviceIdentifier != null) { |
1340 _json["deviceIdentifier"] = (deviceIdentifier).toJson(); | 1483 _json["deviceIdentifier"] = (deviceIdentifier).toJson(); |
1341 } | 1484 } |
1342 if (sectionType != null) { | 1485 if (sectionType != null) { |
1343 _json["sectionType"] = sectionType; | 1486 _json["sectionType"] = sectionType; |
1344 } | 1487 } |
1345 return _json; | 1488 return _json; |
1346 } | 1489 } |
1347 } | 1490 } |
1348 | 1491 |
1349 /** Stores the processing result for each device. */ | 1492 /// Stores the processing result for each device. |
1350 class PerDeviceStatusInBatch { | 1493 class PerDeviceStatusInBatch { |
1351 /** device id of the device if process succeeds. */ | 1494 /// Device ID of the device if process succeeds. |
1352 core.String deviceId; | 1495 core.String deviceId; |
1353 /** Error identifier. */ | 1496 |
| 1497 /// Error identifier. |
1354 core.String errorIdentifier; | 1498 core.String errorIdentifier; |
1355 /** Error message */ | 1499 |
| 1500 /// Error message. |
1356 core.String errorMessage; | 1501 core.String errorMessage; |
1357 /** | 1502 |
1358 * Process result. | 1503 /// Process result. |
1359 * Possible string values are: | 1504 /// Possible string values are: |
1360 * - "SINGLE_DEVICE_STATUS_UNSPECIFIED" : Invalid code. Shouldn' be used. | 1505 /// - "SINGLE_DEVICE_STATUS_UNSPECIFIED" : Invalid code. Shouldn't be used. |
1361 * - "SINGLE_DEVICE_STATUS_UNKNOWN_ERROR" : Unknown error. | 1506 /// - "SINGLE_DEVICE_STATUS_UNKNOWN_ERROR" : Unknown error. |
1362 * Unknown error is we don't expect it here. | 1507 /// We don't expect this error to occur here. |
1363 * - "SINGLE_DEVICE_STATUS_OTHER_ERROR" : Other error. | 1508 /// - "SINGLE_DEVICE_STATUS_OTHER_ERROR" : Other error. |
1364 * Other error is we know/expect this error, but not having proper error | 1509 /// We know/expect this error, but there's no defined error code for the |
1365 * code yet. | 1510 /// error. |
1366 * - "SINGLE_DEVICE_STATUS_SUCCESS" : Success. | 1511 /// - "SINGLE_DEVICE_STATUS_SUCCESS" : Success. |
1367 * - "SINGLE_DEVICE_STATUS_PERMISSION_DENIED" : Permission denied | 1512 /// - "SINGLE_DEVICE_STATUS_PERMISSION_DENIED" : Permission denied. |
1368 * - "SINGLE_DEVICE_STATUS_INVALID_DEVICE_IDENTIFIER" : Invalid device | 1513 /// - "SINGLE_DEVICE_STATUS_INVALID_DEVICE_IDENTIFIER" : Invalid device |
1369 * identifier. | 1514 /// identifier. |
1370 * - "SINGLE_DEVICE_STATUS_INVALID_SECTION_TYPE" : Invalid section type. | 1515 /// - "SINGLE_DEVICE_STATUS_INVALID_SECTION_TYPE" : Invalid section type. |
1371 * - "SINGLE_DEVICE_STATUS_SECTION_NOT_YOURS" : This section is claimed by | 1516 /// - "SINGLE_DEVICE_STATUS_SECTION_NOT_YOURS" : This section is claimed by |
1372 * other company. | 1517 /// another company. |
1373 */ | |
1374 core.String status; | 1518 core.String status; |
1375 | 1519 |
1376 PerDeviceStatusInBatch(); | 1520 PerDeviceStatusInBatch(); |
1377 | 1521 |
1378 PerDeviceStatusInBatch.fromJson(core.Map _json) { | 1522 PerDeviceStatusInBatch.fromJson(core.Map _json) { |
1379 if (_json.containsKey("deviceId")) { | 1523 if (_json.containsKey("deviceId")) { |
1380 deviceId = _json["deviceId"]; | 1524 deviceId = _json["deviceId"]; |
1381 } | 1525 } |
1382 if (_json.containsKey("errorIdentifier")) { | 1526 if (_json.containsKey("errorIdentifier")) { |
1383 errorIdentifier = _json["errorIdentifier"]; | 1527 errorIdentifier = _json["errorIdentifier"]; |
1384 } | 1528 } |
1385 if (_json.containsKey("errorMessage")) { | 1529 if (_json.containsKey("errorMessage")) { |
1386 errorMessage = _json["errorMessage"]; | 1530 errorMessage = _json["errorMessage"]; |
1387 } | 1531 } |
1388 if (_json.containsKey("status")) { | 1532 if (_json.containsKey("status")) { |
1389 status = _json["status"]; | 1533 status = _json["status"]; |
1390 } | 1534 } |
1391 } | 1535 } |
1392 | 1536 |
1393 core.Map<core.String, core.Object> toJson() { | 1537 core.Map<core.String, core.Object> toJson() { |
1394 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1538 final core.Map<core.String, core.Object> _json = |
| 1539 new core.Map<core.String, core.Object>(); |
1395 if (deviceId != null) { | 1540 if (deviceId != null) { |
1396 _json["deviceId"] = deviceId; | 1541 _json["deviceId"] = deviceId; |
1397 } | 1542 } |
1398 if (errorIdentifier != null) { | 1543 if (errorIdentifier != null) { |
1399 _json["errorIdentifier"] = errorIdentifier; | 1544 _json["errorIdentifier"] = errorIdentifier; |
1400 } | 1545 } |
1401 if (errorMessage != null) { | 1546 if (errorMessage != null) { |
1402 _json["errorMessage"] = errorMessage; | 1547 _json["errorMessage"] = errorMessage; |
1403 } | 1548 } |
1404 if (status != null) { | 1549 if (status != null) { |
1405 _json["status"] = status; | 1550 _json["status"] = status; |
1406 } | 1551 } |
1407 return _json; | 1552 return _json; |
1408 } | 1553 } |
1409 } | 1554 } |
1410 | 1555 |
1411 /** | 1556 /// The `Status` type defines a logical error model that is suitable for |
1412 * The `Status` type defines a logical error model that is suitable for | 1557 /// different |
1413 * different | 1558 /// programming environments, including REST APIs and RPC APIs. It is used by |
1414 * programming environments, including REST APIs and RPC APIs. It is used by | 1559 /// [gRPC](https://github.com/grpc). The error model is designed to be: |
1415 * [gRPC](https://github.com/grpc). The error model is designed to be: | 1560 /// |
1416 * | 1561 /// - Simple to use and understand for most users |
1417 * - Simple to use and understand for most users | 1562 /// - Flexible enough to meet unexpected needs |
1418 * - Flexible enough to meet unexpected needs | 1563 /// |
1419 * | 1564 /// # Overview |
1420 * # Overview | 1565 /// |
1421 * | 1566 /// The `Status` message contains three pieces of data: error code, error |
1422 * The `Status` message contains three pieces of data: error code, error | 1567 /// message, |
1423 * message, | 1568 /// and error details. The error code should be an enum value of |
1424 * and error details. The error code should be an enum value of | 1569 /// google.rpc.Code, but it may accept additional error codes if needed. The |
1425 * google.rpc.Code, but it may accept additional error codes if needed. The | 1570 /// error message should be a developer-facing English message that helps |
1426 * error message should be a developer-facing English message that helps | 1571 /// developers *understand* and *resolve* the error. If a localized user-facing |
1427 * developers *understand* and *resolve* the error. If a localized user-facing | 1572 /// error message is needed, put the localized message in the error details or |
1428 * error message is needed, put the localized message in the error details or | 1573 /// localize it in the client. The optional error details may contain arbitrary |
1429 * localize it in the client. The optional error details may contain arbitrary | 1574 /// information about the error. There is a predefined set of error detail |
1430 * information about the error. There is a predefined set of error detail types | 1575 /// types |
1431 * in the package `google.rpc` that can be used for common error conditions. | 1576 /// in the package `google.rpc` that can be used for common error conditions. |
1432 * | 1577 /// |
1433 * # Language mapping | 1578 /// # Language mapping |
1434 * | 1579 /// |
1435 * The `Status` message is the logical representation of the error model, but it | 1580 /// The `Status` message is the logical representation of the error model, but |
1436 * is not necessarily the actual wire format. When the `Status` message is | 1581 /// it |
1437 * exposed in different client libraries and different wire protocols, it can be | 1582 /// is not necessarily the actual wire format. When the `Status` message is |
1438 * mapped differently. For example, it will likely be mapped to some exceptions | 1583 /// exposed in different client libraries and different wire protocols, it can |
1439 * in Java, but more likely mapped to some error codes in C. | 1584 /// be |
1440 * | 1585 /// mapped differently. For example, it will likely be mapped to some |
1441 * # Other uses | 1586 /// exceptions |
1442 * | 1587 /// in Java, but more likely mapped to some error codes in C. |
1443 * The error model and the `Status` message can be used in a variety of | 1588 /// |
1444 * environments, either with or without APIs, to provide a | 1589 /// # Other uses |
1445 * consistent developer experience across different environments. | 1590 /// |
1446 * | 1591 /// The error model and the `Status` message can be used in a variety of |
1447 * Example uses of this error model include: | 1592 /// environments, either with or without APIs, to provide a |
1448 * | 1593 /// consistent developer experience across different environments. |
1449 * - Partial errors. If a service needs to return partial errors to the client, | 1594 /// |
1450 * it may embed the `Status` in the normal response to indicate the partial | 1595 /// Example uses of this error model include: |
1451 * errors. | 1596 /// |
1452 * | 1597 /// - Partial errors. If a service needs to return partial errors to the |
1453 * - Workflow errors. A typical workflow has multiple steps. Each step may | 1598 /// client, |
1454 * have a `Status` message for error reporting. | 1599 /// it may embed the `Status` in the normal response to indicate the partial |
1455 * | 1600 /// errors. |
1456 * - Batch operations. If a client uses batch request and batch response, the | 1601 /// |
1457 * `Status` message should be used directly inside batch response, one for | 1602 /// - Workflow errors. A typical workflow has multiple steps. Each step may |
1458 * each error sub-response. | 1603 /// have a `Status` message for error reporting. |
1459 * | 1604 /// |
1460 * - Asynchronous operations. If an API call embeds asynchronous operation | 1605 /// - Batch operations. If a client uses batch request and batch response, the |
1461 * results in its response, the status of those operations should be | 1606 /// `Status` message should be used directly inside batch response, one for |
1462 * represented directly using the `Status` message. | 1607 /// each error sub-response. |
1463 * | 1608 /// |
1464 * - Logging. If some API errors are stored in logs, the message `Status` could | 1609 /// - Asynchronous operations. If an API call embeds asynchronous operation |
1465 * be used directly after any stripping needed for security/privacy reasons. | 1610 /// results in its response, the status of those operations should be |
1466 */ | 1611 /// represented directly using the `Status` message. |
| 1612 /// |
| 1613 /// - Logging. If some API errors are stored in logs, the message `Status` |
| 1614 /// could |
| 1615 /// be used directly after any stripping needed for security/privacy reasons. |
1467 class Status { | 1616 class Status { |
1468 /** The status code, which should be an enum value of google.rpc.Code. */ | 1617 /// The status code, which should be an enum value of google.rpc.Code. |
1469 core.int code; | 1618 core.int code; |
1470 /** | 1619 |
1471 * A list of messages that carry the error details. There is a common set of | 1620 /// A list of messages that carry the error details. There is a common set |
1472 * message types for APIs to use. | 1621 /// of |
1473 * | 1622 /// message types for APIs to use. |
1474 * The values for Object must be JSON objects. It can consist of `num`, | 1623 /// |
1475 * `String`, `bool` and `null` as well as `Map` and `List` values. | 1624 /// The values for Object must be JSON objects. It can consist of `num`, |
1476 */ | 1625 /// `String`, `bool` and `null` as well as `Map` and `List` values. |
1477 core.List<core.Map<core.String, core.Object>> details; | 1626 core.List<core.Map<core.String, core.Object>> details; |
1478 /** | 1627 |
1479 * A developer-facing error message, which should be in English. Any | 1628 /// A developer-facing error message, which should be in English. Any |
1480 * user-facing error message should be localized and sent in the | 1629 /// user-facing error message should be localized and sent in the |
1481 * google.rpc.Status.details field, or localized by the client. | 1630 /// google.rpc.Status.details field, or localized by the client. |
1482 */ | |
1483 core.String message; | 1631 core.String message; |
1484 | 1632 |
1485 Status(); | 1633 Status(); |
1486 | 1634 |
1487 Status.fromJson(core.Map _json) { | 1635 Status.fromJson(core.Map _json) { |
1488 if (_json.containsKey("code")) { | 1636 if (_json.containsKey("code")) { |
1489 code = _json["code"]; | 1637 code = _json["code"]; |
1490 } | 1638 } |
1491 if (_json.containsKey("details")) { | 1639 if (_json.containsKey("details")) { |
1492 details = _json["details"]; | 1640 details = _json["details"]; |
1493 } | 1641 } |
1494 if (_json.containsKey("message")) { | 1642 if (_json.containsKey("message")) { |
1495 message = _json["message"]; | 1643 message = _json["message"]; |
1496 } | 1644 } |
1497 } | 1645 } |
1498 | 1646 |
1499 core.Map<core.String, core.Object> toJson() { | 1647 core.Map<core.String, core.Object> toJson() { |
1500 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1648 final core.Map<core.String, core.Object> _json = |
| 1649 new core.Map<core.String, core.Object>(); |
1501 if (code != null) { | 1650 if (code != null) { |
1502 _json["code"] = code; | 1651 _json["code"] = code; |
1503 } | 1652 } |
1504 if (details != null) { | 1653 if (details != null) { |
1505 _json["details"] = details; | 1654 _json["details"] = details; |
1506 } | 1655 } |
1507 if (message != null) { | 1656 if (message != null) { |
1508 _json["message"] = message; | 1657 _json["message"] = message; |
1509 } | 1658 } |
1510 return _json; | 1659 return _json; |
1511 } | 1660 } |
1512 } | 1661 } |
1513 | 1662 |
1514 /** Request message to unclaim a device. */ | 1663 /// Request message to unclaim a device. |
1515 class UnclaimDeviceRequest { | 1664 class UnclaimDeviceRequest { |
1516 /** The device id returned by ClaimDevice. */ | 1665 /// The device ID returned by `ClaimDevice`. |
1517 core.String deviceId; | 1666 core.String deviceId; |
1518 /** The device identifier you use when you claimed this device. */ | 1667 |
| 1668 /// The device identifier you used when you claimed this device. |
1519 DeviceIdentifier deviceIdentifier; | 1669 DeviceIdentifier deviceIdentifier; |
1520 /** | 1670 |
1521 * The section type to unclaim for. | 1671 /// The section type to unclaim for. |
1522 * Possible string values are: | 1672 /// Possible string values are: |
1523 * - "SECTION_TYPE_UNSPECIFIED" : Unspecified | 1673 /// - "SECTION_TYPE_UNSPECIFIED" : Unspecified section type. |
1524 * - "SECTION_TYPE_ZERO_TOUCH" : Zero touch | 1674 /// - "SECTION_TYPE_ZERO_TOUCH" : Zero touch section type. |
1525 */ | |
1526 core.String sectionType; | 1675 core.String sectionType; |
1527 | 1676 |
1528 UnclaimDeviceRequest(); | 1677 UnclaimDeviceRequest(); |
1529 | 1678 |
1530 UnclaimDeviceRequest.fromJson(core.Map _json) { | 1679 UnclaimDeviceRequest.fromJson(core.Map _json) { |
1531 if (_json.containsKey("deviceId")) { | 1680 if (_json.containsKey("deviceId")) { |
1532 deviceId = _json["deviceId"]; | 1681 deviceId = _json["deviceId"]; |
1533 } | 1682 } |
1534 if (_json.containsKey("deviceIdentifier")) { | 1683 if (_json.containsKey("deviceIdentifier")) { |
1535 deviceIdentifier = new DeviceIdentifier.fromJson(_json["deviceIdentifier"]
); | 1684 deviceIdentifier = |
| 1685 new DeviceIdentifier.fromJson(_json["deviceIdentifier"]); |
1536 } | 1686 } |
1537 if (_json.containsKey("sectionType")) { | 1687 if (_json.containsKey("sectionType")) { |
1538 sectionType = _json["sectionType"]; | 1688 sectionType = _json["sectionType"]; |
1539 } | 1689 } |
1540 } | 1690 } |
1541 | 1691 |
1542 core.Map<core.String, core.Object> toJson() { | 1692 core.Map<core.String, core.Object> toJson() { |
1543 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1693 final core.Map<core.String, core.Object> _json = |
| 1694 new core.Map<core.String, core.Object>(); |
1544 if (deviceId != null) { | 1695 if (deviceId != null) { |
1545 _json["deviceId"] = deviceId; | 1696 _json["deviceId"] = deviceId; |
1546 } | 1697 } |
1547 if (deviceIdentifier != null) { | 1698 if (deviceIdentifier != null) { |
1548 _json["deviceIdentifier"] = (deviceIdentifier).toJson(); | 1699 _json["deviceIdentifier"] = (deviceIdentifier).toJson(); |
1549 } | 1700 } |
1550 if (sectionType != null) { | 1701 if (sectionType != null) { |
1551 _json["sectionType"] = sectionType; | 1702 _json["sectionType"] = sectionType; |
1552 } | 1703 } |
1553 return _json; | 1704 return _json; |
1554 } | 1705 } |
1555 } | 1706 } |
1556 | 1707 |
1557 /** Request to unclaim devices asynchronously in batch. */ | 1708 /// Request to unclaim devices asynchronously in batch. |
1558 class UnclaimDevicesRequest { | 1709 class UnclaimDevicesRequest { |
1559 /** list of unclaims. */ | 1710 /// List of devices to unclaim. |
1560 core.List<PartnerUnclaim> unclaims; | 1711 core.List<PartnerUnclaim> unclaims; |
1561 | 1712 |
1562 UnclaimDevicesRequest(); | 1713 UnclaimDevicesRequest(); |
1563 | 1714 |
1564 UnclaimDevicesRequest.fromJson(core.Map _json) { | 1715 UnclaimDevicesRequest.fromJson(core.Map _json) { |
1565 if (_json.containsKey("unclaims")) { | 1716 if (_json.containsKey("unclaims")) { |
1566 unclaims = _json["unclaims"].map((value) => new PartnerUnclaim.fromJson(va
lue)).toList(); | 1717 unclaims = _json["unclaims"] |
| 1718 .map((value) => new PartnerUnclaim.fromJson(value)) |
| 1719 .toList(); |
1567 } | 1720 } |
1568 } | 1721 } |
1569 | 1722 |
1570 core.Map<core.String, core.Object> toJson() { | 1723 core.Map<core.String, core.Object> toJson() { |
1571 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1724 final core.Map<core.String, core.Object> _json = |
| 1725 new core.Map<core.String, core.Object>(); |
1572 if (unclaims != null) { | 1726 if (unclaims != null) { |
1573 _json["unclaims"] = unclaims.map((value) => (value).toJson()).toList(); | 1727 _json["unclaims"] = unclaims.map((value) => (value).toJson()).toList(); |
1574 } | 1728 } |
1575 return _json; | 1729 return _json; |
1576 } | 1730 } |
1577 } | 1731 } |
1578 | 1732 |
1579 /** Request to update device metadata in batch. */ | 1733 /// Request to update device metadata in batch. |
1580 class UpdateDeviceMetadataInBatchRequest { | 1734 class UpdateDeviceMetadataInBatchRequest { |
1581 /** list of metadata updates. */ | 1735 /// List of metadata updates. |
1582 core.List<UpdateMetadataArguments> updates; | 1736 core.List<UpdateMetadataArguments> updates; |
1583 | 1737 |
1584 UpdateDeviceMetadataInBatchRequest(); | 1738 UpdateDeviceMetadataInBatchRequest(); |
1585 | 1739 |
1586 UpdateDeviceMetadataInBatchRequest.fromJson(core.Map _json) { | 1740 UpdateDeviceMetadataInBatchRequest.fromJson(core.Map _json) { |
1587 if (_json.containsKey("updates")) { | 1741 if (_json.containsKey("updates")) { |
1588 updates = _json["updates"].map((value) => new UpdateMetadataArguments.from
Json(value)).toList(); | 1742 updates = _json["updates"] |
| 1743 .map((value) => new UpdateMetadataArguments.fromJson(value)) |
| 1744 .toList(); |
1589 } | 1745 } |
1590 } | 1746 } |
1591 | 1747 |
1592 core.Map<core.String, core.Object> toJson() { | 1748 core.Map<core.String, core.Object> toJson() { |
1593 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1749 final core.Map<core.String, core.Object> _json = |
| 1750 new core.Map<core.String, core.Object>(); |
1594 if (updates != null) { | 1751 if (updates != null) { |
1595 _json["updates"] = updates.map((value) => (value).toJson()).toList(); | 1752 _json["updates"] = updates.map((value) => (value).toJson()).toList(); |
1596 } | 1753 } |
1597 return _json; | 1754 return _json; |
1598 } | 1755 } |
1599 } | 1756 } |
1600 | 1757 |
1601 /** Request to set metadata for a device. */ | 1758 /// Request to set metadata for a device. |
1602 class UpdateDeviceMetadataRequest { | 1759 class UpdateDeviceMetadataRequest { |
1603 /** The metdata to set. */ | 1760 /// The metdata to set. |
1604 DeviceMetadata deviceMetadata; | 1761 DeviceMetadata deviceMetadata; |
1605 | 1762 |
1606 UpdateDeviceMetadataRequest(); | 1763 UpdateDeviceMetadataRequest(); |
1607 | 1764 |
1608 UpdateDeviceMetadataRequest.fromJson(core.Map _json) { | 1765 UpdateDeviceMetadataRequest.fromJson(core.Map _json) { |
1609 if (_json.containsKey("deviceMetadata")) { | 1766 if (_json.containsKey("deviceMetadata")) { |
1610 deviceMetadata = new DeviceMetadata.fromJson(_json["deviceMetadata"]); | 1767 deviceMetadata = new DeviceMetadata.fromJson(_json["deviceMetadata"]); |
1611 } | 1768 } |
1612 } | 1769 } |
1613 | 1770 |
1614 core.Map<core.String, core.Object> toJson() { | 1771 core.Map<core.String, core.Object> toJson() { |
1615 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1772 final core.Map<core.String, core.Object> _json = |
| 1773 new core.Map<core.String, core.Object>(); |
1616 if (deviceMetadata != null) { | 1774 if (deviceMetadata != null) { |
1617 _json["deviceMetadata"] = (deviceMetadata).toJson(); | 1775 _json["deviceMetadata"] = (deviceMetadata).toJson(); |
1618 } | 1776 } |
1619 return _json; | 1777 return _json; |
1620 } | 1778 } |
1621 } | 1779 } |
1622 | 1780 |
1623 /** Identifies metdata updates to one device. */ | 1781 /// Identifies metdata updates to one device. |
1624 class UpdateMetadataArguments { | 1782 class UpdateMetadataArguments { |
1625 /** device id of the device. */ | 1783 /// Device ID of the device. |
1626 core.String deviceId; | 1784 core.String deviceId; |
1627 /** device identifier. */ | 1785 |
| 1786 /// Device identifier. |
1628 DeviceIdentifier deviceIdentifier; | 1787 DeviceIdentifier deviceIdentifier; |
1629 /** The metadata to update. */ | 1788 |
| 1789 /// The metadata to update. |
1630 DeviceMetadata deviceMetadata; | 1790 DeviceMetadata deviceMetadata; |
1631 | 1791 |
1632 UpdateMetadataArguments(); | 1792 UpdateMetadataArguments(); |
1633 | 1793 |
1634 UpdateMetadataArguments.fromJson(core.Map _json) { | 1794 UpdateMetadataArguments.fromJson(core.Map _json) { |
1635 if (_json.containsKey("deviceId")) { | 1795 if (_json.containsKey("deviceId")) { |
1636 deviceId = _json["deviceId"]; | 1796 deviceId = _json["deviceId"]; |
1637 } | 1797 } |
1638 if (_json.containsKey("deviceIdentifier")) { | 1798 if (_json.containsKey("deviceIdentifier")) { |
1639 deviceIdentifier = new DeviceIdentifier.fromJson(_json["deviceIdentifier"]
); | 1799 deviceIdentifier = |
| 1800 new DeviceIdentifier.fromJson(_json["deviceIdentifier"]); |
1640 } | 1801 } |
1641 if (_json.containsKey("deviceMetadata")) { | 1802 if (_json.containsKey("deviceMetadata")) { |
1642 deviceMetadata = new DeviceMetadata.fromJson(_json["deviceMetadata"]); | 1803 deviceMetadata = new DeviceMetadata.fromJson(_json["deviceMetadata"]); |
1643 } | 1804 } |
1644 } | 1805 } |
1645 | 1806 |
1646 core.Map<core.String, core.Object> toJson() { | 1807 core.Map<core.String, core.Object> toJson() { |
1647 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1808 final core.Map<core.String, core.Object> _json = |
| 1809 new core.Map<core.String, core.Object>(); |
1648 if (deviceId != null) { | 1810 if (deviceId != null) { |
1649 _json["deviceId"] = deviceId; | 1811 _json["deviceId"] = deviceId; |
1650 } | 1812 } |
1651 if (deviceIdentifier != null) { | 1813 if (deviceIdentifier != null) { |
1652 _json["deviceIdentifier"] = (deviceIdentifier).toJson(); | 1814 _json["deviceIdentifier"] = (deviceIdentifier).toJson(); |
1653 } | 1815 } |
1654 if (deviceMetadata != null) { | 1816 if (deviceMetadata != null) { |
1655 _json["deviceMetadata"] = (deviceMetadata).toJson(); | 1817 _json["deviceMetadata"] = (deviceMetadata).toJson(); |
1656 } | 1818 } |
1657 return _json; | 1819 return _json; |
1658 } | 1820 } |
1659 } | 1821 } |
OLD | NEW |