@googleapis/serviceusage 16.0.1 → 17.2.0

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