@googleapis/serviceusage 16.0.1 → 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.
@@ -211,7 +211,7 @@ export declare namespace serviceusage_v1beta1 {
211
211
  */
212
212
  kind?: string | null;
213
213
  /**
214
- * Content of the configuration. The underlying schema should be defined by Aspect owners as protobuf message under `apiserving/configaspects/proto`.
214
+ * Content of the configuration. The underlying schema should be defined by Aspect owners as protobuf message under `google/api/configaspects/proto`.
215
215
  */
216
216
  spec?: {
217
217
  [key: string]: any;
@@ -390,6 +390,73 @@ export declare namespace serviceusage_v1beta1 {
390
390
  */
391
391
  services?: Schema$GoogleApiServiceusageV1Service[];
392
392
  }
393
+ /**
394
+ * `BatchingConfigProto` defines the batching configuration for an API method.
395
+ */
396
+ export interface Schema$BatchingConfigProto {
397
+ /**
398
+ * The request and response fields used in batching.
399
+ */
400
+ batchDescriptor?: Schema$BatchingDescriptorProto;
401
+ /**
402
+ * The thresholds which trigger a batched request to be sent.
403
+ */
404
+ thresholds?: Schema$BatchingSettingsProto;
405
+ }
406
+ /**
407
+ * `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.
408
+ */
409
+ export interface Schema$BatchingDescriptorProto {
410
+ /**
411
+ * The repeated field in the request message to be aggregated by batching.
412
+ */
413
+ batchedField?: string | null;
414
+ /**
415
+ * 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.
416
+ */
417
+ discriminatorFields?: string[] | null;
418
+ /**
419
+ * 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.
420
+ */
421
+ subresponseField?: string | null;
422
+ }
423
+ /**
424
+ * `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.
425
+ */
426
+ export interface Schema$BatchingSettingsProto {
427
+ /**
428
+ * The duration after which a batch should be sent, starting from the addition of the first message to that batch.
429
+ */
430
+ delayThreshold?: string | null;
431
+ /**
432
+ * The maximum number of elements collected in a batch that could be accepted by server.
433
+ */
434
+ elementCountLimit?: number | null;
435
+ /**
436
+ * The number of elements of a field collected into a batch which, if exceeded, causes the batch to be sent.
437
+ */
438
+ elementCountThreshold?: number | null;
439
+ /**
440
+ * The maximum size of data allowed by flow control.
441
+ */
442
+ flowControlByteLimit?: number | null;
443
+ /**
444
+ * The maximum number of elements allowed by flow control.
445
+ */
446
+ flowControlElementLimit?: number | null;
447
+ /**
448
+ * The behavior to take when the flow control limit is exceeded.
449
+ */
450
+ flowControlLimitExceededBehavior?: string | null;
451
+ /**
452
+ * The maximum size of the request that could be accepted by server.
453
+ */
454
+ requestByteLimit?: number | null;
455
+ /**
456
+ * 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.
457
+ */
458
+ requestByteThreshold?: string | null;
459
+ }
393
460
  /**
394
461
  * 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
395
462
  */
@@ -1777,6 +1844,10 @@ export declare namespace serviceusage_v1beta1 {
1777
1844
  * 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
1778
1845
  */
1779
1846
  autoPopulatedFields?: string[] | null;
1847
+ /**
1848
+ * 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
1849
+ */
1850
+ batching?: Schema$BatchingConfigProto;
1780
1851
  /**
1781
1852
  * 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
1782
1853
  */
@@ -2556,6 +2627,59 @@ export declare namespace serviceusage_v1beta1 {
2556
2627
  constructor(context: APIRequestContext);
2557
2628
  /**
2558
2629
  * 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.
2630
+ * @example
2631
+ * ```js
2632
+ * // Before running the sample:
2633
+ * // - Enable the API at:
2634
+ * // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
2635
+ * // - Login into gcloud by running:
2636
+ * // ```sh
2637
+ * // $ gcloud auth application-default login
2638
+ * // ```
2639
+ * // - Install the npm module by running:
2640
+ * // ```sh
2641
+ * // $ npm install googleapis
2642
+ * // ```
2643
+ *
2644
+ * const {google} = require('googleapis');
2645
+ * const serviceusage = google.serviceusage('v1beta1');
2646
+ *
2647
+ * async function main() {
2648
+ * const auth = new google.auth.GoogleAuth({
2649
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2650
+ * scopes: [
2651
+ * 'https://www.googleapis.com/auth/cloud-platform',
2652
+ * 'https://www.googleapis.com/auth/service.management',
2653
+ * ],
2654
+ * });
2655
+ *
2656
+ * // Acquire an auth client, and bind it to all future calls
2657
+ * const authClient = await auth.getClient();
2658
+ * google.options({auth: authClient});
2659
+ *
2660
+ * // Do the magic
2661
+ * const res = await serviceusage.operations.get({
2662
+ * // The name of the operation resource.
2663
+ * name: 'operations/my-operation',
2664
+ * });
2665
+ * console.log(res.data);
2666
+ *
2667
+ * // Example response
2668
+ * // {
2669
+ * // "done": false,
2670
+ * // "error": {},
2671
+ * // "metadata": {},
2672
+ * // "name": "my_name",
2673
+ * // "response": {}
2674
+ * // }
2675
+ * }
2676
+ *
2677
+ * main().catch(e => {
2678
+ * console.error(e);
2679
+ * throw e;
2680
+ * });
2681
+ *
2682
+ * ```
2559
2683
  *
2560
2684
  * @param params - Parameters for request
2561
2685
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2570,6 +2694,62 @@ export declare namespace serviceusage_v1beta1 {
2570
2694
  get(callback: BodyResponseCallback<Schema$Operation>): void;
2571
2695
  /**
2572
2696
  * Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
2697
+ * @example
2698
+ * ```js
2699
+ * // Before running the sample:
2700
+ * // - Enable the API at:
2701
+ * // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
2702
+ * // - Login into gcloud by running:
2703
+ * // ```sh
2704
+ * // $ gcloud auth application-default login
2705
+ * // ```
2706
+ * // - Install the npm module by running:
2707
+ * // ```sh
2708
+ * // $ npm install googleapis
2709
+ * // ```
2710
+ *
2711
+ * const {google} = require('googleapis');
2712
+ * const serviceusage = google.serviceusage('v1beta1');
2713
+ *
2714
+ * async function main() {
2715
+ * const auth = new google.auth.GoogleAuth({
2716
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2717
+ * scopes: [
2718
+ * 'https://www.googleapis.com/auth/cloud-platform',
2719
+ * 'https://www.googleapis.com/auth/service.management',
2720
+ * ],
2721
+ * });
2722
+ *
2723
+ * // Acquire an auth client, and bind it to all future calls
2724
+ * const authClient = await auth.getClient();
2725
+ * google.options({auth: authClient});
2726
+ *
2727
+ * // Do the magic
2728
+ * const res = await serviceusage.operations.list({
2729
+ * // The standard list filter.
2730
+ * filter: 'placeholder-value',
2731
+ * // The name of the operation's parent resource.
2732
+ * name: 'placeholder-value',
2733
+ * // The standard list page size.
2734
+ * pageSize: 'placeholder-value',
2735
+ * // The standard list page token.
2736
+ * pageToken: 'placeholder-value',
2737
+ * });
2738
+ * console.log(res.data);
2739
+ *
2740
+ * // Example response
2741
+ * // {
2742
+ * // "nextPageToken": "my_nextPageToken",
2743
+ * // "operations": []
2744
+ * // }
2745
+ * }
2746
+ *
2747
+ * main().catch(e => {
2748
+ * console.error(e);
2749
+ * throw e;
2750
+ * });
2751
+ *
2752
+ * ```
2573
2753
  *
2574
2754
  * @param params - Parameters for request
2575
2755
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2613,6 +2793,67 @@ export declare namespace serviceusage_v1beta1 {
2613
2793
  constructor(context: APIRequestContext);
2614
2794
  /**
2615
2795
  * 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`
2796
+ * @example
2797
+ * ```js
2798
+ * // Before running the sample:
2799
+ * // - Enable the API at:
2800
+ * // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
2801
+ * // - Login into gcloud by running:
2802
+ * // ```sh
2803
+ * // $ gcloud auth application-default login
2804
+ * // ```
2805
+ * // - Install the npm module by running:
2806
+ * // ```sh
2807
+ * // $ npm install googleapis
2808
+ * // ```
2809
+ *
2810
+ * const {google} = require('googleapis');
2811
+ * const serviceusage = google.serviceusage('v1beta1');
2812
+ *
2813
+ * async function main() {
2814
+ * const auth = new google.auth.GoogleAuth({
2815
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2816
+ * scopes: [
2817
+ * 'https://www.googleapis.com/auth/cloud-platform',
2818
+ * 'https://www.googleapis.com/auth/service.management',
2819
+ * ],
2820
+ * });
2821
+ *
2822
+ * // Acquire an auth client, and bind it to all future calls
2823
+ * const authClient = await auth.getClient();
2824
+ * google.options({auth: authClient});
2825
+ *
2826
+ * // Do the magic
2827
+ * const res = await serviceusage.services.batchEnable({
2828
+ * // 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.
2829
+ * parent: '[^/]+/[^/]+',
2830
+ *
2831
+ * // Request body metadata
2832
+ * requestBody: {
2833
+ * // request body parameters
2834
+ * // {
2835
+ * // "serviceIds": []
2836
+ * // }
2837
+ * },
2838
+ * });
2839
+ * console.log(res.data);
2840
+ *
2841
+ * // Example response
2842
+ * // {
2843
+ * // "done": false,
2844
+ * // "error": {},
2845
+ * // "metadata": {},
2846
+ * // "name": "my_name",
2847
+ * // "response": {}
2848
+ * // }
2849
+ * }
2850
+ *
2851
+ * main().catch(e => {
2852
+ * console.error(e);
2853
+ * throw e;
2854
+ * });
2855
+ *
2856
+ * ```
2616
2857
  *
2617
2858
  * @param params - Parameters for request
2618
2859
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2627,6 +2868,65 @@ export declare namespace serviceusage_v1beta1 {
2627
2868
  batchEnable(callback: BodyResponseCallback<Schema$Operation>): void;
2628
2869
  /**
2629
2870
  * 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`
2871
+ * @example
2872
+ * ```js
2873
+ * // Before running the sample:
2874
+ * // - Enable the API at:
2875
+ * // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
2876
+ * // - Login into gcloud by running:
2877
+ * // ```sh
2878
+ * // $ gcloud auth application-default login
2879
+ * // ```
2880
+ * // - Install the npm module by running:
2881
+ * // ```sh
2882
+ * // $ npm install googleapis
2883
+ * // ```
2884
+ *
2885
+ * const {google} = require('googleapis');
2886
+ * const serviceusage = google.serviceusage('v1beta1');
2887
+ *
2888
+ * async function main() {
2889
+ * const auth = new google.auth.GoogleAuth({
2890
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2891
+ * scopes: [
2892
+ * 'https://www.googleapis.com/auth/cloud-platform',
2893
+ * 'https://www.googleapis.com/auth/service.management',
2894
+ * ],
2895
+ * });
2896
+ *
2897
+ * // Acquire an auth client, and bind it to all future calls
2898
+ * const authClient = await auth.getClient();
2899
+ * google.options({auth: authClient});
2900
+ *
2901
+ * // Do the magic
2902
+ * const res = await serviceusage.services.disable({
2903
+ * // 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).
2904
+ * name: '[^/]+/[^/]+/services/my-service',
2905
+ *
2906
+ * // Request body metadata
2907
+ * requestBody: {
2908
+ * // request body parameters
2909
+ * // {}
2910
+ * },
2911
+ * });
2912
+ * console.log(res.data);
2913
+ *
2914
+ * // Example response
2915
+ * // {
2916
+ * // "done": false,
2917
+ * // "error": {},
2918
+ * // "metadata": {},
2919
+ * // "name": "my_name",
2920
+ * // "response": {}
2921
+ * // }
2922
+ * }
2923
+ *
2924
+ * main().catch(e => {
2925
+ * console.error(e);
2926
+ * throw e;
2927
+ * });
2928
+ *
2929
+ * ```
2630
2930
  *
2631
2931
  * @param params - Parameters for request
2632
2932
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2641,6 +2941,65 @@ export declare namespace serviceusage_v1beta1 {
2641
2941
  disable(callback: BodyResponseCallback<Schema$Operation>): void;
2642
2942
  /**
2643
2943
  * Enables a service so that it can be used with a project. Operation response type: `google.protobuf.Empty`
2944
+ * @example
2945
+ * ```js
2946
+ * // Before running the sample:
2947
+ * // - Enable the API at:
2948
+ * // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
2949
+ * // - Login into gcloud by running:
2950
+ * // ```sh
2951
+ * // $ gcloud auth application-default login
2952
+ * // ```
2953
+ * // - Install the npm module by running:
2954
+ * // ```sh
2955
+ * // $ npm install googleapis
2956
+ * // ```
2957
+ *
2958
+ * const {google} = require('googleapis');
2959
+ * const serviceusage = google.serviceusage('v1beta1');
2960
+ *
2961
+ * async function main() {
2962
+ * const auth = new google.auth.GoogleAuth({
2963
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2964
+ * scopes: [
2965
+ * 'https://www.googleapis.com/auth/cloud-platform',
2966
+ * 'https://www.googleapis.com/auth/service.management',
2967
+ * ],
2968
+ * });
2969
+ *
2970
+ * // Acquire an auth client, and bind it to all future calls
2971
+ * const authClient = await auth.getClient();
2972
+ * google.options({auth: authClient});
2973
+ *
2974
+ * // Do the magic
2975
+ * const res = await serviceusage.services.enable({
2976
+ * // 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).
2977
+ * name: '[^/]+/[^/]+/services/my-service',
2978
+ *
2979
+ * // Request body metadata
2980
+ * requestBody: {
2981
+ * // request body parameters
2982
+ * // {}
2983
+ * },
2984
+ * });
2985
+ * console.log(res.data);
2986
+ *
2987
+ * // Example response
2988
+ * // {
2989
+ * // "done": false,
2990
+ * // "error": {},
2991
+ * // "metadata": {},
2992
+ * // "name": "my_name",
2993
+ * // "response": {}
2994
+ * // }
2995
+ * }
2996
+ *
2997
+ * main().catch(e => {
2998
+ * console.error(e);
2999
+ * throw e;
3000
+ * });
3001
+ *
3002
+ * ```
2644
3003
  *
2645
3004
  * @param params - Parameters for request
2646
3005
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2655,6 +3014,59 @@ export declare namespace serviceusage_v1beta1 {
2655
3014
  enable(callback: BodyResponseCallback<Schema$Operation>): void;
2656
3015
  /**
2657
3016
  * Generates service identity for service.
3017
+ * @example
3018
+ * ```js
3019
+ * // Before running the sample:
3020
+ * // - Enable the API at:
3021
+ * // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
3022
+ * // - Login into gcloud by running:
3023
+ * // ```sh
3024
+ * // $ gcloud auth application-default login
3025
+ * // ```
3026
+ * // - Install the npm module by running:
3027
+ * // ```sh
3028
+ * // $ npm install googleapis
3029
+ * // ```
3030
+ *
3031
+ * const {google} = require('googleapis');
3032
+ * const serviceusage = google.serviceusage('v1beta1');
3033
+ *
3034
+ * async function main() {
3035
+ * const auth = new google.auth.GoogleAuth({
3036
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3037
+ * scopes: [
3038
+ * 'https://www.googleapis.com/auth/cloud-platform',
3039
+ * 'https://www.googleapis.com/auth/service.management',
3040
+ * ],
3041
+ * });
3042
+ *
3043
+ * // Acquire an auth client, and bind it to all future calls
3044
+ * const authClient = await auth.getClient();
3045
+ * google.options({auth: authClient});
3046
+ *
3047
+ * // Do the magic
3048
+ * const res = await serviceusage.services.generateServiceIdentity({
3049
+ * // 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`
3050
+ * parent: '[^/]+/[^/]+/services/my-service',
3051
+ * });
3052
+ * console.log(res.data);
3053
+ *
3054
+ * // Example response
3055
+ * // {
3056
+ * // "done": false,
3057
+ * // "error": {},
3058
+ * // "metadata": {},
3059
+ * // "name": "my_name",
3060
+ * // "response": {}
3061
+ * // }
3062
+ * }
3063
+ *
3064
+ * main().catch(e => {
3065
+ * console.error(e);
3066
+ * throw e;
3067
+ * });
3068
+ *
3069
+ * ```
2658
3070
  *
2659
3071
  * @param params - Parameters for request
2660
3072
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2669,6 +3081,58 @@ export declare namespace serviceusage_v1beta1 {
2669
3081
  generateServiceIdentity(callback: BodyResponseCallback<Schema$Operation>): void;
2670
3082
  /**
2671
3083
  * Returns the service configuration and enabled state for a given service.
3084
+ * @example
3085
+ * ```js
3086
+ * // Before running the sample:
3087
+ * // - Enable the API at:
3088
+ * // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
3089
+ * // - Login into gcloud by running:
3090
+ * // ```sh
3091
+ * // $ gcloud auth application-default login
3092
+ * // ```
3093
+ * // - Install the npm module by running:
3094
+ * // ```sh
3095
+ * // $ npm install googleapis
3096
+ * // ```
3097
+ *
3098
+ * const {google} = require('googleapis');
3099
+ * const serviceusage = google.serviceusage('v1beta1');
3100
+ *
3101
+ * async function main() {
3102
+ * const auth = new google.auth.GoogleAuth({
3103
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3104
+ * scopes: [
3105
+ * 'https://www.googleapis.com/auth/cloud-platform',
3106
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
3107
+ * ],
3108
+ * });
3109
+ *
3110
+ * // Acquire an auth client, and bind it to all future calls
3111
+ * const authClient = await auth.getClient();
3112
+ * google.options({auth: authClient});
3113
+ *
3114
+ * // Do the magic
3115
+ * const res = await serviceusage.services.get({
3116
+ * // 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).
3117
+ * name: '[^/]+/[^/]+/services/my-service',
3118
+ * });
3119
+ * console.log(res.data);
3120
+ *
3121
+ * // Example response
3122
+ * // {
3123
+ * // "config": {},
3124
+ * // "name": "my_name",
3125
+ * // "parent": "my_parent",
3126
+ * // "state": "my_state"
3127
+ * // }
3128
+ * }
3129
+ *
3130
+ * main().catch(e => {
3131
+ * console.error(e);
3132
+ * throw e;
3133
+ * });
3134
+ *
3135
+ * ```
2672
3136
  *
2673
3137
  * @param params - Parameters for request
2674
3138
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2683,6 +3147,62 @@ export declare namespace serviceusage_v1beta1 {
2683
3147
  get(callback: BodyResponseCallback<Schema$Service>): void;
2684
3148
  /**
2685
3149
  * 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.
3150
+ * @example
3151
+ * ```js
3152
+ * // Before running the sample:
3153
+ * // - Enable the API at:
3154
+ * // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
3155
+ * // - Login into gcloud by running:
3156
+ * // ```sh
3157
+ * // $ gcloud auth application-default login
3158
+ * // ```
3159
+ * // - Install the npm module by running:
3160
+ * // ```sh
3161
+ * // $ npm install googleapis
3162
+ * // ```
3163
+ *
3164
+ * const {google} = require('googleapis');
3165
+ * const serviceusage = google.serviceusage('v1beta1');
3166
+ *
3167
+ * async function main() {
3168
+ * const auth = new google.auth.GoogleAuth({
3169
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3170
+ * scopes: [
3171
+ * 'https://www.googleapis.com/auth/cloud-platform',
3172
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
3173
+ * ],
3174
+ * });
3175
+ *
3176
+ * // Acquire an auth client, and bind it to all future calls
3177
+ * const authClient = await auth.getClient();
3178
+ * google.options({auth: authClient});
3179
+ *
3180
+ * // Do the magic
3181
+ * const res = await serviceusage.services.list({
3182
+ * // Only list services that conform to the given filter. The allowed filter strings are `state:ENABLED` and `state:DISABLED`.
3183
+ * filter: 'placeholder-value',
3184
+ * // Requested size of the next page of data. Requested page size cannot exceed 200. If not set, the default page size is 50.
3185
+ * pageSize: 'placeholder-value',
3186
+ * // Token identifying which result to start with, which is returned by a previous list call.
3187
+ * pageToken: 'placeholder-value',
3188
+ * // Parent to search for services on. An example name would be: `projects/123` where `123` is the project number (not project ID).
3189
+ * parent: '[^/]+/[^/]+',
3190
+ * });
3191
+ * console.log(res.data);
3192
+ *
3193
+ * // Example response
3194
+ * // {
3195
+ * // "nextPageToken": "my_nextPageToken",
3196
+ * // "services": []
3197
+ * // }
3198
+ * }
3199
+ *
3200
+ * main().catch(e => {
3201
+ * console.error(e);
3202
+ * throw e;
3203
+ * });
3204
+ *
3205
+ * ```
2686
3206
  *
2687
3207
  * @param params - Parameters for request
2688
3208
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2762,6 +3282,62 @@ export declare namespace serviceusage_v1beta1 {
2762
3282
  constructor(context: APIRequestContext);
2763
3283
  /**
2764
3284
  * Retrieves a summary of quota information for a specific quota metric
3285
+ * @example
3286
+ * ```js
3287
+ * // Before running the sample:
3288
+ * // - Enable the API at:
3289
+ * // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
3290
+ * // - Login into gcloud by running:
3291
+ * // ```sh
3292
+ * // $ gcloud auth application-default login
3293
+ * // ```
3294
+ * // - Install the npm module by running:
3295
+ * // ```sh
3296
+ * // $ npm install googleapis
3297
+ * // ```
3298
+ *
3299
+ * const {google} = require('googleapis');
3300
+ * const serviceusage = google.serviceusage('v1beta1');
3301
+ *
3302
+ * async function main() {
3303
+ * const auth = new google.auth.GoogleAuth({
3304
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3305
+ * scopes: [
3306
+ * 'https://www.googleapis.com/auth/cloud-platform',
3307
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
3308
+ * ],
3309
+ * });
3310
+ *
3311
+ * // Acquire an auth client, and bind it to all future calls
3312
+ * const authClient = await auth.getClient();
3313
+ * google.options({auth: authClient});
3314
+ *
3315
+ * // Do the magic
3316
+ * const res = await serviceusage.services.consumerQuotaMetrics.get({
3317
+ * // The resource name of the quota. An example name would be: `projects/123/services/serviceusage.googleapis.com/consumerQuotaMetrics/serviceusage.googleapis.com%2Fmutate_requests`
3318
+ * name: '[^/]+/[^/]+/services/my-service/consumerQuotaMetrics/my-consumerQuotaMetric',
3319
+ * // Specifies the level of detail for quota information in the response.
3320
+ * view: 'placeholder-value',
3321
+ * });
3322
+ * console.log(res.data);
3323
+ *
3324
+ * // Example response
3325
+ * // {
3326
+ * // "consumerQuotaLimits": [],
3327
+ * // "descendantConsumerQuotaLimits": [],
3328
+ * // "displayName": "my_displayName",
3329
+ * // "metric": "my_metric",
3330
+ * // "name": "my_name",
3331
+ * // "unit": "my_unit"
3332
+ * // }
3333
+ * }
3334
+ *
3335
+ * main().catch(e => {
3336
+ * console.error(e);
3337
+ * throw e;
3338
+ * });
3339
+ *
3340
+ * ```
2765
3341
  *
2766
3342
  * @param params - Parameters for request
2767
3343
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2776,6 +3352,70 @@ export declare namespace serviceusage_v1beta1 {
2776
3352
  get(callback: BodyResponseCallback<Schema$ConsumerQuotaMetric>): void;
2777
3353
  /**
2778
3354
  * 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.
3355
+ * @example
3356
+ * ```js
3357
+ * // Before running the sample:
3358
+ * // - Enable the API at:
3359
+ * // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
3360
+ * // - Login into gcloud by running:
3361
+ * // ```sh
3362
+ * // $ gcloud auth application-default login
3363
+ * // ```
3364
+ * // - Install the npm module by running:
3365
+ * // ```sh
3366
+ * // $ npm install googleapis
3367
+ * // ```
3368
+ *
3369
+ * const {google} = require('googleapis');
3370
+ * const serviceusage = google.serviceusage('v1beta1');
3371
+ *
3372
+ * async function main() {
3373
+ * const auth = new google.auth.GoogleAuth({
3374
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3375
+ * scopes: [
3376
+ * 'https://www.googleapis.com/auth/cloud-platform',
3377
+ * 'https://www.googleapis.com/auth/service.management',
3378
+ * ],
3379
+ * });
3380
+ *
3381
+ * // Acquire an auth client, and bind it to all future calls
3382
+ * const authClient = await auth.getClient();
3383
+ * google.options({auth: authClient});
3384
+ *
3385
+ * // Do the magic
3386
+ * const res =
3387
+ * await serviceusage.services.consumerQuotaMetrics.importAdminOverrides({
3388
+ * // The resource name of the consumer. An example name would be: `projects/123/services/compute.googleapis.com`
3389
+ * parent: '[^/]+/[^/]+/services/my-service',
3390
+ *
3391
+ * // Request body metadata
3392
+ * requestBody: {
3393
+ * // request body parameters
3394
+ * // {
3395
+ * // "force": false,
3396
+ * // "forceOnly": [],
3397
+ * // "inlineSource": {}
3398
+ * // }
3399
+ * },
3400
+ * });
3401
+ * console.log(res.data);
3402
+ *
3403
+ * // Example response
3404
+ * // {
3405
+ * // "done": false,
3406
+ * // "error": {},
3407
+ * // "metadata": {},
3408
+ * // "name": "my_name",
3409
+ * // "response": {}
3410
+ * // }
3411
+ * }
3412
+ *
3413
+ * main().catch(e => {
3414
+ * console.error(e);
3415
+ * throw e;
3416
+ * });
3417
+ *
3418
+ * ```
2779
3419
  *
2780
3420
  * @param params - Parameters for request
2781
3421
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2790,6 +3430,70 @@ export declare namespace serviceusage_v1beta1 {
2790
3430
  importAdminOverrides(callback: BodyResponseCallback<Schema$Operation>): void;
2791
3431
  /**
2792
3432
  * 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.
3433
+ * @example
3434
+ * ```js
3435
+ * // Before running the sample:
3436
+ * // - Enable the API at:
3437
+ * // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
3438
+ * // - Login into gcloud by running:
3439
+ * // ```sh
3440
+ * // $ gcloud auth application-default login
3441
+ * // ```
3442
+ * // - Install the npm module by running:
3443
+ * // ```sh
3444
+ * // $ npm install googleapis
3445
+ * // ```
3446
+ *
3447
+ * const {google} = require('googleapis');
3448
+ * const serviceusage = google.serviceusage('v1beta1');
3449
+ *
3450
+ * async function main() {
3451
+ * const auth = new google.auth.GoogleAuth({
3452
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3453
+ * scopes: [
3454
+ * 'https://www.googleapis.com/auth/cloud-platform',
3455
+ * 'https://www.googleapis.com/auth/service.management',
3456
+ * ],
3457
+ * });
3458
+ *
3459
+ * // Acquire an auth client, and bind it to all future calls
3460
+ * const authClient = await auth.getClient();
3461
+ * google.options({auth: authClient});
3462
+ *
3463
+ * // Do the magic
3464
+ * const res =
3465
+ * await serviceusage.services.consumerQuotaMetrics.importConsumerOverrides({
3466
+ * // The resource name of the consumer. An example name would be: `projects/123/services/compute.googleapis.com`
3467
+ * parent: '[^/]+/[^/]+/services/my-service',
3468
+ *
3469
+ * // Request body metadata
3470
+ * requestBody: {
3471
+ * // request body parameters
3472
+ * // {
3473
+ * // "force": false,
3474
+ * // "forceOnly": [],
3475
+ * // "inlineSource": {}
3476
+ * // }
3477
+ * },
3478
+ * });
3479
+ * console.log(res.data);
3480
+ *
3481
+ * // Example response
3482
+ * // {
3483
+ * // "done": false,
3484
+ * // "error": {},
3485
+ * // "metadata": {},
3486
+ * // "name": "my_name",
3487
+ * // "response": {}
3488
+ * // }
3489
+ * }
3490
+ *
3491
+ * main().catch(e => {
3492
+ * console.error(e);
3493
+ * throw e;
3494
+ * });
3495
+ *
3496
+ * ```
2793
3497
  *
2794
3498
  * @param params - Parameters for request
2795
3499
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2804,6 +3508,62 @@ export declare namespace serviceusage_v1beta1 {
2804
3508
  importConsumerOverrides(callback: BodyResponseCallback<Schema$Operation>): void;
2805
3509
  /**
2806
3510
  * 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.
3511
+ * @example
3512
+ * ```js
3513
+ * // Before running the sample:
3514
+ * // - Enable the API at:
3515
+ * // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
3516
+ * // - Login into gcloud by running:
3517
+ * // ```sh
3518
+ * // $ gcloud auth application-default login
3519
+ * // ```
3520
+ * // - Install the npm module by running:
3521
+ * // ```sh
3522
+ * // $ npm install googleapis
3523
+ * // ```
3524
+ *
3525
+ * const {google} = require('googleapis');
3526
+ * const serviceusage = google.serviceusage('v1beta1');
3527
+ *
3528
+ * async function main() {
3529
+ * const auth = new google.auth.GoogleAuth({
3530
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3531
+ * scopes: [
3532
+ * 'https://www.googleapis.com/auth/cloud-platform',
3533
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
3534
+ * ],
3535
+ * });
3536
+ *
3537
+ * // Acquire an auth client, and bind it to all future calls
3538
+ * const authClient = await auth.getClient();
3539
+ * google.options({auth: authClient});
3540
+ *
3541
+ * // Do the magic
3542
+ * const res = await serviceusage.services.consumerQuotaMetrics.list({
3543
+ * // Requested size of the next page of data.
3544
+ * pageSize: 'placeholder-value',
3545
+ * // Token identifying which result to start with; returned by a previous list call.
3546
+ * pageToken: 'placeholder-value',
3547
+ * // 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`
3548
+ * parent: '[^/]+/[^/]+/services/my-service',
3549
+ * // Specifies the level of detail for quota information in the response.
3550
+ * view: 'placeholder-value',
3551
+ * });
3552
+ * console.log(res.data);
3553
+ *
3554
+ * // Example response
3555
+ * // {
3556
+ * // "metrics": [],
3557
+ * // "nextPageToken": "my_nextPageToken"
3558
+ * // }
3559
+ * }
3560
+ *
3561
+ * main().catch(e => {
3562
+ * console.error(e);
3563
+ * throw e;
3564
+ * });
3565
+ *
3566
+ * ```
2807
3567
  *
2808
3568
  * @param params - Parameters for request
2809
3569
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2872,6 +3632,63 @@ export declare namespace serviceusage_v1beta1 {
2872
3632
  constructor(context: APIRequestContext);
2873
3633
  /**
2874
3634
  * Retrieves a summary of quota information for a specific quota limit.
3635
+ * @example
3636
+ * ```js
3637
+ * // Before running the sample:
3638
+ * // - Enable the API at:
3639
+ * // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
3640
+ * // - Login into gcloud by running:
3641
+ * // ```sh
3642
+ * // $ gcloud auth application-default login
3643
+ * // ```
3644
+ * // - Install the npm module by running:
3645
+ * // ```sh
3646
+ * // $ npm install googleapis
3647
+ * // ```
3648
+ *
3649
+ * const {google} = require('googleapis');
3650
+ * const serviceusage = google.serviceusage('v1beta1');
3651
+ *
3652
+ * async function main() {
3653
+ * const auth = new google.auth.GoogleAuth({
3654
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3655
+ * scopes: [
3656
+ * 'https://www.googleapis.com/auth/cloud-platform',
3657
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
3658
+ * ],
3659
+ * });
3660
+ *
3661
+ * // Acquire an auth client, and bind it to all future calls
3662
+ * const authClient = await auth.getClient();
3663
+ * google.options({auth: authClient});
3664
+ *
3665
+ * // Do the magic
3666
+ * const res = await serviceusage.services.consumerQuotaMetrics.limits.get({
3667
+ * // The resource name of the quota limit. Use the quota limit resource name returned by previous ListConsumerQuotaMetrics and GetConsumerQuotaMetric API calls.
3668
+ * name: '[^/]+/[^/]+/services/my-service/consumerQuotaMetrics/my-consumerQuotaMetric/limits/my-limit',
3669
+ * // Specifies the level of detail for quota information in the response.
3670
+ * view: 'placeholder-value',
3671
+ * });
3672
+ * console.log(res.data);
3673
+ *
3674
+ * // Example response
3675
+ * // {
3676
+ * // "allowsAdminOverrides": false,
3677
+ * // "isPrecise": false,
3678
+ * // "metric": "my_metric",
3679
+ * // "name": "my_name",
3680
+ * // "quotaBuckets": [],
3681
+ * // "supportedLocations": [],
3682
+ * // "unit": "my_unit"
3683
+ * // }
3684
+ * }
3685
+ *
3686
+ * main().catch(e => {
3687
+ * console.error(e);
3688
+ * throw e;
3689
+ * });
3690
+ *
3691
+ * ```
2875
3692
  *
2876
3693
  * @param params - Parameters for request
2877
3694
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2900,6 +3717,80 @@ export declare namespace serviceusage_v1beta1 {
2900
3717
  constructor(context: APIRequestContext);
2901
3718
  /**
2902
3719
  * 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.
3720
+ * @example
3721
+ * ```js
3722
+ * // Before running the sample:
3723
+ * // - Enable the API at:
3724
+ * // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
3725
+ * // - Login into gcloud by running:
3726
+ * // ```sh
3727
+ * // $ gcloud auth application-default login
3728
+ * // ```
3729
+ * // - Install the npm module by running:
3730
+ * // ```sh
3731
+ * // $ npm install googleapis
3732
+ * // ```
3733
+ *
3734
+ * const {google} = require('googleapis');
3735
+ * const serviceusage = google.serviceusage('v1beta1');
3736
+ *
3737
+ * async function main() {
3738
+ * const auth = new google.auth.GoogleAuth({
3739
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3740
+ * scopes: [
3741
+ * 'https://www.googleapis.com/auth/cloud-platform',
3742
+ * 'https://www.googleapis.com/auth/service.management',
3743
+ * ],
3744
+ * });
3745
+ *
3746
+ * // Acquire an auth client, and bind it to all future calls
3747
+ * const authClient = await auth.getClient();
3748
+ * google.options({auth: authClient});
3749
+ *
3750
+ * // Do the magic
3751
+ * const res =
3752
+ * await serviceusage.services.consumerQuotaMetrics.limits.adminOverrides.create(
3753
+ * {
3754
+ * // 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.
3755
+ * force: 'placeholder-value',
3756
+ * // 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.
3757
+ * forceOnly: 'placeholder-value',
3758
+ * // 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`
3759
+ * parent:
3760
+ * '[^/]+/[^/]+/services/my-service/consumerQuotaMetrics/my-consumerQuotaMetric/limits/my-limit',
3761
+ *
3762
+ * // Request body metadata
3763
+ * requestBody: {
3764
+ * // request body parameters
3765
+ * // {
3766
+ * // "adminOverrideAncestor": "my_adminOverrideAncestor",
3767
+ * // "dimensions": {},
3768
+ * // "metric": "my_metric",
3769
+ * // "name": "my_name",
3770
+ * // "overrideValue": "my_overrideValue",
3771
+ * // "unit": "my_unit"
3772
+ * // }
3773
+ * },
3774
+ * },
3775
+ * );
3776
+ * console.log(res.data);
3777
+ *
3778
+ * // Example response
3779
+ * // {
3780
+ * // "done": false,
3781
+ * // "error": {},
3782
+ * // "metadata": {},
3783
+ * // "name": "my_name",
3784
+ * // "response": {}
3785
+ * // }
3786
+ * }
3787
+ *
3788
+ * main().catch(e => {
3789
+ * console.error(e);
3790
+ * throw e;
3791
+ * });
3792
+ *
3793
+ * ```
2903
3794
  *
2904
3795
  * @param params - Parameters for request
2905
3796
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2914,6 +3805,66 @@ export declare namespace serviceusage_v1beta1 {
2914
3805
  create(callback: BodyResponseCallback<Schema$Operation>): void;
2915
3806
  /**
2916
3807
  * Deletes an admin override.
3808
+ * @example
3809
+ * ```js
3810
+ * // Before running the sample:
3811
+ * // - Enable the API at:
3812
+ * // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
3813
+ * // - Login into gcloud by running:
3814
+ * // ```sh
3815
+ * // $ gcloud auth application-default login
3816
+ * // ```
3817
+ * // - Install the npm module by running:
3818
+ * // ```sh
3819
+ * // $ npm install googleapis
3820
+ * // ```
3821
+ *
3822
+ * const {google} = require('googleapis');
3823
+ * const serviceusage = google.serviceusage('v1beta1');
3824
+ *
3825
+ * async function main() {
3826
+ * const auth = new google.auth.GoogleAuth({
3827
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3828
+ * scopes: [
3829
+ * 'https://www.googleapis.com/auth/cloud-platform',
3830
+ * 'https://www.googleapis.com/auth/service.management',
3831
+ * ],
3832
+ * });
3833
+ *
3834
+ * // Acquire an auth client, and bind it to all future calls
3835
+ * const authClient = await auth.getClient();
3836
+ * google.options({auth: authClient});
3837
+ *
3838
+ * // Do the magic
3839
+ * const res =
3840
+ * await serviceusage.services.consumerQuotaMetrics.limits.adminOverrides.delete(
3841
+ * {
3842
+ * // 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.
3843
+ * force: 'placeholder-value',
3844
+ * // 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.
3845
+ * forceOnly: 'placeholder-value',
3846
+ * // 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`
3847
+ * name: '[^/]+/[^/]+/services/my-service/consumerQuotaMetrics/my-consumerQuotaMetric/limits/my-limit/adminOverrides/my-adminOverride',
3848
+ * },
3849
+ * );
3850
+ * console.log(res.data);
3851
+ *
3852
+ * // Example response
3853
+ * // {
3854
+ * // "done": false,
3855
+ * // "error": {},
3856
+ * // "metadata": {},
3857
+ * // "name": "my_name",
3858
+ * // "response": {}
3859
+ * // }
3860
+ * }
3861
+ *
3862
+ * main().catch(e => {
3863
+ * console.error(e);
3864
+ * throw e;
3865
+ * });
3866
+ *
3867
+ * ```
2917
3868
  *
2918
3869
  * @param params - Parameters for request
2919
3870
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2928,6 +3879,64 @@ export declare namespace serviceusage_v1beta1 {
2928
3879
  delete(callback: BodyResponseCallback<Schema$Operation>): void;
2929
3880
  /**
2930
3881
  * Lists all admin overrides on this limit.
3882
+ * @example
3883
+ * ```js
3884
+ * // Before running the sample:
3885
+ * // - Enable the API at:
3886
+ * // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
3887
+ * // - Login into gcloud by running:
3888
+ * // ```sh
3889
+ * // $ gcloud auth application-default login
3890
+ * // ```
3891
+ * // - Install the npm module by running:
3892
+ * // ```sh
3893
+ * // $ npm install googleapis
3894
+ * // ```
3895
+ *
3896
+ * const {google} = require('googleapis');
3897
+ * const serviceusage = google.serviceusage('v1beta1');
3898
+ *
3899
+ * async function main() {
3900
+ * const auth = new google.auth.GoogleAuth({
3901
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3902
+ * scopes: [
3903
+ * 'https://www.googleapis.com/auth/cloud-platform',
3904
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
3905
+ * ],
3906
+ * });
3907
+ *
3908
+ * // Acquire an auth client, and bind it to all future calls
3909
+ * const authClient = await auth.getClient();
3910
+ * google.options({auth: authClient});
3911
+ *
3912
+ * // Do the magic
3913
+ * const res =
3914
+ * await serviceusage.services.consumerQuotaMetrics.limits.adminOverrides.list(
3915
+ * {
3916
+ * // Requested size of the next page of data.
3917
+ * pageSize: 'placeholder-value',
3918
+ * // Token identifying which result to start with; returned by a previous list call.
3919
+ * pageToken: 'placeholder-value',
3920
+ * // 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`
3921
+ * parent:
3922
+ * '[^/]+/[^/]+/services/my-service/consumerQuotaMetrics/my-consumerQuotaMetric/limits/my-limit',
3923
+ * },
3924
+ * );
3925
+ * console.log(res.data);
3926
+ *
3927
+ * // Example response
3928
+ * // {
3929
+ * // "nextPageToken": "my_nextPageToken",
3930
+ * // "overrides": []
3931
+ * // }
3932
+ * }
3933
+ *
3934
+ * main().catch(e => {
3935
+ * console.error(e);
3936
+ * throw e;
3937
+ * });
3938
+ *
3939
+ * ```
2931
3940
  *
2932
3941
  * @param params - Parameters for request
2933
3942
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2942,6 +3951,81 @@ export declare namespace serviceusage_v1beta1 {
2942
3951
  list(callback: BodyResponseCallback<Schema$ListAdminOverridesResponse>): void;
2943
3952
  /**
2944
3953
  * Updates an admin override.
3954
+ * @example
3955
+ * ```js
3956
+ * // Before running the sample:
3957
+ * // - Enable the API at:
3958
+ * // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
3959
+ * // - Login into gcloud by running:
3960
+ * // ```sh
3961
+ * // $ gcloud auth application-default login
3962
+ * // ```
3963
+ * // - Install the npm module by running:
3964
+ * // ```sh
3965
+ * // $ npm install googleapis
3966
+ * // ```
3967
+ *
3968
+ * const {google} = require('googleapis');
3969
+ * const serviceusage = google.serviceusage('v1beta1');
3970
+ *
3971
+ * async function main() {
3972
+ * const auth = new google.auth.GoogleAuth({
3973
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3974
+ * scopes: [
3975
+ * 'https://www.googleapis.com/auth/cloud-platform',
3976
+ * 'https://www.googleapis.com/auth/service.management',
3977
+ * ],
3978
+ * });
3979
+ *
3980
+ * // Acquire an auth client, and bind it to all future calls
3981
+ * const authClient = await auth.getClient();
3982
+ * google.options({auth: authClient});
3983
+ *
3984
+ * // Do the magic
3985
+ * const res =
3986
+ * await serviceusage.services.consumerQuotaMetrics.limits.adminOverrides.patch(
3987
+ * {
3988
+ * // 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.
3989
+ * force: 'placeholder-value',
3990
+ * // 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.
3991
+ * forceOnly: 'placeholder-value',
3992
+ * // 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`
3993
+ * name: '[^/]+/[^/]+/services/my-service/consumerQuotaMetrics/my-consumerQuotaMetric/limits/my-limit/adminOverrides/my-adminOverride',
3994
+ * // Update only the specified fields of the override. If unset, all fields will be updated.
3995
+ * updateMask: 'placeholder-value',
3996
+ *
3997
+ * // Request body metadata
3998
+ * requestBody: {
3999
+ * // request body parameters
4000
+ * // {
4001
+ * // "adminOverrideAncestor": "my_adminOverrideAncestor",
4002
+ * // "dimensions": {},
4003
+ * // "metric": "my_metric",
4004
+ * // "name": "my_name",
4005
+ * // "overrideValue": "my_overrideValue",
4006
+ * // "unit": "my_unit"
4007
+ * // }
4008
+ * },
4009
+ * },
4010
+ * );
4011
+ * console.log(res.data);
4012
+ *
4013
+ * // Example response
4014
+ * // {
4015
+ * // "done": false,
4016
+ * // "error": {},
4017
+ * // "metadata": {},
4018
+ * // "name": "my_name",
4019
+ * // "response": {}
4020
+ * // }
4021
+ * }
4022
+ *
4023
+ * main().catch(e => {
4024
+ * console.error(e);
4025
+ * throw e;
4026
+ * });
4027
+ *
4028
+ * ```
2945
4029
  *
2946
4030
  * @param params - Parameters for request
2947
4031
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -3028,6 +4112,80 @@ export declare namespace serviceusage_v1beta1 {
3028
4112
  constructor(context: APIRequestContext);
3029
4113
  /**
3030
4114
  * 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.
4115
+ * @example
4116
+ * ```js
4117
+ * // Before running the sample:
4118
+ * // - Enable the API at:
4119
+ * // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
4120
+ * // - Login into gcloud by running:
4121
+ * // ```sh
4122
+ * // $ gcloud auth application-default login
4123
+ * // ```
4124
+ * // - Install the npm module by running:
4125
+ * // ```sh
4126
+ * // $ npm install googleapis
4127
+ * // ```
4128
+ *
4129
+ * const {google} = require('googleapis');
4130
+ * const serviceusage = google.serviceusage('v1beta1');
4131
+ *
4132
+ * async function main() {
4133
+ * const auth = new google.auth.GoogleAuth({
4134
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
4135
+ * scopes: [
4136
+ * 'https://www.googleapis.com/auth/cloud-platform',
4137
+ * 'https://www.googleapis.com/auth/service.management',
4138
+ * ],
4139
+ * });
4140
+ *
4141
+ * // Acquire an auth client, and bind it to all future calls
4142
+ * const authClient = await auth.getClient();
4143
+ * google.options({auth: authClient});
4144
+ *
4145
+ * // Do the magic
4146
+ * const res =
4147
+ * await serviceusage.services.consumerQuotaMetrics.limits.consumerOverrides.create(
4148
+ * {
4149
+ * // 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.
4150
+ * force: 'placeholder-value',
4151
+ * // 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.
4152
+ * forceOnly: 'placeholder-value',
4153
+ * // 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`
4154
+ * parent:
4155
+ * '[^/]+/[^/]+/services/my-service/consumerQuotaMetrics/my-consumerQuotaMetric/limits/my-limit',
4156
+ *
4157
+ * // Request body metadata
4158
+ * requestBody: {
4159
+ * // request body parameters
4160
+ * // {
4161
+ * // "adminOverrideAncestor": "my_adminOverrideAncestor",
4162
+ * // "dimensions": {},
4163
+ * // "metric": "my_metric",
4164
+ * // "name": "my_name",
4165
+ * // "overrideValue": "my_overrideValue",
4166
+ * // "unit": "my_unit"
4167
+ * // }
4168
+ * },
4169
+ * },
4170
+ * );
4171
+ * console.log(res.data);
4172
+ *
4173
+ * // Example response
4174
+ * // {
4175
+ * // "done": false,
4176
+ * // "error": {},
4177
+ * // "metadata": {},
4178
+ * // "name": "my_name",
4179
+ * // "response": {}
4180
+ * // }
4181
+ * }
4182
+ *
4183
+ * main().catch(e => {
4184
+ * console.error(e);
4185
+ * throw e;
4186
+ * });
4187
+ *
4188
+ * ```
3031
4189
  *
3032
4190
  * @param params - Parameters for request
3033
4191
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -3042,6 +4200,66 @@ export declare namespace serviceusage_v1beta1 {
3042
4200
  create(callback: BodyResponseCallback<Schema$Operation>): void;
3043
4201
  /**
3044
4202
  * Deletes a consumer override.
4203
+ * @example
4204
+ * ```js
4205
+ * // Before running the sample:
4206
+ * // - Enable the API at:
4207
+ * // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
4208
+ * // - Login into gcloud by running:
4209
+ * // ```sh
4210
+ * // $ gcloud auth application-default login
4211
+ * // ```
4212
+ * // - Install the npm module by running:
4213
+ * // ```sh
4214
+ * // $ npm install googleapis
4215
+ * // ```
4216
+ *
4217
+ * const {google} = require('googleapis');
4218
+ * const serviceusage = google.serviceusage('v1beta1');
4219
+ *
4220
+ * async function main() {
4221
+ * const auth = new google.auth.GoogleAuth({
4222
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
4223
+ * scopes: [
4224
+ * 'https://www.googleapis.com/auth/cloud-platform',
4225
+ * 'https://www.googleapis.com/auth/service.management',
4226
+ * ],
4227
+ * });
4228
+ *
4229
+ * // Acquire an auth client, and bind it to all future calls
4230
+ * const authClient = await auth.getClient();
4231
+ * google.options({auth: authClient});
4232
+ *
4233
+ * // Do the magic
4234
+ * const res =
4235
+ * await serviceusage.services.consumerQuotaMetrics.limits.consumerOverrides.delete(
4236
+ * {
4237
+ * // 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.
4238
+ * force: 'placeholder-value',
4239
+ * // 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.
4240
+ * forceOnly: 'placeholder-value',
4241
+ * // 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`
4242
+ * name: '[^/]+/[^/]+/services/my-service/consumerQuotaMetrics/my-consumerQuotaMetric/limits/my-limit/consumerOverrides/my-consumerOverride',
4243
+ * },
4244
+ * );
4245
+ * console.log(res.data);
4246
+ *
4247
+ * // Example response
4248
+ * // {
4249
+ * // "done": false,
4250
+ * // "error": {},
4251
+ * // "metadata": {},
4252
+ * // "name": "my_name",
4253
+ * // "response": {}
4254
+ * // }
4255
+ * }
4256
+ *
4257
+ * main().catch(e => {
4258
+ * console.error(e);
4259
+ * throw e;
4260
+ * });
4261
+ *
4262
+ * ```
3045
4263
  *
3046
4264
  * @param params - Parameters for request
3047
4265
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -3056,6 +4274,64 @@ export declare namespace serviceusage_v1beta1 {
3056
4274
  delete(callback: BodyResponseCallback<Schema$Operation>): void;
3057
4275
  /**
3058
4276
  * Lists all consumer overrides on this limit.
4277
+ * @example
4278
+ * ```js
4279
+ * // Before running the sample:
4280
+ * // - Enable the API at:
4281
+ * // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
4282
+ * // - Login into gcloud by running:
4283
+ * // ```sh
4284
+ * // $ gcloud auth application-default login
4285
+ * // ```
4286
+ * // - Install the npm module by running:
4287
+ * // ```sh
4288
+ * // $ npm install googleapis
4289
+ * // ```
4290
+ *
4291
+ * const {google} = require('googleapis');
4292
+ * const serviceusage = google.serviceusage('v1beta1');
4293
+ *
4294
+ * async function main() {
4295
+ * const auth = new google.auth.GoogleAuth({
4296
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
4297
+ * scopes: [
4298
+ * 'https://www.googleapis.com/auth/cloud-platform',
4299
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
4300
+ * ],
4301
+ * });
4302
+ *
4303
+ * // Acquire an auth client, and bind it to all future calls
4304
+ * const authClient = await auth.getClient();
4305
+ * google.options({auth: authClient});
4306
+ *
4307
+ * // Do the magic
4308
+ * const res =
4309
+ * await serviceusage.services.consumerQuotaMetrics.limits.consumerOverrides.list(
4310
+ * {
4311
+ * // Requested size of the next page of data.
4312
+ * pageSize: 'placeholder-value',
4313
+ * // Token identifying which result to start with; returned by a previous list call.
4314
+ * pageToken: 'placeholder-value',
4315
+ * // 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`
4316
+ * parent:
4317
+ * '[^/]+/[^/]+/services/my-service/consumerQuotaMetrics/my-consumerQuotaMetric/limits/my-limit',
4318
+ * },
4319
+ * );
4320
+ * console.log(res.data);
4321
+ *
4322
+ * // Example response
4323
+ * // {
4324
+ * // "nextPageToken": "my_nextPageToken",
4325
+ * // "overrides": []
4326
+ * // }
4327
+ * }
4328
+ *
4329
+ * main().catch(e => {
4330
+ * console.error(e);
4331
+ * throw e;
4332
+ * });
4333
+ *
4334
+ * ```
3059
4335
  *
3060
4336
  * @param params - Parameters for request
3061
4337
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -3070,6 +4346,81 @@ export declare namespace serviceusage_v1beta1 {
3070
4346
  list(callback: BodyResponseCallback<Schema$ListConsumerOverridesResponse>): void;
3071
4347
  /**
3072
4348
  * Updates a consumer override.
4349
+ * @example
4350
+ * ```js
4351
+ * // Before running the sample:
4352
+ * // - Enable the API at:
4353
+ * // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
4354
+ * // - Login into gcloud by running:
4355
+ * // ```sh
4356
+ * // $ gcloud auth application-default login
4357
+ * // ```
4358
+ * // - Install the npm module by running:
4359
+ * // ```sh
4360
+ * // $ npm install googleapis
4361
+ * // ```
4362
+ *
4363
+ * const {google} = require('googleapis');
4364
+ * const serviceusage = google.serviceusage('v1beta1');
4365
+ *
4366
+ * async function main() {
4367
+ * const auth = new google.auth.GoogleAuth({
4368
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
4369
+ * scopes: [
4370
+ * 'https://www.googleapis.com/auth/cloud-platform',
4371
+ * 'https://www.googleapis.com/auth/service.management',
4372
+ * ],
4373
+ * });
4374
+ *
4375
+ * // Acquire an auth client, and bind it to all future calls
4376
+ * const authClient = await auth.getClient();
4377
+ * google.options({auth: authClient});
4378
+ *
4379
+ * // Do the magic
4380
+ * const res =
4381
+ * await serviceusage.services.consumerQuotaMetrics.limits.consumerOverrides.patch(
4382
+ * {
4383
+ * // 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.
4384
+ * force: 'placeholder-value',
4385
+ * // 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.
4386
+ * forceOnly: 'placeholder-value',
4387
+ * // 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`
4388
+ * name: '[^/]+/[^/]+/services/my-service/consumerQuotaMetrics/my-consumerQuotaMetric/limits/my-limit/consumerOverrides/my-consumerOverride',
4389
+ * // Update only the specified fields of the override. If unset, all fields will be updated.
4390
+ * updateMask: 'placeholder-value',
4391
+ *
4392
+ * // Request body metadata
4393
+ * requestBody: {
4394
+ * // request body parameters
4395
+ * // {
4396
+ * // "adminOverrideAncestor": "my_adminOverrideAncestor",
4397
+ * // "dimensions": {},
4398
+ * // "metric": "my_metric",
4399
+ * // "name": "my_name",
4400
+ * // "overrideValue": "my_overrideValue",
4401
+ * // "unit": "my_unit"
4402
+ * // }
4403
+ * },
4404
+ * },
4405
+ * );
4406
+ * console.log(res.data);
4407
+ *
4408
+ * // Example response
4409
+ * // {
4410
+ * // "done": false,
4411
+ * // "error": {},
4412
+ * // "metadata": {},
4413
+ * // "name": "my_name",
4414
+ * // "response": {}
4415
+ * // }
4416
+ * }
4417
+ *
4418
+ * main().catch(e => {
4419
+ * console.error(e);
4420
+ * throw e;
4421
+ * });
4422
+ *
4423
+ * ```
3073
4424
  *
3074
4425
  * @param params - Parameters for request
3075
4426
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.