@googleapis/serviceusage 15.0.2 → 17.1.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
@@ -23,7 +23,7 @@ import {
23
23
  Compute,
24
24
  UserRefreshClient,
25
25
  BaseExternalAccountClient,
26
- GaxiosPromise,
26
+ GaxiosResponseWithHTTP2,
27
27
  GoogleConfigurable,
28
28
  createAPIRequest,
29
29
  MethodOptions,
@@ -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
  */
@@ -2557,6 +2628,59 @@ export namespace serviceusage_v1beta1 {
2557
2628
 
2558
2629
  /**
2559
2630
  * 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.
2631
+ * @example
2632
+ * ```js
2633
+ * // Before running the sample:
2634
+ * // - Enable the API at:
2635
+ * // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
2636
+ * // - Login into gcloud by running:
2637
+ * // ```sh
2638
+ * // $ gcloud auth application-default login
2639
+ * // ```
2640
+ * // - Install the npm module by running:
2641
+ * // ```sh
2642
+ * // $ npm install googleapis
2643
+ * // ```
2644
+ *
2645
+ * const {google} = require('googleapis');
2646
+ * const serviceusage = google.serviceusage('v1beta1');
2647
+ *
2648
+ * async function main() {
2649
+ * const auth = new google.auth.GoogleAuth({
2650
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2651
+ * scopes: [
2652
+ * 'https://www.googleapis.com/auth/cloud-platform',
2653
+ * 'https://www.googleapis.com/auth/service.management',
2654
+ * ],
2655
+ * });
2656
+ *
2657
+ * // Acquire an auth client, and bind it to all future calls
2658
+ * const authClient = await auth.getClient();
2659
+ * google.options({auth: authClient});
2660
+ *
2661
+ * // Do the magic
2662
+ * const res = await serviceusage.operations.get({
2663
+ * // The name of the operation resource.
2664
+ * name: 'operations/my-operation',
2665
+ * });
2666
+ * console.log(res.data);
2667
+ *
2668
+ * // Example response
2669
+ * // {
2670
+ * // "done": false,
2671
+ * // "error": {},
2672
+ * // "metadata": {},
2673
+ * // "name": "my_name",
2674
+ * // "response": {}
2675
+ * // }
2676
+ * }
2677
+ *
2678
+ * main().catch(e => {
2679
+ * console.error(e);
2680
+ * throw e;
2681
+ * });
2682
+ *
2683
+ * ```
2560
2684
  *
2561
2685
  * @param params - Parameters for request
2562
2686
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2566,11 +2690,11 @@ export namespace serviceusage_v1beta1 {
2566
2690
  get(
2567
2691
  params: Params$Resource$Operations$Get,
2568
2692
  options: StreamMethodOptions
2569
- ): GaxiosPromise<Readable>;
2693
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
2570
2694
  get(
2571
2695
  params?: Params$Resource$Operations$Get,
2572
2696
  options?: MethodOptions
2573
- ): GaxiosPromise<Schema$Operation>;
2697
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
2574
2698
  get(
2575
2699
  params: Params$Resource$Operations$Get,
2576
2700
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -2599,7 +2723,10 @@ export namespace serviceusage_v1beta1 {
2599
2723
  callback?:
2600
2724
  | BodyResponseCallback<Schema$Operation>
2601
2725
  | BodyResponseCallback<Readable>
2602
- ): void | GaxiosPromise<Schema$Operation> | GaxiosPromise<Readable> {
2726
+ ):
2727
+ | void
2728
+ | Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
2729
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
2603
2730
  let params = (paramsOrCallback || {}) as Params$Resource$Operations$Get;
2604
2731
  let options = (optionsOrCallback || {}) as MethodOptions;
2605
2732
 
@@ -2641,6 +2768,62 @@ export namespace serviceusage_v1beta1 {
2641
2768
 
2642
2769
  /**
2643
2770
  * Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
2771
+ * @example
2772
+ * ```js
2773
+ * // Before running the sample:
2774
+ * // - Enable the API at:
2775
+ * // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
2776
+ * // - Login into gcloud by running:
2777
+ * // ```sh
2778
+ * // $ gcloud auth application-default login
2779
+ * // ```
2780
+ * // - Install the npm module by running:
2781
+ * // ```sh
2782
+ * // $ npm install googleapis
2783
+ * // ```
2784
+ *
2785
+ * const {google} = require('googleapis');
2786
+ * const serviceusage = google.serviceusage('v1beta1');
2787
+ *
2788
+ * async function main() {
2789
+ * const auth = new google.auth.GoogleAuth({
2790
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2791
+ * scopes: [
2792
+ * 'https://www.googleapis.com/auth/cloud-platform',
2793
+ * 'https://www.googleapis.com/auth/service.management',
2794
+ * ],
2795
+ * });
2796
+ *
2797
+ * // Acquire an auth client, and bind it to all future calls
2798
+ * const authClient = await auth.getClient();
2799
+ * google.options({auth: authClient});
2800
+ *
2801
+ * // Do the magic
2802
+ * const res = await serviceusage.operations.list({
2803
+ * // The standard list filter.
2804
+ * filter: 'placeholder-value',
2805
+ * // The name of the operation's parent resource.
2806
+ * name: 'placeholder-value',
2807
+ * // The standard list page size.
2808
+ * pageSize: 'placeholder-value',
2809
+ * // The standard list page token.
2810
+ * pageToken: 'placeholder-value',
2811
+ * });
2812
+ * console.log(res.data);
2813
+ *
2814
+ * // Example response
2815
+ * // {
2816
+ * // "nextPageToken": "my_nextPageToken",
2817
+ * // "operations": []
2818
+ * // }
2819
+ * }
2820
+ *
2821
+ * main().catch(e => {
2822
+ * console.error(e);
2823
+ * throw e;
2824
+ * });
2825
+ *
2826
+ * ```
2644
2827
  *
2645
2828
  * @param params - Parameters for request
2646
2829
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2650,11 +2833,11 @@ export namespace serviceusage_v1beta1 {
2650
2833
  list(
2651
2834
  params: Params$Resource$Operations$List,
2652
2835
  options: StreamMethodOptions
2653
- ): GaxiosPromise<Readable>;
2836
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
2654
2837
  list(
2655
2838
  params?: Params$Resource$Operations$List,
2656
2839
  options?: MethodOptions
2657
- ): GaxiosPromise<Schema$ListOperationsResponse>;
2840
+ ): Promise<GaxiosResponseWithHTTP2<Schema$ListOperationsResponse>>;
2658
2841
  list(
2659
2842
  params: Params$Resource$Operations$List,
2660
2843
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -2687,8 +2870,8 @@ export namespace serviceusage_v1beta1 {
2687
2870
  | BodyResponseCallback<Readable>
2688
2871
  ):
2689
2872
  | void
2690
- | GaxiosPromise<Schema$ListOperationsResponse>
2691
- | GaxiosPromise<Readable> {
2873
+ | Promise<GaxiosResponseWithHTTP2<Schema$ListOperationsResponse>>
2874
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
2692
2875
  let params = (paramsOrCallback || {}) as Params$Resource$Operations$List;
2693
2876
  let options = (optionsOrCallback || {}) as MethodOptions;
2694
2877
 
@@ -2769,6 +2952,67 @@ export namespace serviceusage_v1beta1 {
2769
2952
 
2770
2953
  /**
2771
2954
  * 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`
2955
+ * @example
2956
+ * ```js
2957
+ * // Before running the sample:
2958
+ * // - Enable the API at:
2959
+ * // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
2960
+ * // - Login into gcloud by running:
2961
+ * // ```sh
2962
+ * // $ gcloud auth application-default login
2963
+ * // ```
2964
+ * // - Install the npm module by running:
2965
+ * // ```sh
2966
+ * // $ npm install googleapis
2967
+ * // ```
2968
+ *
2969
+ * const {google} = require('googleapis');
2970
+ * const serviceusage = google.serviceusage('v1beta1');
2971
+ *
2972
+ * async function main() {
2973
+ * const auth = new google.auth.GoogleAuth({
2974
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2975
+ * scopes: [
2976
+ * 'https://www.googleapis.com/auth/cloud-platform',
2977
+ * 'https://www.googleapis.com/auth/service.management',
2978
+ * ],
2979
+ * });
2980
+ *
2981
+ * // Acquire an auth client, and bind it to all future calls
2982
+ * const authClient = await auth.getClient();
2983
+ * google.options({auth: authClient});
2984
+ *
2985
+ * // Do the magic
2986
+ * const res = await serviceusage.services.batchEnable({
2987
+ * // 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.
2988
+ * parent: '[^/]+/[^/]+',
2989
+ *
2990
+ * // Request body metadata
2991
+ * requestBody: {
2992
+ * // request body parameters
2993
+ * // {
2994
+ * // "serviceIds": []
2995
+ * // }
2996
+ * },
2997
+ * });
2998
+ * console.log(res.data);
2999
+ *
3000
+ * // Example response
3001
+ * // {
3002
+ * // "done": false,
3003
+ * // "error": {},
3004
+ * // "metadata": {},
3005
+ * // "name": "my_name",
3006
+ * // "response": {}
3007
+ * // }
3008
+ * }
3009
+ *
3010
+ * main().catch(e => {
3011
+ * console.error(e);
3012
+ * throw e;
3013
+ * });
3014
+ *
3015
+ * ```
2772
3016
  *
2773
3017
  * @param params - Parameters for request
2774
3018
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2778,11 +3022,11 @@ export namespace serviceusage_v1beta1 {
2778
3022
  batchEnable(
2779
3023
  params: Params$Resource$Services$Batchenable,
2780
3024
  options: StreamMethodOptions
2781
- ): GaxiosPromise<Readable>;
3025
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
2782
3026
  batchEnable(
2783
3027
  params?: Params$Resource$Services$Batchenable,
2784
3028
  options?: MethodOptions
2785
- ): GaxiosPromise<Schema$Operation>;
3029
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
2786
3030
  batchEnable(
2787
3031
  params: Params$Resource$Services$Batchenable,
2788
3032
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -2811,7 +3055,10 @@ export namespace serviceusage_v1beta1 {
2811
3055
  callback?:
2812
3056
  | BodyResponseCallback<Schema$Operation>
2813
3057
  | BodyResponseCallback<Readable>
2814
- ): void | GaxiosPromise<Schema$Operation> | GaxiosPromise<Readable> {
3058
+ ):
3059
+ | void
3060
+ | Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
3061
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
2815
3062
  let params = (paramsOrCallback ||
2816
3063
  {}) as Params$Resource$Services$Batchenable;
2817
3064
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -2857,6 +3104,65 @@ export namespace serviceusage_v1beta1 {
2857
3104
 
2858
3105
  /**
2859
3106
  * 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`
3107
+ * @example
3108
+ * ```js
3109
+ * // Before running the sample:
3110
+ * // - Enable the API at:
3111
+ * // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
3112
+ * // - Login into gcloud by running:
3113
+ * // ```sh
3114
+ * // $ gcloud auth application-default login
3115
+ * // ```
3116
+ * // - Install the npm module by running:
3117
+ * // ```sh
3118
+ * // $ npm install googleapis
3119
+ * // ```
3120
+ *
3121
+ * const {google} = require('googleapis');
3122
+ * const serviceusage = google.serviceusage('v1beta1');
3123
+ *
3124
+ * async function main() {
3125
+ * const auth = new google.auth.GoogleAuth({
3126
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3127
+ * scopes: [
3128
+ * 'https://www.googleapis.com/auth/cloud-platform',
3129
+ * 'https://www.googleapis.com/auth/service.management',
3130
+ * ],
3131
+ * });
3132
+ *
3133
+ * // Acquire an auth client, and bind it to all future calls
3134
+ * const authClient = await auth.getClient();
3135
+ * google.options({auth: authClient});
3136
+ *
3137
+ * // Do the magic
3138
+ * const res = await serviceusage.services.disable({
3139
+ * // 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).
3140
+ * name: '[^/]+/[^/]+/services/my-service',
3141
+ *
3142
+ * // Request body metadata
3143
+ * requestBody: {
3144
+ * // request body parameters
3145
+ * // {}
3146
+ * },
3147
+ * });
3148
+ * console.log(res.data);
3149
+ *
3150
+ * // Example response
3151
+ * // {
3152
+ * // "done": false,
3153
+ * // "error": {},
3154
+ * // "metadata": {},
3155
+ * // "name": "my_name",
3156
+ * // "response": {}
3157
+ * // }
3158
+ * }
3159
+ *
3160
+ * main().catch(e => {
3161
+ * console.error(e);
3162
+ * throw e;
3163
+ * });
3164
+ *
3165
+ * ```
2860
3166
  *
2861
3167
  * @param params - Parameters for request
2862
3168
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2866,11 +3172,11 @@ export namespace serviceusage_v1beta1 {
2866
3172
  disable(
2867
3173
  params: Params$Resource$Services$Disable,
2868
3174
  options: StreamMethodOptions
2869
- ): GaxiosPromise<Readable>;
3175
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
2870
3176
  disable(
2871
3177
  params?: Params$Resource$Services$Disable,
2872
3178
  options?: MethodOptions
2873
- ): GaxiosPromise<Schema$Operation>;
3179
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
2874
3180
  disable(
2875
3181
  params: Params$Resource$Services$Disable,
2876
3182
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -2899,7 +3205,10 @@ export namespace serviceusage_v1beta1 {
2899
3205
  callback?:
2900
3206
  | BodyResponseCallback<Schema$Operation>
2901
3207
  | BodyResponseCallback<Readable>
2902
- ): void | GaxiosPromise<Schema$Operation> | GaxiosPromise<Readable> {
3208
+ ):
3209
+ | void
3210
+ | Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
3211
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
2903
3212
  let params = (paramsOrCallback || {}) as Params$Resource$Services$Disable;
2904
3213
  let options = (optionsOrCallback || {}) as MethodOptions;
2905
3214
 
@@ -2944,6 +3253,65 @@ export namespace serviceusage_v1beta1 {
2944
3253
 
2945
3254
  /**
2946
3255
  * Enables a service so that it can be used with a project. Operation response type: `google.protobuf.Empty`
3256
+ * @example
3257
+ * ```js
3258
+ * // Before running the sample:
3259
+ * // - Enable the API at:
3260
+ * // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
3261
+ * // - Login into gcloud by running:
3262
+ * // ```sh
3263
+ * // $ gcloud auth application-default login
3264
+ * // ```
3265
+ * // - Install the npm module by running:
3266
+ * // ```sh
3267
+ * // $ npm install googleapis
3268
+ * // ```
3269
+ *
3270
+ * const {google} = require('googleapis');
3271
+ * const serviceusage = google.serviceusage('v1beta1');
3272
+ *
3273
+ * async function main() {
3274
+ * const auth = new google.auth.GoogleAuth({
3275
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3276
+ * scopes: [
3277
+ * 'https://www.googleapis.com/auth/cloud-platform',
3278
+ * 'https://www.googleapis.com/auth/service.management',
3279
+ * ],
3280
+ * });
3281
+ *
3282
+ * // Acquire an auth client, and bind it to all future calls
3283
+ * const authClient = await auth.getClient();
3284
+ * google.options({auth: authClient});
3285
+ *
3286
+ * // Do the magic
3287
+ * const res = await serviceusage.services.enable({
3288
+ * // 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).
3289
+ * name: '[^/]+/[^/]+/services/my-service',
3290
+ *
3291
+ * // Request body metadata
3292
+ * requestBody: {
3293
+ * // request body parameters
3294
+ * // {}
3295
+ * },
3296
+ * });
3297
+ * console.log(res.data);
3298
+ *
3299
+ * // Example response
3300
+ * // {
3301
+ * // "done": false,
3302
+ * // "error": {},
3303
+ * // "metadata": {},
3304
+ * // "name": "my_name",
3305
+ * // "response": {}
3306
+ * // }
3307
+ * }
3308
+ *
3309
+ * main().catch(e => {
3310
+ * console.error(e);
3311
+ * throw e;
3312
+ * });
3313
+ *
3314
+ * ```
2947
3315
  *
2948
3316
  * @param params - Parameters for request
2949
3317
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2953,11 +3321,11 @@ export namespace serviceusage_v1beta1 {
2953
3321
  enable(
2954
3322
  params: Params$Resource$Services$Enable,
2955
3323
  options: StreamMethodOptions
2956
- ): GaxiosPromise<Readable>;
3324
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
2957
3325
  enable(
2958
3326
  params?: Params$Resource$Services$Enable,
2959
3327
  options?: MethodOptions
2960
- ): GaxiosPromise<Schema$Operation>;
3328
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
2961
3329
  enable(
2962
3330
  params: Params$Resource$Services$Enable,
2963
3331
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -2986,7 +3354,10 @@ export namespace serviceusage_v1beta1 {
2986
3354
  callback?:
2987
3355
  | BodyResponseCallback<Schema$Operation>
2988
3356
  | BodyResponseCallback<Readable>
2989
- ): void | GaxiosPromise<Schema$Operation> | GaxiosPromise<Readable> {
3357
+ ):
3358
+ | void
3359
+ | Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
3360
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
2990
3361
  let params = (paramsOrCallback || {}) as Params$Resource$Services$Enable;
2991
3362
  let options = (optionsOrCallback || {}) as MethodOptions;
2992
3363
 
@@ -3031,6 +3402,59 @@ export namespace serviceusage_v1beta1 {
3031
3402
 
3032
3403
  /**
3033
3404
  * Generates service identity for service.
3405
+ * @example
3406
+ * ```js
3407
+ * // Before running the sample:
3408
+ * // - Enable the API at:
3409
+ * // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
3410
+ * // - Login into gcloud by running:
3411
+ * // ```sh
3412
+ * // $ gcloud auth application-default login
3413
+ * // ```
3414
+ * // - Install the npm module by running:
3415
+ * // ```sh
3416
+ * // $ npm install googleapis
3417
+ * // ```
3418
+ *
3419
+ * const {google} = require('googleapis');
3420
+ * const serviceusage = google.serviceusage('v1beta1');
3421
+ *
3422
+ * async function main() {
3423
+ * const auth = new google.auth.GoogleAuth({
3424
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3425
+ * scopes: [
3426
+ * 'https://www.googleapis.com/auth/cloud-platform',
3427
+ * 'https://www.googleapis.com/auth/service.management',
3428
+ * ],
3429
+ * });
3430
+ *
3431
+ * // Acquire an auth client, and bind it to all future calls
3432
+ * const authClient = await auth.getClient();
3433
+ * google.options({auth: authClient});
3434
+ *
3435
+ * // Do the magic
3436
+ * const res = await serviceusage.services.generateServiceIdentity({
3437
+ * // 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`
3438
+ * parent: '[^/]+/[^/]+/services/my-service',
3439
+ * });
3440
+ * console.log(res.data);
3441
+ *
3442
+ * // Example response
3443
+ * // {
3444
+ * // "done": false,
3445
+ * // "error": {},
3446
+ * // "metadata": {},
3447
+ * // "name": "my_name",
3448
+ * // "response": {}
3449
+ * // }
3450
+ * }
3451
+ *
3452
+ * main().catch(e => {
3453
+ * console.error(e);
3454
+ * throw e;
3455
+ * });
3456
+ *
3457
+ * ```
3034
3458
  *
3035
3459
  * @param params - Parameters for request
3036
3460
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -3040,11 +3464,11 @@ export namespace serviceusage_v1beta1 {
3040
3464
  generateServiceIdentity(
3041
3465
  params: Params$Resource$Services$Generateserviceidentity,
3042
3466
  options: StreamMethodOptions
3043
- ): GaxiosPromise<Readable>;
3467
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
3044
3468
  generateServiceIdentity(
3045
3469
  params?: Params$Resource$Services$Generateserviceidentity,
3046
3470
  options?: MethodOptions
3047
- ): GaxiosPromise<Schema$Operation>;
3471
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
3048
3472
  generateServiceIdentity(
3049
3473
  params: Params$Resource$Services$Generateserviceidentity,
3050
3474
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -3075,7 +3499,10 @@ export namespace serviceusage_v1beta1 {
3075
3499
  callback?:
3076
3500
  | BodyResponseCallback<Schema$Operation>
3077
3501
  | BodyResponseCallback<Readable>
3078
- ): void | GaxiosPromise<Schema$Operation> | GaxiosPromise<Readable> {
3502
+ ):
3503
+ | void
3504
+ | Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
3505
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
3079
3506
  let params = (paramsOrCallback ||
3080
3507
  {}) as Params$Resource$Services$Generateserviceidentity;
3081
3508
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -3120,6 +3547,58 @@ export namespace serviceusage_v1beta1 {
3120
3547
 
3121
3548
  /**
3122
3549
  * Returns the service configuration and enabled state for a given service.
3550
+ * @example
3551
+ * ```js
3552
+ * // Before running the sample:
3553
+ * // - Enable the API at:
3554
+ * // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
3555
+ * // - Login into gcloud by running:
3556
+ * // ```sh
3557
+ * // $ gcloud auth application-default login
3558
+ * // ```
3559
+ * // - Install the npm module by running:
3560
+ * // ```sh
3561
+ * // $ npm install googleapis
3562
+ * // ```
3563
+ *
3564
+ * const {google} = require('googleapis');
3565
+ * const serviceusage = google.serviceusage('v1beta1');
3566
+ *
3567
+ * async function main() {
3568
+ * const auth = new google.auth.GoogleAuth({
3569
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3570
+ * scopes: [
3571
+ * 'https://www.googleapis.com/auth/cloud-platform',
3572
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
3573
+ * ],
3574
+ * });
3575
+ *
3576
+ * // Acquire an auth client, and bind it to all future calls
3577
+ * const authClient = await auth.getClient();
3578
+ * google.options({auth: authClient});
3579
+ *
3580
+ * // Do the magic
3581
+ * const res = await serviceusage.services.get({
3582
+ * // 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).
3583
+ * name: '[^/]+/[^/]+/services/my-service',
3584
+ * });
3585
+ * console.log(res.data);
3586
+ *
3587
+ * // Example response
3588
+ * // {
3589
+ * // "config": {},
3590
+ * // "name": "my_name",
3591
+ * // "parent": "my_parent",
3592
+ * // "state": "my_state"
3593
+ * // }
3594
+ * }
3595
+ *
3596
+ * main().catch(e => {
3597
+ * console.error(e);
3598
+ * throw e;
3599
+ * });
3600
+ *
3601
+ * ```
3123
3602
  *
3124
3603
  * @param params - Parameters for request
3125
3604
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -3129,11 +3608,11 @@ export namespace serviceusage_v1beta1 {
3129
3608
  get(
3130
3609
  params: Params$Resource$Services$Get,
3131
3610
  options: StreamMethodOptions
3132
- ): GaxiosPromise<Readable>;
3611
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
3133
3612
  get(
3134
3613
  params?: Params$Resource$Services$Get,
3135
3614
  options?: MethodOptions
3136
- ): GaxiosPromise<Schema$Service>;
3615
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Service>>;
3137
3616
  get(
3138
3617
  params: Params$Resource$Services$Get,
3139
3618
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -3162,7 +3641,10 @@ export namespace serviceusage_v1beta1 {
3162
3641
  callback?:
3163
3642
  | BodyResponseCallback<Schema$Service>
3164
3643
  | BodyResponseCallback<Readable>
3165
- ): void | GaxiosPromise<Schema$Service> | GaxiosPromise<Readable> {
3644
+ ):
3645
+ | void
3646
+ | Promise<GaxiosResponseWithHTTP2<Schema$Service>>
3647
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
3166
3648
  let params = (paramsOrCallback || {}) as Params$Resource$Services$Get;
3167
3649
  let options = (optionsOrCallback || {}) as MethodOptions;
3168
3650
 
@@ -3204,6 +3686,62 @@ export namespace serviceusage_v1beta1 {
3204
3686
 
3205
3687
  /**
3206
3688
  * 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.
3689
+ * @example
3690
+ * ```js
3691
+ * // Before running the sample:
3692
+ * // - Enable the API at:
3693
+ * // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
3694
+ * // - Login into gcloud by running:
3695
+ * // ```sh
3696
+ * // $ gcloud auth application-default login
3697
+ * // ```
3698
+ * // - Install the npm module by running:
3699
+ * // ```sh
3700
+ * // $ npm install googleapis
3701
+ * // ```
3702
+ *
3703
+ * const {google} = require('googleapis');
3704
+ * const serviceusage = google.serviceusage('v1beta1');
3705
+ *
3706
+ * async function main() {
3707
+ * const auth = new google.auth.GoogleAuth({
3708
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3709
+ * scopes: [
3710
+ * 'https://www.googleapis.com/auth/cloud-platform',
3711
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
3712
+ * ],
3713
+ * });
3714
+ *
3715
+ * // Acquire an auth client, and bind it to all future calls
3716
+ * const authClient = await auth.getClient();
3717
+ * google.options({auth: authClient});
3718
+ *
3719
+ * // Do the magic
3720
+ * const res = await serviceusage.services.list({
3721
+ * // Only list services that conform to the given filter. The allowed filter strings are `state:ENABLED` and `state:DISABLED`.
3722
+ * filter: 'placeholder-value',
3723
+ * // Requested size of the next page of data. Requested page size cannot exceed 200. If not set, the default page size is 50.
3724
+ * pageSize: 'placeholder-value',
3725
+ * // Token identifying which result to start with, which is returned by a previous list call.
3726
+ * pageToken: 'placeholder-value',
3727
+ * // Parent to search for services on. An example name would be: `projects/123` where `123` is the project number (not project ID).
3728
+ * parent: '[^/]+/[^/]+',
3729
+ * });
3730
+ * console.log(res.data);
3731
+ *
3732
+ * // Example response
3733
+ * // {
3734
+ * // "nextPageToken": "my_nextPageToken",
3735
+ * // "services": []
3736
+ * // }
3737
+ * }
3738
+ *
3739
+ * main().catch(e => {
3740
+ * console.error(e);
3741
+ * throw e;
3742
+ * });
3743
+ *
3744
+ * ```
3207
3745
  *
3208
3746
  * @param params - Parameters for request
3209
3747
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -3213,11 +3751,11 @@ export namespace serviceusage_v1beta1 {
3213
3751
  list(
3214
3752
  params: Params$Resource$Services$List,
3215
3753
  options: StreamMethodOptions
3216
- ): GaxiosPromise<Readable>;
3754
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
3217
3755
  list(
3218
3756
  params?: Params$Resource$Services$List,
3219
3757
  options?: MethodOptions
3220
- ): GaxiosPromise<Schema$ListServicesResponse>;
3758
+ ): Promise<GaxiosResponseWithHTTP2<Schema$ListServicesResponse>>;
3221
3759
  list(
3222
3760
  params: Params$Resource$Services$List,
3223
3761
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -3250,8 +3788,8 @@ export namespace serviceusage_v1beta1 {
3250
3788
  | BodyResponseCallback<Readable>
3251
3789
  ):
3252
3790
  | void
3253
- | GaxiosPromise<Schema$ListServicesResponse>
3254
- | GaxiosPromise<Readable> {
3791
+ | Promise<GaxiosResponseWithHTTP2<Schema$ListServicesResponse>>
3792
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
3255
3793
  let params = (paramsOrCallback || {}) as Params$Resource$Services$List;
3256
3794
  let options = (optionsOrCallback || {}) as MethodOptions;
3257
3795
 
@@ -3373,6 +3911,62 @@ export namespace serviceusage_v1beta1 {
3373
3911
 
3374
3912
  /**
3375
3913
  * Retrieves a summary of quota information for a specific quota metric
3914
+ * @example
3915
+ * ```js
3916
+ * // Before running the sample:
3917
+ * // - Enable the API at:
3918
+ * // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
3919
+ * // - Login into gcloud by running:
3920
+ * // ```sh
3921
+ * // $ gcloud auth application-default login
3922
+ * // ```
3923
+ * // - Install the npm module by running:
3924
+ * // ```sh
3925
+ * // $ npm install googleapis
3926
+ * // ```
3927
+ *
3928
+ * const {google} = require('googleapis');
3929
+ * const serviceusage = google.serviceusage('v1beta1');
3930
+ *
3931
+ * async function main() {
3932
+ * const auth = new google.auth.GoogleAuth({
3933
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3934
+ * scopes: [
3935
+ * 'https://www.googleapis.com/auth/cloud-platform',
3936
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
3937
+ * ],
3938
+ * });
3939
+ *
3940
+ * // Acquire an auth client, and bind it to all future calls
3941
+ * const authClient = await auth.getClient();
3942
+ * google.options({auth: authClient});
3943
+ *
3944
+ * // Do the magic
3945
+ * const res = await serviceusage.services.consumerQuotaMetrics.get({
3946
+ * // The resource name of the quota. An example name would be: `projects/123/services/serviceusage.googleapis.com/consumerQuotaMetrics/serviceusage.googleapis.com%2Fmutate_requests`
3947
+ * name: '[^/]+/[^/]+/services/my-service/consumerQuotaMetrics/my-consumerQuotaMetric',
3948
+ * // Specifies the level of detail for quota information in the response.
3949
+ * view: 'placeholder-value',
3950
+ * });
3951
+ * console.log(res.data);
3952
+ *
3953
+ * // Example response
3954
+ * // {
3955
+ * // "consumerQuotaLimits": [],
3956
+ * // "descendantConsumerQuotaLimits": [],
3957
+ * // "displayName": "my_displayName",
3958
+ * // "metric": "my_metric",
3959
+ * // "name": "my_name",
3960
+ * // "unit": "my_unit"
3961
+ * // }
3962
+ * }
3963
+ *
3964
+ * main().catch(e => {
3965
+ * console.error(e);
3966
+ * throw e;
3967
+ * });
3968
+ *
3969
+ * ```
3376
3970
  *
3377
3971
  * @param params - Parameters for request
3378
3972
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -3382,11 +3976,11 @@ export namespace serviceusage_v1beta1 {
3382
3976
  get(
3383
3977
  params: Params$Resource$Services$Consumerquotametrics$Get,
3384
3978
  options: StreamMethodOptions
3385
- ): GaxiosPromise<Readable>;
3979
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
3386
3980
  get(
3387
3981
  params?: Params$Resource$Services$Consumerquotametrics$Get,
3388
3982
  options?: MethodOptions
3389
- ): GaxiosPromise<Schema$ConsumerQuotaMetric>;
3983
+ ): Promise<GaxiosResponseWithHTTP2<Schema$ConsumerQuotaMetric>>;
3390
3984
  get(
3391
3985
  params: Params$Resource$Services$Consumerquotametrics$Get,
3392
3986
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -3417,8 +4011,8 @@ export namespace serviceusage_v1beta1 {
3417
4011
  | BodyResponseCallback<Readable>
3418
4012
  ):
3419
4013
  | void
3420
- | GaxiosPromise<Schema$ConsumerQuotaMetric>
3421
- | GaxiosPromise<Readable> {
4014
+ | Promise<GaxiosResponseWithHTTP2<Schema$ConsumerQuotaMetric>>
4015
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
3422
4016
  let params = (paramsOrCallback ||
3423
4017
  {}) as Params$Resource$Services$Consumerquotametrics$Get;
3424
4018
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -3461,6 +4055,70 @@ export namespace serviceusage_v1beta1 {
3461
4055
 
3462
4056
  /**
3463
4057
  * 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.
4058
+ * @example
4059
+ * ```js
4060
+ * // Before running the sample:
4061
+ * // - Enable the API at:
4062
+ * // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
4063
+ * // - Login into gcloud by running:
4064
+ * // ```sh
4065
+ * // $ gcloud auth application-default login
4066
+ * // ```
4067
+ * // - Install the npm module by running:
4068
+ * // ```sh
4069
+ * // $ npm install googleapis
4070
+ * // ```
4071
+ *
4072
+ * const {google} = require('googleapis');
4073
+ * const serviceusage = google.serviceusage('v1beta1');
4074
+ *
4075
+ * async function main() {
4076
+ * const auth = new google.auth.GoogleAuth({
4077
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
4078
+ * scopes: [
4079
+ * 'https://www.googleapis.com/auth/cloud-platform',
4080
+ * 'https://www.googleapis.com/auth/service.management',
4081
+ * ],
4082
+ * });
4083
+ *
4084
+ * // Acquire an auth client, and bind it to all future calls
4085
+ * const authClient = await auth.getClient();
4086
+ * google.options({auth: authClient});
4087
+ *
4088
+ * // Do the magic
4089
+ * const res =
4090
+ * await serviceusage.services.consumerQuotaMetrics.importAdminOverrides({
4091
+ * // The resource name of the consumer. An example name would be: `projects/123/services/compute.googleapis.com`
4092
+ * parent: '[^/]+/[^/]+/services/my-service',
4093
+ *
4094
+ * // Request body metadata
4095
+ * requestBody: {
4096
+ * // request body parameters
4097
+ * // {
4098
+ * // "force": false,
4099
+ * // "forceOnly": [],
4100
+ * // "inlineSource": {}
4101
+ * // }
4102
+ * },
4103
+ * });
4104
+ * console.log(res.data);
4105
+ *
4106
+ * // Example response
4107
+ * // {
4108
+ * // "done": false,
4109
+ * // "error": {},
4110
+ * // "metadata": {},
4111
+ * // "name": "my_name",
4112
+ * // "response": {}
4113
+ * // }
4114
+ * }
4115
+ *
4116
+ * main().catch(e => {
4117
+ * console.error(e);
4118
+ * throw e;
4119
+ * });
4120
+ *
4121
+ * ```
3464
4122
  *
3465
4123
  * @param params - Parameters for request
3466
4124
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -3470,11 +4128,11 @@ export namespace serviceusage_v1beta1 {
3470
4128
  importAdminOverrides(
3471
4129
  params: Params$Resource$Services$Consumerquotametrics$Importadminoverrides,
3472
4130
  options: StreamMethodOptions
3473
- ): GaxiosPromise<Readable>;
4131
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
3474
4132
  importAdminOverrides(
3475
4133
  params?: Params$Resource$Services$Consumerquotametrics$Importadminoverrides,
3476
4134
  options?: MethodOptions
3477
- ): GaxiosPromise<Schema$Operation>;
4135
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
3478
4136
  importAdminOverrides(
3479
4137
  params: Params$Resource$Services$Consumerquotametrics$Importadminoverrides,
3480
4138
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -3505,7 +4163,10 @@ export namespace serviceusage_v1beta1 {
3505
4163
  callback?:
3506
4164
  | BodyResponseCallback<Schema$Operation>
3507
4165
  | BodyResponseCallback<Readable>
3508
- ): void | GaxiosPromise<Schema$Operation> | GaxiosPromise<Readable> {
4166
+ ):
4167
+ | void
4168
+ | Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
4169
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
3509
4170
  let params = (paramsOrCallback ||
3510
4171
  {}) as Params$Resource$Services$Consumerquotametrics$Importadminoverrides;
3511
4172
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -3552,6 +4213,70 @@ export namespace serviceusage_v1beta1 {
3552
4213
 
3553
4214
  /**
3554
4215
  * 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.
4216
+ * @example
4217
+ * ```js
4218
+ * // Before running the sample:
4219
+ * // - Enable the API at:
4220
+ * // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
4221
+ * // - Login into gcloud by running:
4222
+ * // ```sh
4223
+ * // $ gcloud auth application-default login
4224
+ * // ```
4225
+ * // - Install the npm module by running:
4226
+ * // ```sh
4227
+ * // $ npm install googleapis
4228
+ * // ```
4229
+ *
4230
+ * const {google} = require('googleapis');
4231
+ * const serviceusage = google.serviceusage('v1beta1');
4232
+ *
4233
+ * async function main() {
4234
+ * const auth = new google.auth.GoogleAuth({
4235
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
4236
+ * scopes: [
4237
+ * 'https://www.googleapis.com/auth/cloud-platform',
4238
+ * 'https://www.googleapis.com/auth/service.management',
4239
+ * ],
4240
+ * });
4241
+ *
4242
+ * // Acquire an auth client, and bind it to all future calls
4243
+ * const authClient = await auth.getClient();
4244
+ * google.options({auth: authClient});
4245
+ *
4246
+ * // Do the magic
4247
+ * const res =
4248
+ * await serviceusage.services.consumerQuotaMetrics.importConsumerOverrides({
4249
+ * // The resource name of the consumer. An example name would be: `projects/123/services/compute.googleapis.com`
4250
+ * parent: '[^/]+/[^/]+/services/my-service',
4251
+ *
4252
+ * // Request body metadata
4253
+ * requestBody: {
4254
+ * // request body parameters
4255
+ * // {
4256
+ * // "force": false,
4257
+ * // "forceOnly": [],
4258
+ * // "inlineSource": {}
4259
+ * // }
4260
+ * },
4261
+ * });
4262
+ * console.log(res.data);
4263
+ *
4264
+ * // Example response
4265
+ * // {
4266
+ * // "done": false,
4267
+ * // "error": {},
4268
+ * // "metadata": {},
4269
+ * // "name": "my_name",
4270
+ * // "response": {}
4271
+ * // }
4272
+ * }
4273
+ *
4274
+ * main().catch(e => {
4275
+ * console.error(e);
4276
+ * throw e;
4277
+ * });
4278
+ *
4279
+ * ```
3555
4280
  *
3556
4281
  * @param params - Parameters for request
3557
4282
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -3561,11 +4286,11 @@ export namespace serviceusage_v1beta1 {
3561
4286
  importConsumerOverrides(
3562
4287
  params: Params$Resource$Services$Consumerquotametrics$Importconsumeroverrides,
3563
4288
  options: StreamMethodOptions
3564
- ): GaxiosPromise<Readable>;
4289
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
3565
4290
  importConsumerOverrides(
3566
4291
  params?: Params$Resource$Services$Consumerquotametrics$Importconsumeroverrides,
3567
4292
  options?: MethodOptions
3568
- ): GaxiosPromise<Schema$Operation>;
4293
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
3569
4294
  importConsumerOverrides(
3570
4295
  params: Params$Resource$Services$Consumerquotametrics$Importconsumeroverrides,
3571
4296
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -3596,7 +4321,10 @@ export namespace serviceusage_v1beta1 {
3596
4321
  callback?:
3597
4322
  | BodyResponseCallback<Schema$Operation>
3598
4323
  | BodyResponseCallback<Readable>
3599
- ): void | GaxiosPromise<Schema$Operation> | GaxiosPromise<Readable> {
4324
+ ):
4325
+ | void
4326
+ | Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
4327
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
3600
4328
  let params = (paramsOrCallback ||
3601
4329
  {}) as Params$Resource$Services$Consumerquotametrics$Importconsumeroverrides;
3602
4330
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -3643,6 +4371,62 @@ export namespace serviceusage_v1beta1 {
3643
4371
 
3644
4372
  /**
3645
4373
  * 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.
4374
+ * @example
4375
+ * ```js
4376
+ * // Before running the sample:
4377
+ * // - Enable the API at:
4378
+ * // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
4379
+ * // - Login into gcloud by running:
4380
+ * // ```sh
4381
+ * // $ gcloud auth application-default login
4382
+ * // ```
4383
+ * // - Install the npm module by running:
4384
+ * // ```sh
4385
+ * // $ npm install googleapis
4386
+ * // ```
4387
+ *
4388
+ * const {google} = require('googleapis');
4389
+ * const serviceusage = google.serviceusage('v1beta1');
4390
+ *
4391
+ * async function main() {
4392
+ * const auth = new google.auth.GoogleAuth({
4393
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
4394
+ * scopes: [
4395
+ * 'https://www.googleapis.com/auth/cloud-platform',
4396
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
4397
+ * ],
4398
+ * });
4399
+ *
4400
+ * // Acquire an auth client, and bind it to all future calls
4401
+ * const authClient = await auth.getClient();
4402
+ * google.options({auth: authClient});
4403
+ *
4404
+ * // Do the magic
4405
+ * const res = await serviceusage.services.consumerQuotaMetrics.list({
4406
+ * // Requested size of the next page of data.
4407
+ * pageSize: 'placeholder-value',
4408
+ * // Token identifying which result to start with; returned by a previous list call.
4409
+ * pageToken: 'placeholder-value',
4410
+ * // 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`
4411
+ * parent: '[^/]+/[^/]+/services/my-service',
4412
+ * // Specifies the level of detail for quota information in the response.
4413
+ * view: 'placeholder-value',
4414
+ * });
4415
+ * console.log(res.data);
4416
+ *
4417
+ * // Example response
4418
+ * // {
4419
+ * // "metrics": [],
4420
+ * // "nextPageToken": "my_nextPageToken"
4421
+ * // }
4422
+ * }
4423
+ *
4424
+ * main().catch(e => {
4425
+ * console.error(e);
4426
+ * throw e;
4427
+ * });
4428
+ *
4429
+ * ```
3646
4430
  *
3647
4431
  * @param params - Parameters for request
3648
4432
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -3652,11 +4436,13 @@ export namespace serviceusage_v1beta1 {
3652
4436
  list(
3653
4437
  params: Params$Resource$Services$Consumerquotametrics$List,
3654
4438
  options: StreamMethodOptions
3655
- ): GaxiosPromise<Readable>;
4439
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
3656
4440
  list(
3657
4441
  params?: Params$Resource$Services$Consumerquotametrics$List,
3658
4442
  options?: MethodOptions
3659
- ): GaxiosPromise<Schema$ListConsumerQuotaMetricsResponse>;
4443
+ ): Promise<
4444
+ GaxiosResponseWithHTTP2<Schema$ListConsumerQuotaMetricsResponse>
4445
+ >;
3660
4446
  list(
3661
4447
  params: Params$Resource$Services$Consumerquotametrics$List,
3662
4448
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -3691,8 +4477,10 @@ export namespace serviceusage_v1beta1 {
3691
4477
  | BodyResponseCallback<Readable>
3692
4478
  ):
3693
4479
  | void
3694
- | GaxiosPromise<Schema$ListConsumerQuotaMetricsResponse>
3695
- | GaxiosPromise<Readable> {
4480
+ | Promise<
4481
+ GaxiosResponseWithHTTP2<Schema$ListConsumerQuotaMetricsResponse>
4482
+ >
4483
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
3696
4484
  let params = (paramsOrCallback ||
3697
4485
  {}) as Params$Resource$Services$Consumerquotametrics$List;
3698
4486
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -3812,6 +4600,63 @@ export namespace serviceusage_v1beta1 {
3812
4600
 
3813
4601
  /**
3814
4602
  * Retrieves a summary of quota information for a specific quota limit.
4603
+ * @example
4604
+ * ```js
4605
+ * // Before running the sample:
4606
+ * // - Enable the API at:
4607
+ * // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
4608
+ * // - Login into gcloud by running:
4609
+ * // ```sh
4610
+ * // $ gcloud auth application-default login
4611
+ * // ```
4612
+ * // - Install the npm module by running:
4613
+ * // ```sh
4614
+ * // $ npm install googleapis
4615
+ * // ```
4616
+ *
4617
+ * const {google} = require('googleapis');
4618
+ * const serviceusage = google.serviceusage('v1beta1');
4619
+ *
4620
+ * async function main() {
4621
+ * const auth = new google.auth.GoogleAuth({
4622
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
4623
+ * scopes: [
4624
+ * 'https://www.googleapis.com/auth/cloud-platform',
4625
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
4626
+ * ],
4627
+ * });
4628
+ *
4629
+ * // Acquire an auth client, and bind it to all future calls
4630
+ * const authClient = await auth.getClient();
4631
+ * google.options({auth: authClient});
4632
+ *
4633
+ * // Do the magic
4634
+ * const res = await serviceusage.services.consumerQuotaMetrics.limits.get({
4635
+ * // The resource name of the quota limit. Use the quota limit resource name returned by previous ListConsumerQuotaMetrics and GetConsumerQuotaMetric API calls.
4636
+ * name: '[^/]+/[^/]+/services/my-service/consumerQuotaMetrics/my-consumerQuotaMetric/limits/my-limit',
4637
+ * // Specifies the level of detail for quota information in the response.
4638
+ * view: 'placeholder-value',
4639
+ * });
4640
+ * console.log(res.data);
4641
+ *
4642
+ * // Example response
4643
+ * // {
4644
+ * // "allowsAdminOverrides": false,
4645
+ * // "isPrecise": false,
4646
+ * // "metric": "my_metric",
4647
+ * // "name": "my_name",
4648
+ * // "quotaBuckets": [],
4649
+ * // "supportedLocations": [],
4650
+ * // "unit": "my_unit"
4651
+ * // }
4652
+ * }
4653
+ *
4654
+ * main().catch(e => {
4655
+ * console.error(e);
4656
+ * throw e;
4657
+ * });
4658
+ *
4659
+ * ```
3815
4660
  *
3816
4661
  * @param params - Parameters for request
3817
4662
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -3821,11 +4666,11 @@ export namespace serviceusage_v1beta1 {
3821
4666
  get(
3822
4667
  params: Params$Resource$Services$Consumerquotametrics$Limits$Get,
3823
4668
  options: StreamMethodOptions
3824
- ): GaxiosPromise<Readable>;
4669
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
3825
4670
  get(
3826
4671
  params?: Params$Resource$Services$Consumerquotametrics$Limits$Get,
3827
4672
  options?: MethodOptions
3828
- ): GaxiosPromise<Schema$ConsumerQuotaLimit>;
4673
+ ): Promise<GaxiosResponseWithHTTP2<Schema$ConsumerQuotaLimit>>;
3829
4674
  get(
3830
4675
  params: Params$Resource$Services$Consumerquotametrics$Limits$Get,
3831
4676
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -3856,8 +4701,8 @@ export namespace serviceusage_v1beta1 {
3856
4701
  | BodyResponseCallback<Readable>
3857
4702
  ):
3858
4703
  | void
3859
- | GaxiosPromise<Schema$ConsumerQuotaLimit>
3860
- | GaxiosPromise<Readable> {
4704
+ | Promise<GaxiosResponseWithHTTP2<Schema$ConsumerQuotaLimit>>
4705
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
3861
4706
  let params = (paramsOrCallback ||
3862
4707
  {}) as Params$Resource$Services$Consumerquotametrics$Limits$Get;
3863
4708
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -3919,6 +4764,80 @@ export namespace serviceusage_v1beta1 {
3919
4764
 
3920
4765
  /**
3921
4766
  * 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.
4767
+ * @example
4768
+ * ```js
4769
+ * // Before running the sample:
4770
+ * // - Enable the API at:
4771
+ * // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
4772
+ * // - Login into gcloud by running:
4773
+ * // ```sh
4774
+ * // $ gcloud auth application-default login
4775
+ * // ```
4776
+ * // - Install the npm module by running:
4777
+ * // ```sh
4778
+ * // $ npm install googleapis
4779
+ * // ```
4780
+ *
4781
+ * const {google} = require('googleapis');
4782
+ * const serviceusage = google.serviceusage('v1beta1');
4783
+ *
4784
+ * async function main() {
4785
+ * const auth = new google.auth.GoogleAuth({
4786
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
4787
+ * scopes: [
4788
+ * 'https://www.googleapis.com/auth/cloud-platform',
4789
+ * 'https://www.googleapis.com/auth/service.management',
4790
+ * ],
4791
+ * });
4792
+ *
4793
+ * // Acquire an auth client, and bind it to all future calls
4794
+ * const authClient = await auth.getClient();
4795
+ * google.options({auth: authClient});
4796
+ *
4797
+ * // Do the magic
4798
+ * const res =
4799
+ * await serviceusage.services.consumerQuotaMetrics.limits.adminOverrides.create(
4800
+ * {
4801
+ * // 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.
4802
+ * force: 'placeholder-value',
4803
+ * // 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.
4804
+ * forceOnly: 'placeholder-value',
4805
+ * // 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`
4806
+ * parent:
4807
+ * '[^/]+/[^/]+/services/my-service/consumerQuotaMetrics/my-consumerQuotaMetric/limits/my-limit',
4808
+ *
4809
+ * // Request body metadata
4810
+ * requestBody: {
4811
+ * // request body parameters
4812
+ * // {
4813
+ * // "adminOverrideAncestor": "my_adminOverrideAncestor",
4814
+ * // "dimensions": {},
4815
+ * // "metric": "my_metric",
4816
+ * // "name": "my_name",
4817
+ * // "overrideValue": "my_overrideValue",
4818
+ * // "unit": "my_unit"
4819
+ * // }
4820
+ * },
4821
+ * },
4822
+ * );
4823
+ * console.log(res.data);
4824
+ *
4825
+ * // Example response
4826
+ * // {
4827
+ * // "done": false,
4828
+ * // "error": {},
4829
+ * // "metadata": {},
4830
+ * // "name": "my_name",
4831
+ * // "response": {}
4832
+ * // }
4833
+ * }
4834
+ *
4835
+ * main().catch(e => {
4836
+ * console.error(e);
4837
+ * throw e;
4838
+ * });
4839
+ *
4840
+ * ```
3922
4841
  *
3923
4842
  * @param params - Parameters for request
3924
4843
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -3928,11 +4847,11 @@ export namespace serviceusage_v1beta1 {
3928
4847
  create(
3929
4848
  params: Params$Resource$Services$Consumerquotametrics$Limits$Adminoverrides$Create,
3930
4849
  options: StreamMethodOptions
3931
- ): GaxiosPromise<Readable>;
4850
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
3932
4851
  create(
3933
4852
  params?: Params$Resource$Services$Consumerquotametrics$Limits$Adminoverrides$Create,
3934
4853
  options?: MethodOptions
3935
- ): GaxiosPromise<Schema$Operation>;
4854
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
3936
4855
  create(
3937
4856
  params: Params$Resource$Services$Consumerquotametrics$Limits$Adminoverrides$Create,
3938
4857
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -3961,7 +4880,10 @@ export namespace serviceusage_v1beta1 {
3961
4880
  callback?:
3962
4881
  | BodyResponseCallback<Schema$Operation>
3963
4882
  | BodyResponseCallback<Readable>
3964
- ): void | GaxiosPromise<Schema$Operation> | GaxiosPromise<Readable> {
4883
+ ):
4884
+ | void
4885
+ | Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
4886
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
3965
4887
  let params = (paramsOrCallback ||
3966
4888
  {}) as Params$Resource$Services$Consumerquotametrics$Limits$Adminoverrides$Create;
3967
4889
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -4008,6 +4930,66 @@ export namespace serviceusage_v1beta1 {
4008
4930
 
4009
4931
  /**
4010
4932
  * Deletes an admin override.
4933
+ * @example
4934
+ * ```js
4935
+ * // Before running the sample:
4936
+ * // - Enable the API at:
4937
+ * // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
4938
+ * // - Login into gcloud by running:
4939
+ * // ```sh
4940
+ * // $ gcloud auth application-default login
4941
+ * // ```
4942
+ * // - Install the npm module by running:
4943
+ * // ```sh
4944
+ * // $ npm install googleapis
4945
+ * // ```
4946
+ *
4947
+ * const {google} = require('googleapis');
4948
+ * const serviceusage = google.serviceusage('v1beta1');
4949
+ *
4950
+ * async function main() {
4951
+ * const auth = new google.auth.GoogleAuth({
4952
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
4953
+ * scopes: [
4954
+ * 'https://www.googleapis.com/auth/cloud-platform',
4955
+ * 'https://www.googleapis.com/auth/service.management',
4956
+ * ],
4957
+ * });
4958
+ *
4959
+ * // Acquire an auth client, and bind it to all future calls
4960
+ * const authClient = await auth.getClient();
4961
+ * google.options({auth: authClient});
4962
+ *
4963
+ * // Do the magic
4964
+ * const res =
4965
+ * await serviceusage.services.consumerQuotaMetrics.limits.adminOverrides.delete(
4966
+ * {
4967
+ * // 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.
4968
+ * force: 'placeholder-value',
4969
+ * // 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.
4970
+ * forceOnly: 'placeholder-value',
4971
+ * // 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`
4972
+ * name: '[^/]+/[^/]+/services/my-service/consumerQuotaMetrics/my-consumerQuotaMetric/limits/my-limit/adminOverrides/my-adminOverride',
4973
+ * },
4974
+ * );
4975
+ * console.log(res.data);
4976
+ *
4977
+ * // Example response
4978
+ * // {
4979
+ * // "done": false,
4980
+ * // "error": {},
4981
+ * // "metadata": {},
4982
+ * // "name": "my_name",
4983
+ * // "response": {}
4984
+ * // }
4985
+ * }
4986
+ *
4987
+ * main().catch(e => {
4988
+ * console.error(e);
4989
+ * throw e;
4990
+ * });
4991
+ *
4992
+ * ```
4011
4993
  *
4012
4994
  * @param params - Parameters for request
4013
4995
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -4017,11 +4999,11 @@ export namespace serviceusage_v1beta1 {
4017
4999
  delete(
4018
5000
  params: Params$Resource$Services$Consumerquotametrics$Limits$Adminoverrides$Delete,
4019
5001
  options: StreamMethodOptions
4020
- ): GaxiosPromise<Readable>;
5002
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
4021
5003
  delete(
4022
5004
  params?: Params$Resource$Services$Consumerquotametrics$Limits$Adminoverrides$Delete,
4023
5005
  options?: MethodOptions
4024
- ): GaxiosPromise<Schema$Operation>;
5006
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
4025
5007
  delete(
4026
5008
  params: Params$Resource$Services$Consumerquotametrics$Limits$Adminoverrides$Delete,
4027
5009
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -4050,7 +5032,10 @@ export namespace serviceusage_v1beta1 {
4050
5032
  callback?:
4051
5033
  | BodyResponseCallback<Schema$Operation>
4052
5034
  | BodyResponseCallback<Readable>
4053
- ): void | GaxiosPromise<Schema$Operation> | GaxiosPromise<Readable> {
5035
+ ):
5036
+ | void
5037
+ | Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
5038
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
4054
5039
  let params = (paramsOrCallback ||
4055
5040
  {}) as Params$Resource$Services$Consumerquotametrics$Limits$Adminoverrides$Delete;
4056
5041
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -4094,6 +5079,64 @@ export namespace serviceusage_v1beta1 {
4094
5079
 
4095
5080
  /**
4096
5081
  * Lists all admin overrides on this limit.
5082
+ * @example
5083
+ * ```js
5084
+ * // Before running the sample:
5085
+ * // - Enable the API at:
5086
+ * // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
5087
+ * // - Login into gcloud by running:
5088
+ * // ```sh
5089
+ * // $ gcloud auth application-default login
5090
+ * // ```
5091
+ * // - Install the npm module by running:
5092
+ * // ```sh
5093
+ * // $ npm install googleapis
5094
+ * // ```
5095
+ *
5096
+ * const {google} = require('googleapis');
5097
+ * const serviceusage = google.serviceusage('v1beta1');
5098
+ *
5099
+ * async function main() {
5100
+ * const auth = new google.auth.GoogleAuth({
5101
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
5102
+ * scopes: [
5103
+ * 'https://www.googleapis.com/auth/cloud-platform',
5104
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
5105
+ * ],
5106
+ * });
5107
+ *
5108
+ * // Acquire an auth client, and bind it to all future calls
5109
+ * const authClient = await auth.getClient();
5110
+ * google.options({auth: authClient});
5111
+ *
5112
+ * // Do the magic
5113
+ * const res =
5114
+ * await serviceusage.services.consumerQuotaMetrics.limits.adminOverrides.list(
5115
+ * {
5116
+ * // Requested size of the next page of data.
5117
+ * pageSize: 'placeholder-value',
5118
+ * // Token identifying which result to start with; returned by a previous list call.
5119
+ * pageToken: 'placeholder-value',
5120
+ * // 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`
5121
+ * parent:
5122
+ * '[^/]+/[^/]+/services/my-service/consumerQuotaMetrics/my-consumerQuotaMetric/limits/my-limit',
5123
+ * },
5124
+ * );
5125
+ * console.log(res.data);
5126
+ *
5127
+ * // Example response
5128
+ * // {
5129
+ * // "nextPageToken": "my_nextPageToken",
5130
+ * // "overrides": []
5131
+ * // }
5132
+ * }
5133
+ *
5134
+ * main().catch(e => {
5135
+ * console.error(e);
5136
+ * throw e;
5137
+ * });
5138
+ *
5139
+ * ```
4097
5140
  *
4098
5141
  * @param params - Parameters for request
4099
5142
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -4103,11 +5146,11 @@ export namespace serviceusage_v1beta1 {
4103
5146
  list(
4104
5147
  params: Params$Resource$Services$Consumerquotametrics$Limits$Adminoverrides$List,
4105
5148
  options: StreamMethodOptions
4106
- ): GaxiosPromise<Readable>;
5149
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
4107
5150
  list(
4108
5151
  params?: Params$Resource$Services$Consumerquotametrics$Limits$Adminoverrides$List,
4109
5152
  options?: MethodOptions
4110
- ): GaxiosPromise<Schema$ListAdminOverridesResponse>;
5153
+ ): Promise<GaxiosResponseWithHTTP2<Schema$ListAdminOverridesResponse>>;
4111
5154
  list(
4112
5155
  params: Params$Resource$Services$Consumerquotametrics$Limits$Adminoverrides$List,
4113
5156
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -4142,8 +5185,8 @@ export namespace serviceusage_v1beta1 {
4142
5185
  | BodyResponseCallback<Readable>
4143
5186
  ):
4144
5187
  | void
4145
- | GaxiosPromise<Schema$ListAdminOverridesResponse>
4146
- | GaxiosPromise<Readable> {
5188
+ | Promise<GaxiosResponseWithHTTP2<Schema$ListAdminOverridesResponse>>
5189
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
4147
5190
  let params = (paramsOrCallback ||
4148
5191
  {}) as Params$Resource$Services$Consumerquotametrics$Limits$Adminoverrides$List;
4149
5192
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -4190,6 +5233,81 @@ export namespace serviceusage_v1beta1 {
4190
5233
 
4191
5234
  /**
4192
5235
  * Updates an admin override.
5236
+ * @example
5237
+ * ```js
5238
+ * // Before running the sample:
5239
+ * // - Enable the API at:
5240
+ * // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
5241
+ * // - Login into gcloud by running:
5242
+ * // ```sh
5243
+ * // $ gcloud auth application-default login
5244
+ * // ```
5245
+ * // - Install the npm module by running:
5246
+ * // ```sh
5247
+ * // $ npm install googleapis
5248
+ * // ```
5249
+ *
5250
+ * const {google} = require('googleapis');
5251
+ * const serviceusage = google.serviceusage('v1beta1');
5252
+ *
5253
+ * async function main() {
5254
+ * const auth = new google.auth.GoogleAuth({
5255
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
5256
+ * scopes: [
5257
+ * 'https://www.googleapis.com/auth/cloud-platform',
5258
+ * 'https://www.googleapis.com/auth/service.management',
5259
+ * ],
5260
+ * });
5261
+ *
5262
+ * // Acquire an auth client, and bind it to all future calls
5263
+ * const authClient = await auth.getClient();
5264
+ * google.options({auth: authClient});
5265
+ *
5266
+ * // Do the magic
5267
+ * const res =
5268
+ * await serviceusage.services.consumerQuotaMetrics.limits.adminOverrides.patch(
5269
+ * {
5270
+ * // 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.
5271
+ * force: 'placeholder-value',
5272
+ * // 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.
5273
+ * forceOnly: 'placeholder-value',
5274
+ * // 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`
5275
+ * name: '[^/]+/[^/]+/services/my-service/consumerQuotaMetrics/my-consumerQuotaMetric/limits/my-limit/adminOverrides/my-adminOverride',
5276
+ * // Update only the specified fields of the override. If unset, all fields will be updated.
5277
+ * updateMask: 'placeholder-value',
5278
+ *
5279
+ * // Request body metadata
5280
+ * requestBody: {
5281
+ * // request body parameters
5282
+ * // {
5283
+ * // "adminOverrideAncestor": "my_adminOverrideAncestor",
5284
+ * // "dimensions": {},
5285
+ * // "metric": "my_metric",
5286
+ * // "name": "my_name",
5287
+ * // "overrideValue": "my_overrideValue",
5288
+ * // "unit": "my_unit"
5289
+ * // }
5290
+ * },
5291
+ * },
5292
+ * );
5293
+ * console.log(res.data);
5294
+ *
5295
+ * // Example response
5296
+ * // {
5297
+ * // "done": false,
5298
+ * // "error": {},
5299
+ * // "metadata": {},
5300
+ * // "name": "my_name",
5301
+ * // "response": {}
5302
+ * // }
5303
+ * }
5304
+ *
5305
+ * main().catch(e => {
5306
+ * console.error(e);
5307
+ * throw e;
5308
+ * });
5309
+ *
5310
+ * ```
4193
5311
  *
4194
5312
  * @param params - Parameters for request
4195
5313
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -4199,11 +5317,11 @@ export namespace serviceusage_v1beta1 {
4199
5317
  patch(
4200
5318
  params: Params$Resource$Services$Consumerquotametrics$Limits$Adminoverrides$Patch,
4201
5319
  options: StreamMethodOptions
4202
- ): GaxiosPromise<Readable>;
5320
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
4203
5321
  patch(
4204
5322
  params?: Params$Resource$Services$Consumerquotametrics$Limits$Adminoverrides$Patch,
4205
5323
  options?: MethodOptions
4206
- ): GaxiosPromise<Schema$Operation>;
5324
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
4207
5325
  patch(
4208
5326
  params: Params$Resource$Services$Consumerquotametrics$Limits$Adminoverrides$Patch,
4209
5327
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -4232,7 +5350,10 @@ export namespace serviceusage_v1beta1 {
4232
5350
  callback?:
4233
5351
  | BodyResponseCallback<Schema$Operation>
4234
5352
  | BodyResponseCallback<Readable>
4235
- ): void | GaxiosPromise<Schema$Operation> | GaxiosPromise<Readable> {
5353
+ ):
5354
+ | void
5355
+ | Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
5356
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
4236
5357
  let params = (paramsOrCallback ||
4237
5358
  {}) as Params$Resource$Services$Consumerquotametrics$Limits$Adminoverrides$Patch;
4238
5359
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -4358,6 +5479,80 @@ export namespace serviceusage_v1beta1 {
4358
5479
 
4359
5480
  /**
4360
5481
  * 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.
5482
+ * @example
5483
+ * ```js
5484
+ * // Before running the sample:
5485
+ * // - Enable the API at:
5486
+ * // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
5487
+ * // - Login into gcloud by running:
5488
+ * // ```sh
5489
+ * // $ gcloud auth application-default login
5490
+ * // ```
5491
+ * // - Install the npm module by running:
5492
+ * // ```sh
5493
+ * // $ npm install googleapis
5494
+ * // ```
5495
+ *
5496
+ * const {google} = require('googleapis');
5497
+ * const serviceusage = google.serviceusage('v1beta1');
5498
+ *
5499
+ * async function main() {
5500
+ * const auth = new google.auth.GoogleAuth({
5501
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
5502
+ * scopes: [
5503
+ * 'https://www.googleapis.com/auth/cloud-platform',
5504
+ * 'https://www.googleapis.com/auth/service.management',
5505
+ * ],
5506
+ * });
5507
+ *
5508
+ * // Acquire an auth client, and bind it to all future calls
5509
+ * const authClient = await auth.getClient();
5510
+ * google.options({auth: authClient});
5511
+ *
5512
+ * // Do the magic
5513
+ * const res =
5514
+ * await serviceusage.services.consumerQuotaMetrics.limits.consumerOverrides.create(
5515
+ * {
5516
+ * // 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.
5517
+ * force: 'placeholder-value',
5518
+ * // 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.
5519
+ * forceOnly: 'placeholder-value',
5520
+ * // 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`
5521
+ * parent:
5522
+ * '[^/]+/[^/]+/services/my-service/consumerQuotaMetrics/my-consumerQuotaMetric/limits/my-limit',
5523
+ *
5524
+ * // Request body metadata
5525
+ * requestBody: {
5526
+ * // request body parameters
5527
+ * // {
5528
+ * // "adminOverrideAncestor": "my_adminOverrideAncestor",
5529
+ * // "dimensions": {},
5530
+ * // "metric": "my_metric",
5531
+ * // "name": "my_name",
5532
+ * // "overrideValue": "my_overrideValue",
5533
+ * // "unit": "my_unit"
5534
+ * // }
5535
+ * },
5536
+ * },
5537
+ * );
5538
+ * console.log(res.data);
5539
+ *
5540
+ * // Example response
5541
+ * // {
5542
+ * // "done": false,
5543
+ * // "error": {},
5544
+ * // "metadata": {},
5545
+ * // "name": "my_name",
5546
+ * // "response": {}
5547
+ * // }
5548
+ * }
5549
+ *
5550
+ * main().catch(e => {
5551
+ * console.error(e);
5552
+ * throw e;
5553
+ * });
5554
+ *
5555
+ * ```
4361
5556
  *
4362
5557
  * @param params - Parameters for request
4363
5558
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -4367,11 +5562,11 @@ export namespace serviceusage_v1beta1 {
4367
5562
  create(
4368
5563
  params: Params$Resource$Services$Consumerquotametrics$Limits$Consumeroverrides$Create,
4369
5564
  options: StreamMethodOptions
4370
- ): GaxiosPromise<Readable>;
5565
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
4371
5566
  create(
4372
5567
  params?: Params$Resource$Services$Consumerquotametrics$Limits$Consumeroverrides$Create,
4373
5568
  options?: MethodOptions
4374
- ): GaxiosPromise<Schema$Operation>;
5569
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
4375
5570
  create(
4376
5571
  params: Params$Resource$Services$Consumerquotametrics$Limits$Consumeroverrides$Create,
4377
5572
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -4400,7 +5595,10 @@ export namespace serviceusage_v1beta1 {
4400
5595
  callback?:
4401
5596
  | BodyResponseCallback<Schema$Operation>
4402
5597
  | BodyResponseCallback<Readable>
4403
- ): void | GaxiosPromise<Schema$Operation> | GaxiosPromise<Readable> {
5598
+ ):
5599
+ | void
5600
+ | Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
5601
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
4404
5602
  let params = (paramsOrCallback ||
4405
5603
  {}) as Params$Resource$Services$Consumerquotametrics$Limits$Consumeroverrides$Create;
4406
5604
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -4447,6 +5645,66 @@ export namespace serviceusage_v1beta1 {
4447
5645
 
4448
5646
  /**
4449
5647
  * Deletes a consumer override.
5648
+ * @example
5649
+ * ```js
5650
+ * // Before running the sample:
5651
+ * // - Enable the API at:
5652
+ * // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
5653
+ * // - Login into gcloud by running:
5654
+ * // ```sh
5655
+ * // $ gcloud auth application-default login
5656
+ * // ```
5657
+ * // - Install the npm module by running:
5658
+ * // ```sh
5659
+ * // $ npm install googleapis
5660
+ * // ```
5661
+ *
5662
+ * const {google} = require('googleapis');
5663
+ * const serviceusage = google.serviceusage('v1beta1');
5664
+ *
5665
+ * async function main() {
5666
+ * const auth = new google.auth.GoogleAuth({
5667
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
5668
+ * scopes: [
5669
+ * 'https://www.googleapis.com/auth/cloud-platform',
5670
+ * 'https://www.googleapis.com/auth/service.management',
5671
+ * ],
5672
+ * });
5673
+ *
5674
+ * // Acquire an auth client, and bind it to all future calls
5675
+ * const authClient = await auth.getClient();
5676
+ * google.options({auth: authClient});
5677
+ *
5678
+ * // Do the magic
5679
+ * const res =
5680
+ * await serviceusage.services.consumerQuotaMetrics.limits.consumerOverrides.delete(
5681
+ * {
5682
+ * // 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.
5683
+ * force: 'placeholder-value',
5684
+ * // 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.
5685
+ * forceOnly: 'placeholder-value',
5686
+ * // 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`
5687
+ * name: '[^/]+/[^/]+/services/my-service/consumerQuotaMetrics/my-consumerQuotaMetric/limits/my-limit/consumerOverrides/my-consumerOverride',
5688
+ * },
5689
+ * );
5690
+ * console.log(res.data);
5691
+ *
5692
+ * // Example response
5693
+ * // {
5694
+ * // "done": false,
5695
+ * // "error": {},
5696
+ * // "metadata": {},
5697
+ * // "name": "my_name",
5698
+ * // "response": {}
5699
+ * // }
5700
+ * }
5701
+ *
5702
+ * main().catch(e => {
5703
+ * console.error(e);
5704
+ * throw e;
5705
+ * });
5706
+ *
5707
+ * ```
4450
5708
  *
4451
5709
  * @param params - Parameters for request
4452
5710
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -4456,11 +5714,11 @@ export namespace serviceusage_v1beta1 {
4456
5714
  delete(
4457
5715
  params: Params$Resource$Services$Consumerquotametrics$Limits$Consumeroverrides$Delete,
4458
5716
  options: StreamMethodOptions
4459
- ): GaxiosPromise<Readable>;
5717
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
4460
5718
  delete(
4461
5719
  params?: Params$Resource$Services$Consumerquotametrics$Limits$Consumeroverrides$Delete,
4462
5720
  options?: MethodOptions
4463
- ): GaxiosPromise<Schema$Operation>;
5721
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
4464
5722
  delete(
4465
5723
  params: Params$Resource$Services$Consumerquotametrics$Limits$Consumeroverrides$Delete,
4466
5724
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -4489,7 +5747,10 @@ export namespace serviceusage_v1beta1 {
4489
5747
  callback?:
4490
5748
  | BodyResponseCallback<Schema$Operation>
4491
5749
  | BodyResponseCallback<Readable>
4492
- ): void | GaxiosPromise<Schema$Operation> | GaxiosPromise<Readable> {
5750
+ ):
5751
+ | void
5752
+ | Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
5753
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
4493
5754
  let params = (paramsOrCallback ||
4494
5755
  {}) as Params$Resource$Services$Consumerquotametrics$Limits$Consumeroverrides$Delete;
4495
5756
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -4533,6 +5794,64 @@ export namespace serviceusage_v1beta1 {
4533
5794
 
4534
5795
  /**
4535
5796
  * Lists all consumer overrides on this limit.
5797
+ * @example
5798
+ * ```js
5799
+ * // Before running the sample:
5800
+ * // - Enable the API at:
5801
+ * // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
5802
+ * // - Login into gcloud by running:
5803
+ * // ```sh
5804
+ * // $ gcloud auth application-default login
5805
+ * // ```
5806
+ * // - Install the npm module by running:
5807
+ * // ```sh
5808
+ * // $ npm install googleapis
5809
+ * // ```
5810
+ *
5811
+ * const {google} = require('googleapis');
5812
+ * const serviceusage = google.serviceusage('v1beta1');
5813
+ *
5814
+ * async function main() {
5815
+ * const auth = new google.auth.GoogleAuth({
5816
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
5817
+ * scopes: [
5818
+ * 'https://www.googleapis.com/auth/cloud-platform',
5819
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
5820
+ * ],
5821
+ * });
5822
+ *
5823
+ * // Acquire an auth client, and bind it to all future calls
5824
+ * const authClient = await auth.getClient();
5825
+ * google.options({auth: authClient});
5826
+ *
5827
+ * // Do the magic
5828
+ * const res =
5829
+ * await serviceusage.services.consumerQuotaMetrics.limits.consumerOverrides.list(
5830
+ * {
5831
+ * // Requested size of the next page of data.
5832
+ * pageSize: 'placeholder-value',
5833
+ * // Token identifying which result to start with; returned by a previous list call.
5834
+ * pageToken: 'placeholder-value',
5835
+ * // 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`
5836
+ * parent:
5837
+ * '[^/]+/[^/]+/services/my-service/consumerQuotaMetrics/my-consumerQuotaMetric/limits/my-limit',
5838
+ * },
5839
+ * );
5840
+ * console.log(res.data);
5841
+ *
5842
+ * // Example response
5843
+ * // {
5844
+ * // "nextPageToken": "my_nextPageToken",
5845
+ * // "overrides": []
5846
+ * // }
5847
+ * }
5848
+ *
5849
+ * main().catch(e => {
5850
+ * console.error(e);
5851
+ * throw e;
5852
+ * });
5853
+ *
5854
+ * ```
4536
5855
  *
4537
5856
  * @param params - Parameters for request
4538
5857
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -4542,11 +5861,11 @@ export namespace serviceusage_v1beta1 {
4542
5861
  list(
4543
5862
  params: Params$Resource$Services$Consumerquotametrics$Limits$Consumeroverrides$List,
4544
5863
  options: StreamMethodOptions
4545
- ): GaxiosPromise<Readable>;
5864
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
4546
5865
  list(
4547
5866
  params?: Params$Resource$Services$Consumerquotametrics$Limits$Consumeroverrides$List,
4548
5867
  options?: MethodOptions
4549
- ): GaxiosPromise<Schema$ListConsumerOverridesResponse>;
5868
+ ): Promise<GaxiosResponseWithHTTP2<Schema$ListConsumerOverridesResponse>>;
4550
5869
  list(
4551
5870
  params: Params$Resource$Services$Consumerquotametrics$Limits$Consumeroverrides$List,
4552
5871
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -4581,8 +5900,8 @@ export namespace serviceusage_v1beta1 {
4581
5900
  | BodyResponseCallback<Readable>
4582
5901
  ):
4583
5902
  | void
4584
- | GaxiosPromise<Schema$ListConsumerOverridesResponse>
4585
- | GaxiosPromise<Readable> {
5903
+ | Promise<GaxiosResponseWithHTTP2<Schema$ListConsumerOverridesResponse>>
5904
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
4586
5905
  let params = (paramsOrCallback ||
4587
5906
  {}) as Params$Resource$Services$Consumerquotametrics$Limits$Consumeroverrides$List;
4588
5907
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -4631,6 +5950,81 @@ export namespace serviceusage_v1beta1 {
4631
5950
 
4632
5951
  /**
4633
5952
  * Updates a consumer override.
5953
+ * @example
5954
+ * ```js
5955
+ * // Before running the sample:
5956
+ * // - Enable the API at:
5957
+ * // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
5958
+ * // - Login into gcloud by running:
5959
+ * // ```sh
5960
+ * // $ gcloud auth application-default login
5961
+ * // ```
5962
+ * // - Install the npm module by running:
5963
+ * // ```sh
5964
+ * // $ npm install googleapis
5965
+ * // ```
5966
+ *
5967
+ * const {google} = require('googleapis');
5968
+ * const serviceusage = google.serviceusage('v1beta1');
5969
+ *
5970
+ * async function main() {
5971
+ * const auth = new google.auth.GoogleAuth({
5972
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
5973
+ * scopes: [
5974
+ * 'https://www.googleapis.com/auth/cloud-platform',
5975
+ * 'https://www.googleapis.com/auth/service.management',
5976
+ * ],
5977
+ * });
5978
+ *
5979
+ * // Acquire an auth client, and bind it to all future calls
5980
+ * const authClient = await auth.getClient();
5981
+ * google.options({auth: authClient});
5982
+ *
5983
+ * // Do the magic
5984
+ * const res =
5985
+ * await serviceusage.services.consumerQuotaMetrics.limits.consumerOverrides.patch(
5986
+ * {
5987
+ * // 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.
5988
+ * force: 'placeholder-value',
5989
+ * // 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.
5990
+ * forceOnly: 'placeholder-value',
5991
+ * // 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`
5992
+ * name: '[^/]+/[^/]+/services/my-service/consumerQuotaMetrics/my-consumerQuotaMetric/limits/my-limit/consumerOverrides/my-consumerOverride',
5993
+ * // Update only the specified fields of the override. If unset, all fields will be updated.
5994
+ * updateMask: 'placeholder-value',
5995
+ *
5996
+ * // Request body metadata
5997
+ * requestBody: {
5998
+ * // request body parameters
5999
+ * // {
6000
+ * // "adminOverrideAncestor": "my_adminOverrideAncestor",
6001
+ * // "dimensions": {},
6002
+ * // "metric": "my_metric",
6003
+ * // "name": "my_name",
6004
+ * // "overrideValue": "my_overrideValue",
6005
+ * // "unit": "my_unit"
6006
+ * // }
6007
+ * },
6008
+ * },
6009
+ * );
6010
+ * console.log(res.data);
6011
+ *
6012
+ * // Example response
6013
+ * // {
6014
+ * // "done": false,
6015
+ * // "error": {},
6016
+ * // "metadata": {},
6017
+ * // "name": "my_name",
6018
+ * // "response": {}
6019
+ * // }
6020
+ * }
6021
+ *
6022
+ * main().catch(e => {
6023
+ * console.error(e);
6024
+ * throw e;
6025
+ * });
6026
+ *
6027
+ * ```
4634
6028
  *
4635
6029
  * @param params - Parameters for request
4636
6030
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -4640,11 +6034,11 @@ export namespace serviceusage_v1beta1 {
4640
6034
  patch(
4641
6035
  params: Params$Resource$Services$Consumerquotametrics$Limits$Consumeroverrides$Patch,
4642
6036
  options: StreamMethodOptions
4643
- ): GaxiosPromise<Readable>;
6037
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
4644
6038
  patch(
4645
6039
  params?: Params$Resource$Services$Consumerquotametrics$Limits$Consumeroverrides$Patch,
4646
6040
  options?: MethodOptions
4647
- ): GaxiosPromise<Schema$Operation>;
6041
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
4648
6042
  patch(
4649
6043
  params: Params$Resource$Services$Consumerquotametrics$Limits$Consumeroverrides$Patch,
4650
6044
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -4673,7 +6067,10 @@ export namespace serviceusage_v1beta1 {
4673
6067
  callback?:
4674
6068
  | BodyResponseCallback<Schema$Operation>
4675
6069
  | BodyResponseCallback<Readable>
4676
- ): void | GaxiosPromise<Schema$Operation> | GaxiosPromise<Readable> {
6070
+ ):
6071
+ | void
6072
+ | Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
6073
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
4677
6074
  let params = (paramsOrCallback ||
4678
6075
  {}) as Params$Resource$Services$Consumerquotametrics$Limits$Consumeroverrides$Patch;
4679
6076
  let options = (optionsOrCallback || {}) as MethodOptions;