@maxim_mazurok/gapi.client.servicecontrol-v1 0.0.20220729

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 ADDED
@@ -0,0 +1,1155 @@
1
+ /* Type definitions for non-npm package Service Control API v1 0.0 */
2
+ // Project: https://cloud.google.com/service-control/
3
+ // Definitions by: Maxim Mazurok <https://github.com/Maxim-Mazurok>
4
+ // Nick Amoscato <https://github.com/namoscato>
5
+ // Declan Vong <https://github.com/declanvong>
6
+ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
7
+ // TypeScript Version: 2.8
8
+
9
+ // IMPORTANT
10
+ // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
11
+ // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
12
+ // Generated from: https://servicecontrol.googleapis.com/$discovery/rest?version=v1
13
+ // Revision: 20220729
14
+
15
+ /// <reference types="gapi.client" />
16
+
17
+ declare namespace gapi.client {
18
+ /** Load Service Control API v1 */
19
+ function load(urlOrObject: "https://servicecontrol.googleapis.com/$discovery/rest?version=v1"): Promise<void>;
20
+ /** @deprecated Please load APIs with discovery documents. */
21
+ function load(name: "servicecontrol", version: "v1"): Promise<void>;
22
+ /** @deprecated Please load APIs with discovery documents. */
23
+ function load(name: "servicecontrol", version: "v1", callback: () => any): void;
24
+
25
+ namespace servicecontrol {
26
+ interface AllocateInfo {
27
+ /**
28
+ * A list of label keys that were unused by the server in processing the request. Thus, for similar requests repeated in a certain future time window, the caller can choose to ignore
29
+ * these labels in the requests to achieve better client-side cache hits and quota aggregation for rate quota. This field is not populated for allocation quota checks.
30
+ */
31
+ unusedArguments?: string[];
32
+ }
33
+ interface AllocateQuotaRequest {
34
+ /** Operation that describes the quota allocation. */
35
+ allocateOperation?: QuotaOperation;
36
+ /** Specifies which version of service configuration should be used to process the request. If unspecified or no matching version can be found, the latest one will be used. */
37
+ serviceConfigId?: string;
38
+ }
39
+ interface AllocateQuotaResponse {
40
+ /** Indicates the decision of the allocate. */
41
+ allocateErrors?: QuotaError[];
42
+ /** WARNING: DO NOT use this field until this warning message is removed. */
43
+ allocateInfo?: AllocateInfo;
44
+ /** The same operation_id value used in the AllocateQuotaRequest. Used for logging and diagnostics purposes. */
45
+ operationId?: string;
46
+ /**
47
+ * Quota metrics to indicate the result of allocation. Depending on the request, one or more of the following metrics will be included: 1. Per quota group or per quota metric
48
+ * incremental usage will be specified using the following delta metric : "serviceruntime.googleapis.com/api/consumer/quota_used_count" 2. The quota limit reached condition will be
49
+ * specified using the following boolean metric : "serviceruntime.googleapis.com/quota/exceeded"
50
+ */
51
+ quotaMetrics?: MetricValueSet[];
52
+ /** ID of the actual config used to process the request. */
53
+ serviceConfigId?: string;
54
+ }
55
+ interface Attributes {
56
+ /**
57
+ * The set of attributes. Each attribute's key can be up to 128 bytes long. The value can be a string up to 256 bytes, a signed 64-bit integer, or the Boolean values `true` and
58
+ * `false`. For example: "/instance_id": "my-instance" "/http/user_agent": "" "/http/request_bytes": 300 "abc.com/myattribute": true
59
+ */
60
+ attributeMap?: { [P in string]: AttributeValue };
61
+ /**
62
+ * The number of attributes that were discarded. Attributes can be discarded because their keys are too long or because there are too many attributes. If this value is 0 then all
63
+ * attributes are valid.
64
+ */
65
+ droppedAttributesCount?: number;
66
+ }
67
+ interface AttributeValue {
68
+ /** A Boolean value represented by `true` or `false`. */
69
+ boolValue?: boolean;
70
+ /** A 64-bit signed integer. */
71
+ intValue?: string;
72
+ /** A string up to 256 bytes long. */
73
+ stringValue?: TruncatableString;
74
+ }
75
+ interface AuditLog {
76
+ /** Authentication information. */
77
+ authenticationInfo?: AuthenticationInfo;
78
+ /** Authorization information. If there are multiple resources or permissions involved, then there is one AuthorizationInfo element for each {resource, permission} tuple. */
79
+ authorizationInfo?: AuthorizationInfo[];
80
+ /** Other service-specific data about the request, response, and other information associated with the current audited event. */
81
+ metadata?: { [P in string]: any };
82
+ /**
83
+ * The name of the service method or operation. For API calls, this should be the name of the API method. For example, "google.cloud.bigquery.v2.TableService.InsertTable"
84
+ * "google.logging.v2.ConfigServiceV2.CreateSink"
85
+ */
86
+ methodName?: string;
87
+ /** The number of items returned from a List or Query API method, if applicable. */
88
+ numResponseItems?: string;
89
+ /** Indicates the policy violations for this request. If the request is denied by the policy, violation information will be logged here. */
90
+ policyViolationInfo?: PolicyViolationInfo;
91
+ /**
92
+ * The operation request. This may not include all request parameters, such as those that are too large, privacy-sensitive, or duplicated elsewhere in the log record. It should never
93
+ * include user-generated data, such as file contents. When the JSON object represented here has a proto equivalent, the proto name will be indicated in the `@‍type` property.
94
+ */
95
+ request?: { [P in string]: any };
96
+ /** Metadata about the operation. */
97
+ requestMetadata?: RequestMetadata;
98
+ /** The resource location information. */
99
+ resourceLocation?: ResourceLocation;
100
+ /**
101
+ * The resource or collection that is the target of the operation. The name is a scheme-less URI, not including the API service name. For example:
102
+ * "projects/PROJECT_ID/zones/us-central1-a/instances" "projects/PROJECT_ID/datasets/DATASET_ID"
103
+ */
104
+ resourceName?: string;
105
+ /**
106
+ * The resource's original state before mutation. Present only for operations which have successfully modified the targeted resource(s). In general, this field should contain all
107
+ * changed fields, except those that are already been included in `request`, `response`, `metadata` or `service_data` fields. When the JSON object represented here has a proto
108
+ * equivalent, the proto name will be indicated in the `@‍type` property.
109
+ */
110
+ resourceOriginalState?: { [P in string]: any };
111
+ /**
112
+ * The operation response. This may not include all response elements, such as those that are too large, privacy-sensitive, or duplicated elsewhere in the log record. It should never
113
+ * include user-generated data, such as file contents. When the JSON object represented here has a proto equivalent, the proto name will be indicated in the `@‍type` property.
114
+ */
115
+ response?: { [P in string]: any };
116
+ /** Deprecated. Use the `metadata` field instead. Other service-specific data about the request, response, and other activities. */
117
+ serviceData?: { [P in string]: any };
118
+ /** The name of the API service performing the operation. For example, `"compute.googleapis.com"`. */
119
+ serviceName?: string;
120
+ /** The status of the overall operation. */
121
+ status?: Status;
122
+ }
123
+ interface Auth {
124
+ /**
125
+ * A list of access level resource names that allow resources to be accessed by authenticated requester. It is part of Secure GCP processing for the incoming request. An access level
126
+ * string has the format: "//{api_service_name}/accessPolicies/{policy_id}/accessLevels/{short_name}" Example:
127
+ * "//accesscontextmanager.googleapis.com/accessPolicies/MY_POLICY_ID/accessLevels/MY_LEVEL"
128
+ */
129
+ accessLevels?: string[];
130
+ /**
131
+ * The intended audience(s) for this authentication information. Reflects the audience (`aud`) claim within a JWT. The audience value(s) depends on the `issuer`, but typically include
132
+ * one or more of the following pieces of information: * The services intended to receive the credential. For example, ["https://pubsub.googleapis.com/",
133
+ * "https://storage.googleapis.com/"]. * A set of service-based scopes. For example, ["https://www.googleapis.com/auth/cloud-platform"]. * The client id of an app, such as the Firebase
134
+ * project id for JWTs from Firebase Auth. Consult the documentation for the credential issuer to determine the information provided.
135
+ */
136
+ audiences?: string[];
137
+ /**
138
+ * Structured claims presented with the credential. JWTs include `{key: value}` pairs for standard and private claims. The following is a subset of the standard required and optional
139
+ * claims that would typically be presented for a Google-based JWT: {'iss': 'accounts.google.com', 'sub': '113289723416554971153', 'aud': ['123456789012', 'pubsub.googleapis.com'],
140
+ * 'azp': '123456789012.apps.googleusercontent.com', 'email': 'jsmith@example.com', 'iat': 1353601026, 'exp': 1353604926} SAML assertions are similarly specified, but with an identity
141
+ * provider dependent structure.
142
+ */
143
+ claims?: { [P in string]: any };
144
+ /**
145
+ * The authorized presenter of the credential. Reflects the optional Authorized Presenter (`azp`) claim within a JWT or the OAuth client id. For example, a Google Cloud Platform client
146
+ * id looks as follows: "123456789012.apps.googleusercontent.com".
147
+ */
148
+ presenter?: string;
149
+ /**
150
+ * The authenticated principal. Reflects the issuer (`iss`) and subject (`sub`) claims within a JWT. The issuer and subject should be `/` delimited, with `/` percent-encoded within the
151
+ * subject fragment. For Google accounts, the principal format is: "https://accounts.google.com/{id}"
152
+ */
153
+ principal?: string;
154
+ }
155
+ interface AuthenticationInfo {
156
+ /** The authority selector specified by the requestor, if any. It is not guaranteed that the principal was allowed to use this authority. */
157
+ authoritySelector?: string;
158
+ /**
159
+ * The email address of the authenticated user (or service account on behalf of third party principal) making the request. For third party identity callers, the `principal_subject`
160
+ * field is populated instead of this field. For privacy reasons, the principal email address is sometimes redacted. For more information, see [Caller identities in audit
161
+ * logs](https://cloud.google.com/logging/docs/audit#user-id).
162
+ */
163
+ principalEmail?: string;
164
+ /** String representation of identity of requesting party. Populated for both first and third party identities. */
165
+ principalSubject?: string;
166
+ /**
167
+ * Identity delegation history of an authenticated service account that makes the request. It contains information on the real authorities that try to access GCP resources by
168
+ * delegating on a service account. When multiple authorities present, they are guaranteed to be sorted based on the original ordering of the identity delegation events.
169
+ */
170
+ serviceAccountDelegationInfo?: ServiceAccountDelegationInfo[];
171
+ /**
172
+ * The name of the service account key used to create or exchange credentials for authenticating the service account making the request. This is a scheme-less URI full resource name.
173
+ * For example: "//iam.googleapis.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}"
174
+ */
175
+ serviceAccountKeyName?: string;
176
+ /**
177
+ * The third party identification (if any) of the authenticated user making the request. When the JSON object represented here has a proto equivalent, the proto name will be indicated
178
+ * in the `@‍type` property.
179
+ */
180
+ thirdPartyPrincipal?: { [P in string]: any };
181
+ }
182
+ interface AuthorizationInfo {
183
+ /** Whether or not authorization for `resource` and `permission` was granted. */
184
+ granted?: boolean;
185
+ /** The required IAM permission. */
186
+ permission?: string;
187
+ /**
188
+ * The resource being accessed, as a REST-style or cloud resource string. For example: bigquery.googleapis.com/projects/PROJECTID/datasets/DATASETID or
189
+ * projects/PROJECTID/datasets/DATASETID
190
+ */
191
+ resource?: string;
192
+ /**
193
+ * Resource attributes used in IAM condition evaluation. This field contains resource attributes like resource type and resource name. To get the whole view of the attributes used in
194
+ * IAM condition evaluation, the user must also look into `AuditLog.request_metadata.request_attributes`.
195
+ */
196
+ resourceAttributes?: Resource;
197
+ }
198
+ interface CheckError {
199
+ /** The error code. */
200
+ code?: string;
201
+ /** Free-form text providing details on the error cause of the error. */
202
+ detail?: string;
203
+ /** Contains public information about the check error. If available, `status.code` will be non zero and client can propagate it out as public error. */
204
+ status?: Status;
205
+ /** Subject to whom this error applies. See the specific code enum for more details on this field. For example: - "project:" - "folder:" - "organization:" */
206
+ subject?: string;
207
+ }
208
+ interface CheckInfo {
209
+ /** Consumer info of this check. */
210
+ consumerInfo?: ConsumerInfo;
211
+ /** A list of fields and label keys that are ignored by the server. The client doesn't need to send them for following requests to improve performance and allow better aggregation. */
212
+ unusedArguments?: string[];
213
+ }
214
+ interface CheckRequest {
215
+ /** The operation to be checked. */
216
+ operation?: Operation;
217
+ /** Requests the project settings to be returned as part of the check response. */
218
+ requestProjectSettings?: boolean;
219
+ /** Specifies which version of service configuration should be used to process the request. If unspecified or no matching version can be found, the latest one will be used. */
220
+ serviceConfigId?: string;
221
+ /**
222
+ * Indicates if service activation check should be skipped for this request. Default behavior is to perform the check and apply relevant quota. WARNING: Setting this flag to "true"
223
+ * will disable quota enforcement.
224
+ */
225
+ skipActivationCheck?: boolean;
226
+ }
227
+ interface CheckResponse {
228
+ /**
229
+ * Indicate the decision of the check. If no check errors are present, the service should process the operation. Otherwise the service should use the list of errors to determine the
230
+ * appropriate action.
231
+ */
232
+ checkErrors?: CheckError[];
233
+ /** Feedback data returned from the server during processing a Check request. */
234
+ checkInfo?: CheckInfo;
235
+ /** The same operation_id value used in the CheckRequest. Used for logging and diagnostics purposes. */
236
+ operationId?: string;
237
+ /** Quota information for the check request associated with this response. */
238
+ quotaInfo?: QuotaInfo;
239
+ /** The actual config id used to process the request. */
240
+ serviceConfigId?: string;
241
+ /** The current service rollout id used to process the request. */
242
+ serviceRolloutId?: string;
243
+ }
244
+ interface ConsumerInfo {
245
+ /** The consumer identity number, can be Google cloud project number, folder number or organization number e.g. 1234567890. A value of 0 indicates no consumer number is found. */
246
+ consumerNumber?: string;
247
+ /**
248
+ * The Google cloud project number, e.g. 1234567890. A value of 0 indicates no project number is found. NOTE: This field is deprecated after Chemist support flexible consumer id. New
249
+ * code should not depend on this field anymore.
250
+ */
251
+ projectNumber?: string;
252
+ /** The type of the consumer which should have been defined in [Google Resource Manager](https://cloud.google.com/resource-manager/). */
253
+ type?: string;
254
+ }
255
+ interface Distribution {
256
+ /**
257
+ * The number of samples in each histogram bucket. `bucket_counts` are optional. If present, they must sum to the `count` value. The buckets are defined below in `bucket_option`. There
258
+ * are N buckets. `bucket_counts[0]` is the number of samples in the underflow bucket. `bucket_counts[1]` to `bucket_counts[N-1]` are the numbers of samples in each of the finite
259
+ * buckets. And `bucket_counts[N] is the number of samples in the overflow bucket. See the comments of `bucket_option` below for more details. Any suffix of trailing zeros may be
260
+ * omitted.
261
+ */
262
+ bucketCounts?: string[];
263
+ /** The total number of samples in the distribution. Must be >= 0. */
264
+ count?: string;
265
+ /** Example points. Must be in increasing order of `value` field. */
266
+ exemplars?: Exemplar[];
267
+ /** Buckets with arbitrary user-provided width. */
268
+ explicitBuckets?: ExplicitBuckets;
269
+ /** Buckets with exponentially growing width. */
270
+ exponentialBuckets?: ExponentialBuckets;
271
+ /** Buckets with constant width. */
272
+ linearBuckets?: LinearBuckets;
273
+ /** The maximum of the population of values. Ignored if `count` is zero. */
274
+ maximum?: number;
275
+ /** The arithmetic mean of the samples in the distribution. If `count` is zero then this field must be zero. */
276
+ mean?: number;
277
+ /** The minimum of the population of values. Ignored if `count` is zero. */
278
+ minimum?: number;
279
+ /**
280
+ * The sum of squared deviations from the mean: Sum[i=1..count]((x_i - mean)^2) where each x_i is a sample values. If `count` is zero then this field must be zero, otherwise validation
281
+ * of the request fails.
282
+ */
283
+ sumOfSquaredDeviation?: number;
284
+ }
285
+ interface Exemplar {
286
+ /**
287
+ * Contextual information about the example value. Examples are: Trace: type.googleapis.com/google.monitoring.v3.SpanContext Literal string:
288
+ * type.googleapis.com/google.protobuf.StringValue Labels dropped during aggregation: type.googleapis.com/google.monitoring.v3.DroppedLabels There may be only a single attachment of
289
+ * any given message type in a single exemplar, and this is enforced by the system.
290
+ */
291
+ attachments?: Array<{ [P in string]: any }>;
292
+ /** The observation (sampling) time of the above value. */
293
+ timestamp?: string;
294
+ /** Value of the exemplar point. This value determines to which bucket the exemplar belongs. */
295
+ value?: number;
296
+ }
297
+ interface ExplicitBuckets {
298
+ /**
299
+ * 'bound' is a list of strictly increasing boundaries between buckets. Note that a list of length N-1 defines N buckets because of fenceposting. See comments on `bucket_options` for
300
+ * details. The i'th finite bucket covers the interval [bound[i-1], bound[i]) where i ranges from 1 to bound_size() - 1. Note that there are no finite buckets at all if 'bound' only
301
+ * contains a single element; in that special case the single bound defines the boundary between the underflow and overflow buckets. bucket number lower bound upper bound i == 0
302
+ * (underflow) -inf bound[i] 0 < i < bound_size() bound[i-1] bound[i] i == bound_size() (overflow) bound[i-1] +inf
303
+ */
304
+ bounds?: number[];
305
+ }
306
+ interface ExponentialBuckets {
307
+ /**
308
+ * The i'th exponential bucket covers the interval [scale * growth_factor^(i-1), scale * growth_factor^i) where i ranges from 1 to num_finite_buckets inclusive. Must be larger than
309
+ * 1.0.
310
+ */
311
+ growthFactor?: number;
312
+ /** The number of finite buckets. With the underflow and overflow buckets, the total number of buckets is `num_finite_buckets` + 2. See comments on `bucket_options` for details. */
313
+ numFiniteBuckets?: number;
314
+ /** The i'th exponential bucket covers the interval [scale * growth_factor^(i-1), scale * growth_factor^i) where i ranges from 1 to num_finite_buckets inclusive. Must be > 0. */
315
+ scale?: number;
316
+ }
317
+ interface FirstPartyPrincipal {
318
+ /** The email address of a Google account. . */
319
+ principalEmail?: string;
320
+ /** Metadata about the service that uses the service account. . */
321
+ serviceMetadata?: { [P in string]: any };
322
+ }
323
+ interface HttpRequest {
324
+ /** The number of HTTP response bytes inserted into cache. Set only when a cache fill was attempted. */
325
+ cacheFillBytes?: string;
326
+ /** Whether or not an entity was served from cache (with or without validation). */
327
+ cacheHit?: boolean;
328
+ /** Whether or not a cache lookup was attempted. */
329
+ cacheLookup?: boolean;
330
+ /** Whether or not the response was validated with the origin server before being served from cache. This field is only meaningful if `cache_hit` is True. */
331
+ cacheValidatedWithOriginServer?: boolean;
332
+ /** The request processing latency on the server, from the time the request was received until the response was sent. */
333
+ latency?: string;
334
+ /** Protocol used for the request. Examples: "HTTP/1.1", "HTTP/2", "websocket" */
335
+ protocol?: string;
336
+ /** The referer URL of the request, as defined in [HTTP/1.1 Header Field Definitions](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). */
337
+ referer?: string;
338
+ /** The IP address (IPv4 or IPv6) of the client that issued the HTTP request. Examples: `"192.168.1.1"`, `"FE80::0202:B3FF:FE1E:8329"`. */
339
+ remoteIp?: string;
340
+ /** The request method. Examples: `"GET"`, `"HEAD"`, `"PUT"`, `"POST"`. */
341
+ requestMethod?: string;
342
+ /** The size of the HTTP request message in bytes, including the request headers and the request body. */
343
+ requestSize?: string;
344
+ /** The scheme (http, https), the host name, the path, and the query portion of the URL that was requested. Example: `"http://example.com/some/info?color=red"`. */
345
+ requestUrl?: string;
346
+ /** The size of the HTTP response message sent back to the client, in bytes, including the response headers and the response body. */
347
+ responseSize?: string;
348
+ /** The IP address (IPv4 or IPv6) of the origin server that the request was sent to. */
349
+ serverIp?: string;
350
+ /** The response code indicating the status of the response. Examples: 200, 404. */
351
+ status?: number;
352
+ /** The user agent sent by the client. Example: `"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)"`. */
353
+ userAgent?: string;
354
+ }
355
+ interface LinearBuckets {
356
+ /** The number of finite buckets. With the underflow and overflow buckets, the total number of buckets is `num_finite_buckets` + 2. See comments on `bucket_options` for details. */
357
+ numFiniteBuckets?: number;
358
+ /** The i'th linear bucket covers the interval [offset + (i-1) * width, offset + i * width) where i ranges from 1 to num_finite_buckets, inclusive. */
359
+ offset?: number;
360
+ /** The i'th linear bucket covers the interval [offset + (i-1) * width, offset + i * width) where i ranges from 1 to num_finite_buckets, inclusive. Must be strictly positive. */
361
+ width?: number;
362
+ }
363
+ interface LogEntry {
364
+ /** Optional. Information about the HTTP request associated with this log entry, if applicable. */
365
+ httpRequest?: HttpRequest;
366
+ /** A unique ID for the log entry used for deduplication. If omitted, the implementation will generate one based on operation_id. */
367
+ insertId?: string;
368
+ /** A set of user-defined (key, value) data that provides additional information about the log entry. */
369
+ labels?: { [P in string]: string };
370
+ /** Required. The log to which this log entry belongs. Examples: `"syslog"`, `"book_log"`. */
371
+ name?: string;
372
+ /** Optional. Information about an operation associated with the log entry, if applicable. */
373
+ operation?: LogEntryOperation;
374
+ /** The log entry payload, represented as a protocol buffer that is expressed as a JSON object. The only accepted type currently is AuditLog. */
375
+ protoPayload?: { [P in string]: any };
376
+ /** The severity of the log entry. The default value is `LogSeverity.DEFAULT`. */
377
+ severity?: string;
378
+ /** Optional. Source code location information associated with the log entry, if any. */
379
+ sourceLocation?: LogEntrySourceLocation;
380
+ /** The log entry payload, represented as a structure that is expressed as a JSON object. */
381
+ structPayload?: { [P in string]: any };
382
+ /** The log entry payload, represented as a Unicode string (UTF-8). */
383
+ textPayload?: string;
384
+ /** The time the event described by the log entry occurred. If omitted, defaults to operation start time. */
385
+ timestamp?: string;
386
+ /**
387
+ * Optional. Resource name of the trace associated with the log entry, if any. If this field contains a relative resource name, you can assume the name is relative to
388
+ * `//tracing.googleapis.com`. Example: `projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824`
389
+ */
390
+ trace?: string;
391
+ }
392
+ interface LogEntryOperation {
393
+ /** Optional. Set this to True if this is the first log entry in the operation. */
394
+ first?: boolean;
395
+ /** Optional. An arbitrary operation identifier. Log entries with the same identifier are assumed to be part of the same operation. */
396
+ id?: string;
397
+ /** Optional. Set this to True if this is the last log entry in the operation. */
398
+ last?: boolean;
399
+ /**
400
+ * Optional. An arbitrary producer identifier. The combination of `id` and `producer` must be globally unique. Examples for `producer`: `"MyDivision.MyBigCompany.com"`,
401
+ * `"github.com/MyProject/MyApplication"`.
402
+ */
403
+ producer?: string;
404
+ }
405
+ interface LogEntrySourceLocation {
406
+ /** Optional. Source file name. Depending on the runtime environment, this might be a simple name or a fully-qualified name. */
407
+ file?: string;
408
+ /**
409
+ * Optional. Human-readable name of the function or method being invoked, with optional context such as the class or package name. This information may be used in contexts such as the
410
+ * logs viewer, where a file and line number are less meaningful. The format can vary by language. For example: `qual.if.ied.Class.method` (Java), `dir/package.func` (Go), `function`
411
+ * (Python).
412
+ */
413
+ function?: string;
414
+ /** Optional. Line within the source file. 1-based; 0 indicates no line number available. */
415
+ line?: string;
416
+ }
417
+ interface MetricValue {
418
+ /** A boolean value. */
419
+ boolValue?: boolean;
420
+ /** A distribution value. */
421
+ distributionValue?: Distribution;
422
+ /** A double precision floating point value. */
423
+ doubleValue?: number;
424
+ /** The end of the time period over which this metric value's measurement applies. If not specified, google.api.servicecontrol.v1.Operation.end_time will be used. */
425
+ endTime?: string;
426
+ /** A signed 64-bit integer value. */
427
+ int64Value?: string;
428
+ /**
429
+ * The labels describing the metric value. See comments on google.api.servicecontrol.v1.Operation.labels for the overriding relationship. Note that this map must not contain monitored
430
+ * resource labels.
431
+ */
432
+ labels?: { [P in string]: string };
433
+ /** A money value. */
434
+ moneyValue?: Money;
435
+ /**
436
+ * The start of the time period over which this metric value's measurement applies. The time period has different semantics for different metric types (cumulative, delta, and gauge).
437
+ * See the metric definition documentation in the service configuration for details. If not specified, google.api.servicecontrol.v1.Operation.start_time will be used.
438
+ */
439
+ startTime?: string;
440
+ /** A text string value. */
441
+ stringValue?: string;
442
+ }
443
+ interface MetricValueSet {
444
+ /** The metric name defined in the service configuration. */
445
+ metricName?: string;
446
+ /** The values in this metric. */
447
+ metricValues?: MetricValue[];
448
+ }
449
+ interface Money {
450
+ /** The three-letter currency code defined in ISO 4217. */
451
+ currencyCode?: string;
452
+ /**
453
+ * Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units`
454
+ * is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and
455
+ * `nanos`=-750,000,000.
456
+ */
457
+ nanos?: number;
458
+ /** The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. */
459
+ units?: string;
460
+ }
461
+ interface Operation {
462
+ /**
463
+ * Identity of the consumer who is using the service. This field should be filled in for the operations initiated by a consumer, but not for service-initiated operations that are not
464
+ * related to a specific consumer. - This can be in one of the following formats: - project:PROJECT_ID, - project`_`number:PROJECT_NUMBER, - projects/PROJECT_ID or PROJECT_NUMBER, -
465
+ * folders/FOLDER_NUMBER, - organizations/ORGANIZATION_NUMBER, - api`_`key:API_KEY.
466
+ */
467
+ consumerId?: string;
468
+ /** End time of the operation. Required when the operation is used in ServiceController.Report, but optional when the operation is used in ServiceController.Check. */
469
+ endTime?: string;
470
+ /** DO NOT USE. This is an experimental field. */
471
+ importance?: string;
472
+ /**
473
+ * Labels describing the operation. Only the following labels are allowed: - Labels describing monitored resources as defined in the service configuration. - Default labels of metric
474
+ * values. When specified, labels defined in the metric value override these default. - The following labels defined by Google Cloud Platform: - `cloud.googleapis.com/location`
475
+ * describing the location where the operation happened, - `servicecontrol.googleapis.com/user_agent` describing the user agent of the API request, -
476
+ * `servicecontrol.googleapis.com/service_agent` describing the service used to handle the API request (e.g. ESP), - `servicecontrol.googleapis.com/platform` describing the platform
477
+ * where the API is served, such as App Engine, Compute Engine, or Kubernetes Engine.
478
+ */
479
+ labels?: { [P in string]: string };
480
+ /** Represents information to be logged. */
481
+ logEntries?: LogEntry[];
482
+ /**
483
+ * Represents information about this operation. Each MetricValueSet corresponds to a metric defined in the service configuration. The data type used in the MetricValueSet must agree
484
+ * with the data type specified in the metric definition. Within a single operation, it is not allowed to have more than one MetricValue instances that have the same metric names and
485
+ * identical label value combinations. If a request has such duplicated MetricValue instances, the entire request is rejected with an invalid argument error.
486
+ */
487
+ metricValueSets?: MetricValueSet[];
488
+ /**
489
+ * Identity of the operation. This must be unique within the scope of the service that generated the operation. If the service calls Check() and Report() on the same operation, the two
490
+ * calls should carry the same id. UUID version 4 is recommended, though not required. In scenarios where an operation is computed from existing information and an idempotent id is
491
+ * desirable for deduplication purpose, UUID version 5 is recommended. See RFC 4122 for details.
492
+ */
493
+ operationId?: string;
494
+ /** Fully qualified name of the operation. Reserved for future use. */
495
+ operationName?: string;
496
+ /** Represents the properties needed for quota check. Applicable only if this operation is for a quota check request. If this is not specified, no quota check will be performed. */
497
+ quotaProperties?: QuotaProperties;
498
+ /** The resources that are involved in the operation. The maximum supported number of entries in this field is 100. */
499
+ resources?: ResourceInfo[];
500
+ /** Required. Start time of the operation. */
501
+ startTime?: string;
502
+ /** Unimplemented. A list of Cloud Trace spans. The span names shall contain the id of the destination project which can be either the produce or the consumer project. */
503
+ traceSpans?: TraceSpan[];
504
+ /** Private Preview. This feature is only available for approved services. User defined labels for the resource that this operation is associated with. */
505
+ userLabels?: { [P in string]: string };
506
+ }
507
+ interface OrgPolicyViolationInfo {
508
+ /**
509
+ * Optional. Resource payload that is currently in scope and is subjected to orgpolicy conditions. This payload may be the subset of the actual Resource that may come in the request.
510
+ * This payload should not contain any core content.
511
+ */
512
+ payload?: { [P in string]: any };
513
+ /**
514
+ * Optional. Tags referenced on the resource at the time of evaluation. These also include the federated tags, if they are supplied in the CheckOrgPolicy or CheckCustomConstraints
515
+ * Requests. Optional field as of now. These tags are the Cloud tags that are available on the resource during the policy evaluation and will be available as part of the OrgPolicy
516
+ * check response for logging purposes.
517
+ */
518
+ resourceTags?: { [P in string]: string };
519
+ /** Optional. Resource type that the orgpolicy is checked against. Example: compute.googleapis.com/Instance, store.googleapis.com/bucket */
520
+ resourceType?: string;
521
+ /** Optional. Policy violations */
522
+ violationInfo?: ViolationInfo[];
523
+ }
524
+ interface Peer {
525
+ /** The IP address of the peer. */
526
+ ip?: string;
527
+ /** The labels associated with the peer. */
528
+ labels?: { [P in string]: string };
529
+ /** The network port of the peer. */
530
+ port?: string;
531
+ /**
532
+ * The identity of this peer. Similar to `Request.auth.principal`, but relative to the peer instead of the request. For example, the idenity associated with a load balancer that
533
+ * forwared the request.
534
+ */
535
+ principal?: string;
536
+ /** The CLDR country/region code associated with the above IP address. If the IP address is private, the `region_code` should reflect the physical location where this peer is running. */
537
+ regionCode?: string;
538
+ }
539
+ interface PolicyViolationInfo {
540
+ /** Indicates the orgpolicy violations for this resource. */
541
+ orgPolicyViolationInfo?: OrgPolicyViolationInfo;
542
+ }
543
+ interface QuotaError {
544
+ /** Error code. */
545
+ code?: string;
546
+ /** Free-form text that provides details on the cause of the error. */
547
+ description?: string;
548
+ /** Contains additional information about the quota error. If available, `status.code` will be non zero. */
549
+ status?: Status;
550
+ /** Subject to whom this error applies. See the specific enum for more details on this field. For example, "clientip:" or "project:". */
551
+ subject?: string;
552
+ }
553
+ interface QuotaInfo {
554
+ /**
555
+ * Quota Metrics that have exceeded quota limits. For QuotaGroup-based quota, this is QuotaGroup.name For QuotaLimit-based quota, this is QuotaLimit.name See: google.api.Quota
556
+ * Deprecated: Use quota_metrics to get per quota group limit exceeded status.
557
+ */
558
+ limitExceeded?: string[];
559
+ /**
560
+ * Map of quota group name to the actual number of tokens consumed. If the quota check was not successful, then this will not be populated due to no quota consumption. We are not
561
+ * merging this field with 'quota_metrics' field because of the complexity of scaling in Chemist client code base. For simplicity, we will keep this field for Castor (that scales quota
562
+ * usage) and 'quota_metrics' for SuperQuota (that doesn't scale quota usage).
563
+ */
564
+ quotaConsumed?: { [P in string]: number };
565
+ /**
566
+ * Quota metrics to indicate the usage. Depending on the check request, one or more of the following metrics will be included: 1. For rate quota, per quota group or per quota metric
567
+ * incremental usage will be specified using the following delta metric: "serviceruntime.googleapis.com/api/consumer/quota_used_count" 2. For allocation quota, per quota metric total
568
+ * usage will be specified using the following gauge metric: "serviceruntime.googleapis.com/allocation/consumer/quota_used_count" 3. For both rate quota and allocation quota, the quota
569
+ * limit reached condition will be specified using the following boolean metric: "serviceruntime.googleapis.com/quota/exceeded"
570
+ */
571
+ quotaMetrics?: MetricValueSet[];
572
+ }
573
+ interface QuotaOperation {
574
+ /** Identity of the consumer for whom this quota operation is being performed. This can be in one of the following formats: project:, project_number:, api_key:. */
575
+ consumerId?: string;
576
+ /** Labels describing the operation. */
577
+ labels?: { [P in string]: string };
578
+ /**
579
+ * Fully qualified name of the API method for which this quota operation is requested. This name is used for matching quota rules or metric rules and billing status rules defined in
580
+ * service configuration. This field should not be set if any of the following is true: (1) the quota operation is performed on non-API resources. (2) quota_metrics is set because the
581
+ * caller is doing quota override. Example of an RPC method name: google.example.library.v1.LibraryService.CreateShelf
582
+ */
583
+ methodName?: string;
584
+ /**
585
+ * Identity of the operation. For Allocation Quota, this is expected to be unique within the scope of the service that generated the operation, and guarantees idempotency in case of
586
+ * retries. In order to ensure best performance and latency in the Quota backends, operation_ids are optimally associated with time, so that related operations can be accessed fast in
587
+ * storage. For this reason, the recommended token for services that intend to operate at a high QPS is Unix time in nanos + UUID
588
+ */
589
+ operationId?: string;
590
+ /**
591
+ * Represents information about this operation. Each MetricValueSet corresponds to a metric defined in the service configuration. The data type used in the MetricValueSet must agree
592
+ * with the data type specified in the metric definition. Within a single operation, it is not allowed to have more than one MetricValue instances that have the same metric names and
593
+ * identical label value combinations. If a request has such duplicated MetricValue instances, the entire request is rejected with an invalid argument error. This field is mutually
594
+ * exclusive with method_name.
595
+ */
596
+ quotaMetrics?: MetricValueSet[];
597
+ /** Quota mode for this operation. */
598
+ quotaMode?: string;
599
+ }
600
+ interface QuotaProperties {
601
+ /** Quota mode for this operation. */
602
+ quotaMode?: string;
603
+ }
604
+ interface ReportError {
605
+ /** The Operation.operation_id value from the request. */
606
+ operationId?: string;
607
+ /** Details of the error when processing the Operation. */
608
+ status?: Status;
609
+ }
610
+ interface ReportRequest {
611
+ /**
612
+ * Operations to be reported. Typically the service should report one operation per request. Putting multiple operations into a single request is allowed, but should be used only when
613
+ * multiple operations are natually available at the time of the report. There is no limit on the number of operations in the same ReportRequest, however the ReportRequest size should
614
+ * be no larger than 1MB. See ReportResponse.report_errors for partial failure behavior.
615
+ */
616
+ operations?: Operation[];
617
+ /** Specifies which version of service config should be used to process the request. If unspecified or no matching version can be found, the latest one will be used. */
618
+ serviceConfigId?: string;
619
+ }
620
+ interface ReportResponse {
621
+ /**
622
+ * Partial failures, one for each `Operation` in the request that failed processing. There are three possible combinations of the RPC status: 1. The combination of a successful RPC
623
+ * status and an empty `report_errors` list indicates a complete success where all `Operations` in the request are processed successfully. 2. The combination of a successful RPC status
624
+ * and a non-empty `report_errors` list indicates a partial success where some `Operations` in the request succeeded. Each `Operation` that failed processing has a corresponding item
625
+ * in this list. 3. A failed RPC status indicates a general non-deterministic failure. When this happens, it's impossible to know which of the 'Operations' in the request succeeded or
626
+ * failed.
627
+ */
628
+ reportErrors?: ReportError[];
629
+ /** The actual config id used to process the request. */
630
+ serviceConfigId?: string;
631
+ /** The current service rollout id used to process the request. */
632
+ serviceRolloutId?: string;
633
+ }
634
+ interface Request {
635
+ /** The request authentication. May be absent for unauthenticated requests. Derived from the HTTP request `Authorization` header or equivalent. */
636
+ auth?: Auth;
637
+ /**
638
+ * The HTTP request headers. If multiple headers share the same key, they must be merged according to the HTTP spec. All header keys must be lowercased, because HTTP header keys are
639
+ * case-insensitive.
640
+ */
641
+ headers?: { [P in string]: string };
642
+ /** The HTTP request `Host` header value. */
643
+ host?: string;
644
+ /** The unique ID for a request, which can be propagated to downstream systems. The ID should have low probability of collision within a single day for a specific service. */
645
+ id?: string;
646
+ /** The HTTP request method, such as `GET`, `POST`. */
647
+ method?: string;
648
+ /** The HTTP URL path, excluding the query parameters. */
649
+ path?: string;
650
+ /**
651
+ * The network protocol used with the request, such as "http/1.1", "spdy/3", "h2", "h2c", "webrtc", "tcp", "udp", "quic". See
652
+ * https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids for details.
653
+ */
654
+ protocol?: string;
655
+ /** The HTTP URL query in the format of `name1=value1&name2=value2`, as it appears in the first line of the HTTP request. No decoding is performed. */
656
+ query?: string;
657
+ /** A special parameter for request reason. It is used by security systems to associate auditing information with a request. */
658
+ reason?: string;
659
+ /** The HTTP URL scheme, such as `http` and `https`. */
660
+ scheme?: string;
661
+ /** The HTTP request size in bytes. If unknown, it must be -1. */
662
+ size?: string;
663
+ /** The timestamp when the `destination` service receives the last byte of the request. */
664
+ time?: string;
665
+ }
666
+ interface RequestMetadata {
667
+ /**
668
+ * The IP address of the caller. For caller from internet, this will be public IPv4 or IPv6 address. For caller from a Compute Engine VM with external IP address, this will be the VM's
669
+ * external IP address. For caller from a Compute Engine VM without external IP address, if the VM is in the same organization (or project) as the accessed resource, `caller_ip` will
670
+ * be the VM's internal IPv4 address, otherwise the `caller_ip` will be redacted to "gce-internal-ip". See https://cloud.google.com/compute/docs/vpc/ for more information.
671
+ */
672
+ callerIp?: string;
673
+ /**
674
+ * The network of the caller. Set only if the network host project is part of the same GCP organization (or project) as the accessed resource. See
675
+ * https://cloud.google.com/compute/docs/vpc/ for more information. This is a scheme-less URI full resource name. For example:
676
+ * "//compute.googleapis.com/projects/PROJECT_ID/global/networks/NETWORK_ID"
677
+ */
678
+ callerNetwork?: string;
679
+ /**
680
+ * The user agent of the caller. This information is not authenticated and should be treated accordingly. For example: + `google-api-python-client/1.4.0`: The request was made by the
681
+ * Google API client for Python. + `Cloud SDK Command Line Tool apitools-client/1.0 gcloud/0.9.62`: The request was made by the Google Cloud SDK CLI (gcloud). + `AppEngine-Google;
682
+ * (+http://code.google.com/appengine; appid: s~my-project`: The request was made from the `my-project` App Engine app. NOLINT
683
+ */
684
+ callerSuppliedUserAgent?: string;
685
+ /**
686
+ * The destination of a network activity, such as accepting a TCP connection. In a multi hop network activity, the destination represents the receiver of the last hop. Only two fields
687
+ * are used in this message, Peer.port and Peer.ip. These fields are optionally populated by those services utilizing the IAM condition feature.
688
+ */
689
+ destinationAttributes?: Peer;
690
+ /**
691
+ * Request attributes used in IAM condition evaluation. This field contains request attributes like request time and access levels associated with the request. To get the whole view of
692
+ * the attributes used in IAM condition evaluation, the user must also look into `AuditLog.authentication_info.resource_attributes`.
693
+ */
694
+ requestAttributes?: Request;
695
+ }
696
+ interface Resource {
697
+ /**
698
+ * Annotations is an unstructured key-value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be
699
+ * preserved when modifying objects. More info: https://kubernetes.io/docs/user-guide/annotations
700
+ */
701
+ annotations?: { [P in string]: string };
702
+ /** Output only. The timestamp when the resource was created. This may be either the time creation was initiated or when it was completed. */
703
+ createTime?: string;
704
+ /** Output only. The timestamp when the resource was deleted. If the resource is not deleted, this must be empty. */
705
+ deleteTime?: string;
706
+ /** Mutable. The display name set by clients. Must be <= 63 characters. */
707
+ displayName?: string;
708
+ /**
709
+ * Output only. An opaque value that uniquely identifies a version or generation of a resource. It can be used to confirm that the client and server agree on the ordering of a resource
710
+ * being written.
711
+ */
712
+ etag?: string;
713
+ /** The labels or tags on the resource, such as AWS resource tags and Kubernetes resource labels. */
714
+ labels?: { [P in string]: string };
715
+ /**
716
+ * Immutable. The location of the resource. The location encoding is specific to the service provider, and new encoding may be introduced as the service evolves. For Google Cloud
717
+ * products, the encoding is what is used by Google Cloud APIs, such as `us-east1`, `aws-us-east-1`, and `azure-eastus2`. The semantics of `location` is identical to the
718
+ * `cloud.googleapis.com/location` label used by some Google Cloud APIs.
719
+ */
720
+ location?: string;
721
+ /**
722
+ * The stable identifier (name) of a resource on the `service`. A resource can be logically identified as "//{resource.service}/{resource.name}". The differences between a resource
723
+ * name and a URI are: * Resource name is a logical identifier, independent of network protocol and API version. For example, `//pubsub.googleapis.com/projects/123/topics/news-feed`. *
724
+ * URI often includes protocol and version information, so it can be used directly by applications. For example, `https://pubsub.googleapis.com/v1/projects/123/topics/news-feed`. See
725
+ * https://cloud.google.com/apis/design/resource_names for details.
726
+ */
727
+ name?: string;
728
+ /** The name of the service that this resource belongs to, such as `pubsub.googleapis.com`. The service may be different from the DNS hostname that actually serves the request. */
729
+ service?: string;
730
+ /**
731
+ * The type of the resource. The syntax is platform-specific because different platforms define their resources differently. For Google APIs, the type format must be
732
+ * "{service}/{kind}", such as "pubsub.googleapis.com/Topic".
733
+ */
734
+ type?: string;
735
+ /**
736
+ * The unique identifier of the resource. UID is unique in the time and space for this resource within the scope of the service. It is typically generated by the server on successful
737
+ * creation of a resource and must not be changed. UID is used to uniquely identify resources with resource name reuses. This should be a UUID4.
738
+ */
739
+ uid?: string;
740
+ /**
741
+ * Output only. The timestamp when the resource was last updated. Any change to the resource made by users must refresh this value. Changes to a resource made by the service should
742
+ * refresh this value.
743
+ */
744
+ updateTime?: string;
745
+ }
746
+ interface ResourceInfo {
747
+ /** The identifier of the parent of this resource instance. Must be in one of the following formats: - `projects/` - `folders/` - `organizations/` */
748
+ resourceContainer?: string;
749
+ /**
750
+ * The location of the resource. If not empty, the resource will be checked against location policy. The value must be a valid zone, region or multiregion. For example: "europe-west4"
751
+ * or "northamerica-northeast1-a"
752
+ */
753
+ resourceLocation?: string;
754
+ /** Name of the resource. This is used for auditing purposes. */
755
+ resourceName?: string;
756
+ }
757
+ interface ResourceLocation {
758
+ /**
759
+ * The locations of a resource after the execution of the operation. Requests to create or delete a location based resource must populate the 'current_locations' field and not the
760
+ * 'original_locations' field. For example: "europe-west1-a" "us-east1" "nam3"
761
+ */
762
+ currentLocations?: string[];
763
+ /**
764
+ * The locations of a resource prior to the execution of the operation. Requests that mutate the resource's location must populate both the 'original_locations' as well as the
765
+ * 'current_locations' fields. For example: "europe-west1-a" "us-east1" "nam3"
766
+ */
767
+ originalLocations?: string[];
768
+ }
769
+ interface ServiceAccountDelegationInfo {
770
+ /** First party (Google) identity as the real authority. */
771
+ firstPartyPrincipal?: FirstPartyPrincipal;
772
+ /**
773
+ * A string representing the principal_subject associated with the identity. For most identities, the format will be `principal://iam.googleapis.com/{identity pool
774
+ * name}/subject/{subject)` except for some GKE identities (GKE_WORKLOAD, FREEFORM, GKE_HUB_WORKLOAD) that are still in the legacy format `serviceAccount:{identity pool
775
+ * name}[{subject}]`
776
+ */
777
+ principalSubject?: string;
778
+ /** Third party identity as the real authority. */
779
+ thirdPartyPrincipal?: ThirdPartyPrincipal;
780
+ }
781
+ interface SpanContext {
782
+ /**
783
+ * The resource name of the span. The format is: projects/[PROJECT_ID_OR_NUMBER]/traces/[TRACE_ID]/spans/[SPAN_ID] `[TRACE_ID]` is a unique identifier for a trace within a project; it
784
+ * is a 32-character hexadecimal encoding of a 16-byte array. `[SPAN_ID]` is a unique identifier for a span within a trace; it is a 16-character hexadecimal encoding of an 8-byte
785
+ * array.
786
+ */
787
+ spanName?: string;
788
+ }
789
+ interface Status {
790
+ /** The status code, which should be an enum value of google.rpc.Code. */
791
+ code?: number;
792
+ /** A list of messages that carry the error details. There is a common set of message types for APIs to use. */
793
+ details?: Array<{ [P in string]: any }>;
794
+ /**
795
+ * 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
796
+ * client.
797
+ */
798
+ message?: string;
799
+ }
800
+ interface ThirdPartyPrincipal {
801
+ /** Metadata about third party identity. */
802
+ thirdPartyClaims?: { [P in string]: any };
803
+ }
804
+ interface TraceSpan {
805
+ /** A set of attributes on the span. You can have up to 32 attributes per span. */
806
+ attributes?: Attributes;
807
+ /** An optional number of child spans that were generated while this span was active. If set, allows implementation to detect missing child spans. */
808
+ childSpanCount?: number;
809
+ /**
810
+ * A description of the span's operation (up to 128 bytes). Stackdriver Trace displays the description in the Google Cloud Platform Console. For example, the display name can be a
811
+ * qualified method name or a file name and a line number where the operation is called. A best practice is to use the same display name within an application and at the same call
812
+ * point. This makes it easier to correlate spans in different traces.
813
+ */
814
+ displayName?: TruncatableString;
815
+ /**
816
+ * The end time of the span. On the client side, this is the time kept by the local machine where the span execution ends. On the server side, this is the time when the server
817
+ * application handler stops running.
818
+ */
819
+ endTime?: string;
820
+ /**
821
+ * The resource name of the span in the following format: projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/SPAN_ID is a unique identifier for a trace within a project; it is a
822
+ * 32-character hexadecimal encoding of a 16-byte array. [SPAN_ID] is a unique identifier for a span within a trace; it is a 16-character hexadecimal encoding of an 8-byte array.
823
+ */
824
+ name?: string;
825
+ /** The [SPAN_ID] of this span's parent span. If this is a root span, then this field must be empty. */
826
+ parentSpanId?: string;
827
+ /**
828
+ * (Optional) Set this parameter to indicate whether this span is in the same process as its parent. If you do not set this parameter, Stackdriver Trace is unable to take advantage of
829
+ * this helpful information.
830
+ */
831
+ sameProcessAsParentSpan?: boolean;
832
+ /** The [SPAN_ID] portion of the span's resource name. */
833
+ spanId?: string;
834
+ /**
835
+ * Distinguishes between spans generated in a particular context. For example, two spans with the same name may be distinguished using `CLIENT` (caller) and `SERVER` (callee) to
836
+ * identify an RPC call.
837
+ */
838
+ spanKind?: string;
839
+ /**
840
+ * The start time of the span. On the client side, this is the time kept by the local machine where the span execution starts. On the server side, this is the time when the server's
841
+ * application handler starts running.
842
+ */
843
+ startTime?: string;
844
+ /** An optional final status for this span. */
845
+ status?: Status;
846
+ }
847
+ interface TruncatableString {
848
+ /** The number of bytes removed from the original string. If this value is 0, then the string was not shortened. */
849
+ truncatedByteCount?: number;
850
+ /**
851
+ * The shortened string. For example, if the original string is 500 bytes long and the limit of the string is 128 bytes, then `value` contains the first 128 bytes of the 500-byte
852
+ * string. Truncation always happens on a UTF8 character boundary. If there are multi-byte characters in the string, then the length of the shortened string might be less than the size
853
+ * limit.
854
+ */
855
+ value?: string;
856
+ }
857
+ interface V1HttpRequest {
858
+ /** The number of HTTP response bytes inserted into cache. Set only when a cache fill was attempted. */
859
+ cacheFillBytes?: string;
860
+ /** Whether or not an entity was served from cache (with or without validation). */
861
+ cacheHit?: boolean;
862
+ /** Whether or not a cache lookup was attempted. */
863
+ cacheLookup?: boolean;
864
+ /** Whether or not the response was validated with the origin server before being served from cache. This field is only meaningful if `cache_hit` is True. */
865
+ cacheValidatedWithOriginServer?: boolean;
866
+ /** The request processing latency on the server, from the time the request was received until the response was sent. */
867
+ latency?: string;
868
+ /** Protocol used for the request. Examples: "HTTP/1.1", "HTTP/2", "websocket" */
869
+ protocol?: string;
870
+ /** The referer URL of the request, as defined in [HTTP/1.1 Header Field Definitions](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). */
871
+ referer?: string;
872
+ /** The IP address (IPv4 or IPv6) of the client that issued the HTTP request. Examples: `"192.168.1.1"`, `"FE80::0202:B3FF:FE1E:8329"`. */
873
+ remoteIp?: string;
874
+ /** The request method. Examples: `"GET"`, `"HEAD"`, `"PUT"`, `"POST"`. */
875
+ requestMethod?: string;
876
+ /** The size of the HTTP request message in bytes, including the request headers and the request body. */
877
+ requestSize?: string;
878
+ /** The scheme (http, https), the host name, the path, and the query portion of the URL that was requested. Example: `"http://example.com/some/info?color=red"`. */
879
+ requestUrl?: string;
880
+ /** The size of the HTTP response message sent back to the client, in bytes, including the response headers and the response body. */
881
+ responseSize?: string;
882
+ /** The IP address (IPv4 or IPv6) of the origin server that the request was sent to. */
883
+ serverIp?: string;
884
+ /** The response code indicating the status of the response. Examples: 200, 404. */
885
+ status?: number;
886
+ /** The user agent sent by the client. Example: `"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)"`. */
887
+ userAgent?: string;
888
+ }
889
+ interface V1LogEntry {
890
+ /** Optional. Information about the HTTP request associated with this log entry, if applicable. */
891
+ httpRequest?: V1HttpRequest;
892
+ /** A unique ID for the log entry used for deduplication. If omitted, the implementation will generate one based on operation_id. */
893
+ insertId?: string;
894
+ /** A set of user-defined (key, value) data that provides additional information about the log entry. */
895
+ labels?: { [P in string]: string };
896
+ /** A set of user-defined (key, value) data that provides additional information about the moniotored resource that the log entry belongs to. */
897
+ monitoredResourceLabels?: { [P in string]: string };
898
+ /** Required. The log to which this log entry belongs. Examples: `"syslog"`, `"book_log"`. */
899
+ name?: string;
900
+ /** Optional. Information about an operation associated with the log entry, if applicable. */
901
+ operation?: V1LogEntryOperation;
902
+ /** The log entry payload, represented as a protocol buffer that is expressed as a JSON object. The only accepted type currently is AuditLog. */
903
+ protoPayload?: { [P in string]: any };
904
+ /** The severity of the log entry. The default value is `LogSeverity.DEFAULT`. */
905
+ severity?: string;
906
+ /** Optional. Source code location information associated with the log entry, if any. */
907
+ sourceLocation?: V1LogEntrySourceLocation;
908
+ /** The log entry payload, represented as a structure that is expressed as a JSON object. */
909
+ structPayload?: { [P in string]: any };
910
+ /** The log entry payload, represented as a Unicode string (UTF-8). */
911
+ textPayload?: string;
912
+ /** The time the event described by the log entry occurred. If omitted, defaults to operation start time. */
913
+ timestamp?: string;
914
+ /**
915
+ * Optional. Resource name of the trace associated with the log entry, if any. If this field contains a relative resource name, you can assume the name is relative to
916
+ * `//tracing.googleapis.com`. Example: `projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824`
917
+ */
918
+ trace?: string;
919
+ }
920
+ interface V1LogEntryOperation {
921
+ /** Optional. Set this to True if this is the first log entry in the operation. */
922
+ first?: boolean;
923
+ /** Optional. An arbitrary operation identifier. Log entries with the same identifier are assumed to be part of the same operation. */
924
+ id?: string;
925
+ /** Optional. Set this to True if this is the last log entry in the operation. */
926
+ last?: boolean;
927
+ /**
928
+ * Optional. An arbitrary producer identifier. The combination of `id` and `producer` must be globally unique. Examples for `producer`: `"MyDivision.MyBigCompany.com"`,
929
+ * `"github.com/MyProject/MyApplication"`.
930
+ */
931
+ producer?: string;
932
+ }
933
+ interface V1LogEntrySourceLocation {
934
+ /** Optional. Source file name. Depending on the runtime environment, this might be a simple name or a fully-qualified name. */
935
+ file?: string;
936
+ /**
937
+ * Optional. Human-readable name of the function or method being invoked, with optional context such as the class or package name. This information may be used in contexts such as the
938
+ * logs viewer, where a file and line number are less meaningful. The format can vary by language. For example: `qual.if.ied.Class.method` (Java), `dir/package.func` (Go), `function`
939
+ * (Python).
940
+ */
941
+ function?: string;
942
+ /** Optional. Line within the source file. 1-based; 0 indicates no line number available. */
943
+ line?: string;
944
+ }
945
+ interface ViolationInfo {
946
+ /** Optional. Value that is being checked for the policy. This could be in encrypted form (if pii sensitive). This field will only be emitted in LIST_POLICY types */
947
+ checkedValue?: string;
948
+ /** Optional. Constraint name */
949
+ constraint?: string;
950
+ /** Optional. Error message that policy is indicating. */
951
+ errorMessage?: string;
952
+ /** Optional. Indicates the type of the policy. */
953
+ policyType?: string;
954
+ }
955
+ interface ServicesResource {
956
+ /**
957
+ * Attempts to allocate quota for the specified consumer. It should be called before the operation is executed. This method requires the `servicemanagement.services.quota` permission
958
+ * on the specified service. For more information, see [Cloud IAM](https://cloud.google.com/iam). **NOTE:** The client **must** fail-open on server errors `INTERNAL`, `UNKNOWN`,
959
+ * `DEADLINE_EXCEEDED`, and `UNAVAILABLE`. To ensure system reliability, the server may inject these errors to prohibit any hard dependency on the quota functionality.
960
+ */
961
+ allocateQuota(request: {
962
+ /** V1 error format. */
963
+ "$.xgafv"?: string;
964
+ /** OAuth access token. */
965
+ access_token?: string;
966
+ /** Data format for response. */
967
+ alt?: string;
968
+ /** JSONP */
969
+ callback?: string;
970
+ /** Selector specifying which fields to include in a partial response. */
971
+ fields?: string;
972
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
973
+ key?: string;
974
+ /** OAuth 2.0 token for the current user. */
975
+ oauth_token?: string;
976
+ /** Returns response with indentations and line breaks. */
977
+ prettyPrint?: boolean;
978
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
979
+ quotaUser?: string;
980
+ /** Name of the service as specified in the service configuration. For example, `"pubsub.googleapis.com"`. See google.api.Service for the definition of a service name. */
981
+ serviceName: string;
982
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
983
+ upload_protocol?: string;
984
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
985
+ uploadType?: string;
986
+ /** Request body */
987
+ resource: AllocateQuotaRequest;
988
+ }): client.Request<AllocateQuotaResponse>;
989
+ allocateQuota(request: {
990
+ /** V1 error format. */
991
+ "$.xgafv"?: string;
992
+ /** OAuth access token. */
993
+ access_token?: string;
994
+ /** Data format for response. */
995
+ alt?: string;
996
+ /** JSONP */
997
+ callback?: string;
998
+ /** Selector specifying which fields to include in a partial response. */
999
+ fields?: string;
1000
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1001
+ key?: string;
1002
+ /** OAuth 2.0 token for the current user. */
1003
+ oauth_token?: string;
1004
+ /** Returns response with indentations and line breaks. */
1005
+ prettyPrint?: boolean;
1006
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1007
+ quotaUser?: string;
1008
+ /** Name of the service as specified in the service configuration. For example, `"pubsub.googleapis.com"`. See google.api.Service for the definition of a service name. */
1009
+ serviceName: string;
1010
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1011
+ upload_protocol?: string;
1012
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1013
+ uploadType?: string;
1014
+ },
1015
+ body: AllocateQuotaRequest): client.Request<AllocateQuotaResponse>;
1016
+ /**
1017
+ * Checks whether an operation on a service should be allowed to proceed based on the configuration of the service and related policies. It must be called before the operation is
1018
+ * executed. If feasible, the client should cache the check results and reuse them for 60 seconds. In case of any server errors, the client should rely on the cached results for much
1019
+ * longer time to avoid outage. WARNING: There is general 60s delay for the configuration and policy propagation, therefore callers MUST NOT depend on the `Check` method having the
1020
+ * latest policy information. NOTE: the CheckRequest has the size limit (wire-format byte size) of 1MB. This method requires the `servicemanagement.services.check` permission on the
1021
+ * specified service. For more information, see [Cloud IAM](https://cloud.google.com/iam).
1022
+ */
1023
+ check(request: {
1024
+ /** V1 error format. */
1025
+ "$.xgafv"?: string;
1026
+ /** OAuth access token. */
1027
+ access_token?: string;
1028
+ /** Data format for response. */
1029
+ alt?: string;
1030
+ /** JSONP */
1031
+ callback?: string;
1032
+ /** Selector specifying which fields to include in a partial response. */
1033
+ fields?: string;
1034
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1035
+ key?: string;
1036
+ /** OAuth 2.0 token for the current user. */
1037
+ oauth_token?: string;
1038
+ /** Returns response with indentations and line breaks. */
1039
+ prettyPrint?: boolean;
1040
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1041
+ quotaUser?: string;
1042
+ /**
1043
+ * The service name as specified in its service configuration. For example, `"pubsub.googleapis.com"`. See
1044
+ * [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service) for the definition of a service name.
1045
+ */
1046
+ serviceName: string;
1047
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1048
+ upload_protocol?: string;
1049
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1050
+ uploadType?: string;
1051
+ /** Request body */
1052
+ resource: CheckRequest;
1053
+ }): client.Request<CheckResponse>;
1054
+ check(request: {
1055
+ /** V1 error format. */
1056
+ "$.xgafv"?: string;
1057
+ /** OAuth access token. */
1058
+ access_token?: string;
1059
+ /** Data format for response. */
1060
+ alt?: string;
1061
+ /** JSONP */
1062
+ callback?: string;
1063
+ /** Selector specifying which fields to include in a partial response. */
1064
+ fields?: string;
1065
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1066
+ key?: string;
1067
+ /** OAuth 2.0 token for the current user. */
1068
+ oauth_token?: string;
1069
+ /** Returns response with indentations and line breaks. */
1070
+ prettyPrint?: boolean;
1071
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1072
+ quotaUser?: string;
1073
+ /**
1074
+ * The service name as specified in its service configuration. For example, `"pubsub.googleapis.com"`. See
1075
+ * [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service) for the definition of a service name.
1076
+ */
1077
+ serviceName: string;
1078
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1079
+ upload_protocol?: string;
1080
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1081
+ uploadType?: string;
1082
+ },
1083
+ body: CheckRequest): client.Request<CheckResponse>;
1084
+ /**
1085
+ * Reports operation results to Google Service Control, such as logs and metrics. It should be called after an operation is completed. If feasible, the client should aggregate
1086
+ * reporting data for up to 5 seconds to reduce API traffic. Limiting aggregation to 5 seconds is to reduce data loss during client crashes. Clients should carefully choose the
1087
+ * aggregation time window to avoid data loss risk more than 0.01% for business and compliance reasons. NOTE: the ReportRequest has the size limit (wire-format byte size) of 1MB. This
1088
+ * method requires the `servicemanagement.services.report` permission on the specified service. For more information, see [Google Cloud IAM](https://cloud.google.com/iam).
1089
+ */
1090
+ report(request: {
1091
+ /** V1 error format. */
1092
+ "$.xgafv"?: string;
1093
+ /** OAuth access token. */
1094
+ access_token?: string;
1095
+ /** Data format for response. */
1096
+ alt?: string;
1097
+ /** JSONP */
1098
+ callback?: string;
1099
+ /** Selector specifying which fields to include in a partial response. */
1100
+ fields?: string;
1101
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1102
+ key?: string;
1103
+ /** OAuth 2.0 token for the current user. */
1104
+ oauth_token?: string;
1105
+ /** Returns response with indentations and line breaks. */
1106
+ prettyPrint?: boolean;
1107
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1108
+ quotaUser?: string;
1109
+ /**
1110
+ * The service name as specified in its service configuration. For example, `"pubsub.googleapis.com"`. See
1111
+ * [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service) for the definition of a service name.
1112
+ */
1113
+ serviceName: string;
1114
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1115
+ upload_protocol?: string;
1116
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1117
+ uploadType?: string;
1118
+ /** Request body */
1119
+ resource: ReportRequest;
1120
+ }): client.Request<ReportResponse>;
1121
+ report(request: {
1122
+ /** V1 error format. */
1123
+ "$.xgafv"?: string;
1124
+ /** OAuth access token. */
1125
+ access_token?: string;
1126
+ /** Data format for response. */
1127
+ alt?: string;
1128
+ /** JSONP */
1129
+ callback?: string;
1130
+ /** Selector specifying which fields to include in a partial response. */
1131
+ fields?: string;
1132
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1133
+ key?: string;
1134
+ /** OAuth 2.0 token for the current user. */
1135
+ oauth_token?: string;
1136
+ /** Returns response with indentations and line breaks. */
1137
+ prettyPrint?: boolean;
1138
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1139
+ quotaUser?: string;
1140
+ /**
1141
+ * The service name as specified in its service configuration. For example, `"pubsub.googleapis.com"`. See
1142
+ * [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service) for the definition of a service name.
1143
+ */
1144
+ serviceName: string;
1145
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1146
+ upload_protocol?: string;
1147
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1148
+ uploadType?: string;
1149
+ },
1150
+ body: ReportRequest): client.Request<ReportResponse>;
1151
+ }
1152
+
1153
+ const services: ServicesResource;
1154
+ }
1155
+ }