@googleapis/serviceusage 16.0.1 → 17.2.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.
package/v1beta1.ts CHANGED
@@ -261,7 +261,7 @@ export namespace serviceusage_v1beta1 {
261
261
  */
262
262
  kind?: string | null;
263
263
  /**
264
- * Content of the configuration. The underlying schema should be defined by Aspect owners as protobuf message under `apiserving/configaspects/proto`.
264
+ * Content of the configuration. The underlying schema should be defined by Aspect owners as protobuf message under `google/api/configaspects/proto`.
265
265
  */
266
266
  spec?: {[key: string]: any} | null;
267
267
  }
@@ -436,6 +436,73 @@ export namespace serviceusage_v1beta1 {
436
436
  */
437
437
  services?: Schema$GoogleApiServiceusageV1Service[];
438
438
  }
439
+ /**
440
+ * `BatchingConfigProto` defines the batching configuration for an API method.
441
+ */
442
+ export interface Schema$BatchingConfigProto {
443
+ /**
444
+ * The request and response fields used in batching.
445
+ */
446
+ batchDescriptor?: Schema$BatchingDescriptorProto;
447
+ /**
448
+ * The thresholds which trigger a batched request to be sent.
449
+ */
450
+ thresholds?: Schema$BatchingSettingsProto;
451
+ }
452
+ /**
453
+ * `BatchingDescriptorProto` specifies the fields of the request message to be used for batching, and, optionally, the fields of the response message to be used for demultiplexing.
454
+ */
455
+ export interface Schema$BatchingDescriptorProto {
456
+ /**
457
+ * The repeated field in the request message to be aggregated by batching.
458
+ */
459
+ batchedField?: string | null;
460
+ /**
461
+ * A list of the fields in the request message. Two requests will be batched together only if the values of every field specified in `request_discriminator_fields` is equal between the two requests.
462
+ */
463
+ discriminatorFields?: string[] | null;
464
+ /**
465
+ * Optional. When present, indicates the field in the response message to be used to demultiplex the response into multiple response messages, in correspondence with the multiple request messages originally batched together.
466
+ */
467
+ subresponseField?: string | null;
468
+ }
469
+ /**
470
+ * `BatchingSettingsProto` specifies a set of batching thresholds, each of which acts as a trigger to send a batch of messages as a request. At least one threshold must be positive nonzero.
471
+ */
472
+ export interface Schema$BatchingSettingsProto {
473
+ /**
474
+ * The duration after which a batch should be sent, starting from the addition of the first message to that batch.
475
+ */
476
+ delayThreshold?: string | null;
477
+ /**
478
+ * The maximum number of elements collected in a batch that could be accepted by server.
479
+ */
480
+ elementCountLimit?: number | null;
481
+ /**
482
+ * The number of elements of a field collected into a batch which, if exceeded, causes the batch to be sent.
483
+ */
484
+ elementCountThreshold?: number | null;
485
+ /**
486
+ * The maximum size of data allowed by flow control.
487
+ */
488
+ flowControlByteLimit?: number | null;
489
+ /**
490
+ * The maximum number of elements allowed by flow control.
491
+ */
492
+ flowControlElementLimit?: number | null;
493
+ /**
494
+ * The behavior to take when the flow control limit is exceeded.
495
+ */
496
+ flowControlLimitExceededBehavior?: string | null;
497
+ /**
498
+ * The maximum size of the request that could be accepted by server.
499
+ */
500
+ requestByteLimit?: number | null;
501
+ /**
502
+ * The aggregated size of the batched field which, if exceeded, causes the batch to be sent. This size is computed by aggregating the sizes of the request field to be batched, not of the entire request message.
503
+ */
504
+ requestByteThreshold?: string | null;
505
+ }
439
506
  /**
440
507
  * Billing related configuration of the service. The following example shows how to configure monitored resources and metrics for billing, `consumer_destinations` is the only supported destination and the monitored resources need at least one label key `cloud.googleapis.com/location` to indicate the location of the billing usage, using different monitored resources between monitoring and billing is recommended so they can be evolved independently: monitored_resources: - type: library.googleapis.com/billing_branch labels: - key: cloud.googleapis.com/location description: | Predefined label to support billing location restriction. - key: city description: | Custom label to define the city where the library branch is located in. - key: name description: Custom label to define the name of the library branch. metrics: - name: library.googleapis.com/book/borrowed_count metric_kind: DELTA value_type: INT64 unit: "1" billing: consumer_destinations: - monitored_resource: library.googleapis.com/billing_branch metrics: - library.googleapis.com/book/borrowed_count
441
508
  */
@@ -1797,6 +1864,10 @@ export namespace serviceusage_v1beta1 {
1797
1864
  * List of top-level fields of the request message, that should be automatically populated by the client libraries based on their (google.api.field_info).format. Currently supported format: UUID4. Example of a YAML configuration: publishing: method_settings: - selector: google.example.v1.ExampleService.CreateExample auto_populated_fields: - request_id
1798
1865
  */
1799
1866
  autoPopulatedFields?: string[] | null;
1867
+ /**
1868
+ * Batching configuration for an API method in client libraries. Example of a YAML configuration: publishing: method_settings: - selector: google.example.v1.ExampleService.BatchCreateExample batching: element_count_threshold: 1000 request_byte_threshold: 100000000 delay_threshold_millis: 10
1869
+ */
1870
+ batching?: Schema$BatchingConfigProto;
1800
1871
  /**
1801
1872
  * Describes settings to use for long-running operations when generating API methods for RPCs. Complements RPCs that use the annotations in google/longrunning/operations.proto. Example of a YAML configuration:: publishing: method_settings: - selector: google.cloud.speech.v2.Speech.BatchRecognize long_running: initial_poll_delay: 60s # 1 minute poll_delay_multiplier: 1.5 max_poll_delay: 360s # 6 minutes total_poll_timeout: 54000s # 90 minutes
1802
1873
  */
@@ -2056,6 +2127,10 @@ export namespace serviceusage_v1beta1 {
2056
2127
  * Some settings.
2057
2128
  */
2058
2129
  common?: Schema$CommonLanguageSettings;
2130
+ /**
2131
+ * The package name to use in Php. Clobbers the php_namespace option set in the protobuf. This should be used **only** by APIs who have already set the language_settings.php.package_name" field in gapic.yaml. API teams should use the protobuf php_namespace option where possible. Example of a YAML configuration:: publishing: library_settings: php_settings: library_package: Google\Cloud\PubSub\V1
2132
+ */
2133
+ libraryPackage?: string | null;
2059
2134
  }
2060
2135
  /**
2061
2136
  * Quota policy created by service producer.
@@ -2557,6 +2632,59 @@ export namespace serviceusage_v1beta1 {
2557
2632
 
2558
2633
  /**
2559
2634
  * Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
2635
+ * @example
2636
+ * ```js
2637
+ * // Before running the sample:
2638
+ * // - Enable the API at:
2639
+ * // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
2640
+ * // - Login into gcloud by running:
2641
+ * // ```sh
2642
+ * // $ gcloud auth application-default login
2643
+ * // ```
2644
+ * // - Install the npm module by running:
2645
+ * // ```sh
2646
+ * // $ npm install googleapis
2647
+ * // ```
2648
+ *
2649
+ * const {google} = require('googleapis');
2650
+ * const serviceusage = google.serviceusage('v1beta1');
2651
+ *
2652
+ * async function main() {
2653
+ * const auth = new google.auth.GoogleAuth({
2654
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2655
+ * scopes: [
2656
+ * 'https://www.googleapis.com/auth/cloud-platform',
2657
+ * 'https://www.googleapis.com/auth/service.management',
2658
+ * ],
2659
+ * });
2660
+ *
2661
+ * // Acquire an auth client, and bind it to all future calls
2662
+ * const authClient = await auth.getClient();
2663
+ * google.options({auth: authClient});
2664
+ *
2665
+ * // Do the magic
2666
+ * const res = await serviceusage.operations.get({
2667
+ * // The name of the operation resource.
2668
+ * name: 'operations/my-operation',
2669
+ * });
2670
+ * console.log(res.data);
2671
+ *
2672
+ * // Example response
2673
+ * // {
2674
+ * // "done": false,
2675
+ * // "error": {},
2676
+ * // "metadata": {},
2677
+ * // "name": "my_name",
2678
+ * // "response": {}
2679
+ * // }
2680
+ * }
2681
+ *
2682
+ * main().catch(e => {
2683
+ * console.error(e);
2684
+ * throw e;
2685
+ * });
2686
+ *
2687
+ * ```
2560
2688
  *
2561
2689
  * @param params - Parameters for request
2562
2690
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2644,6 +2772,62 @@ export namespace serviceusage_v1beta1 {
2644
2772
 
2645
2773
  /**
2646
2774
  * Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
2775
+ * @example
2776
+ * ```js
2777
+ * // Before running the sample:
2778
+ * // - Enable the API at:
2779
+ * // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
2780
+ * // - Login into gcloud by running:
2781
+ * // ```sh
2782
+ * // $ gcloud auth application-default login
2783
+ * // ```
2784
+ * // - Install the npm module by running:
2785
+ * // ```sh
2786
+ * // $ npm install googleapis
2787
+ * // ```
2788
+ *
2789
+ * const {google} = require('googleapis');
2790
+ * const serviceusage = google.serviceusage('v1beta1');
2791
+ *
2792
+ * async function main() {
2793
+ * const auth = new google.auth.GoogleAuth({
2794
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2795
+ * scopes: [
2796
+ * 'https://www.googleapis.com/auth/cloud-platform',
2797
+ * 'https://www.googleapis.com/auth/service.management',
2798
+ * ],
2799
+ * });
2800
+ *
2801
+ * // Acquire an auth client, and bind it to all future calls
2802
+ * const authClient = await auth.getClient();
2803
+ * google.options({auth: authClient});
2804
+ *
2805
+ * // Do the magic
2806
+ * const res = await serviceusage.operations.list({
2807
+ * // The standard list filter.
2808
+ * filter: 'placeholder-value',
2809
+ * // The name of the operation's parent resource.
2810
+ * name: 'placeholder-value',
2811
+ * // The standard list page size.
2812
+ * pageSize: 'placeholder-value',
2813
+ * // The standard list page token.
2814
+ * pageToken: 'placeholder-value',
2815
+ * });
2816
+ * console.log(res.data);
2817
+ *
2818
+ * // Example response
2819
+ * // {
2820
+ * // "nextPageToken": "my_nextPageToken",
2821
+ * // "operations": []
2822
+ * // }
2823
+ * }
2824
+ *
2825
+ * main().catch(e => {
2826
+ * console.error(e);
2827
+ * throw e;
2828
+ * });
2829
+ *
2830
+ * ```
2647
2831
  *
2648
2832
  * @param params - Parameters for request
2649
2833
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2772,6 +2956,67 @@ export namespace serviceusage_v1beta1 {
2772
2956
 
2773
2957
  /**
2774
2958
  * Enables multiple services on a project. The operation is atomic: if enabling any service fails, then the entire batch fails, and no state changes occur. Operation response type: `google.protobuf.Empty`
2959
+ * @example
2960
+ * ```js
2961
+ * // Before running the sample:
2962
+ * // - Enable the API at:
2963
+ * // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
2964
+ * // - Login into gcloud by running:
2965
+ * // ```sh
2966
+ * // $ gcloud auth application-default login
2967
+ * // ```
2968
+ * // - Install the npm module by running:
2969
+ * // ```sh
2970
+ * // $ npm install googleapis
2971
+ * // ```
2972
+ *
2973
+ * const {google} = require('googleapis');
2974
+ * const serviceusage = google.serviceusage('v1beta1');
2975
+ *
2976
+ * async function main() {
2977
+ * const auth = new google.auth.GoogleAuth({
2978
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2979
+ * scopes: [
2980
+ * 'https://www.googleapis.com/auth/cloud-platform',
2981
+ * 'https://www.googleapis.com/auth/service.management',
2982
+ * ],
2983
+ * });
2984
+ *
2985
+ * // Acquire an auth client, and bind it to all future calls
2986
+ * const authClient = await auth.getClient();
2987
+ * google.options({auth: authClient});
2988
+ *
2989
+ * // Do the magic
2990
+ * const res = await serviceusage.services.batchEnable({
2991
+ * // Parent to enable services on. An example name would be: `projects/123` where `123` is the project number (not project ID). The `BatchEnableServices` method currently only supports projects.
2992
+ * parent: '[^/]+/[^/]+',
2993
+ *
2994
+ * // Request body metadata
2995
+ * requestBody: {
2996
+ * // request body parameters
2997
+ * // {
2998
+ * // "serviceIds": []
2999
+ * // }
3000
+ * },
3001
+ * });
3002
+ * console.log(res.data);
3003
+ *
3004
+ * // Example response
3005
+ * // {
3006
+ * // "done": false,
3007
+ * // "error": {},
3008
+ * // "metadata": {},
3009
+ * // "name": "my_name",
3010
+ * // "response": {}
3011
+ * // }
3012
+ * }
3013
+ *
3014
+ * main().catch(e => {
3015
+ * console.error(e);
3016
+ * throw e;
3017
+ * });
3018
+ *
3019
+ * ```
2775
3020
  *
2776
3021
  * @param params - Parameters for request
2777
3022
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2863,6 +3108,65 @@ export namespace serviceusage_v1beta1 {
2863
3108
 
2864
3109
  /**
2865
3110
  * Disables a service so that it can no longer be used with a project. This prevents unintended usage that may cause unexpected billing charges or security leaks. It is not valid to call the disable method on a service that is not currently enabled. Callers will receive a `FAILED_PRECONDITION` status if the target service is not currently enabled. Operation response type: `google.protobuf.Empty`
3111
+ * @example
3112
+ * ```js
3113
+ * // Before running the sample:
3114
+ * // - Enable the API at:
3115
+ * // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
3116
+ * // - Login into gcloud by running:
3117
+ * // ```sh
3118
+ * // $ gcloud auth application-default login
3119
+ * // ```
3120
+ * // - Install the npm module by running:
3121
+ * // ```sh
3122
+ * // $ npm install googleapis
3123
+ * // ```
3124
+ *
3125
+ * const {google} = require('googleapis');
3126
+ * const serviceusage = google.serviceusage('v1beta1');
3127
+ *
3128
+ * async function main() {
3129
+ * const auth = new google.auth.GoogleAuth({
3130
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3131
+ * scopes: [
3132
+ * 'https://www.googleapis.com/auth/cloud-platform',
3133
+ * 'https://www.googleapis.com/auth/service.management',
3134
+ * ],
3135
+ * });
3136
+ *
3137
+ * // Acquire an auth client, and bind it to all future calls
3138
+ * const authClient = await auth.getClient();
3139
+ * google.options({auth: authClient});
3140
+ *
3141
+ * // Do the magic
3142
+ * const res = await serviceusage.services.disable({
3143
+ * // Name of the consumer and service to disable the service on. The enable and disable methods currently only support projects. An example name would be: `projects/123/services/serviceusage.googleapis.com` where `123` is the project number (not project ID).
3144
+ * name: '[^/]+/[^/]+/services/my-service',
3145
+ *
3146
+ * // Request body metadata
3147
+ * requestBody: {
3148
+ * // request body parameters
3149
+ * // {}
3150
+ * },
3151
+ * });
3152
+ * console.log(res.data);
3153
+ *
3154
+ * // Example response
3155
+ * // {
3156
+ * // "done": false,
3157
+ * // "error": {},
3158
+ * // "metadata": {},
3159
+ * // "name": "my_name",
3160
+ * // "response": {}
3161
+ * // }
3162
+ * }
3163
+ *
3164
+ * main().catch(e => {
3165
+ * console.error(e);
3166
+ * throw e;
3167
+ * });
3168
+ *
3169
+ * ```
2866
3170
  *
2867
3171
  * @param params - Parameters for request
2868
3172
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2953,6 +3257,65 @@ export namespace serviceusage_v1beta1 {
2953
3257
 
2954
3258
  /**
2955
3259
  * Enables a service so that it can be used with a project. Operation response type: `google.protobuf.Empty`
3260
+ * @example
3261
+ * ```js
3262
+ * // Before running the sample:
3263
+ * // - Enable the API at:
3264
+ * // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
3265
+ * // - Login into gcloud by running:
3266
+ * // ```sh
3267
+ * // $ gcloud auth application-default login
3268
+ * // ```
3269
+ * // - Install the npm module by running:
3270
+ * // ```sh
3271
+ * // $ npm install googleapis
3272
+ * // ```
3273
+ *
3274
+ * const {google} = require('googleapis');
3275
+ * const serviceusage = google.serviceusage('v1beta1');
3276
+ *
3277
+ * async function main() {
3278
+ * const auth = new google.auth.GoogleAuth({
3279
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3280
+ * scopes: [
3281
+ * 'https://www.googleapis.com/auth/cloud-platform',
3282
+ * 'https://www.googleapis.com/auth/service.management',
3283
+ * ],
3284
+ * });
3285
+ *
3286
+ * // Acquire an auth client, and bind it to all future calls
3287
+ * const authClient = await auth.getClient();
3288
+ * google.options({auth: authClient});
3289
+ *
3290
+ * // Do the magic
3291
+ * const res = await serviceusage.services.enable({
3292
+ * // Name of the consumer and service to enable the service on. The `EnableService` and `DisableService` methods currently only support projects. Enabling a service requires that the service is public or is shared with the user enabling the service. An example name would be: `projects/123/services/serviceusage.googleapis.com` where `123` is the project number (not project ID).
3293
+ * name: '[^/]+/[^/]+/services/my-service',
3294
+ *
3295
+ * // Request body metadata
3296
+ * requestBody: {
3297
+ * // request body parameters
3298
+ * // {}
3299
+ * },
3300
+ * });
3301
+ * console.log(res.data);
3302
+ *
3303
+ * // Example response
3304
+ * // {
3305
+ * // "done": false,
3306
+ * // "error": {},
3307
+ * // "metadata": {},
3308
+ * // "name": "my_name",
3309
+ * // "response": {}
3310
+ * // }
3311
+ * }
3312
+ *
3313
+ * main().catch(e => {
3314
+ * console.error(e);
3315
+ * throw e;
3316
+ * });
3317
+ *
3318
+ * ```
2956
3319
  *
2957
3320
  * @param params - Parameters for request
2958
3321
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -3043,6 +3406,59 @@ export namespace serviceusage_v1beta1 {
3043
3406
 
3044
3407
  /**
3045
3408
  * Generates service identity for service.
3409
+ * @example
3410
+ * ```js
3411
+ * // Before running the sample:
3412
+ * // - Enable the API at:
3413
+ * // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
3414
+ * // - Login into gcloud by running:
3415
+ * // ```sh
3416
+ * // $ gcloud auth application-default login
3417
+ * // ```
3418
+ * // - Install the npm module by running:
3419
+ * // ```sh
3420
+ * // $ npm install googleapis
3421
+ * // ```
3422
+ *
3423
+ * const {google} = require('googleapis');
3424
+ * const serviceusage = google.serviceusage('v1beta1');
3425
+ *
3426
+ * async function main() {
3427
+ * const auth = new google.auth.GoogleAuth({
3428
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3429
+ * scopes: [
3430
+ * 'https://www.googleapis.com/auth/cloud-platform',
3431
+ * 'https://www.googleapis.com/auth/service.management',
3432
+ * ],
3433
+ * });
3434
+ *
3435
+ * // Acquire an auth client, and bind it to all future calls
3436
+ * const authClient = await auth.getClient();
3437
+ * google.options({auth: authClient});
3438
+ *
3439
+ * // Do the magic
3440
+ * const res = await serviceusage.services.generateServiceIdentity({
3441
+ * // Name of the consumer and service to generate an identity for. The `GenerateServiceIdentity` methods currently support projects, folders, organizations. Example parents would be: `projects/123/services/example.googleapis.com` `folders/123/services/example.googleapis.com` `organizations/123/services/example.googleapis.com`
3442
+ * parent: '[^/]+/[^/]+/services/my-service',
3443
+ * });
3444
+ * console.log(res.data);
3445
+ *
3446
+ * // Example response
3447
+ * // {
3448
+ * // "done": false,
3449
+ * // "error": {},
3450
+ * // "metadata": {},
3451
+ * // "name": "my_name",
3452
+ * // "response": {}
3453
+ * // }
3454
+ * }
3455
+ *
3456
+ * main().catch(e => {
3457
+ * console.error(e);
3458
+ * throw e;
3459
+ * });
3460
+ *
3461
+ * ```
3046
3462
  *
3047
3463
  * @param params - Parameters for request
3048
3464
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -3135,6 +3551,58 @@ export namespace serviceusage_v1beta1 {
3135
3551
 
3136
3552
  /**
3137
3553
  * Returns the service configuration and enabled state for a given service.
3554
+ * @example
3555
+ * ```js
3556
+ * // Before running the sample:
3557
+ * // - Enable the API at:
3558
+ * // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
3559
+ * // - Login into gcloud by running:
3560
+ * // ```sh
3561
+ * // $ gcloud auth application-default login
3562
+ * // ```
3563
+ * // - Install the npm module by running:
3564
+ * // ```sh
3565
+ * // $ npm install googleapis
3566
+ * // ```
3567
+ *
3568
+ * const {google} = require('googleapis');
3569
+ * const serviceusage = google.serviceusage('v1beta1');
3570
+ *
3571
+ * async function main() {
3572
+ * const auth = new google.auth.GoogleAuth({
3573
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3574
+ * scopes: [
3575
+ * 'https://www.googleapis.com/auth/cloud-platform',
3576
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
3577
+ * ],
3578
+ * });
3579
+ *
3580
+ * // Acquire an auth client, and bind it to all future calls
3581
+ * const authClient = await auth.getClient();
3582
+ * google.options({auth: authClient});
3583
+ *
3584
+ * // Do the magic
3585
+ * const res = await serviceusage.services.get({
3586
+ * // Name of the consumer and service to get the `ConsumerState` for. An example name would be: `projects/123/services/serviceusage.googleapis.com` where `123` is the project number (not project ID).
3587
+ * name: '[^/]+/[^/]+/services/my-service',
3588
+ * });
3589
+ * console.log(res.data);
3590
+ *
3591
+ * // Example response
3592
+ * // {
3593
+ * // "config": {},
3594
+ * // "name": "my_name",
3595
+ * // "parent": "my_parent",
3596
+ * // "state": "my_state"
3597
+ * // }
3598
+ * }
3599
+ *
3600
+ * main().catch(e => {
3601
+ * console.error(e);
3602
+ * throw e;
3603
+ * });
3604
+ *
3605
+ * ```
3138
3606
  *
3139
3607
  * @param params - Parameters for request
3140
3608
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -3222,6 +3690,62 @@ export namespace serviceusage_v1beta1 {
3222
3690
 
3223
3691
  /**
3224
3692
  * Lists all services available to the specified project, and the current state of those services with respect to the project. The list includes all public services, all services for which the calling user has the `servicemanagement.services.bind` permission, and all services that have already been enabled on the project. The list can be filtered to only include services in a specific state, for example to only include services enabled on the project.
3693
+ * @example
3694
+ * ```js
3695
+ * // Before running the sample:
3696
+ * // - Enable the API at:
3697
+ * // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
3698
+ * // - Login into gcloud by running:
3699
+ * // ```sh
3700
+ * // $ gcloud auth application-default login
3701
+ * // ```
3702
+ * // - Install the npm module by running:
3703
+ * // ```sh
3704
+ * // $ npm install googleapis
3705
+ * // ```
3706
+ *
3707
+ * const {google} = require('googleapis');
3708
+ * const serviceusage = google.serviceusage('v1beta1');
3709
+ *
3710
+ * async function main() {
3711
+ * const auth = new google.auth.GoogleAuth({
3712
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3713
+ * scopes: [
3714
+ * 'https://www.googleapis.com/auth/cloud-platform',
3715
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
3716
+ * ],
3717
+ * });
3718
+ *
3719
+ * // Acquire an auth client, and bind it to all future calls
3720
+ * const authClient = await auth.getClient();
3721
+ * google.options({auth: authClient});
3722
+ *
3723
+ * // Do the magic
3724
+ * const res = await serviceusage.services.list({
3725
+ * // Only list services that conform to the given filter. The allowed filter strings are `state:ENABLED` and `state:DISABLED`.
3726
+ * filter: 'placeholder-value',
3727
+ * // Requested size of the next page of data. Requested page size cannot exceed 200. If not set, the default page size is 50.
3728
+ * pageSize: 'placeholder-value',
3729
+ * // Token identifying which result to start with, which is returned by a previous list call.
3730
+ * pageToken: 'placeholder-value',
3731
+ * // Parent to search for services on. An example name would be: `projects/123` where `123` is the project number (not project ID).
3732
+ * parent: '[^/]+/[^/]+',
3733
+ * });
3734
+ * console.log(res.data);
3735
+ *
3736
+ * // Example response
3737
+ * // {
3738
+ * // "nextPageToken": "my_nextPageToken",
3739
+ * // "services": []
3740
+ * // }
3741
+ * }
3742
+ *
3743
+ * main().catch(e => {
3744
+ * console.error(e);
3745
+ * throw e;
3746
+ * });
3747
+ *
3748
+ * ```
3225
3749
  *
3226
3750
  * @param params - Parameters for request
3227
3751
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -3391,6 +3915,62 @@ export namespace serviceusage_v1beta1 {
3391
3915
 
3392
3916
  /**
3393
3917
  * Retrieves a summary of quota information for a specific quota metric
3918
+ * @example
3919
+ * ```js
3920
+ * // Before running the sample:
3921
+ * // - Enable the API at:
3922
+ * // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
3923
+ * // - Login into gcloud by running:
3924
+ * // ```sh
3925
+ * // $ gcloud auth application-default login
3926
+ * // ```
3927
+ * // - Install the npm module by running:
3928
+ * // ```sh
3929
+ * // $ npm install googleapis
3930
+ * // ```
3931
+ *
3932
+ * const {google} = require('googleapis');
3933
+ * const serviceusage = google.serviceusage('v1beta1');
3934
+ *
3935
+ * async function main() {
3936
+ * const auth = new google.auth.GoogleAuth({
3937
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3938
+ * scopes: [
3939
+ * 'https://www.googleapis.com/auth/cloud-platform',
3940
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
3941
+ * ],
3942
+ * });
3943
+ *
3944
+ * // Acquire an auth client, and bind it to all future calls
3945
+ * const authClient = await auth.getClient();
3946
+ * google.options({auth: authClient});
3947
+ *
3948
+ * // Do the magic
3949
+ * const res = await serviceusage.services.consumerQuotaMetrics.get({
3950
+ * // The resource name of the quota. An example name would be: `projects/123/services/serviceusage.googleapis.com/consumerQuotaMetrics/serviceusage.googleapis.com%2Fmutate_requests`
3951
+ * name: '[^/]+/[^/]+/services/my-service/consumerQuotaMetrics/my-consumerQuotaMetric',
3952
+ * // Specifies the level of detail for quota information in the response.
3953
+ * view: 'placeholder-value',
3954
+ * });
3955
+ * console.log(res.data);
3956
+ *
3957
+ * // Example response
3958
+ * // {
3959
+ * // "consumerQuotaLimits": [],
3960
+ * // "descendantConsumerQuotaLimits": [],
3961
+ * // "displayName": "my_displayName",
3962
+ * // "metric": "my_metric",
3963
+ * // "name": "my_name",
3964
+ * // "unit": "my_unit"
3965
+ * // }
3966
+ * }
3967
+ *
3968
+ * main().catch(e => {
3969
+ * console.error(e);
3970
+ * throw e;
3971
+ * });
3972
+ *
3973
+ * ```
3394
3974
  *
3395
3975
  * @param params - Parameters for request
3396
3976
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -3479,6 +4059,70 @@ export namespace serviceusage_v1beta1 {
3479
4059
 
3480
4060
  /**
3481
4061
  * Creates or updates multiple admin overrides atomically, all on the same consumer, but on many different metrics or limits. The name field in the quota override message should not be set.
4062
+ * @example
4063
+ * ```js
4064
+ * // Before running the sample:
4065
+ * // - Enable the API at:
4066
+ * // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
4067
+ * // - Login into gcloud by running:
4068
+ * // ```sh
4069
+ * // $ gcloud auth application-default login
4070
+ * // ```
4071
+ * // - Install the npm module by running:
4072
+ * // ```sh
4073
+ * // $ npm install googleapis
4074
+ * // ```
4075
+ *
4076
+ * const {google} = require('googleapis');
4077
+ * const serviceusage = google.serviceusage('v1beta1');
4078
+ *
4079
+ * async function main() {
4080
+ * const auth = new google.auth.GoogleAuth({
4081
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
4082
+ * scopes: [
4083
+ * 'https://www.googleapis.com/auth/cloud-platform',
4084
+ * 'https://www.googleapis.com/auth/service.management',
4085
+ * ],
4086
+ * });
4087
+ *
4088
+ * // Acquire an auth client, and bind it to all future calls
4089
+ * const authClient = await auth.getClient();
4090
+ * google.options({auth: authClient});
4091
+ *
4092
+ * // Do the magic
4093
+ * const res =
4094
+ * await serviceusage.services.consumerQuotaMetrics.importAdminOverrides({
4095
+ * // The resource name of the consumer. An example name would be: `projects/123/services/compute.googleapis.com`
4096
+ * parent: '[^/]+/[^/]+/services/my-service',
4097
+ *
4098
+ * // Request body metadata
4099
+ * requestBody: {
4100
+ * // request body parameters
4101
+ * // {
4102
+ * // "force": false,
4103
+ * // "forceOnly": [],
4104
+ * // "inlineSource": {}
4105
+ * // }
4106
+ * },
4107
+ * });
4108
+ * console.log(res.data);
4109
+ *
4110
+ * // Example response
4111
+ * // {
4112
+ * // "done": false,
4113
+ * // "error": {},
4114
+ * // "metadata": {},
4115
+ * // "name": "my_name",
4116
+ * // "response": {}
4117
+ * // }
4118
+ * }
4119
+ *
4120
+ * main().catch(e => {
4121
+ * console.error(e);
4122
+ * throw e;
4123
+ * });
4124
+ *
4125
+ * ```
3482
4126
  *
3483
4127
  * @param params - Parameters for request
3484
4128
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -3573,6 +4217,70 @@ export namespace serviceusage_v1beta1 {
3573
4217
 
3574
4218
  /**
3575
4219
  * Creates or updates multiple consumer overrides atomically, all on the same consumer, but on many different metrics or limits. The name field in the quota override message should not be set.
4220
+ * @example
4221
+ * ```js
4222
+ * // Before running the sample:
4223
+ * // - Enable the API at:
4224
+ * // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
4225
+ * // - Login into gcloud by running:
4226
+ * // ```sh
4227
+ * // $ gcloud auth application-default login
4228
+ * // ```
4229
+ * // - Install the npm module by running:
4230
+ * // ```sh
4231
+ * // $ npm install googleapis
4232
+ * // ```
4233
+ *
4234
+ * const {google} = require('googleapis');
4235
+ * const serviceusage = google.serviceusage('v1beta1');
4236
+ *
4237
+ * async function main() {
4238
+ * const auth = new google.auth.GoogleAuth({
4239
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
4240
+ * scopes: [
4241
+ * 'https://www.googleapis.com/auth/cloud-platform',
4242
+ * 'https://www.googleapis.com/auth/service.management',
4243
+ * ],
4244
+ * });
4245
+ *
4246
+ * // Acquire an auth client, and bind it to all future calls
4247
+ * const authClient = await auth.getClient();
4248
+ * google.options({auth: authClient});
4249
+ *
4250
+ * // Do the magic
4251
+ * const res =
4252
+ * await serviceusage.services.consumerQuotaMetrics.importConsumerOverrides({
4253
+ * // The resource name of the consumer. An example name would be: `projects/123/services/compute.googleapis.com`
4254
+ * parent: '[^/]+/[^/]+/services/my-service',
4255
+ *
4256
+ * // Request body metadata
4257
+ * requestBody: {
4258
+ * // request body parameters
4259
+ * // {
4260
+ * // "force": false,
4261
+ * // "forceOnly": [],
4262
+ * // "inlineSource": {}
4263
+ * // }
4264
+ * },
4265
+ * });
4266
+ * console.log(res.data);
4267
+ *
4268
+ * // Example response
4269
+ * // {
4270
+ * // "done": false,
4271
+ * // "error": {},
4272
+ * // "metadata": {},
4273
+ * // "name": "my_name",
4274
+ * // "response": {}
4275
+ * // }
4276
+ * }
4277
+ *
4278
+ * main().catch(e => {
4279
+ * console.error(e);
4280
+ * throw e;
4281
+ * });
4282
+ *
4283
+ * ```
3576
4284
  *
3577
4285
  * @param params - Parameters for request
3578
4286
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -3667,6 +4375,62 @@ export namespace serviceusage_v1beta1 {
3667
4375
 
3668
4376
  /**
3669
4377
  * Retrieves a summary of all quota information visible to the service consumer, organized by service metric. Each metric includes information about all of its defined limits. Each limit includes the limit configuration (quota unit, preciseness, default value), the current effective limit value, and all of the overrides applied to the limit.
4378
+ * @example
4379
+ * ```js
4380
+ * // Before running the sample:
4381
+ * // - Enable the API at:
4382
+ * // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
4383
+ * // - Login into gcloud by running:
4384
+ * // ```sh
4385
+ * // $ gcloud auth application-default login
4386
+ * // ```
4387
+ * // - Install the npm module by running:
4388
+ * // ```sh
4389
+ * // $ npm install googleapis
4390
+ * // ```
4391
+ *
4392
+ * const {google} = require('googleapis');
4393
+ * const serviceusage = google.serviceusage('v1beta1');
4394
+ *
4395
+ * async function main() {
4396
+ * const auth = new google.auth.GoogleAuth({
4397
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
4398
+ * scopes: [
4399
+ * 'https://www.googleapis.com/auth/cloud-platform',
4400
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
4401
+ * ],
4402
+ * });
4403
+ *
4404
+ * // Acquire an auth client, and bind it to all future calls
4405
+ * const authClient = await auth.getClient();
4406
+ * google.options({auth: authClient});
4407
+ *
4408
+ * // Do the magic
4409
+ * const res = await serviceusage.services.consumerQuotaMetrics.list({
4410
+ * // Requested size of the next page of data.
4411
+ * pageSize: 'placeholder-value',
4412
+ * // Token identifying which result to start with; returned by a previous list call.
4413
+ * pageToken: 'placeholder-value',
4414
+ * // Parent of the quotas resource. Some example names would be: `projects/123/services/serviceconsumermanagement.googleapis.com` `folders/345/services/serviceconsumermanagement.googleapis.com` `organizations/456/services/serviceconsumermanagement.googleapis.com`
4415
+ * parent: '[^/]+/[^/]+/services/my-service',
4416
+ * // Specifies the level of detail for quota information in the response.
4417
+ * view: 'placeholder-value',
4418
+ * });
4419
+ * console.log(res.data);
4420
+ *
4421
+ * // Example response
4422
+ * // {
4423
+ * // "metrics": [],
4424
+ * // "nextPageToken": "my_nextPageToken"
4425
+ * // }
4426
+ * }
4427
+ *
4428
+ * main().catch(e => {
4429
+ * console.error(e);
4430
+ * throw e;
4431
+ * });
4432
+ *
4433
+ * ```
3670
4434
  *
3671
4435
  * @param params - Parameters for request
3672
4436
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -3840,6 +4604,63 @@ export namespace serviceusage_v1beta1 {
3840
4604
 
3841
4605
  /**
3842
4606
  * Retrieves a summary of quota information for a specific quota limit.
4607
+ * @example
4608
+ * ```js
4609
+ * // Before running the sample:
4610
+ * // - Enable the API at:
4611
+ * // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
4612
+ * // - Login into gcloud by running:
4613
+ * // ```sh
4614
+ * // $ gcloud auth application-default login
4615
+ * // ```
4616
+ * // - Install the npm module by running:
4617
+ * // ```sh
4618
+ * // $ npm install googleapis
4619
+ * // ```
4620
+ *
4621
+ * const {google} = require('googleapis');
4622
+ * const serviceusage = google.serviceusage('v1beta1');
4623
+ *
4624
+ * async function main() {
4625
+ * const auth = new google.auth.GoogleAuth({
4626
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
4627
+ * scopes: [
4628
+ * 'https://www.googleapis.com/auth/cloud-platform',
4629
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
4630
+ * ],
4631
+ * });
4632
+ *
4633
+ * // Acquire an auth client, and bind it to all future calls
4634
+ * const authClient = await auth.getClient();
4635
+ * google.options({auth: authClient});
4636
+ *
4637
+ * // Do the magic
4638
+ * const res = await serviceusage.services.consumerQuotaMetrics.limits.get({
4639
+ * // The resource name of the quota limit. Use the quota limit resource name returned by previous ListConsumerQuotaMetrics and GetConsumerQuotaMetric API calls.
4640
+ * name: '[^/]+/[^/]+/services/my-service/consumerQuotaMetrics/my-consumerQuotaMetric/limits/my-limit',
4641
+ * // Specifies the level of detail for quota information in the response.
4642
+ * view: 'placeholder-value',
4643
+ * });
4644
+ * console.log(res.data);
4645
+ *
4646
+ * // Example response
4647
+ * // {
4648
+ * // "allowsAdminOverrides": false,
4649
+ * // "isPrecise": false,
4650
+ * // "metric": "my_metric",
4651
+ * // "name": "my_name",
4652
+ * // "quotaBuckets": [],
4653
+ * // "supportedLocations": [],
4654
+ * // "unit": "my_unit"
4655
+ * // }
4656
+ * }
4657
+ *
4658
+ * main().catch(e => {
4659
+ * console.error(e);
4660
+ * throw e;
4661
+ * });
4662
+ *
4663
+ * ```
3843
4664
  *
3844
4665
  * @param params - Parameters for request
3845
4666
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -3947,6 +4768,80 @@ export namespace serviceusage_v1beta1 {
3947
4768
 
3948
4769
  /**
3949
4770
  * Creates an admin override. An admin override is applied by an administrator of a parent folder or parent organization of the consumer receiving the override. An admin override is intended to limit the amount of quota the consumer can use out of the total quota pool allocated to all children of the folder or organization.
4771
+ * @example
4772
+ * ```js
4773
+ * // Before running the sample:
4774
+ * // - Enable the API at:
4775
+ * // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
4776
+ * // - Login into gcloud by running:
4777
+ * // ```sh
4778
+ * // $ gcloud auth application-default login
4779
+ * // ```
4780
+ * // - Install the npm module by running:
4781
+ * // ```sh
4782
+ * // $ npm install googleapis
4783
+ * // ```
4784
+ *
4785
+ * const {google} = require('googleapis');
4786
+ * const serviceusage = google.serviceusage('v1beta1');
4787
+ *
4788
+ * async function main() {
4789
+ * const auth = new google.auth.GoogleAuth({
4790
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
4791
+ * scopes: [
4792
+ * 'https://www.googleapis.com/auth/cloud-platform',
4793
+ * 'https://www.googleapis.com/auth/service.management',
4794
+ * ],
4795
+ * });
4796
+ *
4797
+ * // Acquire an auth client, and bind it to all future calls
4798
+ * const authClient = await auth.getClient();
4799
+ * google.options({auth: authClient});
4800
+ *
4801
+ * // Do the magic
4802
+ * const res =
4803
+ * await serviceusage.services.consumerQuotaMetrics.limits.adminOverrides.create(
4804
+ * {
4805
+ * // Whether to force the creation of the quota override. Setting the force parameter to 'true' ignores all quota safety checks that would fail the request. QuotaSafetyCheck lists all such validations. If force is set to true, it is recommended to include a case id in "X-Goog-Request-Reason" header when sending the request.
4806
+ * force: 'placeholder-value',
4807
+ * // The list of quota safety checks to ignore before the override mutation. Unlike 'force' field that ignores all the quota safety checks, the 'force_only' field ignores only the specified checks; other checks are still enforced. The 'force' and 'force_only' fields cannot both be set. If force_only is specified, it is recommended to include a case id in "X-Goog-Request-Reason" header when sending the request.
4808
+ * forceOnly: 'placeholder-value',
4809
+ * // The resource name of the parent quota limit, returned by a ListConsumerQuotaMetrics or GetConsumerQuotaMetric call. An example name would be: `projects/123/services/compute.googleapis.com/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion`
4810
+ * parent:
4811
+ * '[^/]+/[^/]+/services/my-service/consumerQuotaMetrics/my-consumerQuotaMetric/limits/my-limit',
4812
+ *
4813
+ * // Request body metadata
4814
+ * requestBody: {
4815
+ * // request body parameters
4816
+ * // {
4817
+ * // "adminOverrideAncestor": "my_adminOverrideAncestor",
4818
+ * // "dimensions": {},
4819
+ * // "metric": "my_metric",
4820
+ * // "name": "my_name",
4821
+ * // "overrideValue": "my_overrideValue",
4822
+ * // "unit": "my_unit"
4823
+ * // }
4824
+ * },
4825
+ * },
4826
+ * );
4827
+ * console.log(res.data);
4828
+ *
4829
+ * // Example response
4830
+ * // {
4831
+ * // "done": false,
4832
+ * // "error": {},
4833
+ * // "metadata": {},
4834
+ * // "name": "my_name",
4835
+ * // "response": {}
4836
+ * // }
4837
+ * }
4838
+ *
4839
+ * main().catch(e => {
4840
+ * console.error(e);
4841
+ * throw e;
4842
+ * });
4843
+ *
4844
+ * ```
3950
4845
  *
3951
4846
  * @param params - Parameters for request
3952
4847
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -4039,6 +4934,66 @@ export namespace serviceusage_v1beta1 {
4039
4934
 
4040
4935
  /**
4041
4936
  * Deletes an admin override.
4937
+ * @example
4938
+ * ```js
4939
+ * // Before running the sample:
4940
+ * // - Enable the API at:
4941
+ * // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
4942
+ * // - Login into gcloud by running:
4943
+ * // ```sh
4944
+ * // $ gcloud auth application-default login
4945
+ * // ```
4946
+ * // - Install the npm module by running:
4947
+ * // ```sh
4948
+ * // $ npm install googleapis
4949
+ * // ```
4950
+ *
4951
+ * const {google} = require('googleapis');
4952
+ * const serviceusage = google.serviceusage('v1beta1');
4953
+ *
4954
+ * async function main() {
4955
+ * const auth = new google.auth.GoogleAuth({
4956
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
4957
+ * scopes: [
4958
+ * 'https://www.googleapis.com/auth/cloud-platform',
4959
+ * 'https://www.googleapis.com/auth/service.management',
4960
+ * ],
4961
+ * });
4962
+ *
4963
+ * // Acquire an auth client, and bind it to all future calls
4964
+ * const authClient = await auth.getClient();
4965
+ * google.options({auth: authClient});
4966
+ *
4967
+ * // Do the magic
4968
+ * const res =
4969
+ * await serviceusage.services.consumerQuotaMetrics.limits.adminOverrides.delete(
4970
+ * {
4971
+ * // Whether to force the deletion of the quota override. Setting the force parameter to 'true' ignores all quota safety checks that would fail the request. QuotaSafetyCheck lists all such validations. If force is set to true, it is recommended to include a case id in "X-Goog-Request-Reason" header when sending the request.
4972
+ * force: 'placeholder-value',
4973
+ * // The list of quota safety checks to ignore before the override mutation. Unlike 'force' field that ignores all the quota safety checks, the 'force_only' field ignores only the specified checks; other checks are still enforced. The 'force' and 'force_only' fields cannot both be set. If force_only is specified, it is recommended to include a case id in "X-Goog-Request-Reason" header when sending the request.
4974
+ * forceOnly: 'placeholder-value',
4975
+ * // The resource name of the override to delete. An example name would be: `projects/123/services/compute.googleapis.com/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion/adminOverrides/4a3f2c1d`
4976
+ * name: '[^/]+/[^/]+/services/my-service/consumerQuotaMetrics/my-consumerQuotaMetric/limits/my-limit/adminOverrides/my-adminOverride',
4977
+ * },
4978
+ * );
4979
+ * console.log(res.data);
4980
+ *
4981
+ * // Example response
4982
+ * // {
4983
+ * // "done": false,
4984
+ * // "error": {},
4985
+ * // "metadata": {},
4986
+ * // "name": "my_name",
4987
+ * // "response": {}
4988
+ * // }
4989
+ * }
4990
+ *
4991
+ * main().catch(e => {
4992
+ * console.error(e);
4993
+ * throw e;
4994
+ * });
4995
+ *
4996
+ * ```
4042
4997
  *
4043
4998
  * @param params - Parameters for request
4044
4999
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -4128,6 +5083,64 @@ export namespace serviceusage_v1beta1 {
4128
5083
 
4129
5084
  /**
4130
5085
  * Lists all admin overrides on this limit.
5086
+ * @example
5087
+ * ```js
5088
+ * // Before running the sample:
5089
+ * // - Enable the API at:
5090
+ * // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
5091
+ * // - Login into gcloud by running:
5092
+ * // ```sh
5093
+ * // $ gcloud auth application-default login
5094
+ * // ```
5095
+ * // - Install the npm module by running:
5096
+ * // ```sh
5097
+ * // $ npm install googleapis
5098
+ * // ```
5099
+ *
5100
+ * const {google} = require('googleapis');
5101
+ * const serviceusage = google.serviceusage('v1beta1');
5102
+ *
5103
+ * async function main() {
5104
+ * const auth = new google.auth.GoogleAuth({
5105
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
5106
+ * scopes: [
5107
+ * 'https://www.googleapis.com/auth/cloud-platform',
5108
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
5109
+ * ],
5110
+ * });
5111
+ *
5112
+ * // Acquire an auth client, and bind it to all future calls
5113
+ * const authClient = await auth.getClient();
5114
+ * google.options({auth: authClient});
5115
+ *
5116
+ * // Do the magic
5117
+ * const res =
5118
+ * await serviceusage.services.consumerQuotaMetrics.limits.adminOverrides.list(
5119
+ * {
5120
+ * // Requested size of the next page of data.
5121
+ * pageSize: 'placeholder-value',
5122
+ * // Token identifying which result to start with; returned by a previous list call.
5123
+ * pageToken: 'placeholder-value',
5124
+ * // The resource name of the parent quota limit, returned by a ListConsumerQuotaMetrics or GetConsumerQuotaMetric call. An example name would be: `projects/123/services/compute.googleapis.com/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion`
5125
+ * parent:
5126
+ * '[^/]+/[^/]+/services/my-service/consumerQuotaMetrics/my-consumerQuotaMetric/limits/my-limit',
5127
+ * },
5128
+ * );
5129
+ * console.log(res.data);
5130
+ *
5131
+ * // Example response
5132
+ * // {
5133
+ * // "nextPageToken": "my_nextPageToken",
5134
+ * // "overrides": []
5135
+ * // }
5136
+ * }
5137
+ *
5138
+ * main().catch(e => {
5139
+ * console.error(e);
5140
+ * throw e;
5141
+ * });
5142
+ *
5143
+ * ```
4131
5144
  *
4132
5145
  * @param params - Parameters for request
4133
5146
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -4224,6 +5237,81 @@ export namespace serviceusage_v1beta1 {
4224
5237
 
4225
5238
  /**
4226
5239
  * Updates an admin override.
5240
+ * @example
5241
+ * ```js
5242
+ * // Before running the sample:
5243
+ * // - Enable the API at:
5244
+ * // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
5245
+ * // - Login into gcloud by running:
5246
+ * // ```sh
5247
+ * // $ gcloud auth application-default login
5248
+ * // ```
5249
+ * // - Install the npm module by running:
5250
+ * // ```sh
5251
+ * // $ npm install googleapis
5252
+ * // ```
5253
+ *
5254
+ * const {google} = require('googleapis');
5255
+ * const serviceusage = google.serviceusage('v1beta1');
5256
+ *
5257
+ * async function main() {
5258
+ * const auth = new google.auth.GoogleAuth({
5259
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
5260
+ * scopes: [
5261
+ * 'https://www.googleapis.com/auth/cloud-platform',
5262
+ * 'https://www.googleapis.com/auth/service.management',
5263
+ * ],
5264
+ * });
5265
+ *
5266
+ * // Acquire an auth client, and bind it to all future calls
5267
+ * const authClient = await auth.getClient();
5268
+ * google.options({auth: authClient});
5269
+ *
5270
+ * // Do the magic
5271
+ * const res =
5272
+ * await serviceusage.services.consumerQuotaMetrics.limits.adminOverrides.patch(
5273
+ * {
5274
+ * // Whether to force the update of the quota override. Setting the force parameter to 'true' ignores all quota safety checks that would fail the request. QuotaSafetyCheck lists all such validations. If force is set to true, it is recommended to include a case id in "X-Goog-Request-Reason" header when sending the request.
5275
+ * force: 'placeholder-value',
5276
+ * // The list of quota safety checks to ignore before the override mutation. Unlike 'force' field that ignores all the quota safety checks, the 'force_only' field ignores only the specified checks; other checks are still enforced. The 'force' and 'force_only' fields cannot both be set. If force_only is specified, it is recommended to include a case id in "X-Goog-Request-Reason" header when sending the request.
5277
+ * forceOnly: 'placeholder-value',
5278
+ * // The resource name of the override to update. An example name would be: `projects/123/services/compute.googleapis.com/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion/adminOverrides/4a3f2c1d`
5279
+ * name: '[^/]+/[^/]+/services/my-service/consumerQuotaMetrics/my-consumerQuotaMetric/limits/my-limit/adminOverrides/my-adminOverride',
5280
+ * // Update only the specified fields of the override. If unset, all fields will be updated.
5281
+ * updateMask: 'placeholder-value',
5282
+ *
5283
+ * // Request body metadata
5284
+ * requestBody: {
5285
+ * // request body parameters
5286
+ * // {
5287
+ * // "adminOverrideAncestor": "my_adminOverrideAncestor",
5288
+ * // "dimensions": {},
5289
+ * // "metric": "my_metric",
5290
+ * // "name": "my_name",
5291
+ * // "overrideValue": "my_overrideValue",
5292
+ * // "unit": "my_unit"
5293
+ * // }
5294
+ * },
5295
+ * },
5296
+ * );
5297
+ * console.log(res.data);
5298
+ *
5299
+ * // Example response
5300
+ * // {
5301
+ * // "done": false,
5302
+ * // "error": {},
5303
+ * // "metadata": {},
5304
+ * // "name": "my_name",
5305
+ * // "response": {}
5306
+ * // }
5307
+ * }
5308
+ *
5309
+ * main().catch(e => {
5310
+ * console.error(e);
5311
+ * throw e;
5312
+ * });
5313
+ *
5314
+ * ```
4227
5315
  *
4228
5316
  * @param params - Parameters for request
4229
5317
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -4395,6 +5483,80 @@ export namespace serviceusage_v1beta1 {
4395
5483
 
4396
5484
  /**
4397
5485
  * Creates a consumer override. A consumer override is applied to the consumer on its own authority to limit its own quota usage. Consumer overrides cannot be used to grant more quota than would be allowed by admin overrides, producer overrides, or the default limit of the service.
5486
+ * @example
5487
+ * ```js
5488
+ * // Before running the sample:
5489
+ * // - Enable the API at:
5490
+ * // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
5491
+ * // - Login into gcloud by running:
5492
+ * // ```sh
5493
+ * // $ gcloud auth application-default login
5494
+ * // ```
5495
+ * // - Install the npm module by running:
5496
+ * // ```sh
5497
+ * // $ npm install googleapis
5498
+ * // ```
5499
+ *
5500
+ * const {google} = require('googleapis');
5501
+ * const serviceusage = google.serviceusage('v1beta1');
5502
+ *
5503
+ * async function main() {
5504
+ * const auth = new google.auth.GoogleAuth({
5505
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
5506
+ * scopes: [
5507
+ * 'https://www.googleapis.com/auth/cloud-platform',
5508
+ * 'https://www.googleapis.com/auth/service.management',
5509
+ * ],
5510
+ * });
5511
+ *
5512
+ * // Acquire an auth client, and bind it to all future calls
5513
+ * const authClient = await auth.getClient();
5514
+ * google.options({auth: authClient});
5515
+ *
5516
+ * // Do the magic
5517
+ * const res =
5518
+ * await serviceusage.services.consumerQuotaMetrics.limits.consumerOverrides.create(
5519
+ * {
5520
+ * // Whether to force the creation of the quota override. Setting the force parameter to 'true' ignores all quota safety checks that would fail the request. QuotaSafetyCheck lists all such validations. If force is set to true, it is recommended to include a case id in "X-Goog-Request-Reason" header when sending the request.
5521
+ * force: 'placeholder-value',
5522
+ * // The list of quota safety checks to ignore before the override mutation. Unlike 'force' field that ignores all the quota safety checks, the 'force_only' field ignores only the specified checks; other checks are still enforced. The 'force' and 'force_only' fields cannot both be set. If force_only is specified, it is recommended to include a case id in "X-Goog-Request-Reason" header when sending the request.
5523
+ * forceOnly: 'placeholder-value',
5524
+ * // The resource name of the parent quota limit, returned by a ListConsumerQuotaMetrics or GetConsumerQuotaMetric call. An example name would be: `projects/123/services/compute.googleapis.com/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion`
5525
+ * parent:
5526
+ * '[^/]+/[^/]+/services/my-service/consumerQuotaMetrics/my-consumerQuotaMetric/limits/my-limit',
5527
+ *
5528
+ * // Request body metadata
5529
+ * requestBody: {
5530
+ * // request body parameters
5531
+ * // {
5532
+ * // "adminOverrideAncestor": "my_adminOverrideAncestor",
5533
+ * // "dimensions": {},
5534
+ * // "metric": "my_metric",
5535
+ * // "name": "my_name",
5536
+ * // "overrideValue": "my_overrideValue",
5537
+ * // "unit": "my_unit"
5538
+ * // }
5539
+ * },
5540
+ * },
5541
+ * );
5542
+ * console.log(res.data);
5543
+ *
5544
+ * // Example response
5545
+ * // {
5546
+ * // "done": false,
5547
+ * // "error": {},
5548
+ * // "metadata": {},
5549
+ * // "name": "my_name",
5550
+ * // "response": {}
5551
+ * // }
5552
+ * }
5553
+ *
5554
+ * main().catch(e => {
5555
+ * console.error(e);
5556
+ * throw e;
5557
+ * });
5558
+ *
5559
+ * ```
4398
5560
  *
4399
5561
  * @param params - Parameters for request
4400
5562
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -4487,6 +5649,66 @@ export namespace serviceusage_v1beta1 {
4487
5649
 
4488
5650
  /**
4489
5651
  * Deletes a consumer override.
5652
+ * @example
5653
+ * ```js
5654
+ * // Before running the sample:
5655
+ * // - Enable the API at:
5656
+ * // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
5657
+ * // - Login into gcloud by running:
5658
+ * // ```sh
5659
+ * // $ gcloud auth application-default login
5660
+ * // ```
5661
+ * // - Install the npm module by running:
5662
+ * // ```sh
5663
+ * // $ npm install googleapis
5664
+ * // ```
5665
+ *
5666
+ * const {google} = require('googleapis');
5667
+ * const serviceusage = google.serviceusage('v1beta1');
5668
+ *
5669
+ * async function main() {
5670
+ * const auth = new google.auth.GoogleAuth({
5671
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
5672
+ * scopes: [
5673
+ * 'https://www.googleapis.com/auth/cloud-platform',
5674
+ * 'https://www.googleapis.com/auth/service.management',
5675
+ * ],
5676
+ * });
5677
+ *
5678
+ * // Acquire an auth client, and bind it to all future calls
5679
+ * const authClient = await auth.getClient();
5680
+ * google.options({auth: authClient});
5681
+ *
5682
+ * // Do the magic
5683
+ * const res =
5684
+ * await serviceusage.services.consumerQuotaMetrics.limits.consumerOverrides.delete(
5685
+ * {
5686
+ * // Whether to force the deletion of the quota override. Setting the force parameter to 'true' ignores all quota safety checks that would fail the request. QuotaSafetyCheck lists all such validations. If force is set to true, it is recommended to include a case id in "X-Goog-Request-Reason" header when sending the request.
5687
+ * force: 'placeholder-value',
5688
+ * // The list of quota safety checks to ignore before the override mutation. Unlike 'force' field that ignores all the quota safety checks, the 'force_only' field ignores only the specified checks; other checks are still enforced. The 'force' and 'force_only' fields cannot both be set. If force_only is specified, it is recommended to include a case id in "X-Goog-Request-Reason" header when sending the request.
5689
+ * forceOnly: 'placeholder-value',
5690
+ * // The resource name of the override to delete. An example name would be: `projects/123/services/compute.googleapis.com/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion/consumerOverrides/4a3f2c1d`
5691
+ * name: '[^/]+/[^/]+/services/my-service/consumerQuotaMetrics/my-consumerQuotaMetric/limits/my-limit/consumerOverrides/my-consumerOverride',
5692
+ * },
5693
+ * );
5694
+ * console.log(res.data);
5695
+ *
5696
+ * // Example response
5697
+ * // {
5698
+ * // "done": false,
5699
+ * // "error": {},
5700
+ * // "metadata": {},
5701
+ * // "name": "my_name",
5702
+ * // "response": {}
5703
+ * // }
5704
+ * }
5705
+ *
5706
+ * main().catch(e => {
5707
+ * console.error(e);
5708
+ * throw e;
5709
+ * });
5710
+ *
5711
+ * ```
4490
5712
  *
4491
5713
  * @param params - Parameters for request
4492
5714
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -4576,6 +5798,64 @@ export namespace serviceusage_v1beta1 {
4576
5798
 
4577
5799
  /**
4578
5800
  * Lists all consumer overrides on this limit.
5801
+ * @example
5802
+ * ```js
5803
+ * // Before running the sample:
5804
+ * // - Enable the API at:
5805
+ * // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
5806
+ * // - Login into gcloud by running:
5807
+ * // ```sh
5808
+ * // $ gcloud auth application-default login
5809
+ * // ```
5810
+ * // - Install the npm module by running:
5811
+ * // ```sh
5812
+ * // $ npm install googleapis
5813
+ * // ```
5814
+ *
5815
+ * const {google} = require('googleapis');
5816
+ * const serviceusage = google.serviceusage('v1beta1');
5817
+ *
5818
+ * async function main() {
5819
+ * const auth = new google.auth.GoogleAuth({
5820
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
5821
+ * scopes: [
5822
+ * 'https://www.googleapis.com/auth/cloud-platform',
5823
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
5824
+ * ],
5825
+ * });
5826
+ *
5827
+ * // Acquire an auth client, and bind it to all future calls
5828
+ * const authClient = await auth.getClient();
5829
+ * google.options({auth: authClient});
5830
+ *
5831
+ * // Do the magic
5832
+ * const res =
5833
+ * await serviceusage.services.consumerQuotaMetrics.limits.consumerOverrides.list(
5834
+ * {
5835
+ * // Requested size of the next page of data.
5836
+ * pageSize: 'placeholder-value',
5837
+ * // Token identifying which result to start with; returned by a previous list call.
5838
+ * pageToken: 'placeholder-value',
5839
+ * // The resource name of the parent quota limit, returned by a ListConsumerQuotaMetrics or GetConsumerQuotaMetric call. An example name would be: `projects/123/services/compute.googleapis.com/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion`
5840
+ * parent:
5841
+ * '[^/]+/[^/]+/services/my-service/consumerQuotaMetrics/my-consumerQuotaMetric/limits/my-limit',
5842
+ * },
5843
+ * );
5844
+ * console.log(res.data);
5845
+ *
5846
+ * // Example response
5847
+ * // {
5848
+ * // "nextPageToken": "my_nextPageToken",
5849
+ * // "overrides": []
5850
+ * // }
5851
+ * }
5852
+ *
5853
+ * main().catch(e => {
5854
+ * console.error(e);
5855
+ * throw e;
5856
+ * });
5857
+ *
5858
+ * ```
4579
5859
  *
4580
5860
  * @param params - Parameters for request
4581
5861
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -4674,6 +5954,81 @@ export namespace serviceusage_v1beta1 {
4674
5954
 
4675
5955
  /**
4676
5956
  * Updates a consumer override.
5957
+ * @example
5958
+ * ```js
5959
+ * // Before running the sample:
5960
+ * // - Enable the API at:
5961
+ * // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
5962
+ * // - Login into gcloud by running:
5963
+ * // ```sh
5964
+ * // $ gcloud auth application-default login
5965
+ * // ```
5966
+ * // - Install the npm module by running:
5967
+ * // ```sh
5968
+ * // $ npm install googleapis
5969
+ * // ```
5970
+ *
5971
+ * const {google} = require('googleapis');
5972
+ * const serviceusage = google.serviceusage('v1beta1');
5973
+ *
5974
+ * async function main() {
5975
+ * const auth = new google.auth.GoogleAuth({
5976
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
5977
+ * scopes: [
5978
+ * 'https://www.googleapis.com/auth/cloud-platform',
5979
+ * 'https://www.googleapis.com/auth/service.management',
5980
+ * ],
5981
+ * });
5982
+ *
5983
+ * // Acquire an auth client, and bind it to all future calls
5984
+ * const authClient = await auth.getClient();
5985
+ * google.options({auth: authClient});
5986
+ *
5987
+ * // Do the magic
5988
+ * const res =
5989
+ * await serviceusage.services.consumerQuotaMetrics.limits.consumerOverrides.patch(
5990
+ * {
5991
+ * // Whether to force the update of the quota override. Setting the force parameter to 'true' ignores all quota safety checks that would fail the request. QuotaSafetyCheck lists all such validations. If force is set to true, it is recommended to include a case id in "X-Goog-Request-Reason" header when sending the request.
5992
+ * force: 'placeholder-value',
5993
+ * // The list of quota safety checks to ignore before the override mutation. Unlike 'force' field that ignores all the quota safety checks, the 'force_only' field ignores only the specified checks; other checks are still enforced. The 'force' and 'force_only' fields cannot both be set. If force_only is specified, it is recommended to include a case id in "X-Goog-Request-Reason" header when sending the request.
5994
+ * forceOnly: 'placeholder-value',
5995
+ * // The resource name of the override to update. An example name would be: `projects/123/services/compute.googleapis.com/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion/consumerOverrides/4a3f2c1d`
5996
+ * name: '[^/]+/[^/]+/services/my-service/consumerQuotaMetrics/my-consumerQuotaMetric/limits/my-limit/consumerOverrides/my-consumerOverride',
5997
+ * // Update only the specified fields of the override. If unset, all fields will be updated.
5998
+ * updateMask: 'placeholder-value',
5999
+ *
6000
+ * // Request body metadata
6001
+ * requestBody: {
6002
+ * // request body parameters
6003
+ * // {
6004
+ * // "adminOverrideAncestor": "my_adminOverrideAncestor",
6005
+ * // "dimensions": {},
6006
+ * // "metric": "my_metric",
6007
+ * // "name": "my_name",
6008
+ * // "overrideValue": "my_overrideValue",
6009
+ * // "unit": "my_unit"
6010
+ * // }
6011
+ * },
6012
+ * },
6013
+ * );
6014
+ * console.log(res.data);
6015
+ *
6016
+ * // Example response
6017
+ * // {
6018
+ * // "done": false,
6019
+ * // "error": {},
6020
+ * // "metadata": {},
6021
+ * // "name": "my_name",
6022
+ * // "response": {}
6023
+ * // }
6024
+ * }
6025
+ *
6026
+ * main().catch(e => {
6027
+ * console.error(e);
6028
+ * throw e;
6029
+ * });
6030
+ *
6031
+ * ```
4677
6032
  *
4678
6033
  * @param params - Parameters for request
4679
6034
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.