@googleapis/servicedirectory 3.1.0 → 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.
@@ -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 servicedirectory_v1beta1 {
5
5
  export interface Options extends GlobalOptions {
@@ -384,28 +384,133 @@ export declare namespace servicedirectory_v1beta1 {
384
384
  constructor(context: APIRequestContext);
385
385
  /**
386
386
  * Gets information about a location.
387
+ * @example
388
+ * ```js
389
+ * // Before running the sample:
390
+ * // - Enable the API at:
391
+ * // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
392
+ * // - Login into gcloud by running:
393
+ * // ```sh
394
+ * // $ gcloud auth application-default login
395
+ * // ```
396
+ * // - Install the npm module by running:
397
+ * // ```sh
398
+ * // $ npm install googleapis
399
+ * // ```
400
+ *
401
+ * const {google} = require('googleapis');
402
+ * const servicedirectory = google.servicedirectory('v1beta1');
403
+ *
404
+ * async function main() {
405
+ * const auth = new google.auth.GoogleAuth({
406
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
407
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
408
+ * });
409
+ *
410
+ * // Acquire an auth client, and bind it to all future calls
411
+ * const authClient = await auth.getClient();
412
+ * google.options({auth: authClient});
413
+ *
414
+ * // Do the magic
415
+ * const res = await servicedirectory.projects.locations.get({
416
+ * // Resource name for the location.
417
+ * name: 'projects/my-project/locations/my-location',
418
+ * });
419
+ * console.log(res.data);
420
+ *
421
+ * // Example response
422
+ * // {
423
+ * // "displayName": "my_displayName",
424
+ * // "labels": {},
425
+ * // "locationId": "my_locationId",
426
+ * // "metadata": {},
427
+ * // "name": "my_name"
428
+ * // }
429
+ * }
430
+ *
431
+ * main().catch(e => {
432
+ * console.error(e);
433
+ * throw e;
434
+ * });
435
+ *
436
+ * ```
387
437
  *
388
438
  * @param params - Parameters for request
389
439
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
390
440
  * @param callback - Optional callback that handles the response.
391
441
  * @returns A promise if used with async/await, or void if used with a callback.
392
442
  */
393
- get(params: Params$Resource$Projects$Locations$Get, options: StreamMethodOptions): GaxiosPromise<Readable>;
394
- get(params?: Params$Resource$Projects$Locations$Get, options?: MethodOptions): GaxiosPromise<Schema$Location>;
443
+ get(params: Params$Resource$Projects$Locations$Get, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
444
+ get(params?: Params$Resource$Projects$Locations$Get, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Location>>;
395
445
  get(params: Params$Resource$Projects$Locations$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
396
446
  get(params: Params$Resource$Projects$Locations$Get, options: MethodOptions | BodyResponseCallback<Schema$Location>, callback: BodyResponseCallback<Schema$Location>): void;
397
447
  get(params: Params$Resource$Projects$Locations$Get, callback: BodyResponseCallback<Schema$Location>): void;
398
448
  get(callback: BodyResponseCallback<Schema$Location>): void;
399
449
  /**
400
450
  * Lists information about the supported locations for this service.
451
+ * @example
452
+ * ```js
453
+ * // Before running the sample:
454
+ * // - Enable the API at:
455
+ * // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
456
+ * // - Login into gcloud by running:
457
+ * // ```sh
458
+ * // $ gcloud auth application-default login
459
+ * // ```
460
+ * // - Install the npm module by running:
461
+ * // ```sh
462
+ * // $ npm install googleapis
463
+ * // ```
464
+ *
465
+ * const {google} = require('googleapis');
466
+ * const servicedirectory = google.servicedirectory('v1beta1');
467
+ *
468
+ * async function main() {
469
+ * const auth = new google.auth.GoogleAuth({
470
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
471
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
472
+ * });
473
+ *
474
+ * // Acquire an auth client, and bind it to all future calls
475
+ * const authClient = await auth.getClient();
476
+ * google.options({auth: authClient});
477
+ *
478
+ * // Do the magic
479
+ * const res = await servicedirectory.projects.locations.list({
480
+ * // Optional. A list of extra location types that should be used as conditions for controlling the visibility of the locations.
481
+ * extraLocationTypes: 'placeholder-value',
482
+ * // A filter to narrow down results to a preferred subset. The filtering language accepts strings like `"displayName=tokyo"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).
483
+ * filter: 'placeholder-value',
484
+ * // The resource that owns the locations collection, if applicable.
485
+ * name: 'projects/my-project',
486
+ * // The maximum number of results to return. If not set, the service selects a default.
487
+ * pageSize: 'placeholder-value',
488
+ * // A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.
489
+ * pageToken: 'placeholder-value',
490
+ * });
491
+ * console.log(res.data);
492
+ *
493
+ * // Example response
494
+ * // {
495
+ * // "locations": [],
496
+ * // "nextPageToken": "my_nextPageToken"
497
+ * // }
498
+ * }
499
+ *
500
+ * main().catch(e => {
501
+ * console.error(e);
502
+ * throw e;
503
+ * });
504
+ *
505
+ * ```
401
506
  *
402
507
  * @param params - Parameters for request
403
508
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
404
509
  * @param callback - Optional callback that handles the response.
405
510
  * @returns A promise if used with async/await, or void if used with a callback.
406
511
  */
407
- list(params: Params$Resource$Projects$Locations$List, options: StreamMethodOptions): GaxiosPromise<Readable>;
408
- list(params?: Params$Resource$Projects$Locations$List, options?: MethodOptions): GaxiosPromise<Schema$ListLocationsResponse>;
512
+ list(params: Params$Resource$Projects$Locations$List, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
513
+ list(params?: Params$Resource$Projects$Locations$List, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ListLocationsResponse>>;
409
514
  list(params: Params$Resource$Projects$Locations$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
410
515
  list(params: Params$Resource$Projects$Locations$List, options: MethodOptions | BodyResponseCallback<Schema$ListLocationsResponse>, callback: BodyResponseCallback<Schema$ListLocationsResponse>): void;
411
516
  list(params: Params$Resource$Projects$Locations$List, callback: BodyResponseCallback<Schema$ListLocationsResponse>): void;
@@ -446,112 +551,563 @@ export declare namespace servicedirectory_v1beta1 {
446
551
  constructor(context: APIRequestContext);
447
552
  /**
448
553
  * Creates a namespace, and returns the new namespace.
554
+ * @example
555
+ * ```js
556
+ * // Before running the sample:
557
+ * // - Enable the API at:
558
+ * // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
559
+ * // - Login into gcloud by running:
560
+ * // ```sh
561
+ * // $ gcloud auth application-default login
562
+ * // ```
563
+ * // - Install the npm module by running:
564
+ * // ```sh
565
+ * // $ npm install googleapis
566
+ * // ```
567
+ *
568
+ * const {google} = require('googleapis');
569
+ * const servicedirectory = google.servicedirectory('v1beta1');
570
+ *
571
+ * async function main() {
572
+ * const auth = new google.auth.GoogleAuth({
573
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
574
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
575
+ * });
576
+ *
577
+ * // Acquire an auth client, and bind it to all future calls
578
+ * const authClient = await auth.getClient();
579
+ * google.options({auth: authClient});
580
+ *
581
+ * // Do the magic
582
+ * const res = await servicedirectory.projects.locations.namespaces.create({
583
+ * // Required. The Resource ID must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z](?:[-a-z0-9]{0,61\}[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
584
+ * namespaceId: 'placeholder-value',
585
+ * // Required. The resource name of the project and location the namespace will be created in.
586
+ * parent: 'projects/my-project/locations/my-location',
587
+ *
588
+ * // Request body metadata
589
+ * requestBody: {
590
+ * // request body parameters
591
+ * // {
592
+ * // "createTime": "my_createTime",
593
+ * // "labels": {},
594
+ * // "name": "my_name",
595
+ * // "uid": "my_uid",
596
+ * // "updateTime": "my_updateTime"
597
+ * // }
598
+ * },
599
+ * });
600
+ * console.log(res.data);
601
+ *
602
+ * // Example response
603
+ * // {
604
+ * // "createTime": "my_createTime",
605
+ * // "labels": {},
606
+ * // "name": "my_name",
607
+ * // "uid": "my_uid",
608
+ * // "updateTime": "my_updateTime"
609
+ * // }
610
+ * }
611
+ *
612
+ * main().catch(e => {
613
+ * console.error(e);
614
+ * throw e;
615
+ * });
616
+ *
617
+ * ```
449
618
  *
450
619
  * @param params - Parameters for request
451
620
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
452
621
  * @param callback - Optional callback that handles the response.
453
622
  * @returns A promise if used with async/await, or void if used with a callback.
454
623
  */
455
- create(params: Params$Resource$Projects$Locations$Namespaces$Create, options: StreamMethodOptions): GaxiosPromise<Readable>;
456
- create(params?: Params$Resource$Projects$Locations$Namespaces$Create, options?: MethodOptions): GaxiosPromise<Schema$Namespace>;
624
+ create(params: Params$Resource$Projects$Locations$Namespaces$Create, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
625
+ create(params?: Params$Resource$Projects$Locations$Namespaces$Create, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Namespace>>;
457
626
  create(params: Params$Resource$Projects$Locations$Namespaces$Create, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
458
627
  create(params: Params$Resource$Projects$Locations$Namespaces$Create, options: MethodOptions | BodyResponseCallback<Schema$Namespace>, callback: BodyResponseCallback<Schema$Namespace>): void;
459
628
  create(params: Params$Resource$Projects$Locations$Namespaces$Create, callback: BodyResponseCallback<Schema$Namespace>): void;
460
629
  create(callback: BodyResponseCallback<Schema$Namespace>): void;
461
630
  /**
462
631
  * Deletes a namespace. This also deletes all services and endpoints in the namespace.
632
+ * @example
633
+ * ```js
634
+ * // Before running the sample:
635
+ * // - Enable the API at:
636
+ * // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
637
+ * // - Login into gcloud by running:
638
+ * // ```sh
639
+ * // $ gcloud auth application-default login
640
+ * // ```
641
+ * // - Install the npm module by running:
642
+ * // ```sh
643
+ * // $ npm install googleapis
644
+ * // ```
645
+ *
646
+ * const {google} = require('googleapis');
647
+ * const servicedirectory = google.servicedirectory('v1beta1');
648
+ *
649
+ * async function main() {
650
+ * const auth = new google.auth.GoogleAuth({
651
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
652
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
653
+ * });
654
+ *
655
+ * // Acquire an auth client, and bind it to all future calls
656
+ * const authClient = await auth.getClient();
657
+ * google.options({auth: authClient});
658
+ *
659
+ * // Do the magic
660
+ * const res = await servicedirectory.projects.locations.namespaces.delete({
661
+ * // Required. The name of the namespace to delete.
662
+ * name: 'projects/my-project/locations/my-location/namespaces/my-namespace',
663
+ * });
664
+ * console.log(res.data);
665
+ *
666
+ * // Example response
667
+ * // {}
668
+ * }
669
+ *
670
+ * main().catch(e => {
671
+ * console.error(e);
672
+ * throw e;
673
+ * });
674
+ *
675
+ * ```
463
676
  *
464
677
  * @param params - Parameters for request
465
678
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
466
679
  * @param callback - Optional callback that handles the response.
467
680
  * @returns A promise if used with async/await, or void if used with a callback.
468
681
  */
469
- delete(params: Params$Resource$Projects$Locations$Namespaces$Delete, options: StreamMethodOptions): GaxiosPromise<Readable>;
470
- delete(params?: Params$Resource$Projects$Locations$Namespaces$Delete, options?: MethodOptions): GaxiosPromise<Schema$Empty>;
682
+ delete(params: Params$Resource$Projects$Locations$Namespaces$Delete, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
683
+ delete(params?: Params$Resource$Projects$Locations$Namespaces$Delete, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Empty>>;
471
684
  delete(params: Params$Resource$Projects$Locations$Namespaces$Delete, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
472
685
  delete(params: Params$Resource$Projects$Locations$Namespaces$Delete, options: MethodOptions | BodyResponseCallback<Schema$Empty>, callback: BodyResponseCallback<Schema$Empty>): void;
473
686
  delete(params: Params$Resource$Projects$Locations$Namespaces$Delete, callback: BodyResponseCallback<Schema$Empty>): void;
474
687
  delete(callback: BodyResponseCallback<Schema$Empty>): void;
475
688
  /**
476
689
  * Gets a namespace.
690
+ * @example
691
+ * ```js
692
+ * // Before running the sample:
693
+ * // - Enable the API at:
694
+ * // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
695
+ * // - Login into gcloud by running:
696
+ * // ```sh
697
+ * // $ gcloud auth application-default login
698
+ * // ```
699
+ * // - Install the npm module by running:
700
+ * // ```sh
701
+ * // $ npm install googleapis
702
+ * // ```
703
+ *
704
+ * const {google} = require('googleapis');
705
+ * const servicedirectory = google.servicedirectory('v1beta1');
706
+ *
707
+ * async function main() {
708
+ * const auth = new google.auth.GoogleAuth({
709
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
710
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
711
+ * });
712
+ *
713
+ * // Acquire an auth client, and bind it to all future calls
714
+ * const authClient = await auth.getClient();
715
+ * google.options({auth: authClient});
716
+ *
717
+ * // Do the magic
718
+ * const res = await servicedirectory.projects.locations.namespaces.get({
719
+ * // Required. The name of the namespace to retrieve.
720
+ * name: 'projects/my-project/locations/my-location/namespaces/my-namespace',
721
+ * });
722
+ * console.log(res.data);
723
+ *
724
+ * // Example response
725
+ * // {
726
+ * // "createTime": "my_createTime",
727
+ * // "labels": {},
728
+ * // "name": "my_name",
729
+ * // "uid": "my_uid",
730
+ * // "updateTime": "my_updateTime"
731
+ * // }
732
+ * }
733
+ *
734
+ * main().catch(e => {
735
+ * console.error(e);
736
+ * throw e;
737
+ * });
738
+ *
739
+ * ```
477
740
  *
478
741
  * @param params - Parameters for request
479
742
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
480
743
  * @param callback - Optional callback that handles the response.
481
744
  * @returns A promise if used with async/await, or void if used with a callback.
482
745
  */
483
- get(params: Params$Resource$Projects$Locations$Namespaces$Get, options: StreamMethodOptions): GaxiosPromise<Readable>;
484
- get(params?: Params$Resource$Projects$Locations$Namespaces$Get, options?: MethodOptions): GaxiosPromise<Schema$Namespace>;
746
+ get(params: Params$Resource$Projects$Locations$Namespaces$Get, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
747
+ get(params?: Params$Resource$Projects$Locations$Namespaces$Get, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Namespace>>;
485
748
  get(params: Params$Resource$Projects$Locations$Namespaces$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
486
749
  get(params: Params$Resource$Projects$Locations$Namespaces$Get, options: MethodOptions | BodyResponseCallback<Schema$Namespace>, callback: BodyResponseCallback<Schema$Namespace>): void;
487
750
  get(params: Params$Resource$Projects$Locations$Namespaces$Get, callback: BodyResponseCallback<Schema$Namespace>): void;
488
751
  get(callback: BodyResponseCallback<Schema$Namespace>): void;
489
752
  /**
490
753
  * Gets the IAM Policy for a resource
754
+ * @example
755
+ * ```js
756
+ * // Before running the sample:
757
+ * // - Enable the API at:
758
+ * // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
759
+ * // - Login into gcloud by running:
760
+ * // ```sh
761
+ * // $ gcloud auth application-default login
762
+ * // ```
763
+ * // - Install the npm module by running:
764
+ * // ```sh
765
+ * // $ npm install googleapis
766
+ * // ```
767
+ *
768
+ * const {google} = require('googleapis');
769
+ * const servicedirectory = google.servicedirectory('v1beta1');
770
+ *
771
+ * async function main() {
772
+ * const auth = new google.auth.GoogleAuth({
773
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
774
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
775
+ * });
776
+ *
777
+ * // Acquire an auth client, and bind it to all future calls
778
+ * const authClient = await auth.getClient();
779
+ * google.options({auth: authClient});
780
+ *
781
+ * // Do the magic
782
+ * const res = await servicedirectory.projects.locations.namespaces.getIamPolicy(
783
+ * {
784
+ * // REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.
785
+ * resource:
786
+ * 'projects/my-project/locations/my-location/namespaces/my-namespace',
787
+ *
788
+ * // Request body metadata
789
+ * requestBody: {
790
+ * // request body parameters
791
+ * // {
792
+ * // "options": {}
793
+ * // }
794
+ * },
795
+ * },
796
+ * );
797
+ * console.log(res.data);
798
+ *
799
+ * // Example response
800
+ * // {
801
+ * // "bindings": [],
802
+ * // "etag": "my_etag",
803
+ * // "version": 0
804
+ * // }
805
+ * }
806
+ *
807
+ * main().catch(e => {
808
+ * console.error(e);
809
+ * throw e;
810
+ * });
811
+ *
812
+ * ```
491
813
  *
492
814
  * @param params - Parameters for request
493
815
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
494
816
  * @param callback - Optional callback that handles the response.
495
817
  * @returns A promise if used with async/await, or void if used with a callback.
496
818
  */
497
- getIamPolicy(params: Params$Resource$Projects$Locations$Namespaces$Getiampolicy, options: StreamMethodOptions): GaxiosPromise<Readable>;
498
- getIamPolicy(params?: Params$Resource$Projects$Locations$Namespaces$Getiampolicy, options?: MethodOptions): GaxiosPromise<Schema$Policy>;
819
+ getIamPolicy(params: Params$Resource$Projects$Locations$Namespaces$Getiampolicy, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
820
+ getIamPolicy(params?: Params$Resource$Projects$Locations$Namespaces$Getiampolicy, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Policy>>;
499
821
  getIamPolicy(params: Params$Resource$Projects$Locations$Namespaces$Getiampolicy, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
500
822
  getIamPolicy(params: Params$Resource$Projects$Locations$Namespaces$Getiampolicy, options: MethodOptions | BodyResponseCallback<Schema$Policy>, callback: BodyResponseCallback<Schema$Policy>): void;
501
823
  getIamPolicy(params: Params$Resource$Projects$Locations$Namespaces$Getiampolicy, callback: BodyResponseCallback<Schema$Policy>): void;
502
824
  getIamPolicy(callback: BodyResponseCallback<Schema$Policy>): void;
503
825
  /**
504
826
  * Lists all namespaces.
827
+ * @example
828
+ * ```js
829
+ * // Before running the sample:
830
+ * // - Enable the API at:
831
+ * // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
832
+ * // - Login into gcloud by running:
833
+ * // ```sh
834
+ * // $ gcloud auth application-default login
835
+ * // ```
836
+ * // - Install the npm module by running:
837
+ * // ```sh
838
+ * // $ npm install googleapis
839
+ * // ```
840
+ *
841
+ * const {google} = require('googleapis');
842
+ * const servicedirectory = google.servicedirectory('v1beta1');
843
+ *
844
+ * async function main() {
845
+ * const auth = new google.auth.GoogleAuth({
846
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
847
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
848
+ * });
849
+ *
850
+ * // Acquire an auth client, and bind it to all future calls
851
+ * const authClient = await auth.getClient();
852
+ * google.options({auth: authClient});
853
+ *
854
+ * // Do the magic
855
+ * const res = await servicedirectory.projects.locations.namespaces.list({
856
+ * // Optional. The filter to list results by. General `filter` string syntax: ` ()` * `` can be `name`, `labels.` for map field, or `attributes.` for attributes field * `` can be `<`, `\>`, `<=`, `\>=`, `!=`, `=`, `:`. Of which `:` means `HAS`, and is roughly the same as `=` * `` must be the same data type as field * `` can be `AND`, `OR`, `NOT` Examples of valid filters: * `labels.owner` returns namespaces that have a label with the key `owner`, this is the same as `labels:owner` * `labels.owner=sd` returns namespaces that have key/value `owner=sd` * `name\>projects/my-project/locations/us-east1/namespaces/namespace-c` returns namespaces that have name that is alphabetically later than the string, so "namespace-e" is returned but "namespace-a" is not * `labels.owner!=sd AND labels.foo=bar` returns namespaces that have `owner` in label key but value is not `sd` AND have key/value `foo=bar` * `doesnotexist.foo=bar` returns an empty list. Note that namespace doesn't have a field called "doesnotexist". Since the filter does not match any namespaces, it returns no results * `attributes.managed_registration=true` returns namespaces that are managed by a GCP product or service For more information about filtering, see [API Filtering](https://aip.dev/160).
857
+ * filter: 'placeholder-value',
858
+ * // Optional. The order to list results by. General `order_by` string syntax: ` () (,)` * `` allows value: `name` * `` ascending or descending order by ``. If this is left blank, `asc` is used Note that an empty `order_by` string results in default order, which is order by `name` in ascending order.
859
+ * orderBy: 'placeholder-value',
860
+ * // Optional. The maximum number of items to return. The default value is 100.
861
+ * pageSize: 'placeholder-value',
862
+ * // Optional. The next_page_token value returned from a previous List request, if any.
863
+ * pageToken: 'placeholder-value',
864
+ * // Required. The resource name of the project and location whose namespaces you'd like to list.
865
+ * parent: 'projects/my-project/locations/my-location',
866
+ * });
867
+ * console.log(res.data);
868
+ *
869
+ * // Example response
870
+ * // {
871
+ * // "namespaces": [],
872
+ * // "nextPageToken": "my_nextPageToken"
873
+ * // }
874
+ * }
875
+ *
876
+ * main().catch(e => {
877
+ * console.error(e);
878
+ * throw e;
879
+ * });
880
+ *
881
+ * ```
505
882
  *
506
883
  * @param params - Parameters for request
507
884
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
508
885
  * @param callback - Optional callback that handles the response.
509
886
  * @returns A promise if used with async/await, or void if used with a callback.
510
887
  */
511
- list(params: Params$Resource$Projects$Locations$Namespaces$List, options: StreamMethodOptions): GaxiosPromise<Readable>;
512
- list(params?: Params$Resource$Projects$Locations$Namespaces$List, options?: MethodOptions): GaxiosPromise<Schema$ListNamespacesResponse>;
888
+ list(params: Params$Resource$Projects$Locations$Namespaces$List, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
889
+ list(params?: Params$Resource$Projects$Locations$Namespaces$List, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ListNamespacesResponse>>;
513
890
  list(params: Params$Resource$Projects$Locations$Namespaces$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
514
891
  list(params: Params$Resource$Projects$Locations$Namespaces$List, options: MethodOptions | BodyResponseCallback<Schema$ListNamespacesResponse>, callback: BodyResponseCallback<Schema$ListNamespacesResponse>): void;
515
892
  list(params: Params$Resource$Projects$Locations$Namespaces$List, callback: BodyResponseCallback<Schema$ListNamespacesResponse>): void;
516
893
  list(callback: BodyResponseCallback<Schema$ListNamespacesResponse>): void;
517
894
  /**
518
895
  * Updates a namespace.
896
+ * @example
897
+ * ```js
898
+ * // Before running the sample:
899
+ * // - Enable the API at:
900
+ * // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
901
+ * // - Login into gcloud by running:
902
+ * // ```sh
903
+ * // $ gcloud auth application-default login
904
+ * // ```
905
+ * // - Install the npm module by running:
906
+ * // ```sh
907
+ * // $ npm install googleapis
908
+ * // ```
909
+ *
910
+ * const {google} = require('googleapis');
911
+ * const servicedirectory = google.servicedirectory('v1beta1');
912
+ *
913
+ * async function main() {
914
+ * const auth = new google.auth.GoogleAuth({
915
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
916
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
917
+ * });
918
+ *
919
+ * // Acquire an auth client, and bind it to all future calls
920
+ * const authClient = await auth.getClient();
921
+ * google.options({auth: authClient});
922
+ *
923
+ * // Do the magic
924
+ * const res = await servicedirectory.projects.locations.namespaces.patch({
925
+ * // Immutable. The resource name for the namespace in the format `projects/x/locations/x/namespaces/x`.
926
+ * name: 'projects/my-project/locations/my-location/namespaces/my-namespace',
927
+ * // Required. List of fields to be updated in this request.
928
+ * updateMask: 'placeholder-value',
929
+ *
930
+ * // Request body metadata
931
+ * requestBody: {
932
+ * // request body parameters
933
+ * // {
934
+ * // "createTime": "my_createTime",
935
+ * // "labels": {},
936
+ * // "name": "my_name",
937
+ * // "uid": "my_uid",
938
+ * // "updateTime": "my_updateTime"
939
+ * // }
940
+ * },
941
+ * });
942
+ * console.log(res.data);
943
+ *
944
+ * // Example response
945
+ * // {
946
+ * // "createTime": "my_createTime",
947
+ * // "labels": {},
948
+ * // "name": "my_name",
949
+ * // "uid": "my_uid",
950
+ * // "updateTime": "my_updateTime"
951
+ * // }
952
+ * }
953
+ *
954
+ * main().catch(e => {
955
+ * console.error(e);
956
+ * throw e;
957
+ * });
958
+ *
959
+ * ```
519
960
  *
520
961
  * @param params - Parameters for request
521
962
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
522
963
  * @param callback - Optional callback that handles the response.
523
964
  * @returns A promise if used with async/await, or void if used with a callback.
524
965
  */
525
- patch(params: Params$Resource$Projects$Locations$Namespaces$Patch, options: StreamMethodOptions): GaxiosPromise<Readable>;
526
- patch(params?: Params$Resource$Projects$Locations$Namespaces$Patch, options?: MethodOptions): GaxiosPromise<Schema$Namespace>;
966
+ patch(params: Params$Resource$Projects$Locations$Namespaces$Patch, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
967
+ patch(params?: Params$Resource$Projects$Locations$Namespaces$Patch, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Namespace>>;
527
968
  patch(params: Params$Resource$Projects$Locations$Namespaces$Patch, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
528
969
  patch(params: Params$Resource$Projects$Locations$Namespaces$Patch, options: MethodOptions | BodyResponseCallback<Schema$Namespace>, callback: BodyResponseCallback<Schema$Namespace>): void;
529
970
  patch(params: Params$Resource$Projects$Locations$Namespaces$Patch, callback: BodyResponseCallback<Schema$Namespace>): void;
530
971
  patch(callback: BodyResponseCallback<Schema$Namespace>): void;
531
972
  /**
532
973
  * Sets the IAM Policy for a resource
974
+ * @example
975
+ * ```js
976
+ * // Before running the sample:
977
+ * // - Enable the API at:
978
+ * // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
979
+ * // - Login into gcloud by running:
980
+ * // ```sh
981
+ * // $ gcloud auth application-default login
982
+ * // ```
983
+ * // - Install the npm module by running:
984
+ * // ```sh
985
+ * // $ npm install googleapis
986
+ * // ```
987
+ *
988
+ * const {google} = require('googleapis');
989
+ * const servicedirectory = google.servicedirectory('v1beta1');
990
+ *
991
+ * async function main() {
992
+ * const auth = new google.auth.GoogleAuth({
993
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
994
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
995
+ * });
996
+ *
997
+ * // Acquire an auth client, and bind it to all future calls
998
+ * const authClient = await auth.getClient();
999
+ * google.options({auth: authClient});
1000
+ *
1001
+ * // Do the magic
1002
+ * const res = await servicedirectory.projects.locations.namespaces.setIamPolicy(
1003
+ * {
1004
+ * // REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.
1005
+ * resource:
1006
+ * 'projects/my-project/locations/my-location/namespaces/my-namespace',
1007
+ *
1008
+ * // Request body metadata
1009
+ * requestBody: {
1010
+ * // request body parameters
1011
+ * // {
1012
+ * // "policy": {}
1013
+ * // }
1014
+ * },
1015
+ * },
1016
+ * );
1017
+ * console.log(res.data);
1018
+ *
1019
+ * // Example response
1020
+ * // {
1021
+ * // "bindings": [],
1022
+ * // "etag": "my_etag",
1023
+ * // "version": 0
1024
+ * // }
1025
+ * }
1026
+ *
1027
+ * main().catch(e => {
1028
+ * console.error(e);
1029
+ * throw e;
1030
+ * });
1031
+ *
1032
+ * ```
533
1033
  *
534
1034
  * @param params - Parameters for request
535
1035
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
536
1036
  * @param callback - Optional callback that handles the response.
537
1037
  * @returns A promise if used with async/await, or void if used with a callback.
538
1038
  */
539
- setIamPolicy(params: Params$Resource$Projects$Locations$Namespaces$Setiampolicy, options: StreamMethodOptions): GaxiosPromise<Readable>;
540
- setIamPolicy(params?: Params$Resource$Projects$Locations$Namespaces$Setiampolicy, options?: MethodOptions): GaxiosPromise<Schema$Policy>;
1039
+ setIamPolicy(params: Params$Resource$Projects$Locations$Namespaces$Setiampolicy, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
1040
+ setIamPolicy(params?: Params$Resource$Projects$Locations$Namespaces$Setiampolicy, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Policy>>;
541
1041
  setIamPolicy(params: Params$Resource$Projects$Locations$Namespaces$Setiampolicy, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
542
1042
  setIamPolicy(params: Params$Resource$Projects$Locations$Namespaces$Setiampolicy, options: MethodOptions | BodyResponseCallback<Schema$Policy>, callback: BodyResponseCallback<Schema$Policy>): void;
543
1043
  setIamPolicy(params: Params$Resource$Projects$Locations$Namespaces$Setiampolicy, callback: BodyResponseCallback<Schema$Policy>): void;
544
1044
  setIamPolicy(callback: BodyResponseCallback<Schema$Policy>): void;
545
1045
  /**
546
1046
  * Tests IAM permissions for a resource (namespace, service or service workload only).
1047
+ * @example
1048
+ * ```js
1049
+ * // Before running the sample:
1050
+ * // - Enable the API at:
1051
+ * // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
1052
+ * // - Login into gcloud by running:
1053
+ * // ```sh
1054
+ * // $ gcloud auth application-default login
1055
+ * // ```
1056
+ * // - Install the npm module by running:
1057
+ * // ```sh
1058
+ * // $ npm install googleapis
1059
+ * // ```
1060
+ *
1061
+ * const {google} = require('googleapis');
1062
+ * const servicedirectory = google.servicedirectory('v1beta1');
1063
+ *
1064
+ * async function main() {
1065
+ * const auth = new google.auth.GoogleAuth({
1066
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1067
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1068
+ * });
1069
+ *
1070
+ * // Acquire an auth client, and bind it to all future calls
1071
+ * const authClient = await auth.getClient();
1072
+ * google.options({auth: authClient});
1073
+ *
1074
+ * // Do the magic
1075
+ * const res =
1076
+ * await servicedirectory.projects.locations.namespaces.testIamPermissions({
1077
+ * // REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.
1078
+ * resource:
1079
+ * 'projects/my-project/locations/my-location/namespaces/my-namespace',
1080
+ *
1081
+ * // Request body metadata
1082
+ * requestBody: {
1083
+ * // request body parameters
1084
+ * // {
1085
+ * // "permissions": []
1086
+ * // }
1087
+ * },
1088
+ * });
1089
+ * console.log(res.data);
1090
+ *
1091
+ * // Example response
1092
+ * // {
1093
+ * // "permissions": []
1094
+ * // }
1095
+ * }
1096
+ *
1097
+ * main().catch(e => {
1098
+ * console.error(e);
1099
+ * throw e;
1100
+ * });
1101
+ *
1102
+ * ```
547
1103
  *
548
1104
  * @param params - Parameters for request
549
1105
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
550
1106
  * @param callback - Optional callback that handles the response.
551
1107
  * @returns A promise if used with async/await, or void if used with a callback.
552
1108
  */
553
- testIamPermissions(params: Params$Resource$Projects$Locations$Namespaces$Testiampermissions, options: StreamMethodOptions): GaxiosPromise<Readable>;
554
- testIamPermissions(params?: Params$Resource$Projects$Locations$Namespaces$Testiampermissions, options?: MethodOptions): GaxiosPromise<Schema$TestIamPermissionsResponse>;
1109
+ testIamPermissions(params: Params$Resource$Projects$Locations$Namespaces$Testiampermissions, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
1110
+ testIamPermissions(params?: Params$Resource$Projects$Locations$Namespaces$Testiampermissions, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$TestIamPermissionsResponse>>;
555
1111
  testIamPermissions(params: Params$Resource$Projects$Locations$Namespaces$Testiampermissions, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
556
1112
  testIamPermissions(params: Params$Resource$Projects$Locations$Namespaces$Testiampermissions, options: MethodOptions | BodyResponseCallback<Schema$TestIamPermissionsResponse>, callback: BodyResponseCallback<Schema$TestIamPermissionsResponse>): void;
557
1113
  testIamPermissions(params: Params$Resource$Projects$Locations$Namespaces$Testiampermissions, callback: BodyResponseCallback<Schema$TestIamPermissionsResponse>): void;
@@ -655,126 +1211,646 @@ export declare namespace servicedirectory_v1beta1 {
655
1211
  constructor(context: APIRequestContext);
656
1212
  /**
657
1213
  * Creates a service, and returns the new service.
1214
+ * @example
1215
+ * ```js
1216
+ * // Before running the sample:
1217
+ * // - Enable the API at:
1218
+ * // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
1219
+ * // - Login into gcloud by running:
1220
+ * // ```sh
1221
+ * // $ gcloud auth application-default login
1222
+ * // ```
1223
+ * // - Install the npm module by running:
1224
+ * // ```sh
1225
+ * // $ npm install googleapis
1226
+ * // ```
1227
+ *
1228
+ * const {google} = require('googleapis');
1229
+ * const servicedirectory = google.servicedirectory('v1beta1');
1230
+ *
1231
+ * async function main() {
1232
+ * const auth = new google.auth.GoogleAuth({
1233
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1234
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1235
+ * });
1236
+ *
1237
+ * // Acquire an auth client, and bind it to all future calls
1238
+ * const authClient = await auth.getClient();
1239
+ * google.options({auth: authClient});
1240
+ *
1241
+ * // Do the magic
1242
+ * const res =
1243
+ * await servicedirectory.projects.locations.namespaces.services.create({
1244
+ * // Required. The resource name of the namespace this service will belong to.
1245
+ * parent:
1246
+ * 'projects/my-project/locations/my-location/namespaces/my-namespace',
1247
+ * // Required. The Resource ID must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z](?:[-a-z0-9]{0,61\}[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
1248
+ * serviceId: 'placeholder-value',
1249
+ *
1250
+ * // Request body metadata
1251
+ * requestBody: {
1252
+ * // request body parameters
1253
+ * // {
1254
+ * // "createTime": "my_createTime",
1255
+ * // "endpoints": [],
1256
+ * // "metadata": {},
1257
+ * // "name": "my_name",
1258
+ * // "uid": "my_uid",
1259
+ * // "updateTime": "my_updateTime"
1260
+ * // }
1261
+ * },
1262
+ * });
1263
+ * console.log(res.data);
1264
+ *
1265
+ * // Example response
1266
+ * // {
1267
+ * // "createTime": "my_createTime",
1268
+ * // "endpoints": [],
1269
+ * // "metadata": {},
1270
+ * // "name": "my_name",
1271
+ * // "uid": "my_uid",
1272
+ * // "updateTime": "my_updateTime"
1273
+ * // }
1274
+ * }
1275
+ *
1276
+ * main().catch(e => {
1277
+ * console.error(e);
1278
+ * throw e;
1279
+ * });
1280
+ *
1281
+ * ```
658
1282
  *
659
1283
  * @param params - Parameters for request
660
1284
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
661
1285
  * @param callback - Optional callback that handles the response.
662
1286
  * @returns A promise if used with async/await, or void if used with a callback.
663
1287
  */
664
- create(params: Params$Resource$Projects$Locations$Namespaces$Services$Create, options: StreamMethodOptions): GaxiosPromise<Readable>;
665
- create(params?: Params$Resource$Projects$Locations$Namespaces$Services$Create, options?: MethodOptions): GaxiosPromise<Schema$Service>;
1288
+ create(params: Params$Resource$Projects$Locations$Namespaces$Services$Create, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
1289
+ create(params?: Params$Resource$Projects$Locations$Namespaces$Services$Create, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Service>>;
666
1290
  create(params: Params$Resource$Projects$Locations$Namespaces$Services$Create, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
667
1291
  create(params: Params$Resource$Projects$Locations$Namespaces$Services$Create, options: MethodOptions | BodyResponseCallback<Schema$Service>, callback: BodyResponseCallback<Schema$Service>): void;
668
1292
  create(params: Params$Resource$Projects$Locations$Namespaces$Services$Create, callback: BodyResponseCallback<Schema$Service>): void;
669
1293
  create(callback: BodyResponseCallback<Schema$Service>): void;
670
1294
  /**
671
1295
  * Deletes a service. This also deletes all endpoints associated with the service.
1296
+ * @example
1297
+ * ```js
1298
+ * // Before running the sample:
1299
+ * // - Enable the API at:
1300
+ * // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
1301
+ * // - Login into gcloud by running:
1302
+ * // ```sh
1303
+ * // $ gcloud auth application-default login
1304
+ * // ```
1305
+ * // - Install the npm module by running:
1306
+ * // ```sh
1307
+ * // $ npm install googleapis
1308
+ * // ```
1309
+ *
1310
+ * const {google} = require('googleapis');
1311
+ * const servicedirectory = google.servicedirectory('v1beta1');
1312
+ *
1313
+ * async function main() {
1314
+ * const auth = new google.auth.GoogleAuth({
1315
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1316
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1317
+ * });
1318
+ *
1319
+ * // Acquire an auth client, and bind it to all future calls
1320
+ * const authClient = await auth.getClient();
1321
+ * google.options({auth: authClient});
1322
+ *
1323
+ * // Do the magic
1324
+ * const res =
1325
+ * await servicedirectory.projects.locations.namespaces.services.delete({
1326
+ * // Required. The name of the service to delete.
1327
+ * name: 'projects/my-project/locations/my-location/namespaces/my-namespace/services/my-service',
1328
+ * });
1329
+ * console.log(res.data);
1330
+ *
1331
+ * // Example response
1332
+ * // {}
1333
+ * }
1334
+ *
1335
+ * main().catch(e => {
1336
+ * console.error(e);
1337
+ * throw e;
1338
+ * });
1339
+ *
1340
+ * ```
672
1341
  *
673
1342
  * @param params - Parameters for request
674
1343
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
675
1344
  * @param callback - Optional callback that handles the response.
676
1345
  * @returns A promise if used with async/await, or void if used with a callback.
677
1346
  */
678
- delete(params: Params$Resource$Projects$Locations$Namespaces$Services$Delete, options: StreamMethodOptions): GaxiosPromise<Readable>;
679
- delete(params?: Params$Resource$Projects$Locations$Namespaces$Services$Delete, options?: MethodOptions): GaxiosPromise<Schema$Empty>;
1347
+ delete(params: Params$Resource$Projects$Locations$Namespaces$Services$Delete, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
1348
+ delete(params?: Params$Resource$Projects$Locations$Namespaces$Services$Delete, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Empty>>;
680
1349
  delete(params: Params$Resource$Projects$Locations$Namespaces$Services$Delete, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
681
1350
  delete(params: Params$Resource$Projects$Locations$Namespaces$Services$Delete, options: MethodOptions | BodyResponseCallback<Schema$Empty>, callback: BodyResponseCallback<Schema$Empty>): void;
682
1351
  delete(params: Params$Resource$Projects$Locations$Namespaces$Services$Delete, callback: BodyResponseCallback<Schema$Empty>): void;
683
1352
  delete(callback: BodyResponseCallback<Schema$Empty>): void;
684
1353
  /**
685
1354
  * Gets a service.
1355
+ * @example
1356
+ * ```js
1357
+ * // Before running the sample:
1358
+ * // - Enable the API at:
1359
+ * // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
1360
+ * // - Login into gcloud by running:
1361
+ * // ```sh
1362
+ * // $ gcloud auth application-default login
1363
+ * // ```
1364
+ * // - Install the npm module by running:
1365
+ * // ```sh
1366
+ * // $ npm install googleapis
1367
+ * // ```
1368
+ *
1369
+ * const {google} = require('googleapis');
1370
+ * const servicedirectory = google.servicedirectory('v1beta1');
1371
+ *
1372
+ * async function main() {
1373
+ * const auth = new google.auth.GoogleAuth({
1374
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1375
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1376
+ * });
1377
+ *
1378
+ * // Acquire an auth client, and bind it to all future calls
1379
+ * const authClient = await auth.getClient();
1380
+ * google.options({auth: authClient});
1381
+ *
1382
+ * // Do the magic
1383
+ * const res = await servicedirectory.projects.locations.namespaces.services.get(
1384
+ * {
1385
+ * // Required. The name of the service to get.
1386
+ * name: 'projects/my-project/locations/my-location/namespaces/my-namespace/services/my-service',
1387
+ * },
1388
+ * );
1389
+ * console.log(res.data);
1390
+ *
1391
+ * // Example response
1392
+ * // {
1393
+ * // "createTime": "my_createTime",
1394
+ * // "endpoints": [],
1395
+ * // "metadata": {},
1396
+ * // "name": "my_name",
1397
+ * // "uid": "my_uid",
1398
+ * // "updateTime": "my_updateTime"
1399
+ * // }
1400
+ * }
1401
+ *
1402
+ * main().catch(e => {
1403
+ * console.error(e);
1404
+ * throw e;
1405
+ * });
1406
+ *
1407
+ * ```
686
1408
  *
687
1409
  * @param params - Parameters for request
688
1410
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
689
1411
  * @param callback - Optional callback that handles the response.
690
1412
  * @returns A promise if used with async/await, or void if used with a callback.
691
1413
  */
692
- get(params: Params$Resource$Projects$Locations$Namespaces$Services$Get, options: StreamMethodOptions): GaxiosPromise<Readable>;
693
- get(params?: Params$Resource$Projects$Locations$Namespaces$Services$Get, options?: MethodOptions): GaxiosPromise<Schema$Service>;
1414
+ get(params: Params$Resource$Projects$Locations$Namespaces$Services$Get, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
1415
+ get(params?: Params$Resource$Projects$Locations$Namespaces$Services$Get, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Service>>;
694
1416
  get(params: Params$Resource$Projects$Locations$Namespaces$Services$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
695
1417
  get(params: Params$Resource$Projects$Locations$Namespaces$Services$Get, options: MethodOptions | BodyResponseCallback<Schema$Service>, callback: BodyResponseCallback<Schema$Service>): void;
696
1418
  get(params: Params$Resource$Projects$Locations$Namespaces$Services$Get, callback: BodyResponseCallback<Schema$Service>): void;
697
1419
  get(callback: BodyResponseCallback<Schema$Service>): void;
698
1420
  /**
699
1421
  * Gets the IAM Policy for a resource
1422
+ * @example
1423
+ * ```js
1424
+ * // Before running the sample:
1425
+ * // - Enable the API at:
1426
+ * // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
1427
+ * // - Login into gcloud by running:
1428
+ * // ```sh
1429
+ * // $ gcloud auth application-default login
1430
+ * // ```
1431
+ * // - Install the npm module by running:
1432
+ * // ```sh
1433
+ * // $ npm install googleapis
1434
+ * // ```
1435
+ *
1436
+ * const {google} = require('googleapis');
1437
+ * const servicedirectory = google.servicedirectory('v1beta1');
1438
+ *
1439
+ * async function main() {
1440
+ * const auth = new google.auth.GoogleAuth({
1441
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1442
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1443
+ * });
1444
+ *
1445
+ * // Acquire an auth client, and bind it to all future calls
1446
+ * const authClient = await auth.getClient();
1447
+ * google.options({auth: authClient});
1448
+ *
1449
+ * // Do the magic
1450
+ * const res =
1451
+ * await servicedirectory.projects.locations.namespaces.services.getIamPolicy({
1452
+ * // REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.
1453
+ * resource:
1454
+ * 'projects/my-project/locations/my-location/namespaces/my-namespace/services/my-service',
1455
+ *
1456
+ * // Request body metadata
1457
+ * requestBody: {
1458
+ * // request body parameters
1459
+ * // {
1460
+ * // "options": {}
1461
+ * // }
1462
+ * },
1463
+ * });
1464
+ * console.log(res.data);
1465
+ *
1466
+ * // Example response
1467
+ * // {
1468
+ * // "bindings": [],
1469
+ * // "etag": "my_etag",
1470
+ * // "version": 0
1471
+ * // }
1472
+ * }
1473
+ *
1474
+ * main().catch(e => {
1475
+ * console.error(e);
1476
+ * throw e;
1477
+ * });
1478
+ *
1479
+ * ```
700
1480
  *
701
1481
  * @param params - Parameters for request
702
1482
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
703
1483
  * @param callback - Optional callback that handles the response.
704
1484
  * @returns A promise if used with async/await, or void if used with a callback.
705
1485
  */
706
- getIamPolicy(params: Params$Resource$Projects$Locations$Namespaces$Services$Getiampolicy, options: StreamMethodOptions): GaxiosPromise<Readable>;
707
- getIamPolicy(params?: Params$Resource$Projects$Locations$Namespaces$Services$Getiampolicy, options?: MethodOptions): GaxiosPromise<Schema$Policy>;
1486
+ getIamPolicy(params: Params$Resource$Projects$Locations$Namespaces$Services$Getiampolicy, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
1487
+ getIamPolicy(params?: Params$Resource$Projects$Locations$Namespaces$Services$Getiampolicy, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Policy>>;
708
1488
  getIamPolicy(params: Params$Resource$Projects$Locations$Namespaces$Services$Getiampolicy, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
709
1489
  getIamPolicy(params: Params$Resource$Projects$Locations$Namespaces$Services$Getiampolicy, options: MethodOptions | BodyResponseCallback<Schema$Policy>, callback: BodyResponseCallback<Schema$Policy>): void;
710
1490
  getIamPolicy(params: Params$Resource$Projects$Locations$Namespaces$Services$Getiampolicy, callback: BodyResponseCallback<Schema$Policy>): void;
711
1491
  getIamPolicy(callback: BodyResponseCallback<Schema$Policy>): void;
712
1492
  /**
713
1493
  * Lists all services belonging to a namespace.
1494
+ * @example
1495
+ * ```js
1496
+ * // Before running the sample:
1497
+ * // - Enable the API at:
1498
+ * // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
1499
+ * // - Login into gcloud by running:
1500
+ * // ```sh
1501
+ * // $ gcloud auth application-default login
1502
+ * // ```
1503
+ * // - Install the npm module by running:
1504
+ * // ```sh
1505
+ * // $ npm install googleapis
1506
+ * // ```
1507
+ *
1508
+ * const {google} = require('googleapis');
1509
+ * const servicedirectory = google.servicedirectory('v1beta1');
1510
+ *
1511
+ * async function main() {
1512
+ * const auth = new google.auth.GoogleAuth({
1513
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1514
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1515
+ * });
1516
+ *
1517
+ * // Acquire an auth client, and bind it to all future calls
1518
+ * const authClient = await auth.getClient();
1519
+ * google.options({auth: authClient});
1520
+ *
1521
+ * // Do the magic
1522
+ * const res =
1523
+ * await servicedirectory.projects.locations.namespaces.services.list({
1524
+ * // Optional. The filter to list results by. General `filter` string syntax: ` ()` * `` can be `name` or `metadata.` for map field * `` can be `<`, `\>`, `<=`, `\>=`, `!=`, `=`, `:`. Of which `:` means `HAS`, and is roughly the same as `=` * `` must be the same data type as field * `` can be `AND`, `OR`, `NOT` Examples of valid filters: * `metadata.owner` returns services that have a metadata with the key `owner`, this is the same as `metadata:owner` * `metadata.protocol=gRPC` returns services that have key/value `protocol=gRPC` * `name\>projects/my-project/locations/us-east1/namespaces/my-namespace/services/service-c` returns services that have name that is alphabetically later than the string, so "service-e" is returned but "service-a" is not * `metadata.owner!=sd AND metadata.foo=bar` returns services that have `owner` in metadata key but value is not `sd` AND have key/value `foo=bar` * `doesnotexist.foo=bar` returns an empty list. Note that service doesn't have a field called "doesnotexist". Since the filter does not match any services, it returns no results * `attributes.managed_registration=true` returns services that are managed by a GCP product or service For more information about filtering, see [API Filtering](https://aip.dev/160).
1525
+ * filter: 'placeholder-value',
1526
+ * // Optional. The order to list results by. General `order_by` string syntax: ` () (,)` * `` allows value: `name` * `` ascending or descending order by ``. If this is left blank, `asc` is used Note that an empty `order_by` string results in default order, which is order by `name` in ascending order.
1527
+ * orderBy: 'placeholder-value',
1528
+ * // Optional. The maximum number of items to return. The default value is 100.
1529
+ * pageSize: 'placeholder-value',
1530
+ * // Optional. The next_page_token value returned from a previous List request, if any.
1531
+ * pageToken: 'placeholder-value',
1532
+ * // Required. The resource name of the namespace whose services you'd like to list.
1533
+ * parent:
1534
+ * 'projects/my-project/locations/my-location/namespaces/my-namespace',
1535
+ * });
1536
+ * console.log(res.data);
1537
+ *
1538
+ * // Example response
1539
+ * // {
1540
+ * // "nextPageToken": "my_nextPageToken",
1541
+ * // "services": []
1542
+ * // }
1543
+ * }
1544
+ *
1545
+ * main().catch(e => {
1546
+ * console.error(e);
1547
+ * throw e;
1548
+ * });
1549
+ *
1550
+ * ```
714
1551
  *
715
1552
  * @param params - Parameters for request
716
1553
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
717
1554
  * @param callback - Optional callback that handles the response.
718
1555
  * @returns A promise if used with async/await, or void if used with a callback.
719
1556
  */
720
- list(params: Params$Resource$Projects$Locations$Namespaces$Services$List, options: StreamMethodOptions): GaxiosPromise<Readable>;
721
- list(params?: Params$Resource$Projects$Locations$Namespaces$Services$List, options?: MethodOptions): GaxiosPromise<Schema$ListServicesResponse>;
1557
+ list(params: Params$Resource$Projects$Locations$Namespaces$Services$List, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
1558
+ list(params?: Params$Resource$Projects$Locations$Namespaces$Services$List, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ListServicesResponse>>;
722
1559
  list(params: Params$Resource$Projects$Locations$Namespaces$Services$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
723
1560
  list(params: Params$Resource$Projects$Locations$Namespaces$Services$List, options: MethodOptions | BodyResponseCallback<Schema$ListServicesResponse>, callback: BodyResponseCallback<Schema$ListServicesResponse>): void;
724
1561
  list(params: Params$Resource$Projects$Locations$Namespaces$Services$List, callback: BodyResponseCallback<Schema$ListServicesResponse>): void;
725
1562
  list(callback: BodyResponseCallback<Schema$ListServicesResponse>): void;
726
1563
  /**
727
1564
  * Updates a service.
1565
+ * @example
1566
+ * ```js
1567
+ * // Before running the sample:
1568
+ * // - Enable the API at:
1569
+ * // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
1570
+ * // - Login into gcloud by running:
1571
+ * // ```sh
1572
+ * // $ gcloud auth application-default login
1573
+ * // ```
1574
+ * // - Install the npm module by running:
1575
+ * // ```sh
1576
+ * // $ npm install googleapis
1577
+ * // ```
1578
+ *
1579
+ * const {google} = require('googleapis');
1580
+ * const servicedirectory = google.servicedirectory('v1beta1');
1581
+ *
1582
+ * async function main() {
1583
+ * const auth = new google.auth.GoogleAuth({
1584
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1585
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1586
+ * });
1587
+ *
1588
+ * // Acquire an auth client, and bind it to all future calls
1589
+ * const authClient = await auth.getClient();
1590
+ * google.options({auth: authClient});
1591
+ *
1592
+ * // Do the magic
1593
+ * const res =
1594
+ * await servicedirectory.projects.locations.namespaces.services.patch({
1595
+ * // Immutable. The resource name for the service in the format `projects/x/locations/x/namespaces/x/services/x`.
1596
+ * name: 'projects/my-project/locations/my-location/namespaces/my-namespace/services/my-service',
1597
+ * // Required. List of fields to be updated in this request.
1598
+ * updateMask: 'placeholder-value',
1599
+ *
1600
+ * // Request body metadata
1601
+ * requestBody: {
1602
+ * // request body parameters
1603
+ * // {
1604
+ * // "createTime": "my_createTime",
1605
+ * // "endpoints": [],
1606
+ * // "metadata": {},
1607
+ * // "name": "my_name",
1608
+ * // "uid": "my_uid",
1609
+ * // "updateTime": "my_updateTime"
1610
+ * // }
1611
+ * },
1612
+ * });
1613
+ * console.log(res.data);
1614
+ *
1615
+ * // Example response
1616
+ * // {
1617
+ * // "createTime": "my_createTime",
1618
+ * // "endpoints": [],
1619
+ * // "metadata": {},
1620
+ * // "name": "my_name",
1621
+ * // "uid": "my_uid",
1622
+ * // "updateTime": "my_updateTime"
1623
+ * // }
1624
+ * }
1625
+ *
1626
+ * main().catch(e => {
1627
+ * console.error(e);
1628
+ * throw e;
1629
+ * });
1630
+ *
1631
+ * ```
728
1632
  *
729
1633
  * @param params - Parameters for request
730
1634
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
731
1635
  * @param callback - Optional callback that handles the response.
732
1636
  * @returns A promise if used with async/await, or void if used with a callback.
733
1637
  */
734
- patch(params: Params$Resource$Projects$Locations$Namespaces$Services$Patch, options: StreamMethodOptions): GaxiosPromise<Readable>;
735
- patch(params?: Params$Resource$Projects$Locations$Namespaces$Services$Patch, options?: MethodOptions): GaxiosPromise<Schema$Service>;
1638
+ patch(params: Params$Resource$Projects$Locations$Namespaces$Services$Patch, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
1639
+ patch(params?: Params$Resource$Projects$Locations$Namespaces$Services$Patch, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Service>>;
736
1640
  patch(params: Params$Resource$Projects$Locations$Namespaces$Services$Patch, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
737
1641
  patch(params: Params$Resource$Projects$Locations$Namespaces$Services$Patch, options: MethodOptions | BodyResponseCallback<Schema$Service>, callback: BodyResponseCallback<Schema$Service>): void;
738
1642
  patch(params: Params$Resource$Projects$Locations$Namespaces$Services$Patch, callback: BodyResponseCallback<Schema$Service>): void;
739
1643
  patch(callback: BodyResponseCallback<Schema$Service>): void;
740
1644
  /**
741
1645
  * Returns a service and its associated endpoints. Resolving a service is not considered an active developer method.
1646
+ * @example
1647
+ * ```js
1648
+ * // Before running the sample:
1649
+ * // - Enable the API at:
1650
+ * // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
1651
+ * // - Login into gcloud by running:
1652
+ * // ```sh
1653
+ * // $ gcloud auth application-default login
1654
+ * // ```
1655
+ * // - Install the npm module by running:
1656
+ * // ```sh
1657
+ * // $ npm install googleapis
1658
+ * // ```
1659
+ *
1660
+ * const {google} = require('googleapis');
1661
+ * const servicedirectory = google.servicedirectory('v1beta1');
1662
+ *
1663
+ * async function main() {
1664
+ * const auth = new google.auth.GoogleAuth({
1665
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1666
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1667
+ * });
1668
+ *
1669
+ * // Acquire an auth client, and bind it to all future calls
1670
+ * const authClient = await auth.getClient();
1671
+ * google.options({auth: authClient});
1672
+ *
1673
+ * // Do the magic
1674
+ * const res =
1675
+ * await servicedirectory.projects.locations.namespaces.services.resolve({
1676
+ * // Required. The name of the service to resolve.
1677
+ * name: 'projects/my-project/locations/my-location/namespaces/my-namespace/services/my-service',
1678
+ *
1679
+ * // Request body metadata
1680
+ * requestBody: {
1681
+ * // request body parameters
1682
+ * // {
1683
+ * // "endpointFilter": "my_endpointFilter",
1684
+ * // "maxEndpoints": 0
1685
+ * // }
1686
+ * },
1687
+ * });
1688
+ * console.log(res.data);
1689
+ *
1690
+ * // Example response
1691
+ * // {
1692
+ * // "service": {}
1693
+ * // }
1694
+ * }
1695
+ *
1696
+ * main().catch(e => {
1697
+ * console.error(e);
1698
+ * throw e;
1699
+ * });
1700
+ *
1701
+ * ```
742
1702
  *
743
1703
  * @param params - Parameters for request
744
1704
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
745
1705
  * @param callback - Optional callback that handles the response.
746
1706
  * @returns A promise if used with async/await, or void if used with a callback.
747
1707
  */
748
- resolve(params: Params$Resource$Projects$Locations$Namespaces$Services$Resolve, options: StreamMethodOptions): GaxiosPromise<Readable>;
749
- resolve(params?: Params$Resource$Projects$Locations$Namespaces$Services$Resolve, options?: MethodOptions): GaxiosPromise<Schema$ResolveServiceResponse>;
1708
+ resolve(params: Params$Resource$Projects$Locations$Namespaces$Services$Resolve, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
1709
+ resolve(params?: Params$Resource$Projects$Locations$Namespaces$Services$Resolve, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ResolveServiceResponse>>;
750
1710
  resolve(params: Params$Resource$Projects$Locations$Namespaces$Services$Resolve, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
751
1711
  resolve(params: Params$Resource$Projects$Locations$Namespaces$Services$Resolve, options: MethodOptions | BodyResponseCallback<Schema$ResolveServiceResponse>, callback: BodyResponseCallback<Schema$ResolveServiceResponse>): void;
752
1712
  resolve(params: Params$Resource$Projects$Locations$Namespaces$Services$Resolve, callback: BodyResponseCallback<Schema$ResolveServiceResponse>): void;
753
1713
  resolve(callback: BodyResponseCallback<Schema$ResolveServiceResponse>): void;
754
1714
  /**
755
1715
  * Sets the IAM Policy for a resource
1716
+ * @example
1717
+ * ```js
1718
+ * // Before running the sample:
1719
+ * // - Enable the API at:
1720
+ * // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
1721
+ * // - Login into gcloud by running:
1722
+ * // ```sh
1723
+ * // $ gcloud auth application-default login
1724
+ * // ```
1725
+ * // - Install the npm module by running:
1726
+ * // ```sh
1727
+ * // $ npm install googleapis
1728
+ * // ```
1729
+ *
1730
+ * const {google} = require('googleapis');
1731
+ * const servicedirectory = google.servicedirectory('v1beta1');
1732
+ *
1733
+ * async function main() {
1734
+ * const auth = new google.auth.GoogleAuth({
1735
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1736
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1737
+ * });
1738
+ *
1739
+ * // Acquire an auth client, and bind it to all future calls
1740
+ * const authClient = await auth.getClient();
1741
+ * google.options({auth: authClient});
1742
+ *
1743
+ * // Do the magic
1744
+ * const res =
1745
+ * await servicedirectory.projects.locations.namespaces.services.setIamPolicy({
1746
+ * // REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.
1747
+ * resource:
1748
+ * 'projects/my-project/locations/my-location/namespaces/my-namespace/services/my-service',
1749
+ *
1750
+ * // Request body metadata
1751
+ * requestBody: {
1752
+ * // request body parameters
1753
+ * // {
1754
+ * // "policy": {}
1755
+ * // }
1756
+ * },
1757
+ * });
1758
+ * console.log(res.data);
1759
+ *
1760
+ * // Example response
1761
+ * // {
1762
+ * // "bindings": [],
1763
+ * // "etag": "my_etag",
1764
+ * // "version": 0
1765
+ * // }
1766
+ * }
1767
+ *
1768
+ * main().catch(e => {
1769
+ * console.error(e);
1770
+ * throw e;
1771
+ * });
1772
+ *
1773
+ * ```
756
1774
  *
757
1775
  * @param params - Parameters for request
758
1776
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
759
1777
  * @param callback - Optional callback that handles the response.
760
1778
  * @returns A promise if used with async/await, or void if used with a callback.
761
1779
  */
762
- setIamPolicy(params: Params$Resource$Projects$Locations$Namespaces$Services$Setiampolicy, options: StreamMethodOptions): GaxiosPromise<Readable>;
763
- setIamPolicy(params?: Params$Resource$Projects$Locations$Namespaces$Services$Setiampolicy, options?: MethodOptions): GaxiosPromise<Schema$Policy>;
1780
+ setIamPolicy(params: Params$Resource$Projects$Locations$Namespaces$Services$Setiampolicy, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
1781
+ setIamPolicy(params?: Params$Resource$Projects$Locations$Namespaces$Services$Setiampolicy, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Policy>>;
764
1782
  setIamPolicy(params: Params$Resource$Projects$Locations$Namespaces$Services$Setiampolicy, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
765
1783
  setIamPolicy(params: Params$Resource$Projects$Locations$Namespaces$Services$Setiampolicy, options: MethodOptions | BodyResponseCallback<Schema$Policy>, callback: BodyResponseCallback<Schema$Policy>): void;
766
1784
  setIamPolicy(params: Params$Resource$Projects$Locations$Namespaces$Services$Setiampolicy, callback: BodyResponseCallback<Schema$Policy>): void;
767
1785
  setIamPolicy(callback: BodyResponseCallback<Schema$Policy>): void;
768
1786
  /**
769
1787
  * Tests IAM permissions for a resource (namespace, service or service workload only).
1788
+ * @example
1789
+ * ```js
1790
+ * // Before running the sample:
1791
+ * // - Enable the API at:
1792
+ * // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
1793
+ * // - Login into gcloud by running:
1794
+ * // ```sh
1795
+ * // $ gcloud auth application-default login
1796
+ * // ```
1797
+ * // - Install the npm module by running:
1798
+ * // ```sh
1799
+ * // $ npm install googleapis
1800
+ * // ```
1801
+ *
1802
+ * const {google} = require('googleapis');
1803
+ * const servicedirectory = google.servicedirectory('v1beta1');
1804
+ *
1805
+ * async function main() {
1806
+ * const auth = new google.auth.GoogleAuth({
1807
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1808
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1809
+ * });
1810
+ *
1811
+ * // Acquire an auth client, and bind it to all future calls
1812
+ * const authClient = await auth.getClient();
1813
+ * google.options({auth: authClient});
1814
+ *
1815
+ * // Do the magic
1816
+ * const res =
1817
+ * await servicedirectory.projects.locations.namespaces.services.testIamPermissions(
1818
+ * {
1819
+ * // REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.
1820
+ * resource:
1821
+ * 'projects/my-project/locations/my-location/namespaces/my-namespace/services/my-service',
1822
+ *
1823
+ * // Request body metadata
1824
+ * requestBody: {
1825
+ * // request body parameters
1826
+ * // {
1827
+ * // "permissions": []
1828
+ * // }
1829
+ * },
1830
+ * },
1831
+ * );
1832
+ * console.log(res.data);
1833
+ *
1834
+ * // Example response
1835
+ * // {
1836
+ * // "permissions": []
1837
+ * // }
1838
+ * }
1839
+ *
1840
+ * main().catch(e => {
1841
+ * console.error(e);
1842
+ * throw e;
1843
+ * });
1844
+ *
1845
+ * ```
770
1846
  *
771
1847
  * @param params - Parameters for request
772
1848
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
773
1849
  * @param callback - Optional callback that handles the response.
774
1850
  * @returns A promise if used with async/await, or void if used with a callback.
775
1851
  */
776
- testIamPermissions(params: Params$Resource$Projects$Locations$Namespaces$Services$Testiampermissions, options: StreamMethodOptions): GaxiosPromise<Readable>;
777
- testIamPermissions(params?: Params$Resource$Projects$Locations$Namespaces$Services$Testiampermissions, options?: MethodOptions): GaxiosPromise<Schema$TestIamPermissionsResponse>;
1852
+ testIamPermissions(params: Params$Resource$Projects$Locations$Namespaces$Services$Testiampermissions, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
1853
+ testIamPermissions(params?: Params$Resource$Projects$Locations$Namespaces$Services$Testiampermissions, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$TestIamPermissionsResponse>>;
778
1854
  testIamPermissions(params: Params$Resource$Projects$Locations$Namespaces$Services$Testiampermissions, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
779
1855
  testIamPermissions(params: Params$Resource$Projects$Locations$Namespaces$Services$Testiampermissions, options: MethodOptions | BodyResponseCallback<Schema$TestIamPermissionsResponse>, callback: BodyResponseCallback<Schema$TestIamPermissionsResponse>): void;
780
1856
  testIamPermissions(params: Params$Resource$Projects$Locations$Namespaces$Services$Testiampermissions, callback: BodyResponseCallback<Schema$TestIamPermissionsResponse>): void;
@@ -887,70 +1963,379 @@ export declare namespace servicedirectory_v1beta1 {
887
1963
  constructor(context: APIRequestContext);
888
1964
  /**
889
1965
  * Creates an endpoint, and returns the new endpoint.
1966
+ * @example
1967
+ * ```js
1968
+ * // Before running the sample:
1969
+ * // - Enable the API at:
1970
+ * // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
1971
+ * // - Login into gcloud by running:
1972
+ * // ```sh
1973
+ * // $ gcloud auth application-default login
1974
+ * // ```
1975
+ * // - Install the npm module by running:
1976
+ * // ```sh
1977
+ * // $ npm install googleapis
1978
+ * // ```
1979
+ *
1980
+ * const {google} = require('googleapis');
1981
+ * const servicedirectory = google.servicedirectory('v1beta1');
1982
+ *
1983
+ * async function main() {
1984
+ * const auth = new google.auth.GoogleAuth({
1985
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1986
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1987
+ * });
1988
+ *
1989
+ * // Acquire an auth client, and bind it to all future calls
1990
+ * const authClient = await auth.getClient();
1991
+ * google.options({auth: authClient});
1992
+ *
1993
+ * // Do the magic
1994
+ * const res =
1995
+ * await servicedirectory.projects.locations.namespaces.services.endpoints.create(
1996
+ * {
1997
+ * // Required. The Resource ID must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z](?:[-a-z0-9]{0,61\}[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
1998
+ * endpointId: 'placeholder-value',
1999
+ * // Required. The resource name of the service that this endpoint provides.
2000
+ * parent:
2001
+ * 'projects/my-project/locations/my-location/namespaces/my-namespace/services/my-service',
2002
+ *
2003
+ * // Request body metadata
2004
+ * requestBody: {
2005
+ * // request body parameters
2006
+ * // {
2007
+ * // "address": "my_address",
2008
+ * // "createTime": "my_createTime",
2009
+ * // "metadata": {},
2010
+ * // "name": "my_name",
2011
+ * // "network": "my_network",
2012
+ * // "port": 0,
2013
+ * // "uid": "my_uid",
2014
+ * // "updateTime": "my_updateTime"
2015
+ * // }
2016
+ * },
2017
+ * },
2018
+ * );
2019
+ * console.log(res.data);
2020
+ *
2021
+ * // Example response
2022
+ * // {
2023
+ * // "address": "my_address",
2024
+ * // "createTime": "my_createTime",
2025
+ * // "metadata": {},
2026
+ * // "name": "my_name",
2027
+ * // "network": "my_network",
2028
+ * // "port": 0,
2029
+ * // "uid": "my_uid",
2030
+ * // "updateTime": "my_updateTime"
2031
+ * // }
2032
+ * }
2033
+ *
2034
+ * main().catch(e => {
2035
+ * console.error(e);
2036
+ * throw e;
2037
+ * });
2038
+ *
2039
+ * ```
890
2040
  *
891
2041
  * @param params - Parameters for request
892
2042
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
893
2043
  * @param callback - Optional callback that handles the response.
894
2044
  * @returns A promise if used with async/await, or void if used with a callback.
895
2045
  */
896
- create(params: Params$Resource$Projects$Locations$Namespaces$Services$Endpoints$Create, options: StreamMethodOptions): GaxiosPromise<Readable>;
897
- create(params?: Params$Resource$Projects$Locations$Namespaces$Services$Endpoints$Create, options?: MethodOptions): GaxiosPromise<Schema$Endpoint>;
2046
+ create(params: Params$Resource$Projects$Locations$Namespaces$Services$Endpoints$Create, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
2047
+ create(params?: Params$Resource$Projects$Locations$Namespaces$Services$Endpoints$Create, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Endpoint>>;
898
2048
  create(params: Params$Resource$Projects$Locations$Namespaces$Services$Endpoints$Create, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
899
2049
  create(params: Params$Resource$Projects$Locations$Namespaces$Services$Endpoints$Create, options: MethodOptions | BodyResponseCallback<Schema$Endpoint>, callback: BodyResponseCallback<Schema$Endpoint>): void;
900
2050
  create(params: Params$Resource$Projects$Locations$Namespaces$Services$Endpoints$Create, callback: BodyResponseCallback<Schema$Endpoint>): void;
901
2051
  create(callback: BodyResponseCallback<Schema$Endpoint>): void;
902
2052
  /**
903
2053
  * Deletes an endpoint.
2054
+ * @example
2055
+ * ```js
2056
+ * // Before running the sample:
2057
+ * // - Enable the API at:
2058
+ * // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
2059
+ * // - Login into gcloud by running:
2060
+ * // ```sh
2061
+ * // $ gcloud auth application-default login
2062
+ * // ```
2063
+ * // - Install the npm module by running:
2064
+ * // ```sh
2065
+ * // $ npm install googleapis
2066
+ * // ```
2067
+ *
2068
+ * const {google} = require('googleapis');
2069
+ * const servicedirectory = google.servicedirectory('v1beta1');
2070
+ *
2071
+ * async function main() {
2072
+ * const auth = new google.auth.GoogleAuth({
2073
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2074
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
2075
+ * });
2076
+ *
2077
+ * // Acquire an auth client, and bind it to all future calls
2078
+ * const authClient = await auth.getClient();
2079
+ * google.options({auth: authClient});
2080
+ *
2081
+ * // Do the magic
2082
+ * const res =
2083
+ * await servicedirectory.projects.locations.namespaces.services.endpoints.delete(
2084
+ * {
2085
+ * // Required. The name of the endpoint to delete.
2086
+ * name: 'projects/my-project/locations/my-location/namespaces/my-namespace/services/my-service/endpoints/my-endpoint',
2087
+ * },
2088
+ * );
2089
+ * console.log(res.data);
2090
+ *
2091
+ * // Example response
2092
+ * // {}
2093
+ * }
2094
+ *
2095
+ * main().catch(e => {
2096
+ * console.error(e);
2097
+ * throw e;
2098
+ * });
2099
+ *
2100
+ * ```
904
2101
  *
905
2102
  * @param params - Parameters for request
906
2103
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
907
2104
  * @param callback - Optional callback that handles the response.
908
2105
  * @returns A promise if used with async/await, or void if used with a callback.
909
2106
  */
910
- delete(params: Params$Resource$Projects$Locations$Namespaces$Services$Endpoints$Delete, options: StreamMethodOptions): GaxiosPromise<Readable>;
911
- delete(params?: Params$Resource$Projects$Locations$Namespaces$Services$Endpoints$Delete, options?: MethodOptions): GaxiosPromise<Schema$Empty>;
2107
+ delete(params: Params$Resource$Projects$Locations$Namespaces$Services$Endpoints$Delete, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
2108
+ delete(params?: Params$Resource$Projects$Locations$Namespaces$Services$Endpoints$Delete, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Empty>>;
912
2109
  delete(params: Params$Resource$Projects$Locations$Namespaces$Services$Endpoints$Delete, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
913
2110
  delete(params: Params$Resource$Projects$Locations$Namespaces$Services$Endpoints$Delete, options: MethodOptions | BodyResponseCallback<Schema$Empty>, callback: BodyResponseCallback<Schema$Empty>): void;
914
2111
  delete(params: Params$Resource$Projects$Locations$Namespaces$Services$Endpoints$Delete, callback: BodyResponseCallback<Schema$Empty>): void;
915
2112
  delete(callback: BodyResponseCallback<Schema$Empty>): void;
916
2113
  /**
917
2114
  * Gets an endpoint.
2115
+ * @example
2116
+ * ```js
2117
+ * // Before running the sample:
2118
+ * // - Enable the API at:
2119
+ * // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
2120
+ * // - Login into gcloud by running:
2121
+ * // ```sh
2122
+ * // $ gcloud auth application-default login
2123
+ * // ```
2124
+ * // - Install the npm module by running:
2125
+ * // ```sh
2126
+ * // $ npm install googleapis
2127
+ * // ```
2128
+ *
2129
+ * const {google} = require('googleapis');
2130
+ * const servicedirectory = google.servicedirectory('v1beta1');
2131
+ *
2132
+ * async function main() {
2133
+ * const auth = new google.auth.GoogleAuth({
2134
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2135
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
2136
+ * });
2137
+ *
2138
+ * // Acquire an auth client, and bind it to all future calls
2139
+ * const authClient = await auth.getClient();
2140
+ * google.options({auth: authClient});
2141
+ *
2142
+ * // Do the magic
2143
+ * const res =
2144
+ * await servicedirectory.projects.locations.namespaces.services.endpoints.get(
2145
+ * {
2146
+ * // Required. The name of the endpoint to get.
2147
+ * name: 'projects/my-project/locations/my-location/namespaces/my-namespace/services/my-service/endpoints/my-endpoint',
2148
+ * },
2149
+ * );
2150
+ * console.log(res.data);
2151
+ *
2152
+ * // Example response
2153
+ * // {
2154
+ * // "address": "my_address",
2155
+ * // "createTime": "my_createTime",
2156
+ * // "metadata": {},
2157
+ * // "name": "my_name",
2158
+ * // "network": "my_network",
2159
+ * // "port": 0,
2160
+ * // "uid": "my_uid",
2161
+ * // "updateTime": "my_updateTime"
2162
+ * // }
2163
+ * }
2164
+ *
2165
+ * main().catch(e => {
2166
+ * console.error(e);
2167
+ * throw e;
2168
+ * });
2169
+ *
2170
+ * ```
918
2171
  *
919
2172
  * @param params - Parameters for request
920
2173
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
921
2174
  * @param callback - Optional callback that handles the response.
922
2175
  * @returns A promise if used with async/await, or void if used with a callback.
923
2176
  */
924
- get(params: Params$Resource$Projects$Locations$Namespaces$Services$Endpoints$Get, options: StreamMethodOptions): GaxiosPromise<Readable>;
925
- get(params?: Params$Resource$Projects$Locations$Namespaces$Services$Endpoints$Get, options?: MethodOptions): GaxiosPromise<Schema$Endpoint>;
2177
+ get(params: Params$Resource$Projects$Locations$Namespaces$Services$Endpoints$Get, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
2178
+ get(params?: Params$Resource$Projects$Locations$Namespaces$Services$Endpoints$Get, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Endpoint>>;
926
2179
  get(params: Params$Resource$Projects$Locations$Namespaces$Services$Endpoints$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
927
2180
  get(params: Params$Resource$Projects$Locations$Namespaces$Services$Endpoints$Get, options: MethodOptions | BodyResponseCallback<Schema$Endpoint>, callback: BodyResponseCallback<Schema$Endpoint>): void;
928
2181
  get(params: Params$Resource$Projects$Locations$Namespaces$Services$Endpoints$Get, callback: BodyResponseCallback<Schema$Endpoint>): void;
929
2182
  get(callback: BodyResponseCallback<Schema$Endpoint>): void;
930
2183
  /**
931
2184
  * Lists all endpoints.
2185
+ * @example
2186
+ * ```js
2187
+ * // Before running the sample:
2188
+ * // - Enable the API at:
2189
+ * // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
2190
+ * // - Login into gcloud by running:
2191
+ * // ```sh
2192
+ * // $ gcloud auth application-default login
2193
+ * // ```
2194
+ * // - Install the npm module by running:
2195
+ * // ```sh
2196
+ * // $ npm install googleapis
2197
+ * // ```
2198
+ *
2199
+ * const {google} = require('googleapis');
2200
+ * const servicedirectory = google.servicedirectory('v1beta1');
2201
+ *
2202
+ * async function main() {
2203
+ * const auth = new google.auth.GoogleAuth({
2204
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2205
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
2206
+ * });
2207
+ *
2208
+ * // Acquire an auth client, and bind it to all future calls
2209
+ * const authClient = await auth.getClient();
2210
+ * google.options({auth: authClient});
2211
+ *
2212
+ * // Do the magic
2213
+ * const res =
2214
+ * await servicedirectory.projects.locations.namespaces.services.endpoints.list(
2215
+ * {
2216
+ * // Optional. The filter to list results by. General `filter` string syntax: ` ()` * `` can be `name`, `address`, `port`, `metadata.` for map field, or `attributes.` for attributes field * `` can be `<`, `\>`, `<=`, `\>=`, `!=`, `=`, `:`. Of which `:` means `HAS`, and is roughly the same as `=` * `` must be the same data type as field * `` can be `AND`, `OR`, `NOT` Examples of valid filters: * `metadata.owner` returns endpoints that have a metadata with the key `owner`, this is the same as `metadata:owner` * `metadata.protocol=gRPC` returns endpoints that have key/value `protocol=gRPC` * `address=192.108.1.105` returns endpoints that have this address * `port\>8080` returns endpoints that have port number larger than 8080 * `name\>projects/my-project/locations/us-east1/namespaces/my-namespace/services/my-service/endpoints/endpoint-c` returns endpoints that have name that is alphabetically later than the string, so "endpoint-e" is returned but "endpoint-a" is not * `metadata.owner!=sd AND metadata.foo=bar` returns endpoints that have `owner` in metadata key but value is not `sd` AND have key/value `foo=bar` * `doesnotexist.foo=bar` returns an empty list. Note that endpoint doesn't have a field called "doesnotexist". Since the filter does not match any endpoints, it returns no results * `attributes.kubernetes_resource_type=KUBERNETES_RESOURCE_TYPE_CLUSTER_ IP` returns endpoints with the corresponding kubernetes_resource_type For more information about filtering, see [API Filtering](https://aip.dev/160).
2217
+ * filter: 'placeholder-value',
2218
+ * // Optional. The order to list results by. General `order_by` string syntax: ` () (,)` * `` allows values: `name`, `address`, `port` * `` ascending or descending order by ``. If this is left blank, `asc` is used Note that an empty `order_by` string results in default order, which is order by `name` in ascending order.
2219
+ * orderBy: 'placeholder-value',
2220
+ * // Optional. The maximum number of items to return. The default value is 100.
2221
+ * pageSize: 'placeholder-value',
2222
+ * // Optional. The next_page_token value returned from a previous List request, if any.
2223
+ * pageToken: 'placeholder-value',
2224
+ * // Required. The resource name of the service whose endpoints you'd like to list.
2225
+ * parent:
2226
+ * 'projects/my-project/locations/my-location/namespaces/my-namespace/services/my-service',
2227
+ * },
2228
+ * );
2229
+ * console.log(res.data);
2230
+ *
2231
+ * // Example response
2232
+ * // {
2233
+ * // "endpoints": [],
2234
+ * // "nextPageToken": "my_nextPageToken"
2235
+ * // }
2236
+ * }
2237
+ *
2238
+ * main().catch(e => {
2239
+ * console.error(e);
2240
+ * throw e;
2241
+ * });
2242
+ *
2243
+ * ```
932
2244
  *
933
2245
  * @param params - Parameters for request
934
2246
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
935
2247
  * @param callback - Optional callback that handles the response.
936
2248
  * @returns A promise if used with async/await, or void if used with a callback.
937
2249
  */
938
- list(params: Params$Resource$Projects$Locations$Namespaces$Services$Endpoints$List, options: StreamMethodOptions): GaxiosPromise<Readable>;
939
- list(params?: Params$Resource$Projects$Locations$Namespaces$Services$Endpoints$List, options?: MethodOptions): GaxiosPromise<Schema$ListEndpointsResponse>;
2250
+ list(params: Params$Resource$Projects$Locations$Namespaces$Services$Endpoints$List, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
2251
+ list(params?: Params$Resource$Projects$Locations$Namespaces$Services$Endpoints$List, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ListEndpointsResponse>>;
940
2252
  list(params: Params$Resource$Projects$Locations$Namespaces$Services$Endpoints$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
941
2253
  list(params: Params$Resource$Projects$Locations$Namespaces$Services$Endpoints$List, options: MethodOptions | BodyResponseCallback<Schema$ListEndpointsResponse>, callback: BodyResponseCallback<Schema$ListEndpointsResponse>): void;
942
2254
  list(params: Params$Resource$Projects$Locations$Namespaces$Services$Endpoints$List, callback: BodyResponseCallback<Schema$ListEndpointsResponse>): void;
943
2255
  list(callback: BodyResponseCallback<Schema$ListEndpointsResponse>): void;
944
2256
  /**
945
2257
  * Updates an endpoint.
2258
+ * @example
2259
+ * ```js
2260
+ * // Before running the sample:
2261
+ * // - Enable the API at:
2262
+ * // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
2263
+ * // - Login into gcloud by running:
2264
+ * // ```sh
2265
+ * // $ gcloud auth application-default login
2266
+ * // ```
2267
+ * // - Install the npm module by running:
2268
+ * // ```sh
2269
+ * // $ npm install googleapis
2270
+ * // ```
2271
+ *
2272
+ * const {google} = require('googleapis');
2273
+ * const servicedirectory = google.servicedirectory('v1beta1');
2274
+ *
2275
+ * async function main() {
2276
+ * const auth = new google.auth.GoogleAuth({
2277
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2278
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
2279
+ * });
2280
+ *
2281
+ * // Acquire an auth client, and bind it to all future calls
2282
+ * const authClient = await auth.getClient();
2283
+ * google.options({auth: authClient});
2284
+ *
2285
+ * // Do the magic
2286
+ * const res =
2287
+ * await servicedirectory.projects.locations.namespaces.services.endpoints.patch(
2288
+ * {
2289
+ * // Immutable. The resource name for the endpoint in the format `projects/x/locations/x/namespaces/x/services/x/endpoints/x`.
2290
+ * name: 'projects/my-project/locations/my-location/namespaces/my-namespace/services/my-service/endpoints/my-endpoint',
2291
+ * // Required. List of fields to be updated in this request.
2292
+ * updateMask: 'placeholder-value',
2293
+ *
2294
+ * // Request body metadata
2295
+ * requestBody: {
2296
+ * // request body parameters
2297
+ * // {
2298
+ * // "address": "my_address",
2299
+ * // "createTime": "my_createTime",
2300
+ * // "metadata": {},
2301
+ * // "name": "my_name",
2302
+ * // "network": "my_network",
2303
+ * // "port": 0,
2304
+ * // "uid": "my_uid",
2305
+ * // "updateTime": "my_updateTime"
2306
+ * // }
2307
+ * },
2308
+ * },
2309
+ * );
2310
+ * console.log(res.data);
2311
+ *
2312
+ * // Example response
2313
+ * // {
2314
+ * // "address": "my_address",
2315
+ * // "createTime": "my_createTime",
2316
+ * // "metadata": {},
2317
+ * // "name": "my_name",
2318
+ * // "network": "my_network",
2319
+ * // "port": 0,
2320
+ * // "uid": "my_uid",
2321
+ * // "updateTime": "my_updateTime"
2322
+ * // }
2323
+ * }
2324
+ *
2325
+ * main().catch(e => {
2326
+ * console.error(e);
2327
+ * throw e;
2328
+ * });
2329
+ *
2330
+ * ```
946
2331
  *
947
2332
  * @param params - Parameters for request
948
2333
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
949
2334
  * @param callback - Optional callback that handles the response.
950
2335
  * @returns A promise if used with async/await, or void if used with a callback.
951
2336
  */
952
- patch(params: Params$Resource$Projects$Locations$Namespaces$Services$Endpoints$Patch, options: StreamMethodOptions): GaxiosPromise<Readable>;
953
- patch(params?: Params$Resource$Projects$Locations$Namespaces$Services$Endpoints$Patch, options?: MethodOptions): GaxiosPromise<Schema$Endpoint>;
2337
+ patch(params: Params$Resource$Projects$Locations$Namespaces$Services$Endpoints$Patch, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
2338
+ patch(params?: Params$Resource$Projects$Locations$Namespaces$Services$Endpoints$Patch, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Endpoint>>;
954
2339
  patch(params: Params$Resource$Projects$Locations$Namespaces$Services$Endpoints$Patch, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
955
2340
  patch(params: Params$Resource$Projects$Locations$Namespaces$Services$Endpoints$Patch, options: MethodOptions | BodyResponseCallback<Schema$Endpoint>, callback: BodyResponseCallback<Schema$Endpoint>): void;
956
2341
  patch(params: Params$Resource$Projects$Locations$Namespaces$Services$Endpoints$Patch, callback: BodyResponseCallback<Schema$Endpoint>): void;
@@ -1023,42 +2408,220 @@ export declare namespace servicedirectory_v1beta1 {
1023
2408
  constructor(context: APIRequestContext);
1024
2409
  /**
1025
2410
  * Gets the IAM Policy for a resource
2411
+ * @example
2412
+ * ```js
2413
+ * // Before running the sample:
2414
+ * // - Enable the API at:
2415
+ * // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
2416
+ * // - Login into gcloud by running:
2417
+ * // ```sh
2418
+ * // $ gcloud auth application-default login
2419
+ * // ```
2420
+ * // - Install the npm module by running:
2421
+ * // ```sh
2422
+ * // $ npm install googleapis
2423
+ * // ```
2424
+ *
2425
+ * const {google} = require('googleapis');
2426
+ * const servicedirectory = google.servicedirectory('v1beta1');
2427
+ *
2428
+ * async function main() {
2429
+ * const auth = new google.auth.GoogleAuth({
2430
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2431
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
2432
+ * });
2433
+ *
2434
+ * // Acquire an auth client, and bind it to all future calls
2435
+ * const authClient = await auth.getClient();
2436
+ * google.options({auth: authClient});
2437
+ *
2438
+ * // Do the magic
2439
+ * const res =
2440
+ * await servicedirectory.projects.locations.namespaces.workloads.getIamPolicy(
2441
+ * {
2442
+ * // REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.
2443
+ * resource:
2444
+ * 'projects/my-project/locations/my-location/namespaces/my-namespace/workloads/my-workload',
2445
+ *
2446
+ * // Request body metadata
2447
+ * requestBody: {
2448
+ * // request body parameters
2449
+ * // {
2450
+ * // "options": {}
2451
+ * // }
2452
+ * },
2453
+ * },
2454
+ * );
2455
+ * console.log(res.data);
2456
+ *
2457
+ * // Example response
2458
+ * // {
2459
+ * // "bindings": [],
2460
+ * // "etag": "my_etag",
2461
+ * // "version": 0
2462
+ * // }
2463
+ * }
2464
+ *
2465
+ * main().catch(e => {
2466
+ * console.error(e);
2467
+ * throw e;
2468
+ * });
2469
+ *
2470
+ * ```
1026
2471
  *
1027
2472
  * @param params - Parameters for request
1028
2473
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1029
2474
  * @param callback - Optional callback that handles the response.
1030
2475
  * @returns A promise if used with async/await, or void if used with a callback.
1031
2476
  */
1032
- getIamPolicy(params: Params$Resource$Projects$Locations$Namespaces$Workloads$Getiampolicy, options: StreamMethodOptions): GaxiosPromise<Readable>;
1033
- getIamPolicy(params?: Params$Resource$Projects$Locations$Namespaces$Workloads$Getiampolicy, options?: MethodOptions): GaxiosPromise<Schema$Policy>;
2477
+ getIamPolicy(params: Params$Resource$Projects$Locations$Namespaces$Workloads$Getiampolicy, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
2478
+ getIamPolicy(params?: Params$Resource$Projects$Locations$Namespaces$Workloads$Getiampolicy, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Policy>>;
1034
2479
  getIamPolicy(params: Params$Resource$Projects$Locations$Namespaces$Workloads$Getiampolicy, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1035
2480
  getIamPolicy(params: Params$Resource$Projects$Locations$Namespaces$Workloads$Getiampolicy, options: MethodOptions | BodyResponseCallback<Schema$Policy>, callback: BodyResponseCallback<Schema$Policy>): void;
1036
2481
  getIamPolicy(params: Params$Resource$Projects$Locations$Namespaces$Workloads$Getiampolicy, callback: BodyResponseCallback<Schema$Policy>): void;
1037
2482
  getIamPolicy(callback: BodyResponseCallback<Schema$Policy>): void;
1038
2483
  /**
1039
2484
  * Sets the IAM Policy for a resource
2485
+ * @example
2486
+ * ```js
2487
+ * // Before running the sample:
2488
+ * // - Enable the API at:
2489
+ * // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
2490
+ * // - Login into gcloud by running:
2491
+ * // ```sh
2492
+ * // $ gcloud auth application-default login
2493
+ * // ```
2494
+ * // - Install the npm module by running:
2495
+ * // ```sh
2496
+ * // $ npm install googleapis
2497
+ * // ```
2498
+ *
2499
+ * const {google} = require('googleapis');
2500
+ * const servicedirectory = google.servicedirectory('v1beta1');
2501
+ *
2502
+ * async function main() {
2503
+ * const auth = new google.auth.GoogleAuth({
2504
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2505
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
2506
+ * });
2507
+ *
2508
+ * // Acquire an auth client, and bind it to all future calls
2509
+ * const authClient = await auth.getClient();
2510
+ * google.options({auth: authClient});
2511
+ *
2512
+ * // Do the magic
2513
+ * const res =
2514
+ * await servicedirectory.projects.locations.namespaces.workloads.setIamPolicy(
2515
+ * {
2516
+ * // REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.
2517
+ * resource:
2518
+ * 'projects/my-project/locations/my-location/namespaces/my-namespace/workloads/my-workload',
2519
+ *
2520
+ * // Request body metadata
2521
+ * requestBody: {
2522
+ * // request body parameters
2523
+ * // {
2524
+ * // "policy": {}
2525
+ * // }
2526
+ * },
2527
+ * },
2528
+ * );
2529
+ * console.log(res.data);
2530
+ *
2531
+ * // Example response
2532
+ * // {
2533
+ * // "bindings": [],
2534
+ * // "etag": "my_etag",
2535
+ * // "version": 0
2536
+ * // }
2537
+ * }
2538
+ *
2539
+ * main().catch(e => {
2540
+ * console.error(e);
2541
+ * throw e;
2542
+ * });
2543
+ *
2544
+ * ```
1040
2545
  *
1041
2546
  * @param params - Parameters for request
1042
2547
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1043
2548
  * @param callback - Optional callback that handles the response.
1044
2549
  * @returns A promise if used with async/await, or void if used with a callback.
1045
2550
  */
1046
- setIamPolicy(params: Params$Resource$Projects$Locations$Namespaces$Workloads$Setiampolicy, options: StreamMethodOptions): GaxiosPromise<Readable>;
1047
- setIamPolicy(params?: Params$Resource$Projects$Locations$Namespaces$Workloads$Setiampolicy, options?: MethodOptions): GaxiosPromise<Schema$Policy>;
2551
+ setIamPolicy(params: Params$Resource$Projects$Locations$Namespaces$Workloads$Setiampolicy, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
2552
+ setIamPolicy(params?: Params$Resource$Projects$Locations$Namespaces$Workloads$Setiampolicy, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Policy>>;
1048
2553
  setIamPolicy(params: Params$Resource$Projects$Locations$Namespaces$Workloads$Setiampolicy, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1049
2554
  setIamPolicy(params: Params$Resource$Projects$Locations$Namespaces$Workloads$Setiampolicy, options: MethodOptions | BodyResponseCallback<Schema$Policy>, callback: BodyResponseCallback<Schema$Policy>): void;
1050
2555
  setIamPolicy(params: Params$Resource$Projects$Locations$Namespaces$Workloads$Setiampolicy, callback: BodyResponseCallback<Schema$Policy>): void;
1051
2556
  setIamPolicy(callback: BodyResponseCallback<Schema$Policy>): void;
1052
2557
  /**
1053
2558
  * Tests IAM permissions for a resource (namespace, service or service workload only).
2559
+ * @example
2560
+ * ```js
2561
+ * // Before running the sample:
2562
+ * // - Enable the API at:
2563
+ * // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
2564
+ * // - Login into gcloud by running:
2565
+ * // ```sh
2566
+ * // $ gcloud auth application-default login
2567
+ * // ```
2568
+ * // - Install the npm module by running:
2569
+ * // ```sh
2570
+ * // $ npm install googleapis
2571
+ * // ```
2572
+ *
2573
+ * const {google} = require('googleapis');
2574
+ * const servicedirectory = google.servicedirectory('v1beta1');
2575
+ *
2576
+ * async function main() {
2577
+ * const auth = new google.auth.GoogleAuth({
2578
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2579
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
2580
+ * });
2581
+ *
2582
+ * // Acquire an auth client, and bind it to all future calls
2583
+ * const authClient = await auth.getClient();
2584
+ * google.options({auth: authClient});
2585
+ *
2586
+ * // Do the magic
2587
+ * const res =
2588
+ * await servicedirectory.projects.locations.namespaces.workloads.testIamPermissions(
2589
+ * {
2590
+ * // REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.
2591
+ * resource:
2592
+ * 'projects/my-project/locations/my-location/namespaces/my-namespace/workloads/my-workload',
2593
+ *
2594
+ * // Request body metadata
2595
+ * requestBody: {
2596
+ * // request body parameters
2597
+ * // {
2598
+ * // "permissions": []
2599
+ * // }
2600
+ * },
2601
+ * },
2602
+ * );
2603
+ * console.log(res.data);
2604
+ *
2605
+ * // Example response
2606
+ * // {
2607
+ * // "permissions": []
2608
+ * // }
2609
+ * }
2610
+ *
2611
+ * main().catch(e => {
2612
+ * console.error(e);
2613
+ * throw e;
2614
+ * });
2615
+ *
2616
+ * ```
1054
2617
  *
1055
2618
  * @param params - Parameters for request
1056
2619
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1057
2620
  * @param callback - Optional callback that handles the response.
1058
2621
  * @returns A promise if used with async/await, or void if used with a callback.
1059
2622
  */
1060
- testIamPermissions(params: Params$Resource$Projects$Locations$Namespaces$Workloads$Testiampermissions, options: StreamMethodOptions): GaxiosPromise<Readable>;
1061
- testIamPermissions(params?: Params$Resource$Projects$Locations$Namespaces$Workloads$Testiampermissions, options?: MethodOptions): GaxiosPromise<Schema$TestIamPermissionsResponse>;
2623
+ testIamPermissions(params: Params$Resource$Projects$Locations$Namespaces$Workloads$Testiampermissions, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
2624
+ testIamPermissions(params?: Params$Resource$Projects$Locations$Namespaces$Workloads$Testiampermissions, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$TestIamPermissionsResponse>>;
1062
2625
  testIamPermissions(params: Params$Resource$Projects$Locations$Namespaces$Workloads$Testiampermissions, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1063
2626
  testIamPermissions(params: Params$Resource$Projects$Locations$Namespaces$Workloads$Testiampermissions, options: MethodOptions | BodyResponseCallback<Schema$TestIamPermissionsResponse>, callback: BodyResponseCallback<Schema$TestIamPermissionsResponse>): void;
1064
2627
  testIamPermissions(params: Params$Resource$Projects$Locations$Namespaces$Workloads$Testiampermissions, callback: BodyResponseCallback<Schema$TestIamPermissionsResponse>): void;