@googleapis/smartdevicemanagement 3.0.2 → 5.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,48 @@
1
1
  # Changelog
2
2
 
3
+ ## [5.0.1](https://github.com/googleapis/google-api-nodejs-client/compare/smartdevicemanagement-v5.0.0...smartdevicemanagement-v5.0.1) (2025-07-08)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **smartdevicemanagement:** update the API ([825bb11](https://github.com/googleapis/google-api-nodejs-client/commit/825bb11d1547d916f25600ba84523fee4feddf0a))
9
+ * **smartdevicemanagement:** update the API ([ce349d9](https://github.com/googleapis/google-api-nodejs-client/commit/ce349d90b4eb7fbd9de0f3b47c96ad08b4513c70))
10
+
11
+ ## [5.0.0](https://github.com/googleapis/google-api-nodejs-client/compare/smartdevicemanagement-v4.0.1...smartdevicemanagement-v5.0.0) (2025-06-30)
12
+
13
+
14
+ ### ⚠ BREAKING CHANGES
15
+
16
+ * upgrade to node 18
17
+
18
+ ### Features
19
+
20
+ * upgrade to node 18 ([682fbb8](https://github.com/googleapis/google-api-nodejs-client/commit/682fbb869189ae92b3e9a194d37d0548af0c1f92))
21
+
22
+
23
+ ### Bug Fixes
24
+
25
+ * **deps:** upgrade googleapis-common to 8.0.2-rc ([f4b0990](https://github.com/googleapis/google-api-nodejs-client/commit/f4b099071040cfbcfe4a2e7d487d45ee93b369e0))
26
+ * **smartdevicemanagement:** update the API ([ce349d9](https://github.com/googleapis/google-api-nodejs-client/commit/ce349d90b4eb7fbd9de0f3b47c96ad08b4513c70))
27
+
28
+ ## [4.0.1](https://github.com/googleapis/google-api-nodejs-client/compare/smartdevicemanagement-v4.0.0...smartdevicemanagement-v4.0.1) (2025-06-04)
29
+
30
+
31
+ ### Bug Fixes
32
+
33
+ * **deps:** upgrade googleapis-common to 8.0.2-rc ([f4b0990](https://github.com/googleapis/google-api-nodejs-client/commit/f4b099071040cfbcfe4a2e7d487d45ee93b369e0))
34
+
35
+ ## [4.0.0](https://github.com/googleapis/google-api-nodejs-client/compare/smartdevicemanagement-v3.0.2...smartdevicemanagement-v4.0.0) (2025-05-29)
36
+
37
+
38
+ ### ⚠ BREAKING CHANGES
39
+
40
+ * upgrade to node 18
41
+
42
+ ### Features
43
+
44
+ * upgrade to node 18 ([682fbb8](https://github.com/googleapis/google-api-nodejs-client/commit/682fbb869189ae92b3e9a194d37d0548af0c1f92))
45
+
3
46
  ## [3.0.2](https://github.com/googleapis/google-api-nodejs-client/compare/smartdevicemanagement-v3.0.1...smartdevicemanagement-v3.0.2) (2024-05-02)
4
47
 
5
48
 
package/build/index.d.ts CHANGED
@@ -9,4 +9,4 @@ export declare function smartdevicemanagement(options: smartdevicemanagement_v1.
9
9
  declare const auth: AuthPlus;
10
10
  export { auth };
11
11
  export { smartdevicemanagement_v1 };
12
- export { AuthPlus, GlobalOptions, APIRequestContext, GoogleConfigurable, StreamMethodOptions, GaxiosPromise, MethodOptions, BodyResponseCallback, } from 'googleapis-common';
12
+ export { AuthPlus, GlobalOptions, APIRequestContext, GoogleConfigurable, StreamMethodOptions, MethodOptions, BodyResponseCallback, } from 'googleapis-common';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;AAEjC,kCAAkC;AAElC,yDAAuE;AACvE,6BAA8C;AAuBtC,yGAvBA,6BAAwB,OAuBA;AArBnB,QAAA,QAAQ,GAAG;IACtB,EAAE,EAAE,6BAAwB,CAAC,qBAAqB;CACnD,CAAC;AAQF,SAAgB,qBAAqB,CAInC,gBAAyD;IAEzD,OAAO,IAAA,0BAAM,EAAI,uBAAuB,EAAE,gBAAgB,EAAE,gBAAQ,EAAE,IAAI,CAAC,CAAC;AAC9E,CAAC;AAPD,sDAOC;AAED,MAAM,IAAI,GAAG,IAAI,4BAAQ,EAAE,CAAC;AACpB,oBAAI;AAEZ,uDAS2B;AARzB,6GAAA,QAAQ,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;AAEjC,kCAAkC;AAElC,yDAAuE;AACvE,6BAA8C;AAuBtC,yGAvBA,6BAAwB,OAuBA;AArBnB,QAAA,QAAQ,GAAG;IACtB,EAAE,EAAE,6BAAwB,CAAC,qBAAqB;CACnD,CAAC;AAQF,SAAgB,qBAAqB,CAInC,gBAAyD;IAEzD,OAAO,IAAA,0BAAM,EAAI,uBAAuB,EAAE,gBAAgB,EAAE,gBAAQ,EAAE,IAAI,CAAC,CAAC;AAC9E,CAAC;AAPD,sDAOC;AAED,MAAM,IAAI,GAAG,IAAI,4BAAQ,EAAE,CAAC;AACpB,oBAAI;AAEZ,uDAQ2B;AAPzB,6GAAA,QAAQ,OAAA"}
package/build/v1.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /// <reference types="node" />
2
- import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient, GaxiosPromise, GoogleConfigurable, MethodOptions, StreamMethodOptions, GlobalOptions, GoogleAuth, BodyResponseCallback, APIRequestContext } from 'googleapis-common';
2
+ import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient, GaxiosResponseWithHTTP2, GoogleConfigurable, MethodOptions, StreamMethodOptions, GlobalOptions, GoogleAuth, BodyResponseCallback, APIRequestContext } from 'googleapis-common';
3
3
  import { Readable } from 'stream';
4
4
  export declare namespace smartdevicemanagement_v1 {
5
5
  export interface Options extends GlobalOptions {
@@ -201,42 +201,194 @@ export declare namespace smartdevicemanagement_v1 {
201
201
  constructor(context: APIRequestContext);
202
202
  /**
203
203
  * Executes a command to device managed by the enterprise.
204
+ * @example
205
+ * ```js
206
+ * // Before running the sample:
207
+ * // - Enable the API at:
208
+ * // https://console.developers.google.com/apis/api/smartdevicemanagement.googleapis.com
209
+ * // - Login into gcloud by running:
210
+ * // ```sh
211
+ * // $ gcloud auth application-default login
212
+ * // ```
213
+ * // - Install the npm module by running:
214
+ * // ```sh
215
+ * // $ npm install googleapis
216
+ * // ```
217
+ *
218
+ * const {google} = require('googleapis');
219
+ * const smartdevicemanagement = google.smartdevicemanagement('v1');
220
+ *
221
+ * async function main() {
222
+ * const auth = new google.auth.GoogleAuth({
223
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
224
+ * scopes: ['https://www.googleapis.com/auth/sdm.service'],
225
+ * });
226
+ *
227
+ * // Acquire an auth client, and bind it to all future calls
228
+ * const authClient = await auth.getClient();
229
+ * google.options({auth: authClient});
230
+ *
231
+ * // Do the magic
232
+ * const res = await smartdevicemanagement.enterprises.devices.executeCommand({
233
+ * // The name of the device requested. For example: "enterprises/XYZ/devices/123"
234
+ * name: 'enterprises/my-enterprise/devices/my-device',
235
+ *
236
+ * // Request body metadata
237
+ * requestBody: {
238
+ * // request body parameters
239
+ * // {
240
+ * // "command": "my_command",
241
+ * // "params": {}
242
+ * // }
243
+ * },
244
+ * });
245
+ * console.log(res.data);
246
+ *
247
+ * // Example response
248
+ * // {
249
+ * // "results": {}
250
+ * // }
251
+ * }
252
+ *
253
+ * main().catch(e => {
254
+ * console.error(e);
255
+ * throw e;
256
+ * });
257
+ *
258
+ * ```
204
259
  *
205
260
  * @param params - Parameters for request
206
261
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
207
262
  * @param callback - Optional callback that handles the response.
208
263
  * @returns A promise if used with async/await, or void if used with a callback.
209
264
  */
210
- executeCommand(params: Params$Resource$Enterprises$Devices$Executecommand, options: StreamMethodOptions): GaxiosPromise<Readable>;
211
- executeCommand(params?: Params$Resource$Enterprises$Devices$Executecommand, options?: MethodOptions): GaxiosPromise<Schema$GoogleHomeEnterpriseSdmV1ExecuteDeviceCommandResponse>;
265
+ executeCommand(params: Params$Resource$Enterprises$Devices$Executecommand, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
266
+ executeCommand(params?: Params$Resource$Enterprises$Devices$Executecommand, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$GoogleHomeEnterpriseSdmV1ExecuteDeviceCommandResponse>>;
212
267
  executeCommand(params: Params$Resource$Enterprises$Devices$Executecommand, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
213
268
  executeCommand(params: Params$Resource$Enterprises$Devices$Executecommand, options: MethodOptions | BodyResponseCallback<Schema$GoogleHomeEnterpriseSdmV1ExecuteDeviceCommandResponse>, callback: BodyResponseCallback<Schema$GoogleHomeEnterpriseSdmV1ExecuteDeviceCommandResponse>): void;
214
269
  executeCommand(params: Params$Resource$Enterprises$Devices$Executecommand, callback: BodyResponseCallback<Schema$GoogleHomeEnterpriseSdmV1ExecuteDeviceCommandResponse>): void;
215
270
  executeCommand(callback: BodyResponseCallback<Schema$GoogleHomeEnterpriseSdmV1ExecuteDeviceCommandResponse>): void;
216
271
  /**
217
272
  * Gets a device managed by the enterprise.
273
+ * @example
274
+ * ```js
275
+ * // Before running the sample:
276
+ * // - Enable the API at:
277
+ * // https://console.developers.google.com/apis/api/smartdevicemanagement.googleapis.com
278
+ * // - Login into gcloud by running:
279
+ * // ```sh
280
+ * // $ gcloud auth application-default login
281
+ * // ```
282
+ * // - Install the npm module by running:
283
+ * // ```sh
284
+ * // $ npm install googleapis
285
+ * // ```
286
+ *
287
+ * const {google} = require('googleapis');
288
+ * const smartdevicemanagement = google.smartdevicemanagement('v1');
289
+ *
290
+ * async function main() {
291
+ * const auth = new google.auth.GoogleAuth({
292
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
293
+ * scopes: ['https://www.googleapis.com/auth/sdm.service'],
294
+ * });
295
+ *
296
+ * // Acquire an auth client, and bind it to all future calls
297
+ * const authClient = await auth.getClient();
298
+ * google.options({auth: authClient});
299
+ *
300
+ * // Do the magic
301
+ * const res = await smartdevicemanagement.enterprises.devices.get({
302
+ * // The name of the device requested. For example: "enterprises/XYZ/devices/123"
303
+ * name: 'enterprises/my-enterprise/devices/my-device',
304
+ * });
305
+ * console.log(res.data);
306
+ *
307
+ * // Example response
308
+ * // {
309
+ * // "name": "my_name",
310
+ * // "parentRelations": [],
311
+ * // "traits": {},
312
+ * // "type": "my_type"
313
+ * // }
314
+ * }
315
+ *
316
+ * main().catch(e => {
317
+ * console.error(e);
318
+ * throw e;
319
+ * });
320
+ *
321
+ * ```
218
322
  *
219
323
  * @param params - Parameters for request
220
324
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
221
325
  * @param callback - Optional callback that handles the response.
222
326
  * @returns A promise if used with async/await, or void if used with a callback.
223
327
  */
224
- get(params: Params$Resource$Enterprises$Devices$Get, options: StreamMethodOptions): GaxiosPromise<Readable>;
225
- get(params?: Params$Resource$Enterprises$Devices$Get, options?: MethodOptions): GaxiosPromise<Schema$GoogleHomeEnterpriseSdmV1Device>;
328
+ get(params: Params$Resource$Enterprises$Devices$Get, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
329
+ get(params?: Params$Resource$Enterprises$Devices$Get, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$GoogleHomeEnterpriseSdmV1Device>>;
226
330
  get(params: Params$Resource$Enterprises$Devices$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
227
331
  get(params: Params$Resource$Enterprises$Devices$Get, options: MethodOptions | BodyResponseCallback<Schema$GoogleHomeEnterpriseSdmV1Device>, callback: BodyResponseCallback<Schema$GoogleHomeEnterpriseSdmV1Device>): void;
228
332
  get(params: Params$Resource$Enterprises$Devices$Get, callback: BodyResponseCallback<Schema$GoogleHomeEnterpriseSdmV1Device>): void;
229
333
  get(callback: BodyResponseCallback<Schema$GoogleHomeEnterpriseSdmV1Device>): void;
230
334
  /**
231
335
  * Lists devices managed by the enterprise.
336
+ * @example
337
+ * ```js
338
+ * // Before running the sample:
339
+ * // - Enable the API at:
340
+ * // https://console.developers.google.com/apis/api/smartdevicemanagement.googleapis.com
341
+ * // - Login into gcloud by running:
342
+ * // ```sh
343
+ * // $ gcloud auth application-default login
344
+ * // ```
345
+ * // - Install the npm module by running:
346
+ * // ```sh
347
+ * // $ npm install googleapis
348
+ * // ```
349
+ *
350
+ * const {google} = require('googleapis');
351
+ * const smartdevicemanagement = google.smartdevicemanagement('v1');
352
+ *
353
+ * async function main() {
354
+ * const auth = new google.auth.GoogleAuth({
355
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
356
+ * scopes: ['https://www.googleapis.com/auth/sdm.service'],
357
+ * });
358
+ *
359
+ * // Acquire an auth client, and bind it to all future calls
360
+ * const authClient = await auth.getClient();
361
+ * google.options({auth: authClient});
362
+ *
363
+ * // Do the magic
364
+ * const res = await smartdevicemanagement.enterprises.devices.list({
365
+ * // Optional filter to list devices. Filters can be done on: Device custom name (substring match): 'customName=wing'
366
+ * filter: 'placeholder-value',
367
+ * // The parent enterprise to list devices under. E.g. "enterprises/XYZ".
368
+ * parent: 'enterprises/my-enterprise',
369
+ * });
370
+ * console.log(res.data);
371
+ *
372
+ * // Example response
373
+ * // {
374
+ * // "devices": []
375
+ * // }
376
+ * }
377
+ *
378
+ * main().catch(e => {
379
+ * console.error(e);
380
+ * throw e;
381
+ * });
382
+ *
383
+ * ```
232
384
  *
233
385
  * @param params - Parameters for request
234
386
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
235
387
  * @param callback - Optional callback that handles the response.
236
388
  * @returns A promise if used with async/await, or void if used with a callback.
237
389
  */
238
- list(params: Params$Resource$Enterprises$Devices$List, options: StreamMethodOptions): GaxiosPromise<Readable>;
239
- list(params?: Params$Resource$Enterprises$Devices$List, options?: MethodOptions): GaxiosPromise<Schema$GoogleHomeEnterpriseSdmV1ListDevicesResponse>;
390
+ list(params: Params$Resource$Enterprises$Devices$List, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
391
+ list(params?: Params$Resource$Enterprises$Devices$List, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$GoogleHomeEnterpriseSdmV1ListDevicesResponse>>;
240
392
  list(params: Params$Resource$Enterprises$Devices$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
241
393
  list(params: Params$Resource$Enterprises$Devices$List, options: MethodOptions | BodyResponseCallback<Schema$GoogleHomeEnterpriseSdmV1ListDevicesResponse>, callback: BodyResponseCallback<Schema$GoogleHomeEnterpriseSdmV1ListDevicesResponse>): void;
242
394
  list(params: Params$Resource$Enterprises$Devices$List, callback: BodyResponseCallback<Schema$GoogleHomeEnterpriseSdmV1ListDevicesResponse>): void;
@@ -274,28 +426,123 @@ export declare namespace smartdevicemanagement_v1 {
274
426
  constructor(context: APIRequestContext);
275
427
  /**
276
428
  * Gets a structure managed by the enterprise.
429
+ * @example
430
+ * ```js
431
+ * // Before running the sample:
432
+ * // - Enable the API at:
433
+ * // https://console.developers.google.com/apis/api/smartdevicemanagement.googleapis.com
434
+ * // - Login into gcloud by running:
435
+ * // ```sh
436
+ * // $ gcloud auth application-default login
437
+ * // ```
438
+ * // - Install the npm module by running:
439
+ * // ```sh
440
+ * // $ npm install googleapis
441
+ * // ```
442
+ *
443
+ * const {google} = require('googleapis');
444
+ * const smartdevicemanagement = google.smartdevicemanagement('v1');
445
+ *
446
+ * async function main() {
447
+ * const auth = new google.auth.GoogleAuth({
448
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
449
+ * scopes: ['https://www.googleapis.com/auth/sdm.service'],
450
+ * });
451
+ *
452
+ * // Acquire an auth client, and bind it to all future calls
453
+ * const authClient = await auth.getClient();
454
+ * google.options({auth: authClient});
455
+ *
456
+ * // Do the magic
457
+ * const res = await smartdevicemanagement.enterprises.structures.get({
458
+ * // The name of the structure requested. For example: "enterprises/XYZ/structures/ABC".
459
+ * name: 'enterprises/my-enterprise/structures/my-structure',
460
+ * });
461
+ * console.log(res.data);
462
+ *
463
+ * // Example response
464
+ * // {
465
+ * // "name": "my_name",
466
+ * // "traits": {}
467
+ * // }
468
+ * }
469
+ *
470
+ * main().catch(e => {
471
+ * console.error(e);
472
+ * throw e;
473
+ * });
474
+ *
475
+ * ```
277
476
  *
278
477
  * @param params - Parameters for request
279
478
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
280
479
  * @param callback - Optional callback that handles the response.
281
480
  * @returns A promise if used with async/await, or void if used with a callback.
282
481
  */
283
- get(params: Params$Resource$Enterprises$Structures$Get, options: StreamMethodOptions): GaxiosPromise<Readable>;
284
- get(params?: Params$Resource$Enterprises$Structures$Get, options?: MethodOptions): GaxiosPromise<Schema$GoogleHomeEnterpriseSdmV1Structure>;
482
+ get(params: Params$Resource$Enterprises$Structures$Get, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
483
+ get(params?: Params$Resource$Enterprises$Structures$Get, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$GoogleHomeEnterpriseSdmV1Structure>>;
285
484
  get(params: Params$Resource$Enterprises$Structures$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
286
485
  get(params: Params$Resource$Enterprises$Structures$Get, options: MethodOptions | BodyResponseCallback<Schema$GoogleHomeEnterpriseSdmV1Structure>, callback: BodyResponseCallback<Schema$GoogleHomeEnterpriseSdmV1Structure>): void;
287
486
  get(params: Params$Resource$Enterprises$Structures$Get, callback: BodyResponseCallback<Schema$GoogleHomeEnterpriseSdmV1Structure>): void;
288
487
  get(callback: BodyResponseCallback<Schema$GoogleHomeEnterpriseSdmV1Structure>): void;
289
488
  /**
290
489
  * Lists structures managed by the enterprise.
490
+ * @example
491
+ * ```js
492
+ * // Before running the sample:
493
+ * // - Enable the API at:
494
+ * // https://console.developers.google.com/apis/api/smartdevicemanagement.googleapis.com
495
+ * // - Login into gcloud by running:
496
+ * // ```sh
497
+ * // $ gcloud auth application-default login
498
+ * // ```
499
+ * // - Install the npm module by running:
500
+ * // ```sh
501
+ * // $ npm install googleapis
502
+ * // ```
503
+ *
504
+ * const {google} = require('googleapis');
505
+ * const smartdevicemanagement = google.smartdevicemanagement('v1');
506
+ *
507
+ * async function main() {
508
+ * const auth = new google.auth.GoogleAuth({
509
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
510
+ * scopes: ['https://www.googleapis.com/auth/sdm.service'],
511
+ * });
512
+ *
513
+ * // Acquire an auth client, and bind it to all future calls
514
+ * const authClient = await auth.getClient();
515
+ * google.options({auth: authClient});
516
+ *
517
+ * // Do the magic
518
+ * const res = await smartdevicemanagement.enterprises.structures.list({
519
+ * // Optional filter to list structures.
520
+ * filter: 'placeholder-value',
521
+ * // The parent enterprise to list structures under. E.g. "enterprises/XYZ".
522
+ * parent: 'enterprises/my-enterprise',
523
+ * });
524
+ * console.log(res.data);
525
+ *
526
+ * // Example response
527
+ * // {
528
+ * // "structures": []
529
+ * // }
530
+ * }
531
+ *
532
+ * main().catch(e => {
533
+ * console.error(e);
534
+ * throw e;
535
+ * });
536
+ *
537
+ * ```
291
538
  *
292
539
  * @param params - Parameters for request
293
540
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
294
541
  * @param callback - Optional callback that handles the response.
295
542
  * @returns A promise if used with async/await, or void if used with a callback.
296
543
  */
297
- list(params: Params$Resource$Enterprises$Structures$List, options: StreamMethodOptions): GaxiosPromise<Readable>;
298
- list(params?: Params$Resource$Enterprises$Structures$List, options?: MethodOptions): GaxiosPromise<Schema$GoogleHomeEnterpriseSdmV1ListStructuresResponse>;
544
+ list(params: Params$Resource$Enterprises$Structures$List, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
545
+ list(params?: Params$Resource$Enterprises$Structures$List, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$GoogleHomeEnterpriseSdmV1ListStructuresResponse>>;
299
546
  list(params: Params$Resource$Enterprises$Structures$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
300
547
  list(params: Params$Resource$Enterprises$Structures$List, options: MethodOptions | BodyResponseCallback<Schema$GoogleHomeEnterpriseSdmV1ListStructuresResponse>, callback: BodyResponseCallback<Schema$GoogleHomeEnterpriseSdmV1ListStructuresResponse>): void;
301
548
  list(params: Params$Resource$Enterprises$Structures$List, callback: BodyResponseCallback<Schema$GoogleHomeEnterpriseSdmV1ListStructuresResponse>): void;
@@ -322,28 +569,121 @@ export declare namespace smartdevicemanagement_v1 {
322
569
  constructor(context: APIRequestContext);
323
570
  /**
324
571
  * Gets a room managed by the enterprise.
572
+ * @example
573
+ * ```js
574
+ * // Before running the sample:
575
+ * // - Enable the API at:
576
+ * // https://console.developers.google.com/apis/api/smartdevicemanagement.googleapis.com
577
+ * // - Login into gcloud by running:
578
+ * // ```sh
579
+ * // $ gcloud auth application-default login
580
+ * // ```
581
+ * // - Install the npm module by running:
582
+ * // ```sh
583
+ * // $ npm install googleapis
584
+ * // ```
585
+ *
586
+ * const {google} = require('googleapis');
587
+ * const smartdevicemanagement = google.smartdevicemanagement('v1');
588
+ *
589
+ * async function main() {
590
+ * const auth = new google.auth.GoogleAuth({
591
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
592
+ * scopes: ['https://www.googleapis.com/auth/sdm.service'],
593
+ * });
594
+ *
595
+ * // Acquire an auth client, and bind it to all future calls
596
+ * const authClient = await auth.getClient();
597
+ * google.options({auth: authClient});
598
+ *
599
+ * // Do the magic
600
+ * const res = await smartdevicemanagement.enterprises.structures.rooms.get({
601
+ * // The name of the room requested. For example: "enterprises/XYZ/structures/ABC/rooms/123".
602
+ * name: 'enterprises/my-enterprise/structures/my-structure/rooms/my-room',
603
+ * });
604
+ * console.log(res.data);
605
+ *
606
+ * // Example response
607
+ * // {
608
+ * // "name": "my_name",
609
+ * // "traits": {}
610
+ * // }
611
+ * }
612
+ *
613
+ * main().catch(e => {
614
+ * console.error(e);
615
+ * throw e;
616
+ * });
617
+ *
618
+ * ```
325
619
  *
326
620
  * @param params - Parameters for request
327
621
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
328
622
  * @param callback - Optional callback that handles the response.
329
623
  * @returns A promise if used with async/await, or void if used with a callback.
330
624
  */
331
- get(params: Params$Resource$Enterprises$Structures$Rooms$Get, options: StreamMethodOptions): GaxiosPromise<Readable>;
332
- get(params?: Params$Resource$Enterprises$Structures$Rooms$Get, options?: MethodOptions): GaxiosPromise<Schema$GoogleHomeEnterpriseSdmV1Room>;
625
+ get(params: Params$Resource$Enterprises$Structures$Rooms$Get, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
626
+ get(params?: Params$Resource$Enterprises$Structures$Rooms$Get, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$GoogleHomeEnterpriseSdmV1Room>>;
333
627
  get(params: Params$Resource$Enterprises$Structures$Rooms$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
334
628
  get(params: Params$Resource$Enterprises$Structures$Rooms$Get, options: MethodOptions | BodyResponseCallback<Schema$GoogleHomeEnterpriseSdmV1Room>, callback: BodyResponseCallback<Schema$GoogleHomeEnterpriseSdmV1Room>): void;
335
629
  get(params: Params$Resource$Enterprises$Structures$Rooms$Get, callback: BodyResponseCallback<Schema$GoogleHomeEnterpriseSdmV1Room>): void;
336
630
  get(callback: BodyResponseCallback<Schema$GoogleHomeEnterpriseSdmV1Room>): void;
337
631
  /**
338
632
  * Lists rooms managed by the enterprise.
633
+ * @example
634
+ * ```js
635
+ * // Before running the sample:
636
+ * // - Enable the API at:
637
+ * // https://console.developers.google.com/apis/api/smartdevicemanagement.googleapis.com
638
+ * // - Login into gcloud by running:
639
+ * // ```sh
640
+ * // $ gcloud auth application-default login
641
+ * // ```
642
+ * // - Install the npm module by running:
643
+ * // ```sh
644
+ * // $ npm install googleapis
645
+ * // ```
646
+ *
647
+ * const {google} = require('googleapis');
648
+ * const smartdevicemanagement = google.smartdevicemanagement('v1');
649
+ *
650
+ * async function main() {
651
+ * const auth = new google.auth.GoogleAuth({
652
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
653
+ * scopes: ['https://www.googleapis.com/auth/sdm.service'],
654
+ * });
655
+ *
656
+ * // Acquire an auth client, and bind it to all future calls
657
+ * const authClient = await auth.getClient();
658
+ * google.options({auth: authClient});
659
+ *
660
+ * // Do the magic
661
+ * const res = await smartdevicemanagement.enterprises.structures.rooms.list({
662
+ * // The parent resource name of the rooms requested. For example: "enterprises/XYZ/structures/ABC".
663
+ * parent: 'enterprises/my-enterprise/structures/my-structure',
664
+ * });
665
+ * console.log(res.data);
666
+ *
667
+ * // Example response
668
+ * // {
669
+ * // "rooms": []
670
+ * // }
671
+ * }
672
+ *
673
+ * main().catch(e => {
674
+ * console.error(e);
675
+ * throw e;
676
+ * });
677
+ *
678
+ * ```
339
679
  *
340
680
  * @param params - Parameters for request
341
681
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
342
682
  * @param callback - Optional callback that handles the response.
343
683
  * @returns A promise if used with async/await, or void if used with a callback.
344
684
  */
345
- list(params: Params$Resource$Enterprises$Structures$Rooms$List, options: StreamMethodOptions): GaxiosPromise<Readable>;
346
- list(params?: Params$Resource$Enterprises$Structures$Rooms$List, options?: MethodOptions): GaxiosPromise<Schema$GoogleHomeEnterpriseSdmV1ListRoomsResponse>;
685
+ list(params: Params$Resource$Enterprises$Structures$Rooms$List, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
686
+ list(params?: Params$Resource$Enterprises$Structures$Rooms$List, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$GoogleHomeEnterpriseSdmV1ListRoomsResponse>>;
347
687
  list(params: Params$Resource$Enterprises$Structures$Rooms$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
348
688
  list(params: Params$Resource$Enterprises$Structures$Rooms$List, options: MethodOptions | BodyResponseCallback<Schema$GoogleHomeEnterpriseSdmV1ListRoomsResponse>, callback: BodyResponseCallback<Schema$GoogleHomeEnterpriseSdmV1ListRoomsResponse>): void;
349
689
  list(params: Params$Resource$Enterprises$Structures$Rooms$List, callback: BodyResponseCallback<Schema$GoogleHomeEnterpriseSdmV1ListRoomsResponse>): void;
package/build/v1.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"v1.js","sourceRoot":"","sources":["../v1.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;AAEjC,uDAAuD;AACvD,sDAAsD;AACtD,0DAA0D;AAC1D,oDAAoD;AACpD,4CAA4C;AAE5C,yDAe2B;AAG3B,IAAiB,wBAAwB,CA88BxC;AA98BD,WAAiB,wBAAwB;IAgEvC;;;;;;;;;;OAUG;IACH,MAAa,qBAAqB;QAIhC,YAAY,OAAsB,EAAE,MAA2B;YAC7D,IAAI,CAAC,OAAO,GAAG;gBACb,QAAQ,EAAE,OAAO,IAAI,EAAE;gBACvB,MAAM;aACP,CAAC;YAEF,IAAI,CAAC,WAAW,GAAG,IAAI,oBAAoB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC5D,CAAC;KACF;IAZY,8CAAqB,wBAYjC,CAAA;IAgHD,MAAa,oBAAoB;QAI/B,YAAY,OAA0B;YACpC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;YACvB,IA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AAK,UAAU,EAAE;gBAC3C,QAAQ,GAAG,iBAAiB,CAAC;gBAC7B,OAAO,GAAG,EAAE,CAAC;aACd;YAED,MAAM,OAAO,GACX,OAAO,CAAC,OAAO,IAAI,+CAA+C,CAAC;YACrE,MAAM,UAAU,GAAG;gBACjB,OAAO,EAAE,MAAM,CAAC,MAAM,CACpB;oBACE,GAAG,EAAE,CAAC,OAAO,GAAG,qBAAqB,CAAC,CAAC,OAAO,CAC5C,cAAc,EACd,IAAI,CACL;oBACD,MAAM,EAAE,KAAK;oBACb,UAAU,EAAE,EAAE;iBACf,EACD,OAAO,CACR;gBACD,MAAM;gBACN,cAAc,EAAE,CAAC,QAAQ,CAAC;gBAC1B,UAAU,EAAE,CAAC,QAAQ,CAAC;gBACtB,OAAO,EAAE,IAAI,CAAC,OAAO;aACtB,CAAC;YACF,IAAI,QAAQ,EAAE;gBACZ,IAAA,oCAAgB,EACd,UAAU,EACV,QAAyC,CAC1C,CAAC;aACH;iBAAM;gBACL,OAAO,IAAA,oCAAgB,EACrB,UAAU,CACX,CAAC;aACH;QACH,CAAC;KACF;IAvSY,8DAAqC,wCAuSjD,CAAA;AAgBH,CAAC,EAtzCgB,wBAAwB,GAAxB,gCAAwB,KAAxB,gCAAwB,QAszCxC"}
package/index.ts CHANGED
@@ -44,7 +44,6 @@ export {
44
44
  APIRequestContext,
45
45
  GoogleConfigurable,
46
46
  StreamMethodOptions,
47
- GaxiosPromise,
48
47
  MethodOptions,
49
48
  BodyResponseCallback,
50
49
  } from 'googleapis-common';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@googleapis/smartdevicemanagement",
3
- "version": "3.0.2",
3
+ "version": "5.0.1",
4
4
  "description": "smartdevicemanagement",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -28,7 +28,7 @@
28
28
  "webpack": "webpack"
29
29
  },
30
30
  "dependencies": {
31
- "googleapis-common": "^7.0.0"
31
+ "googleapis-common": "^8.0.2-rc.0"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@microsoft/api-documenter": "^7.8.10",
package/v1.ts CHANGED
@@ -23,7 +23,7 @@ import {
23
23
  Compute,
24
24
  UserRefreshClient,
25
25
  BaseExternalAccountClient,
26
- GaxiosPromise,
26
+ GaxiosResponseWithHTTP2,
27
27
  GoogleConfigurable,
28
28
  createAPIRequest,
29
29
  MethodOptions,
@@ -253,6 +253,61 @@ export namespace smartdevicemanagement_v1 {
253
253
 
254
254
  /**
255
255
  * Executes a command to device managed by the enterprise.
256
+ * @example
257
+ * ```js
258
+ * // Before running the sample:
259
+ * // - Enable the API at:
260
+ * // https://console.developers.google.com/apis/api/smartdevicemanagement.googleapis.com
261
+ * // - Login into gcloud by running:
262
+ * // ```sh
263
+ * // $ gcloud auth application-default login
264
+ * // ```
265
+ * // - Install the npm module by running:
266
+ * // ```sh
267
+ * // $ npm install googleapis
268
+ * // ```
269
+ *
270
+ * const {google} = require('googleapis');
271
+ * const smartdevicemanagement = google.smartdevicemanagement('v1');
272
+ *
273
+ * async function main() {
274
+ * const auth = new google.auth.GoogleAuth({
275
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
276
+ * scopes: ['https://www.googleapis.com/auth/sdm.service'],
277
+ * });
278
+ *
279
+ * // Acquire an auth client, and bind it to all future calls
280
+ * const authClient = await auth.getClient();
281
+ * google.options({auth: authClient});
282
+ *
283
+ * // Do the magic
284
+ * const res = await smartdevicemanagement.enterprises.devices.executeCommand({
285
+ * // The name of the device requested. For example: "enterprises/XYZ/devices/123"
286
+ * name: 'enterprises/my-enterprise/devices/my-device',
287
+ *
288
+ * // Request body metadata
289
+ * requestBody: {
290
+ * // request body parameters
291
+ * // {
292
+ * // "command": "my_command",
293
+ * // "params": {}
294
+ * // }
295
+ * },
296
+ * });
297
+ * console.log(res.data);
298
+ *
299
+ * // Example response
300
+ * // {
301
+ * // "results": {}
302
+ * // }
303
+ * }
304
+ *
305
+ * main().catch(e => {
306
+ * console.error(e);
307
+ * throw e;
308
+ * });
309
+ *
310
+ * ```
256
311
  *
257
312
  * @param params - Parameters for request
258
313
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -262,11 +317,13 @@ export namespace smartdevicemanagement_v1 {
262
317
  executeCommand(
263
318
  params: Params$Resource$Enterprises$Devices$Executecommand,
264
319
  options: StreamMethodOptions
265
- ): GaxiosPromise<Readable>;
320
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
266
321
  executeCommand(
267
322
  params?: Params$Resource$Enterprises$Devices$Executecommand,
268
323
  options?: MethodOptions
269
- ): GaxiosPromise<Schema$GoogleHomeEnterpriseSdmV1ExecuteDeviceCommandResponse>;
324
+ ): Promise<
325
+ GaxiosResponseWithHTTP2<Schema$GoogleHomeEnterpriseSdmV1ExecuteDeviceCommandResponse>
326
+ >;
270
327
  executeCommand(
271
328
  params: Params$Resource$Enterprises$Devices$Executecommand,
272
329
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -301,8 +358,10 @@ export namespace smartdevicemanagement_v1 {
301
358
  | BodyResponseCallback<Readable>
302
359
  ):
303
360
  | void
304
- | GaxiosPromise<Schema$GoogleHomeEnterpriseSdmV1ExecuteDeviceCommandResponse>
305
- | GaxiosPromise<Readable> {
361
+ | Promise<
362
+ GaxiosResponseWithHTTP2<Schema$GoogleHomeEnterpriseSdmV1ExecuteDeviceCommandResponse>
363
+ >
364
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
306
365
  let params = (paramsOrCallback ||
307
366
  {}) as Params$Resource$Enterprises$Devices$Executecommand;
308
367
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -351,6 +410,55 @@ export namespace smartdevicemanagement_v1 {
351
410
 
352
411
  /**
353
412
  * Gets a device managed by the enterprise.
413
+ * @example
414
+ * ```js
415
+ * // Before running the sample:
416
+ * // - Enable the API at:
417
+ * // https://console.developers.google.com/apis/api/smartdevicemanagement.googleapis.com
418
+ * // - Login into gcloud by running:
419
+ * // ```sh
420
+ * // $ gcloud auth application-default login
421
+ * // ```
422
+ * // - Install the npm module by running:
423
+ * // ```sh
424
+ * // $ npm install googleapis
425
+ * // ```
426
+ *
427
+ * const {google} = require('googleapis');
428
+ * const smartdevicemanagement = google.smartdevicemanagement('v1');
429
+ *
430
+ * async function main() {
431
+ * const auth = new google.auth.GoogleAuth({
432
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
433
+ * scopes: ['https://www.googleapis.com/auth/sdm.service'],
434
+ * });
435
+ *
436
+ * // Acquire an auth client, and bind it to all future calls
437
+ * const authClient = await auth.getClient();
438
+ * google.options({auth: authClient});
439
+ *
440
+ * // Do the magic
441
+ * const res = await smartdevicemanagement.enterprises.devices.get({
442
+ * // The name of the device requested. For example: "enterprises/XYZ/devices/123"
443
+ * name: 'enterprises/my-enterprise/devices/my-device',
444
+ * });
445
+ * console.log(res.data);
446
+ *
447
+ * // Example response
448
+ * // {
449
+ * // "name": "my_name",
450
+ * // "parentRelations": [],
451
+ * // "traits": {},
452
+ * // "type": "my_type"
453
+ * // }
454
+ * }
455
+ *
456
+ * main().catch(e => {
457
+ * console.error(e);
458
+ * throw e;
459
+ * });
460
+ *
461
+ * ```
354
462
  *
355
463
  * @param params - Parameters for request
356
464
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -360,11 +468,11 @@ export namespace smartdevicemanagement_v1 {
360
468
  get(
361
469
  params: Params$Resource$Enterprises$Devices$Get,
362
470
  options: StreamMethodOptions
363
- ): GaxiosPromise<Readable>;
471
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
364
472
  get(
365
473
  params?: Params$Resource$Enterprises$Devices$Get,
366
474
  options?: MethodOptions
367
- ): GaxiosPromise<Schema$GoogleHomeEnterpriseSdmV1Device>;
475
+ ): Promise<GaxiosResponseWithHTTP2<Schema$GoogleHomeEnterpriseSdmV1Device>>;
368
476
  get(
369
477
  params: Params$Resource$Enterprises$Devices$Get,
370
478
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -399,8 +507,8 @@ export namespace smartdevicemanagement_v1 {
399
507
  | BodyResponseCallback<Readable>
400
508
  ):
401
509
  | void
402
- | GaxiosPromise<Schema$GoogleHomeEnterpriseSdmV1Device>
403
- | GaxiosPromise<Readable> {
510
+ | Promise<GaxiosResponseWithHTTP2<Schema$GoogleHomeEnterpriseSdmV1Device>>
511
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
404
512
  let params = (paramsOrCallback ||
405
513
  {}) as Params$Resource$Enterprises$Devices$Get;
406
514
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -446,6 +554,54 @@ export namespace smartdevicemanagement_v1 {
446
554
 
447
555
  /**
448
556
  * Lists devices managed by the enterprise.
557
+ * @example
558
+ * ```js
559
+ * // Before running the sample:
560
+ * // - Enable the API at:
561
+ * // https://console.developers.google.com/apis/api/smartdevicemanagement.googleapis.com
562
+ * // - Login into gcloud by running:
563
+ * // ```sh
564
+ * // $ gcloud auth application-default login
565
+ * // ```
566
+ * // - Install the npm module by running:
567
+ * // ```sh
568
+ * // $ npm install googleapis
569
+ * // ```
570
+ *
571
+ * const {google} = require('googleapis');
572
+ * const smartdevicemanagement = google.smartdevicemanagement('v1');
573
+ *
574
+ * async function main() {
575
+ * const auth = new google.auth.GoogleAuth({
576
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
577
+ * scopes: ['https://www.googleapis.com/auth/sdm.service'],
578
+ * });
579
+ *
580
+ * // Acquire an auth client, and bind it to all future calls
581
+ * const authClient = await auth.getClient();
582
+ * google.options({auth: authClient});
583
+ *
584
+ * // Do the magic
585
+ * const res = await smartdevicemanagement.enterprises.devices.list({
586
+ * // Optional filter to list devices. Filters can be done on: Device custom name (substring match): 'customName=wing'
587
+ * filter: 'placeholder-value',
588
+ * // The parent enterprise to list devices under. E.g. "enterprises/XYZ".
589
+ * parent: 'enterprises/my-enterprise',
590
+ * });
591
+ * console.log(res.data);
592
+ *
593
+ * // Example response
594
+ * // {
595
+ * // "devices": []
596
+ * // }
597
+ * }
598
+ *
599
+ * main().catch(e => {
600
+ * console.error(e);
601
+ * throw e;
602
+ * });
603
+ *
604
+ * ```
449
605
  *
450
606
  * @param params - Parameters for request
451
607
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -455,11 +611,13 @@ export namespace smartdevicemanagement_v1 {
455
611
  list(
456
612
  params: Params$Resource$Enterprises$Devices$List,
457
613
  options: StreamMethodOptions
458
- ): GaxiosPromise<Readable>;
614
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
459
615
  list(
460
616
  params?: Params$Resource$Enterprises$Devices$List,
461
617
  options?: MethodOptions
462
- ): GaxiosPromise<Schema$GoogleHomeEnterpriseSdmV1ListDevicesResponse>;
618
+ ): Promise<
619
+ GaxiosResponseWithHTTP2<Schema$GoogleHomeEnterpriseSdmV1ListDevicesResponse>
620
+ >;
463
621
  list(
464
622
  params: Params$Resource$Enterprises$Devices$List,
465
623
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -494,8 +652,10 @@ export namespace smartdevicemanagement_v1 {
494
652
  | BodyResponseCallback<Readable>
495
653
  ):
496
654
  | void
497
- | GaxiosPromise<Schema$GoogleHomeEnterpriseSdmV1ListDevicesResponse>
498
- | GaxiosPromise<Readable> {
655
+ | Promise<
656
+ GaxiosResponseWithHTTP2<Schema$GoogleHomeEnterpriseSdmV1ListDevicesResponse>
657
+ >
658
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
499
659
  let params = (paramsOrCallback ||
500
660
  {}) as Params$Resource$Enterprises$Devices$List;
501
661
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -584,6 +744,53 @@ export namespace smartdevicemanagement_v1 {
584
744
 
585
745
  /**
586
746
  * Gets a structure managed by the enterprise.
747
+ * @example
748
+ * ```js
749
+ * // Before running the sample:
750
+ * // - Enable the API at:
751
+ * // https://console.developers.google.com/apis/api/smartdevicemanagement.googleapis.com
752
+ * // - Login into gcloud by running:
753
+ * // ```sh
754
+ * // $ gcloud auth application-default login
755
+ * // ```
756
+ * // - Install the npm module by running:
757
+ * // ```sh
758
+ * // $ npm install googleapis
759
+ * // ```
760
+ *
761
+ * const {google} = require('googleapis');
762
+ * const smartdevicemanagement = google.smartdevicemanagement('v1');
763
+ *
764
+ * async function main() {
765
+ * const auth = new google.auth.GoogleAuth({
766
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
767
+ * scopes: ['https://www.googleapis.com/auth/sdm.service'],
768
+ * });
769
+ *
770
+ * // Acquire an auth client, and bind it to all future calls
771
+ * const authClient = await auth.getClient();
772
+ * google.options({auth: authClient});
773
+ *
774
+ * // Do the magic
775
+ * const res = await smartdevicemanagement.enterprises.structures.get({
776
+ * // The name of the structure requested. For example: "enterprises/XYZ/structures/ABC".
777
+ * name: 'enterprises/my-enterprise/structures/my-structure',
778
+ * });
779
+ * console.log(res.data);
780
+ *
781
+ * // Example response
782
+ * // {
783
+ * // "name": "my_name",
784
+ * // "traits": {}
785
+ * // }
786
+ * }
787
+ *
788
+ * main().catch(e => {
789
+ * console.error(e);
790
+ * throw e;
791
+ * });
792
+ *
793
+ * ```
587
794
  *
588
795
  * @param params - Parameters for request
589
796
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -593,11 +800,13 @@ export namespace smartdevicemanagement_v1 {
593
800
  get(
594
801
  params: Params$Resource$Enterprises$Structures$Get,
595
802
  options: StreamMethodOptions
596
- ): GaxiosPromise<Readable>;
803
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
597
804
  get(
598
805
  params?: Params$Resource$Enterprises$Structures$Get,
599
806
  options?: MethodOptions
600
- ): GaxiosPromise<Schema$GoogleHomeEnterpriseSdmV1Structure>;
807
+ ): Promise<
808
+ GaxiosResponseWithHTTP2<Schema$GoogleHomeEnterpriseSdmV1Structure>
809
+ >;
601
810
  get(
602
811
  params: Params$Resource$Enterprises$Structures$Get,
603
812
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -632,8 +841,10 @@ export namespace smartdevicemanagement_v1 {
632
841
  | BodyResponseCallback<Readable>
633
842
  ):
634
843
  | void
635
- | GaxiosPromise<Schema$GoogleHomeEnterpriseSdmV1Structure>
636
- | GaxiosPromise<Readable> {
844
+ | Promise<
845
+ GaxiosResponseWithHTTP2<Schema$GoogleHomeEnterpriseSdmV1Structure>
846
+ >
847
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
637
848
  let params = (paramsOrCallback ||
638
849
  {}) as Params$Resource$Enterprises$Structures$Get;
639
850
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -679,6 +890,54 @@ export namespace smartdevicemanagement_v1 {
679
890
 
680
891
  /**
681
892
  * Lists structures managed by the enterprise.
893
+ * @example
894
+ * ```js
895
+ * // Before running the sample:
896
+ * // - Enable the API at:
897
+ * // https://console.developers.google.com/apis/api/smartdevicemanagement.googleapis.com
898
+ * // - Login into gcloud by running:
899
+ * // ```sh
900
+ * // $ gcloud auth application-default login
901
+ * // ```
902
+ * // - Install the npm module by running:
903
+ * // ```sh
904
+ * // $ npm install googleapis
905
+ * // ```
906
+ *
907
+ * const {google} = require('googleapis');
908
+ * const smartdevicemanagement = google.smartdevicemanagement('v1');
909
+ *
910
+ * async function main() {
911
+ * const auth = new google.auth.GoogleAuth({
912
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
913
+ * scopes: ['https://www.googleapis.com/auth/sdm.service'],
914
+ * });
915
+ *
916
+ * // Acquire an auth client, and bind it to all future calls
917
+ * const authClient = await auth.getClient();
918
+ * google.options({auth: authClient});
919
+ *
920
+ * // Do the magic
921
+ * const res = await smartdevicemanagement.enterprises.structures.list({
922
+ * // Optional filter to list structures.
923
+ * filter: 'placeholder-value',
924
+ * // The parent enterprise to list structures under. E.g. "enterprises/XYZ".
925
+ * parent: 'enterprises/my-enterprise',
926
+ * });
927
+ * console.log(res.data);
928
+ *
929
+ * // Example response
930
+ * // {
931
+ * // "structures": []
932
+ * // }
933
+ * }
934
+ *
935
+ * main().catch(e => {
936
+ * console.error(e);
937
+ * throw e;
938
+ * });
939
+ *
940
+ * ```
682
941
  *
683
942
  * @param params - Parameters for request
684
943
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -688,11 +947,13 @@ export namespace smartdevicemanagement_v1 {
688
947
  list(
689
948
  params: Params$Resource$Enterprises$Structures$List,
690
949
  options: StreamMethodOptions
691
- ): GaxiosPromise<Readable>;
950
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
692
951
  list(
693
952
  params?: Params$Resource$Enterprises$Structures$List,
694
953
  options?: MethodOptions
695
- ): GaxiosPromise<Schema$GoogleHomeEnterpriseSdmV1ListStructuresResponse>;
954
+ ): Promise<
955
+ GaxiosResponseWithHTTP2<Schema$GoogleHomeEnterpriseSdmV1ListStructuresResponse>
956
+ >;
696
957
  list(
697
958
  params: Params$Resource$Enterprises$Structures$List,
698
959
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -727,8 +988,10 @@ export namespace smartdevicemanagement_v1 {
727
988
  | BodyResponseCallback<Readable>
728
989
  ):
729
990
  | void
730
- | GaxiosPromise<Schema$GoogleHomeEnterpriseSdmV1ListStructuresResponse>
731
- | GaxiosPromise<Readable> {
991
+ | Promise<
992
+ GaxiosResponseWithHTTP2<Schema$GoogleHomeEnterpriseSdmV1ListStructuresResponse>
993
+ >
994
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
732
995
  let params = (paramsOrCallback ||
733
996
  {}) as Params$Resource$Enterprises$Structures$List;
734
997
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -803,6 +1066,53 @@ export namespace smartdevicemanagement_v1 {
803
1066
 
804
1067
  /**
805
1068
  * Gets a room managed by the enterprise.
1069
+ * @example
1070
+ * ```js
1071
+ * // Before running the sample:
1072
+ * // - Enable the API at:
1073
+ * // https://console.developers.google.com/apis/api/smartdevicemanagement.googleapis.com
1074
+ * // - Login into gcloud by running:
1075
+ * // ```sh
1076
+ * // $ gcloud auth application-default login
1077
+ * // ```
1078
+ * // - Install the npm module by running:
1079
+ * // ```sh
1080
+ * // $ npm install googleapis
1081
+ * // ```
1082
+ *
1083
+ * const {google} = require('googleapis');
1084
+ * const smartdevicemanagement = google.smartdevicemanagement('v1');
1085
+ *
1086
+ * async function main() {
1087
+ * const auth = new google.auth.GoogleAuth({
1088
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1089
+ * scopes: ['https://www.googleapis.com/auth/sdm.service'],
1090
+ * });
1091
+ *
1092
+ * // Acquire an auth client, and bind it to all future calls
1093
+ * const authClient = await auth.getClient();
1094
+ * google.options({auth: authClient});
1095
+ *
1096
+ * // Do the magic
1097
+ * const res = await smartdevicemanagement.enterprises.structures.rooms.get({
1098
+ * // The name of the room requested. For example: "enterprises/XYZ/structures/ABC/rooms/123".
1099
+ * name: 'enterprises/my-enterprise/structures/my-structure/rooms/my-room',
1100
+ * });
1101
+ * console.log(res.data);
1102
+ *
1103
+ * // Example response
1104
+ * // {
1105
+ * // "name": "my_name",
1106
+ * // "traits": {}
1107
+ * // }
1108
+ * }
1109
+ *
1110
+ * main().catch(e => {
1111
+ * console.error(e);
1112
+ * throw e;
1113
+ * });
1114
+ *
1115
+ * ```
806
1116
  *
807
1117
  * @param params - Parameters for request
808
1118
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -812,11 +1122,11 @@ export namespace smartdevicemanagement_v1 {
812
1122
  get(
813
1123
  params: Params$Resource$Enterprises$Structures$Rooms$Get,
814
1124
  options: StreamMethodOptions
815
- ): GaxiosPromise<Readable>;
1125
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
816
1126
  get(
817
1127
  params?: Params$Resource$Enterprises$Structures$Rooms$Get,
818
1128
  options?: MethodOptions
819
- ): GaxiosPromise<Schema$GoogleHomeEnterpriseSdmV1Room>;
1129
+ ): Promise<GaxiosResponseWithHTTP2<Schema$GoogleHomeEnterpriseSdmV1Room>>;
820
1130
  get(
821
1131
  params: Params$Resource$Enterprises$Structures$Rooms$Get,
822
1132
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -851,8 +1161,8 @@ export namespace smartdevicemanagement_v1 {
851
1161
  | BodyResponseCallback<Readable>
852
1162
  ):
853
1163
  | void
854
- | GaxiosPromise<Schema$GoogleHomeEnterpriseSdmV1Room>
855
- | GaxiosPromise<Readable> {
1164
+ | Promise<GaxiosResponseWithHTTP2<Schema$GoogleHomeEnterpriseSdmV1Room>>
1165
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
856
1166
  let params = (paramsOrCallback ||
857
1167
  {}) as Params$Resource$Enterprises$Structures$Rooms$Get;
858
1168
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -898,6 +1208,52 @@ export namespace smartdevicemanagement_v1 {
898
1208
 
899
1209
  /**
900
1210
  * Lists rooms managed by the enterprise.
1211
+ * @example
1212
+ * ```js
1213
+ * // Before running the sample:
1214
+ * // - Enable the API at:
1215
+ * // https://console.developers.google.com/apis/api/smartdevicemanagement.googleapis.com
1216
+ * // - Login into gcloud by running:
1217
+ * // ```sh
1218
+ * // $ gcloud auth application-default login
1219
+ * // ```
1220
+ * // - Install the npm module by running:
1221
+ * // ```sh
1222
+ * // $ npm install googleapis
1223
+ * // ```
1224
+ *
1225
+ * const {google} = require('googleapis');
1226
+ * const smartdevicemanagement = google.smartdevicemanagement('v1');
1227
+ *
1228
+ * async function main() {
1229
+ * const auth = new google.auth.GoogleAuth({
1230
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1231
+ * scopes: ['https://www.googleapis.com/auth/sdm.service'],
1232
+ * });
1233
+ *
1234
+ * // Acquire an auth client, and bind it to all future calls
1235
+ * const authClient = await auth.getClient();
1236
+ * google.options({auth: authClient});
1237
+ *
1238
+ * // Do the magic
1239
+ * const res = await smartdevicemanagement.enterprises.structures.rooms.list({
1240
+ * // The parent resource name of the rooms requested. For example: "enterprises/XYZ/structures/ABC".
1241
+ * parent: 'enterprises/my-enterprise/structures/my-structure',
1242
+ * });
1243
+ * console.log(res.data);
1244
+ *
1245
+ * // Example response
1246
+ * // {
1247
+ * // "rooms": []
1248
+ * // }
1249
+ * }
1250
+ *
1251
+ * main().catch(e => {
1252
+ * console.error(e);
1253
+ * throw e;
1254
+ * });
1255
+ *
1256
+ * ```
901
1257
  *
902
1258
  * @param params - Parameters for request
903
1259
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -907,11 +1263,13 @@ export namespace smartdevicemanagement_v1 {
907
1263
  list(
908
1264
  params: Params$Resource$Enterprises$Structures$Rooms$List,
909
1265
  options: StreamMethodOptions
910
- ): GaxiosPromise<Readable>;
1266
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
911
1267
  list(
912
1268
  params?: Params$Resource$Enterprises$Structures$Rooms$List,
913
1269
  options?: MethodOptions
914
- ): GaxiosPromise<Schema$GoogleHomeEnterpriseSdmV1ListRoomsResponse>;
1270
+ ): Promise<
1271
+ GaxiosResponseWithHTTP2<Schema$GoogleHomeEnterpriseSdmV1ListRoomsResponse>
1272
+ >;
915
1273
  list(
916
1274
  params: Params$Resource$Enterprises$Structures$Rooms$List,
917
1275
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -946,8 +1304,10 @@ export namespace smartdevicemanagement_v1 {
946
1304
  | BodyResponseCallback<Readable>
947
1305
  ):
948
1306
  | void
949
- | GaxiosPromise<Schema$GoogleHomeEnterpriseSdmV1ListRoomsResponse>
950
- | GaxiosPromise<Readable> {
1307
+ | Promise<
1308
+ GaxiosResponseWithHTTP2<Schema$GoogleHomeEnterpriseSdmV1ListRoomsResponse>
1309
+ >
1310
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
951
1311
  let params = (paramsOrCallback ||
952
1312
  {}) as Params$Resource$Enterprises$Structures$Rooms$List;
953
1313
  let options = (optionsOrCallback || {}) as MethodOptions;