@maxim_mazurok/gapi.client.serviceusage-v1 0.1.20260227 → 0.2.20260522
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +165 -82
- package/package.json +1 -1
- package/readme.md +17 -0
package/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
// This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
|
|
10
10
|
// In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
|
|
11
11
|
// Generated from: https://serviceusage.googleapis.com/$discovery/rest?version=v1
|
|
12
|
-
// Revision:
|
|
12
|
+
// Revision: 20260522
|
|
13
13
|
|
|
14
14
|
/// <reference types="gapi.client" />
|
|
15
15
|
|
|
@@ -49,7 +49,11 @@ declare namespace gapi.client {
|
|
|
49
49
|
/** Output only. Analysis result of updating a policy. */
|
|
50
50
|
analysis?: AnalysisResult;
|
|
51
51
|
/** Output only. The type of analysis. */
|
|
52
|
-
analysisType?:
|
|
52
|
+
analysisType?:
|
|
53
|
+
| 'ANALYSIS_TYPE_UNSPECIFIED'
|
|
54
|
+
| 'ANALYSIS_TYPE_DEPENDENCY'
|
|
55
|
+
| 'ANALYSIS_TYPE_RESOURCE_USAGE'
|
|
56
|
+
| 'ANALYSIS_TYPE_RESOURCE_EXISTENCE';
|
|
53
57
|
/** Output only. The user friendly display name of the analysis type. E.g. service dependency analysis, service resource usage analysis, etc. */
|
|
54
58
|
displayName?: string;
|
|
55
59
|
/** The names of the service that has analysis result of warnings or blockers. Example: `services/storage.googleapis.com`. */
|
|
@@ -80,7 +84,7 @@ declare namespace gapi.client {
|
|
|
80
84
|
/** Source context for the protocol buffer service represented by this message. */
|
|
81
85
|
sourceContext?: SourceContext;
|
|
82
86
|
/** The source syntax of the service. */
|
|
83
|
-
syntax?:
|
|
87
|
+
syntax?: 'SYNTAX_PROTO2' | 'SYNTAX_PROTO3' | 'SYNTAX_EDITIONS';
|
|
84
88
|
/** A version string for this interface. If specified, must have the form `major-version.minor-version`, as in `1.10`. If the minor version is omitted, it defaults to zero. If the entire version field is empty, the major version is derived from the package name, as outlined below. If the field is not empty, the version in the package name will be verified to be consistent with what is provided here. The versioning schema uses [semantic versioning](http://semver.org) where the major version number indicates a breaking change and the minor version an additive, non-breaking change. Both version numbers are signals to users what to expect from different versions, and should be carefully chosen based on the product plan. The major version is also reflected in the package name of the interface, which must end in `v`, as in `google.feature.v1`. For major versions 0 and 1, the suffix can be omitted. Zero major versions must only be used for experimental, non-GA interfaces. */
|
|
85
89
|
version?: string;
|
|
86
90
|
}
|
|
@@ -155,8 +159,11 @@ declare namespace gapi.client {
|
|
|
155
159
|
operationDeadline?: number;
|
|
156
160
|
/** The map between request protocol and the backend address. */
|
|
157
161
|
overridesByRequestProtocol?: {[P in string]: BackendRule};
|
|
158
|
-
/**
|
|
159
|
-
pathTranslation?:
|
|
162
|
+
/** Path translation specifies how to combine the backend address with the request path in order to produce the appropriate forwarding URL for the request. See PathTranslation for more details. */
|
|
163
|
+
pathTranslation?:
|
|
164
|
+
| 'PATH_TRANSLATION_UNSPECIFIED'
|
|
165
|
+
| 'CONSTANT_ADDRESS'
|
|
166
|
+
| 'APPEND_PATH_TO_ADDRESS';
|
|
160
167
|
/** The protocol used for sending a request to the backend. The supported values are "http/1.1" and "h2". The default value is inferred from the scheme in the address field: SCHEME PROTOCOL http:// http/1.1 https:// http/1.1 grpc:// h2 grpcs:// h2 For secure HTTP backends (https://) that support HTTP/2, set this field to "h2" for improved performance. Configuring this field to non-default values is only supported for secure HTTP backends. This field will be ignored for all other backends. See https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids for more details on the supported values. */
|
|
161
168
|
protocol?: string;
|
|
162
169
|
/** Selects the methods to which this rule applies. Refer to selector for syntax details. */
|
|
@@ -210,7 +217,11 @@ declare namespace gapi.client {
|
|
|
210
217
|
/** The maximum number of elements allowed by flow control. */
|
|
211
218
|
flowControlElementLimit?: number;
|
|
212
219
|
/** The behavior to take when the flow control limit is exceeded. */
|
|
213
|
-
flowControlLimitExceededBehavior?:
|
|
220
|
+
flowControlLimitExceededBehavior?:
|
|
221
|
+
| 'UNSET_BEHAVIOR'
|
|
222
|
+
| 'THROW_EXCEPTION'
|
|
223
|
+
| 'BLOCK'
|
|
224
|
+
| 'IGNORE';
|
|
214
225
|
/** The maximum size of the request that could be accepted by server. */
|
|
215
226
|
requestByteLimit?: number;
|
|
216
227
|
/** 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. */
|
|
@@ -237,7 +248,15 @@ declare namespace gapi.client {
|
|
|
237
248
|
/** Settings for legacy Java features, supported in the Service YAML. */
|
|
238
249
|
javaSettings?: JavaSettings;
|
|
239
250
|
/** Launch stage of this version of the API. */
|
|
240
|
-
launchStage?:
|
|
251
|
+
launchStage?:
|
|
252
|
+
| 'LAUNCH_STAGE_UNSPECIFIED'
|
|
253
|
+
| 'UNIMPLEMENTED'
|
|
254
|
+
| 'PRELAUNCH'
|
|
255
|
+
| 'EARLY_ACCESS'
|
|
256
|
+
| 'ALPHA'
|
|
257
|
+
| 'BETA'
|
|
258
|
+
| 'GA'
|
|
259
|
+
| 'DEPRECATED';
|
|
241
260
|
/** Settings for Node client libraries. */
|
|
242
261
|
nodeSettings?: NodeSettings;
|
|
243
262
|
/** Settings for PHP client libraries. */
|
|
@@ -253,10 +272,13 @@ declare namespace gapi.client {
|
|
|
253
272
|
}
|
|
254
273
|
interface CommonLanguageSettings {
|
|
255
274
|
/** The destination where API teams want this client library to be published. */
|
|
256
|
-
destinations?:
|
|
275
|
+
destinations?:
|
|
276
|
+
| 'CLIENT_LIBRARY_DESTINATION_UNSPECIFIED'
|
|
277
|
+
| 'GITHUB'
|
|
278
|
+
| 'PACKAGE_MANAGER'[];
|
|
257
279
|
/** Link to automatically generated reference documentation. Example: https://cloud.google.com/nodejs/docs/reference/asset/latest */
|
|
258
280
|
referenceDocsUri?: string;
|
|
259
|
-
/** Configuration for which RPCs should be generated in the GAPIC client. */
|
|
281
|
+
/** Configuration for which RPCs should be generated in the GAPIC client. Note: This field should not be used in most cases. */
|
|
260
282
|
selectiveGapicGeneration?: SelectiveGapicGeneration;
|
|
261
283
|
}
|
|
262
284
|
interface ConsumerPolicy {
|
|
@@ -333,7 +355,10 @@ declare namespace gapi.client {
|
|
|
333
355
|
interface DeleteAdminQuotaPolicyMetadata {}
|
|
334
356
|
interface DisableServiceRequest {
|
|
335
357
|
/** Defines the behavior for checking service usage when disabling a service. */
|
|
336
|
-
checkIfServiceHasUsage?:
|
|
358
|
+
checkIfServiceHasUsage?:
|
|
359
|
+
| 'CHECK_IF_SERVICE_HAS_USAGE_UNSPECIFIED'
|
|
360
|
+
| 'SKIP'
|
|
361
|
+
| 'CHECK';
|
|
337
362
|
/** Indicates if services that are enabled and which depend on this service should also be disabled. If not set, an error will be generated if any enabled services depend on the service to be disabled. When set, the service, and any enabled services that depend on it, will be disabled together. */
|
|
338
363
|
disableDependentServices?: boolean;
|
|
339
364
|
}
|
|
@@ -392,7 +417,11 @@ declare namespace gapi.client {
|
|
|
392
417
|
}
|
|
393
418
|
interface EnableRule {
|
|
394
419
|
/** Client and resource project enable type. */
|
|
395
|
-
enableType?:
|
|
420
|
+
enableType?:
|
|
421
|
+
| 'ENABLE_TYPE_UNSPECIFIED'
|
|
422
|
+
| 'CLIENT'
|
|
423
|
+
| 'RESOURCE'
|
|
424
|
+
| 'V1_COMPATIBLE';
|
|
396
425
|
/** DEPRECATED: Please use field `values`. Service group should have prefix `groups/`. The names of the service groups that are enabled (Not Implemented). Example: `groups/googleServices`. */
|
|
397
426
|
groups?: string[];
|
|
398
427
|
/** DEPRECATED: Please use field `values`. Service should have prefix `services/`. The names of the services that are enabled. Example: `storage.googleapis.com`. */
|
|
@@ -427,7 +456,7 @@ declare namespace gapi.client {
|
|
|
427
456
|
/** The source context. */
|
|
428
457
|
sourceContext?: SourceContext;
|
|
429
458
|
/** The source syntax. */
|
|
430
|
-
syntax?:
|
|
459
|
+
syntax?: 'SYNTAX_PROTO2' | 'SYNTAX_PROTO3' | 'SYNTAX_EDITIONS';
|
|
431
460
|
}
|
|
432
461
|
interface EnumValue {
|
|
433
462
|
/** Enum value name. */
|
|
@@ -447,13 +476,36 @@ declare namespace gapi.client {
|
|
|
447
476
|
}
|
|
448
477
|
interface Field {
|
|
449
478
|
/** The field cardinality. */
|
|
450
|
-
cardinality?:
|
|
479
|
+
cardinality?:
|
|
480
|
+
| 'CARDINALITY_UNKNOWN'
|
|
481
|
+
| 'CARDINALITY_OPTIONAL'
|
|
482
|
+
| 'CARDINALITY_REQUIRED'
|
|
483
|
+
| 'CARDINALITY_REPEATED';
|
|
451
484
|
/** The string value of the default value of this field. Proto2 syntax only. */
|
|
452
485
|
defaultValue?: string;
|
|
453
486
|
/** The field JSON name. */
|
|
454
487
|
jsonName?: string;
|
|
455
488
|
/** The field type. */
|
|
456
|
-
kind?:
|
|
489
|
+
kind?:
|
|
490
|
+
| 'TYPE_UNKNOWN'
|
|
491
|
+
| 'TYPE_DOUBLE'
|
|
492
|
+
| 'TYPE_FLOAT'
|
|
493
|
+
| 'TYPE_INT64'
|
|
494
|
+
| 'TYPE_UINT64'
|
|
495
|
+
| 'TYPE_INT32'
|
|
496
|
+
| 'TYPE_FIXED64'
|
|
497
|
+
| 'TYPE_FIXED32'
|
|
498
|
+
| 'TYPE_BOOL'
|
|
499
|
+
| 'TYPE_STRING'
|
|
500
|
+
| 'TYPE_GROUP'
|
|
501
|
+
| 'TYPE_MESSAGE'
|
|
502
|
+
| 'TYPE_BYTES'
|
|
503
|
+
| 'TYPE_UINT32'
|
|
504
|
+
| 'TYPE_ENUM'
|
|
505
|
+
| 'TYPE_SFIXED32'
|
|
506
|
+
| 'TYPE_SFIXED64'
|
|
507
|
+
| 'TYPE_SINT32'
|
|
508
|
+
| 'TYPE_SINT64';
|
|
457
509
|
/** The field name. */
|
|
458
510
|
name?: string;
|
|
459
511
|
/** The field number. */
|
|
@@ -480,7 +532,7 @@ declare namespace gapi.client {
|
|
|
480
532
|
/** Service identity that service producer can use to access consumer resources. If exists is true, it contains email and unique_id. If exists is false, it contains pre-constructed email and empty unique_id. */
|
|
481
533
|
identity?: ServiceIdentity;
|
|
482
534
|
/** Service identity state. */
|
|
483
|
-
state?:
|
|
535
|
+
state?: 'IDENTITY_STATE_UNSPECIFIED' | 'ACTIVE';
|
|
484
536
|
}
|
|
485
537
|
interface GoogleApiService {
|
|
486
538
|
/** A list of API interfaces exported by this service. Only the `name` field of the google.protobuf.Api needs to be provided by the configuration author, as the remaining fields will be derived from the IDL during the normalization process. It is an error to specify an API interface here which cannot be resolved against the associated IDL files. */
|
|
@@ -503,7 +555,7 @@ declare namespace gapi.client {
|
|
|
503
555
|
customError?: CustomError;
|
|
504
556
|
/** Additional API documentation. */
|
|
505
557
|
documentation?: Documentation;
|
|
506
|
-
/** Configuration for network endpoints. If this is empty, then an endpoint with the same name as the service is automatically generated to service all defined APIs.
|
|
558
|
+
/** Configuration for network endpoints. If this is empty, then an endpoint with the same name as the service is automatically generated to service all defined APIs. */
|
|
507
559
|
endpoints?: Endpoint[];
|
|
508
560
|
/** A list of all enum types included in this API service. Enums referenced directly or indirectly by the `apis` are automatically included. Enums which are not referenced but shall be included should be listed here by name by the configuration author. Example: enums: - name: google.someapi.v1.SomeEnum */
|
|
509
561
|
enums?: Enum[];
|
|
@@ -546,7 +598,7 @@ declare namespace gapi.client {
|
|
|
546
598
|
/** Service identity that service producer can use to access consumer resources. If exists is true, it contains email and unique_id. If exists is false, it contains pre-constructed email and empty unique_id. */
|
|
547
599
|
identity?: GoogleApiServiceusageV1beta1ServiceIdentity;
|
|
548
600
|
/** Service identity state. */
|
|
549
|
-
state?:
|
|
601
|
+
state?: 'IDENTITY_STATE_UNSPECIFIED' | 'ACTIVE';
|
|
550
602
|
}
|
|
551
603
|
interface GoogleApiServiceusageV1beta1ServiceIdentity {
|
|
552
604
|
/** The email address of the service account that a service producer would use to access consumer resources. */
|
|
@@ -566,7 +618,7 @@ declare namespace gapi.client {
|
|
|
566
618
|
/** The resource name of the consumer. A valid name would be: - projects/123 */
|
|
567
619
|
parent?: string;
|
|
568
620
|
/** Whether or not the service has been enabled for use by the consumer. */
|
|
569
|
-
state?:
|
|
621
|
+
state?: 'STATE_UNSPECIFIED' | 'DISABLED' | 'ENABLED';
|
|
570
622
|
}
|
|
571
623
|
interface GoogleApiServiceusageV1ServiceConfig {
|
|
572
624
|
/** A list of API interfaces exported by this service. Contains only the names, versions, and method names of the interfaces. */
|
|
@@ -613,7 +665,10 @@ declare namespace gapi.client {
|
|
|
613
665
|
/** Output only. Analysis result of updating a policy. */
|
|
614
666
|
analysisResult?: GoogleApiServiceusageV2betaAnalysisResult;
|
|
615
667
|
/** Output only. The type of analysis. */
|
|
616
|
-
analysisType?:
|
|
668
|
+
analysisType?:
|
|
669
|
+
| 'ANALYSIS_TYPE_UNSPECIFIED'
|
|
670
|
+
| 'ANALYSIS_TYPE_DEPENDENCY'
|
|
671
|
+
| 'ANALYSIS_TYPE_RESOURCE_USAGE';
|
|
617
672
|
/** Output only. The user friendly display name of the analysis type. E.g. service dependency analysis, service resource usage analysis, etc. */
|
|
618
673
|
displayName?: string;
|
|
619
674
|
/** The names of the service that has analysis result of warnings or blockers. Example: `services/storage.googleapis.com`. */
|
|
@@ -650,7 +705,9 @@ declare namespace gapi.client {
|
|
|
650
705
|
/** Output only. User friendly impact detail in a free form message. */
|
|
651
706
|
detail?: string;
|
|
652
707
|
/** Output only. The type of impact. */
|
|
653
|
-
impactType?:
|
|
708
|
+
impactType?:
|
|
709
|
+
| 'IMPACT_TYPE_UNSPECIFIED'
|
|
710
|
+
| 'DEPENDENCY_MISSING_DEPENDENCIES';
|
|
654
711
|
/** Output only. This field will be populated only for the `DEPENDENCY_MISSING_DEPENDENCIES` impact type. Example: `services/compute.googleapis.com`. Impact.detail will be in format : `missing service dependency: {missing_dependency}.` */
|
|
655
712
|
missingDependency?: string;
|
|
656
713
|
}
|
|
@@ -714,7 +771,10 @@ declare namespace gapi.client {
|
|
|
714
771
|
/** Output only. User friendly impact detail in a free form message. */
|
|
715
772
|
detail?: string;
|
|
716
773
|
/** Output only. The type of impact. */
|
|
717
|
-
impactType?:
|
|
774
|
+
impactType?:
|
|
775
|
+
| 'IMPACT_TYPE_UNSPECIFIED'
|
|
776
|
+
| 'DEPENDENCY_MISSING_DEPENDENCIES'
|
|
777
|
+
| 'RESOURCE_EXISTENCE_PROJECT';
|
|
718
778
|
/** The parent resource that the analysis is based on and the service name that the analysis is for. Example: `projects/100/services/compute.googleapis.com`, folders/101/services/compute.googleapis.com` and `organizations/102/services/compute.googleapis.com`. Usually, the parent resource here is same as the parent resource of the analyzed policy. However, for some analysis types, the parent can be different. For example, for resource existence analysis, if the parent resource of the analyzed policy is a folder or an organization, the parent resource here can still be the project that contains the resources. */
|
|
719
779
|
parent?: string;
|
|
720
780
|
}
|
|
@@ -757,7 +817,7 @@ declare namespace gapi.client {
|
|
|
757
817
|
/** The label key. */
|
|
758
818
|
key?: string;
|
|
759
819
|
/** The type of data that can be assigned to the label. */
|
|
760
|
-
valueType?:
|
|
820
|
+
valueType?: 'STRING' | 'BOOL' | 'INT64';
|
|
761
821
|
}
|
|
762
822
|
interface ListOperationsResponse {
|
|
763
823
|
/** The standard List next-page token. */
|
|
@@ -805,26 +865,6 @@ declare namespace gapi.client {
|
|
|
805
865
|
/** Total polling timeout. Default value: 5 minutes. */
|
|
806
866
|
totalPollTimeout?: string;
|
|
807
867
|
}
|
|
808
|
-
interface McpEnableRule {
|
|
809
|
-
/** List of enabled MCP services. */
|
|
810
|
-
mcpServices?: McpService[];
|
|
811
|
-
}
|
|
812
|
-
interface McpPolicy {
|
|
813
|
-
/** Output only. The time the policy was created. For singleton policies (such as the `default` policy), this is the first touch of the policy. */
|
|
814
|
-
createTime?: string;
|
|
815
|
-
/** An opaque tag indicating the current version of the policy, used for concurrency control. */
|
|
816
|
-
etag?: string;
|
|
817
|
-
/** McpEnableRules contains MCP enablement related rules. */
|
|
818
|
-
mcpEnableRules?: McpEnableRule[];
|
|
819
|
-
/** Output only. The resource name of the policy. Only the `default` policy is supported. We allow the following formats: `projects/{PROJECT_NUMBER}/mcpPolicies/default`, `projects/{PROJECT_ID}/mcpPolicies/default`, `folders/{FOLDER_ID}/mcpPolicies/default`, `organizations/{ORG_ID}/mcpPolicies/default`. */
|
|
820
|
-
name?: string;
|
|
821
|
-
/** Output only. The time the policy was last updated. */
|
|
822
|
-
updateTime?: string;
|
|
823
|
-
}
|
|
824
|
-
interface McpService {
|
|
825
|
-
/** The names of the services that are enabled for MCP. Example: `services/library-example.googleapis.com` */
|
|
826
|
-
service?: string;
|
|
827
|
-
}
|
|
828
868
|
interface Method {
|
|
829
869
|
/** The source edition string, only valid when syntax is SYNTAX_EDITIONS. This field should be ignored, instead the edition should be inherited from Api. This is similar to Field and EnumValue. */
|
|
830
870
|
edition?: string;
|
|
@@ -841,7 +881,7 @@ declare namespace gapi.client {
|
|
|
841
881
|
/** The URL of the output message type. */
|
|
842
882
|
responseTypeUrl?: string;
|
|
843
883
|
/** The source syntax of this method. This field should be ignored, instead the syntax should be inherited from Api. This is similar to Field and EnumValue. */
|
|
844
|
-
syntax?:
|
|
884
|
+
syntax?: 'SYNTAX_PROTO2' | 'SYNTAX_PROTO3' | 'SYNTAX_EDITIONS';
|
|
845
885
|
}
|
|
846
886
|
interface MethodPolicy {
|
|
847
887
|
/** Policies that are applicable to the request message. */
|
|
@@ -867,11 +907,19 @@ declare namespace gapi.client {
|
|
|
867
907
|
/** The set of labels that can be used to describe a specific instance of this metric type. For example, the `appengine.googleapis.com/http/server/response_latencies` metric type has a label for the HTTP response code, `response_code`, so you can look at latencies for successful responses or just for responses that failed. */
|
|
868
908
|
labels?: LabelDescriptor[];
|
|
869
909
|
/** Optional. The launch stage of the metric definition. */
|
|
870
|
-
launchStage?:
|
|
910
|
+
launchStage?:
|
|
911
|
+
| 'LAUNCH_STAGE_UNSPECIFIED'
|
|
912
|
+
| 'UNIMPLEMENTED'
|
|
913
|
+
| 'PRELAUNCH'
|
|
914
|
+
| 'EARLY_ACCESS'
|
|
915
|
+
| 'ALPHA'
|
|
916
|
+
| 'BETA'
|
|
917
|
+
| 'GA'
|
|
918
|
+
| 'DEPRECATED';
|
|
871
919
|
/** Optional. Metadata which can be used to guide usage of the metric. */
|
|
872
920
|
metadata?: MetricDescriptorMetadata;
|
|
873
921
|
/** Whether the metric records instantaneous values, changes to a value, etc. Some combinations of `metric_kind` and `value_type` might not be supported. */
|
|
874
|
-
metricKind?:
|
|
922
|
+
metricKind?: 'METRIC_KIND_UNSPECIFIED' | 'GAUGE' | 'DELTA' | 'CUMULATIVE';
|
|
875
923
|
/** Read-only. If present, then a time series, which is identified partially by a metric type and a MonitoredResourceDescriptor, that is associated with this metric type can only be associated with one of the monitored resource types listed here. */
|
|
876
924
|
monitoredResourceTypes?: string[];
|
|
877
925
|
/** The resource name of the metric descriptor. */
|
|
@@ -881,17 +929,36 @@ declare namespace gapi.client {
|
|
|
881
929
|
/** The units in which the metric value is reported. It is only applicable if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The `unit` defines the representation of the stored metric values. Different systems might scale the values to be more easily displayed (so a value of `0.02kBy` _might_ be displayed as `20By`, and a value of `3523kBy` _might_ be displayed as `3.5MBy`). However, if the `unit` is `kBy`, then the value of the metric is always in thousands of bytes, no matter how it might be displayed. If you want a custom metric to record the exact number of CPU-seconds used by a job, you can create an `INT64 CUMULATIVE` metric whose `unit` is `s{CPU}` (or equivalently `1s{CPU}` or just `s`). If the job uses 12,005 CPU-seconds, then the value is written as `12005`. Alternatively, if you want a custom metric to record data in a more granular way, you can create a `DOUBLE CUMULATIVE` metric whose `unit` is `ks{CPU}`, and then write the value `12.005` (which is `12005/1000`), or use `Kis{CPU}` and write `11.723` (which is `12005/1024`). The supported units are a subset of [The Unified Code for Units of Measure](https://unitsofmeasure.org/ucum.html) standard: **Basic units (UNIT)** * `bit` bit * `By` byte * `s` second * `min` minute * `h` hour * `d` day * `1` dimensionless **Prefixes (PREFIX)** * `k` kilo (10^3) * `M` mega (10^6) * `G` giga (10^9) * `T` tera (10^12) * `P` peta (10^15) * `E` exa (10^18) * `Z` zetta (10^21) * `Y` yotta (10^24) * `m` milli (10^-3) * `u` micro (10^-6) * `n` nano (10^-9) * `p` pico (10^-12) * `f` femto (10^-15) * `a` atto (10^-18) * `z` zepto (10^-21) * `y` yocto (10^-24) * `Ki` kibi (2^10) * `Mi` mebi (2^20) * `Gi` gibi (2^30) * `Ti` tebi (2^40) * `Pi` pebi (2^50) **Grammar** The grammar also includes these connectors: * `/` division or ratio (as an infix operator). For examples, `kBy/{email}` or `MiBy/10ms` (although you should almost never have `/s` in a metric `unit`; rates should always be computed at query time from the underlying cumulative or delta value). * `.` multiplication or composition (as an infix operator). For examples, `GBy.d` or `k{watt}.h`. The grammar for a unit is as follows: Expression = Component { "." Component } { "/" Component } ; Component = ( [ PREFIX ] UNIT | "%" ) [ Annotation ] | Annotation | "1" ; Annotation = "{" NAME "}" ; Notes: * `Annotation` is just a comment if it follows a `UNIT`. If the annotation is used alone, then the unit is equivalent to `1`. For examples, `{request}/s == 1/s`, `By{transmitted}/s == By/s`. * `NAME` is a sequence of non-blank printable ASCII characters not containing `{` or `}`. * `1` represents a unitary [dimensionless unit](https://en.wikipedia.org/wiki/Dimensionless_quantity) of 1, such as in `1/s`. It is typically used when none of the basic units are appropriate. For example, "new users per day" can be represented as `1/d` or `{new-users}/d` (and a metric value `5` would mean "5 new users). Alternatively, "thousands of page views per day" would be represented as `1000/d` or `k1/d` or `k{page_views}/d` (and a metric value of `5.3` would mean "5300 page views per day"). * `%` represents dimensionless value of 1/100, and annotates values giving a percentage (so the metric values are typically in the range of 0..100, and a metric value `3` means "3 percent"). * `10^2.%` indicates a metric contains a ratio, typically in the range 0..1, that will be multiplied by 100 and displayed as a percentage (so a metric value `0.03` means "3 percent"). */
|
|
882
930
|
unit?: string;
|
|
883
931
|
/** Whether the measurement is an integer, a floating-point number, etc. Some combinations of `metric_kind` and `value_type` might not be supported. */
|
|
884
|
-
valueType?:
|
|
932
|
+
valueType?:
|
|
933
|
+
| 'VALUE_TYPE_UNSPECIFIED'
|
|
934
|
+
| 'BOOL'
|
|
935
|
+
| 'INT64'
|
|
936
|
+
| 'DOUBLE'
|
|
937
|
+
| 'STRING'
|
|
938
|
+
| 'DISTRIBUTION'
|
|
939
|
+
| 'MONEY';
|
|
885
940
|
}
|
|
886
941
|
interface MetricDescriptorMetadata {
|
|
887
942
|
/** The delay of data points caused by ingestion. Data points older than this age are guaranteed to be ingested and available to be read, excluding data loss due to errors. */
|
|
888
943
|
ingestDelay?: string;
|
|
889
944
|
/** Deprecated. Must use the MetricDescriptor.launch_stage instead. */
|
|
890
|
-
launchStage?:
|
|
945
|
+
launchStage?:
|
|
946
|
+
| 'LAUNCH_STAGE_UNSPECIFIED'
|
|
947
|
+
| 'UNIMPLEMENTED'
|
|
948
|
+
| 'PRELAUNCH'
|
|
949
|
+
| 'EARLY_ACCESS'
|
|
950
|
+
| 'ALPHA'
|
|
951
|
+
| 'BETA'
|
|
952
|
+
| 'GA'
|
|
953
|
+
| 'DEPRECATED';
|
|
891
954
|
/** The sampling period of metric data points. For metrics which are written periodically, consecutive data points are stored at this time interval, excluding data loss due to errors. Metrics with a higher granularity have a smaller sampling period. */
|
|
892
955
|
samplePeriod?: string;
|
|
893
956
|
/** The scope of the timeseries data of the metric. */
|
|
894
|
-
timeSeriesResourceHierarchyLevel?:
|
|
957
|
+
timeSeriesResourceHierarchyLevel?:
|
|
958
|
+
| 'TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED'
|
|
959
|
+
| 'PROJECT'
|
|
960
|
+
| 'ORGANIZATION'
|
|
961
|
+
| 'FOLDER'[];
|
|
895
962
|
}
|
|
896
963
|
interface MetricRule {
|
|
897
964
|
/** Metrics to update when the selected methods are called, and the associated cost applied to each metric. The key of the map is the metric name, and the values are the amount increased for the metric against which the quota limits are defined. The value must not be negative. */
|
|
@@ -913,7 +980,15 @@ declare namespace gapi.client {
|
|
|
913
980
|
/** Required. A set of labels used to describe instances of this monitored resource type. For example, an individual Google Cloud SQL database is identified by values for the labels `"database_id"` and `"zone"`. */
|
|
914
981
|
labels?: LabelDescriptor[];
|
|
915
982
|
/** Optional. The launch stage of the monitored resource definition. */
|
|
916
|
-
launchStage?:
|
|
983
|
+
launchStage?:
|
|
984
|
+
| 'LAUNCH_STAGE_UNSPECIFIED'
|
|
985
|
+
| 'UNIMPLEMENTED'
|
|
986
|
+
| 'PRELAUNCH'
|
|
987
|
+
| 'EARLY_ACCESS'
|
|
988
|
+
| 'ALPHA'
|
|
989
|
+
| 'BETA'
|
|
990
|
+
| 'GA'
|
|
991
|
+
| 'DEPRECATED';
|
|
917
992
|
/** Optional. The resource name of the monitored resource descriptor: `"projects/{project_id}/monitoredResourceDescriptors/{type}"` where {type} is the value of the `type` field in this object and {project_id} is a project ID that provides API-specific context for accessing the type. APIs that do not use project information can use the resource name format `"monitoredResourceDescriptors/{type}"`. */
|
|
918
993
|
name?: string;
|
|
919
994
|
/** Required. The monitored resource type. For example, the type `"cloudsql_database"` represents databases in Google Cloud SQL. For a list of types, see [Monitored resource types](https://cloud.google.com/monitoring/api/resources) and [Logging resource types](https://cloud.google.com/logging/docs/api/v2/resource-list). */
|
|
@@ -993,7 +1068,16 @@ declare namespace gapi.client {
|
|
|
993
1068
|
/** Link to a *public* URI where users can report issues. Example: https://issuetracker.google.com/issues/new?component=190865&template=1161103 */
|
|
994
1069
|
newIssueUri?: string;
|
|
995
1070
|
/** For whom the client library is being published. */
|
|
996
|
-
organization?:
|
|
1071
|
+
organization?:
|
|
1072
|
+
| 'CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED'
|
|
1073
|
+
| 'CLOUD'
|
|
1074
|
+
| 'ADS'
|
|
1075
|
+
| 'PHOTOS'
|
|
1076
|
+
| 'STREET_VIEW'
|
|
1077
|
+
| 'SHOPPING'
|
|
1078
|
+
| 'GEO'
|
|
1079
|
+
| 'GENERATIVE_AI'
|
|
1080
|
+
| 'HEALTH';
|
|
997
1081
|
/** Optional link to proto reference documentation. Example: https://cloud.google.com/pubsub/lite/docs/reference/rpc */
|
|
998
1082
|
protoReferenceDocumentationUri?: string;
|
|
999
1083
|
/** Optional link to REST reference documentation. Example: https://cloud.google.com/pubsub/lite/docs/reference/rest */
|
|
@@ -1076,13 +1160,13 @@ declare namespace gapi.client {
|
|
|
1076
1160
|
}
|
|
1077
1161
|
interface SourceInfo {
|
|
1078
1162
|
/** All files used during config generation. */
|
|
1079
|
-
sourceFiles?:
|
|
1163
|
+
sourceFiles?: {[P in string]: any}[];
|
|
1080
1164
|
}
|
|
1081
1165
|
interface Status {
|
|
1082
1166
|
/** The status code, which should be an enum value of google.rpc.Code. */
|
|
1083
1167
|
code?: number;
|
|
1084
1168
|
/** A list of messages that carry the error details. There is a common set of message types for APIs to use. */
|
|
1085
|
-
details?:
|
|
1169
|
+
details?: {[P in string]: any}[];
|
|
1086
1170
|
/** A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. */
|
|
1087
1171
|
message?: string;
|
|
1088
1172
|
}
|
|
@@ -1118,12 +1202,11 @@ declare namespace gapi.client {
|
|
|
1118
1202
|
/** The source context. */
|
|
1119
1203
|
sourceContext?: SourceContext;
|
|
1120
1204
|
/** The source syntax. */
|
|
1121
|
-
syntax?:
|
|
1205
|
+
syntax?: 'SYNTAX_PROTO2' | 'SYNTAX_PROTO3' | 'SYNTAX_EDITIONS';
|
|
1122
1206
|
}
|
|
1123
1207
|
interface UpdateAdminQuotaPolicyMetadata {}
|
|
1124
1208
|
interface UpdateConsumerPolicyMetadata {}
|
|
1125
1209
|
interface UpdateContentSecurityPolicyMetadata {}
|
|
1126
|
-
interface UpdateMcpPolicyMetadata {}
|
|
1127
1210
|
interface Usage {
|
|
1128
1211
|
/** The full resource name of a channel used for sending notifications to the service producer. Google Service Management currently only supports [Google Cloud Pub/Sub](https://cloud.google.com/pubsub) as a notification channel. To use Google Cloud Pub/Sub as the channel, this must be the name of a Cloud Pub/Sub topic that uses the Cloud Pub/Sub topic name format documented in https://cloud.google.com/pubsub/docs/overview. */
|
|
1129
1212
|
producerNotificationChannel?: string;
|
|
@@ -1144,11 +1227,11 @@ declare namespace gapi.client {
|
|
|
1144
1227
|
/** Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`. */
|
|
1145
1228
|
cancel(request: {
|
|
1146
1229
|
/** V1 error format. */
|
|
1147
|
-
'$.xgafv'?:
|
|
1230
|
+
'$.xgafv'?: '1' | '2';
|
|
1148
1231
|
/** OAuth access token. */
|
|
1149
1232
|
access_token?: string;
|
|
1150
1233
|
/** Data format for response. */
|
|
1151
|
-
alt?:
|
|
1234
|
+
alt?: 'json' | 'media' | 'proto';
|
|
1152
1235
|
/** JSONP */
|
|
1153
1236
|
callback?: string;
|
|
1154
1237
|
/** Selector specifying which fields to include in a partial response. */
|
|
@@ -1173,11 +1256,11 @@ declare namespace gapi.client {
|
|
|
1173
1256
|
cancel(
|
|
1174
1257
|
request: {
|
|
1175
1258
|
/** V1 error format. */
|
|
1176
|
-
'$.xgafv'?:
|
|
1259
|
+
'$.xgafv'?: '1' | '2';
|
|
1177
1260
|
/** OAuth access token. */
|
|
1178
1261
|
access_token?: string;
|
|
1179
1262
|
/** Data format for response. */
|
|
1180
|
-
alt?:
|
|
1263
|
+
alt?: 'json' | 'media' | 'proto';
|
|
1181
1264
|
/** JSONP */
|
|
1182
1265
|
callback?: string;
|
|
1183
1266
|
/** Selector specifying which fields to include in a partial response. */
|
|
@@ -1202,11 +1285,11 @@ declare namespace gapi.client {
|
|
|
1202
1285
|
/** Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. */
|
|
1203
1286
|
delete(request?: {
|
|
1204
1287
|
/** V1 error format. */
|
|
1205
|
-
'$.xgafv'?:
|
|
1288
|
+
'$.xgafv'?: '1' | '2';
|
|
1206
1289
|
/** OAuth access token. */
|
|
1207
1290
|
access_token?: string;
|
|
1208
1291
|
/** Data format for response. */
|
|
1209
|
-
alt?:
|
|
1292
|
+
alt?: 'json' | 'media' | 'proto';
|
|
1210
1293
|
/** JSONP */
|
|
1211
1294
|
callback?: string;
|
|
1212
1295
|
/** Selector specifying which fields to include in a partial response. */
|
|
@@ -1229,11 +1312,11 @@ declare namespace gapi.client {
|
|
|
1229
1312
|
/** 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. */
|
|
1230
1313
|
get(request?: {
|
|
1231
1314
|
/** V1 error format. */
|
|
1232
|
-
'$.xgafv'?:
|
|
1315
|
+
'$.xgafv'?: '1' | '2';
|
|
1233
1316
|
/** OAuth access token. */
|
|
1234
1317
|
access_token?: string;
|
|
1235
1318
|
/** Data format for response. */
|
|
1236
|
-
alt?:
|
|
1319
|
+
alt?: 'json' | 'media' | 'proto';
|
|
1237
1320
|
/** JSONP */
|
|
1238
1321
|
callback?: string;
|
|
1239
1322
|
/** Selector specifying which fields to include in a partial response. */
|
|
@@ -1256,11 +1339,11 @@ declare namespace gapi.client {
|
|
|
1256
1339
|
/** Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. */
|
|
1257
1340
|
list(request?: {
|
|
1258
1341
|
/** V1 error format. */
|
|
1259
|
-
'$.xgafv'?:
|
|
1342
|
+
'$.xgafv'?: '1' | '2';
|
|
1260
1343
|
/** OAuth access token. */
|
|
1261
1344
|
access_token?: string;
|
|
1262
1345
|
/** Data format for response. */
|
|
1263
|
-
alt?:
|
|
1346
|
+
alt?: 'json' | 'media' | 'proto';
|
|
1264
1347
|
/** JSONP */
|
|
1265
1348
|
callback?: string;
|
|
1266
1349
|
/** Selector specifying which fields to include in a partial response. */
|
|
@@ -1293,11 +1376,11 @@ declare namespace gapi.client {
|
|
|
1293
1376
|
/** Enable multiple services on a project. The operation is atomic: if enabling any service fails, then the entire batch fails, and no state changes occur. To enable a single service, use the `EnableService` method instead. */
|
|
1294
1377
|
batchEnable(request: {
|
|
1295
1378
|
/** V1 error format. */
|
|
1296
|
-
'$.xgafv'?:
|
|
1379
|
+
'$.xgafv'?: '1' | '2';
|
|
1297
1380
|
/** OAuth access token. */
|
|
1298
1381
|
access_token?: string;
|
|
1299
1382
|
/** Data format for response. */
|
|
1300
|
-
alt?:
|
|
1383
|
+
alt?: 'json' | 'media' | 'proto';
|
|
1301
1384
|
/** JSONP */
|
|
1302
1385
|
callback?: string;
|
|
1303
1386
|
/** Selector specifying which fields to include in a partial response. */
|
|
@@ -1322,11 +1405,11 @@ declare namespace gapi.client {
|
|
|
1322
1405
|
batchEnable(
|
|
1323
1406
|
request: {
|
|
1324
1407
|
/** V1 error format. */
|
|
1325
|
-
'$.xgafv'?:
|
|
1408
|
+
'$.xgafv'?: '1' | '2';
|
|
1326
1409
|
/** OAuth access token. */
|
|
1327
1410
|
access_token?: string;
|
|
1328
1411
|
/** Data format for response. */
|
|
1329
|
-
alt?:
|
|
1412
|
+
alt?: 'json' | 'media' | 'proto';
|
|
1330
1413
|
/** JSONP */
|
|
1331
1414
|
callback?: string;
|
|
1332
1415
|
/** Selector specifying which fields to include in a partial response. */
|
|
@@ -1351,11 +1434,11 @@ declare namespace gapi.client {
|
|
|
1351
1434
|
/** Returns the service configurations and enabled states for a given list of services. */
|
|
1352
1435
|
batchGet(request?: {
|
|
1353
1436
|
/** V1 error format. */
|
|
1354
|
-
'$.xgafv'?:
|
|
1437
|
+
'$.xgafv'?: '1' | '2';
|
|
1355
1438
|
/** OAuth access token. */
|
|
1356
1439
|
access_token?: string;
|
|
1357
1440
|
/** Data format for response. */
|
|
1358
|
-
alt?:
|
|
1441
|
+
alt?: 'json' | 'media' | 'proto';
|
|
1359
1442
|
/** JSONP */
|
|
1360
1443
|
callback?: string;
|
|
1361
1444
|
/** Selector specifying which fields to include in a partial response. */
|
|
@@ -1380,11 +1463,11 @@ declare namespace gapi.client {
|
|
|
1380
1463
|
/** Disable 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. */
|
|
1381
1464
|
disable(request: {
|
|
1382
1465
|
/** V1 error format. */
|
|
1383
|
-
'$.xgafv'?:
|
|
1466
|
+
'$.xgafv'?: '1' | '2';
|
|
1384
1467
|
/** OAuth access token. */
|
|
1385
1468
|
access_token?: string;
|
|
1386
1469
|
/** Data format for response. */
|
|
1387
|
-
alt?:
|
|
1470
|
+
alt?: 'json' | 'media' | 'proto';
|
|
1388
1471
|
/** JSONP */
|
|
1389
1472
|
callback?: string;
|
|
1390
1473
|
/** Selector specifying which fields to include in a partial response. */
|
|
@@ -1409,11 +1492,11 @@ declare namespace gapi.client {
|
|
|
1409
1492
|
disable(
|
|
1410
1493
|
request: {
|
|
1411
1494
|
/** V1 error format. */
|
|
1412
|
-
'$.xgafv'?:
|
|
1495
|
+
'$.xgafv'?: '1' | '2';
|
|
1413
1496
|
/** OAuth access token. */
|
|
1414
1497
|
access_token?: string;
|
|
1415
1498
|
/** Data format for response. */
|
|
1416
|
-
alt?:
|
|
1499
|
+
alt?: 'json' | 'media' | 'proto';
|
|
1417
1500
|
/** JSONP */
|
|
1418
1501
|
callback?: string;
|
|
1419
1502
|
/** Selector specifying which fields to include in a partial response. */
|
|
@@ -1438,11 +1521,11 @@ declare namespace gapi.client {
|
|
|
1438
1521
|
/** Enable a service so that it can be used with a project. */
|
|
1439
1522
|
enable(request: {
|
|
1440
1523
|
/** V1 error format. */
|
|
1441
|
-
'$.xgafv'?:
|
|
1524
|
+
'$.xgafv'?: '1' | '2';
|
|
1442
1525
|
/** OAuth access token. */
|
|
1443
1526
|
access_token?: string;
|
|
1444
1527
|
/** Data format for response. */
|
|
1445
|
-
alt?:
|
|
1528
|
+
alt?: 'json' | 'media' | 'proto';
|
|
1446
1529
|
/** JSONP */
|
|
1447
1530
|
callback?: string;
|
|
1448
1531
|
/** Selector specifying which fields to include in a partial response. */
|
|
@@ -1467,11 +1550,11 @@ declare namespace gapi.client {
|
|
|
1467
1550
|
enable(
|
|
1468
1551
|
request: {
|
|
1469
1552
|
/** V1 error format. */
|
|
1470
|
-
'$.xgafv'?:
|
|
1553
|
+
'$.xgafv'?: '1' | '2';
|
|
1471
1554
|
/** OAuth access token. */
|
|
1472
1555
|
access_token?: string;
|
|
1473
1556
|
/** Data format for response. */
|
|
1474
|
-
alt?:
|
|
1557
|
+
alt?: 'json' | 'media' | 'proto';
|
|
1475
1558
|
/** JSONP */
|
|
1476
1559
|
callback?: string;
|
|
1477
1560
|
/** Selector specifying which fields to include in a partial response. */
|
|
@@ -1496,11 +1579,11 @@ declare namespace gapi.client {
|
|
|
1496
1579
|
/** Returns the service configuration and enabled state for a given service. */
|
|
1497
1580
|
get(request?: {
|
|
1498
1581
|
/** V1 error format. */
|
|
1499
|
-
'$.xgafv'?:
|
|
1582
|
+
'$.xgafv'?: '1' | '2';
|
|
1500
1583
|
/** OAuth access token. */
|
|
1501
1584
|
access_token?: string;
|
|
1502
1585
|
/** Data format for response. */
|
|
1503
|
-
alt?:
|
|
1586
|
+
alt?: 'json' | 'media' | 'proto';
|
|
1504
1587
|
/** JSONP */
|
|
1505
1588
|
callback?: string;
|
|
1506
1589
|
/** Selector specifying which fields to include in a partial response. */
|
|
@@ -1523,11 +1606,11 @@ declare namespace gapi.client {
|
|
|
1523
1606
|
/** List 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. WARNING: If you need to query enabled services frequently or across an organization, you should use [Cloud Asset Inventory API](https://cloud.google.com/asset-inventory/docs/apis), which provides higher throughput and richer filtering capability. */
|
|
1524
1607
|
list(request?: {
|
|
1525
1608
|
/** V1 error format. */
|
|
1526
|
-
'$.xgafv'?:
|
|
1609
|
+
'$.xgafv'?: '1' | '2';
|
|
1527
1610
|
/** OAuth access token. */
|
|
1528
1611
|
access_token?: string;
|
|
1529
1612
|
/** Data format for response. */
|
|
1530
|
-
alt?:
|
|
1613
|
+
alt?: 'json' | 'media' | 'proto';
|
|
1531
1614
|
/** JSONP */
|
|
1532
1615
|
callback?: string;
|
|
1533
1616
|
/** Selector specifying which fields to include in a partial response. */
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -11,6 +11,23 @@ Install typings for Service Usage API:
|
|
|
11
11
|
npm install @types/gapi.client.serviceusage-v1 --save-dev
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
+
## TypeScript 6.0+
|
|
15
|
+
|
|
16
|
+
TypeScript 6.0 changed `types` to default to `[]`. You must now explicitly list type packages in `tsconfig.json`:
|
|
17
|
+
|
|
18
|
+
```json
|
|
19
|
+
{
|
|
20
|
+
"compilerOptions": {
|
|
21
|
+
"types": [
|
|
22
|
+
"gapi",
|
|
23
|
+
"gapi.auth2",
|
|
24
|
+
"gapi.client",
|
|
25
|
+
"gapi.client.serviceusage-v1"
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
|
|
14
31
|
## Usage
|
|
15
32
|
|
|
16
33
|
You need to initialize Google API client in your code:
|