@googleapis/servicedirectory 4.0.1 → 6.0.0

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