@maxim_mazurok/gapi.client.cloudfunctions-v1 0.0.20220805

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,1205 @@
1
+ /* Type definitions for non-npm package Cloud Functions API v1 0.0 */
2
+ // Project: https://cloud.google.com/functions
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://cloudfunctions.googleapis.com/$discovery/rest?version=v1
13
+ // Revision: 20220805
14
+
15
+ /// <reference types="gapi.client" />
16
+
17
+ declare namespace gapi.client {
18
+ /** Load Cloud Functions API v1 */
19
+ function load(urlOrObject: "https://cloudfunctions.googleapis.com/$discovery/rest?version=v1"): Promise<void>;
20
+ /** @deprecated Please load APIs with discovery documents. */
21
+ function load(name: "cloudfunctions", version: "v1"): Promise<void>;
22
+ /** @deprecated Please load APIs with discovery documents. */
23
+ function load(name: "cloudfunctions", version: "v1", callback: () => any): void;
24
+
25
+ namespace cloudfunctions {
26
+ interface AuditConfig {
27
+ /** The configuration for logging of each type of permission. */
28
+ auditLogConfigs?: AuditLogConfig[];
29
+ /**
30
+ * Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all
31
+ * services.
32
+ */
33
+ service?: string;
34
+ }
35
+ interface AuditLogConfig {
36
+ /** Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members. */
37
+ exemptedMembers?: string[];
38
+ /** The log type that this config enables. */
39
+ logType?: string;
40
+ }
41
+ interface Binding {
42
+ /**
43
+ * The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`,
44
+ * then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which
45
+ * resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
46
+ */
47
+ condition?: Expr;
48
+ /**
49
+ * Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on
50
+ * the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service
51
+ * account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that
52
+ * represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier
53
+ * for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example,
54
+ * `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. *
55
+ * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example,
56
+ * `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. *
57
+ * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example,
58
+ * `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service
59
+ * account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently
60
+ * deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in
61
+ * the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
62
+ */
63
+ members?: string[];
64
+ /** Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. */
65
+ role?: string;
66
+ }
67
+ interface CallFunctionRequest {
68
+ /** Required. Input to be passed to the function. */
69
+ data?: string;
70
+ }
71
+ interface CallFunctionResponse {
72
+ /** Either system or user-function generated error. Set if execution was not successful. */
73
+ error?: string;
74
+ /** Execution id of function invocation. */
75
+ executionId?: string;
76
+ /** Result populated for successful execution of synchronous function. Will not be populated if function does not return a result through context. */
77
+ result?: string;
78
+ }
79
+ interface CloudFunction {
80
+ /** The amount of memory in MB available for a function. Defaults to 256MB. */
81
+ availableMemoryMb?: number;
82
+ /** Build environment variables that shall be available during build time. */
83
+ buildEnvironmentVariables?: { [P in string]: string };
84
+ /** Output only. The Cloud Build ID of the latest successful deployment of the function. */
85
+ buildId?: string;
86
+ /** Output only. The Cloud Build Name of the function deployment. `projects//locations//builds/`. */
87
+ buildName?: string;
88
+ /**
89
+ * Name of the Cloud Build Custom Worker Pool that should be used to build the function. The format of this field is `projects/{project}/locations/{region}/workerPools/{workerPool}`
90
+ * where `{project}` and `{region}` are the project id and region respectively where the worker pool is defined and `{workerPool}` is the short name of the worker pool. If the project
91
+ * id is not the same as the function, then the Cloud Functions Service Agent (`service-@gcf-admin-robot.iam.gserviceaccount.com`) must be granted the role Cloud Build Custom Workers
92
+ * Builder (`roles/cloudbuild.customworkers.builder`) in the project.
93
+ */
94
+ buildWorkerPool?: string;
95
+ /** User-provided description of a function. */
96
+ description?: string;
97
+ /**
98
+ * Docker Registry to use for this deployment. If `docker_repository` field is specified, this field will be automatically set as `ARTIFACT_REGISTRY`. If unspecified, it currently
99
+ * defaults to `CONTAINER_REGISTRY`. This field may be overridden by the backend for eligible deployments.
100
+ */
101
+ dockerRegistry?: string;
102
+ /**
103
+ * User managed repository created in Artifact Registry optionally with a customer managed encryption key. If specified, deployments will use Artifact Registry. If unspecified and the
104
+ * deployment is eligible to use Artifact Registry, GCF will create and use a repository named 'gcf-artifacts' for every deployed region. This is the repository to which the function
105
+ * docker image will be pushed after it is built by Cloud Build. It must match the pattern `projects/{project}/locations/{location}/repositories/{repository}`. Cross-project
106
+ * repositories are not supported. Cross-location repositories are not supported. Repository format must be 'DOCKER'.
107
+ */
108
+ dockerRepository?: string;
109
+ /**
110
+ * The name of the function (as defined in source code) that will be executed. Defaults to the resource name suffix, if not specified. For backward compatibility, if function with
111
+ * given name is not found, then the system will try to use function named "function". For Node.js this is name of a function exported by the module specified in `source_location`.
112
+ */
113
+ entryPoint?: string;
114
+ /** Environment variables that shall be available during function execution. */
115
+ environmentVariables?: { [P in string]: string };
116
+ /** A source that fires events in response to a condition in another service. */
117
+ eventTrigger?: EventTrigger;
118
+ /** An HTTPS endpoint type of source that can be triggered via URL. */
119
+ httpsTrigger?: HttpsTrigger;
120
+ /** The ingress settings for the function, controlling what traffic can reach it. */
121
+ ingressSettings?: string;
122
+ /**
123
+ * Resource name of a KMS crypto key (managed by the user) used to encrypt/decrypt function resources. It must match the pattern
124
+ * `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. If specified, you must also provide an artifact registry repository using the
125
+ * `docker_repository` field that was created with the same KMS crypto key. The following service accounts need to be granted the role 'Cloud KMS CryptoKey Encrypter/Decrypter
126
+ * (roles/cloudkms.cryptoKeyEncrypterDecrypter)' on the Key/KeyRing/Project/Organization (least access preferred). 1. Google Cloud Functions service account
127
+ * (service-{project_number}@gcf-admin-robot.iam.gserviceaccount.com) - Required to protect the function's image. 2. Google Storage service account
128
+ * (service-{project_number}@gs-project-accounts.iam.gserviceaccount.com) - Required to protect the function's source code. If this service account does not exist, deploying a function
129
+ * without a KMS key or retrieving the service agent name provisions it. For more information, see https://cloud.google.com/storage/docs/projects#service-agents and
130
+ * https://cloud.google.com/storage/docs/getting-service-agent#gsutil. Google Cloud Functions delegates access to service agents to protect function resources in internal projects that
131
+ * are not accessible by the end user.
132
+ */
133
+ kmsKeyName?: string;
134
+ /** Labels associated with this Cloud Function. */
135
+ labels?: { [P in string]: string };
136
+ /**
137
+ * The limit on the maximum number of function instances that may coexist at a given time. In some cases, such as rapid traffic surges, Cloud Functions may, for a short period of time,
138
+ * create more instances than the specified max instances limit. If your function cannot tolerate this temporary behavior, you may want to factor in a safety margin and set a lower max
139
+ * instances value than your function can tolerate. See the [Max Instances](https://cloud.google.com/functions/docs/max-instances) Guide for more details.
140
+ */
141
+ maxInstances?: number;
142
+ /** A lower bound for the number function instances that may coexist at a given time. */
143
+ minInstances?: number;
144
+ /** A user-defined name of the function. Function names must be unique globally and match pattern `projects/*‍/locations/*‍/functions/*` */
145
+ name?: string;
146
+ /**
147
+ * The VPC Network that this cloud function can connect to. It can be either the fully-qualified URI, or the short name of the network resource. If the short network name is used, the
148
+ * network must belong to the same project. Otherwise, it must belong to a project within the same organization. The format of this field is either
149
+ * `projects/{project}/global/networks/{network}` or `{network}`, where `{project}` is a project id where the network is defined, and `{network}` is the short name of the network. This
150
+ * field is mutually exclusive with `vpc_connector` and will be replaced by it. See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for more information on
151
+ * connecting Cloud projects.
152
+ */
153
+ network?: string;
154
+ /**
155
+ * The runtime in which to run the function. Required when deploying a new function, optional when updating an existing function. For a complete list of possible choices, see the
156
+ * [`gcloud` command reference](https://cloud.google.com/sdk/gcloud/reference/functions/deploy#--runtime).
157
+ */
158
+ runtime?: string;
159
+ /** Secret environment variables configuration. */
160
+ secretEnvironmentVariables?: SecretEnvVar[];
161
+ /** Secret volumes configuration. */
162
+ secretVolumes?: SecretVolume[];
163
+ /** The email of the function's service account. If empty, defaults to `{project_id}@appspot.gserviceaccount.com`. */
164
+ serviceAccountEmail?: string;
165
+ /** The Google Cloud Storage URL, starting with `gs://`, pointing to the zip archive which contains the function. */
166
+ sourceArchiveUrl?: string;
167
+ /** **Beta Feature** The source repository where a function is hosted. */
168
+ sourceRepository?: SourceRepository;
169
+ /** Input only. An identifier for Firebase function sources. Disclaimer: This field is only supported for Firebase function deployments. */
170
+ sourceToken?: string;
171
+ /**
172
+ * The Google Cloud Storage signed URL used for source uploading, generated by calling [google.cloud.functions.v1.GenerateUploadUrl]. The signature is validated on write methods
173
+ * (Create, Update) The signature is stripped from the Function object on read methods (Get, List)
174
+ */
175
+ sourceUploadUrl?: string;
176
+ /** Output only. Status of the function deployment. */
177
+ status?: string;
178
+ /** The function execution timeout. Execution is considered failed and can be terminated if the function is not completed at the end of the timeout period. Defaults to 60 seconds. */
179
+ timeout?: string;
180
+ /** Output only. The last update timestamp of a Cloud Function. */
181
+ updateTime?: string;
182
+ /** Output only. The version identifier of the Cloud Function. Each deployment attempt results in a new version of a function being created. */
183
+ versionId?: string;
184
+ /**
185
+ * The VPC Network Connector that this cloud function can connect to. It can be either the fully-qualified URI, or the short name of the network connector resource. The format of this
186
+ * field is `projects/*‍/locations/*‍/connectors/*` This field is mutually exclusive with `network` field and will eventually replace it. See [the VPC
187
+ * documentation](https://cloud.google.com/compute/docs/vpc) for more information on connecting Cloud projects.
188
+ */
189
+ vpcConnector?: string;
190
+ /** The egress settings for the connector, controlling what traffic is diverted through it. */
191
+ vpcConnectorEgressSettings?: string;
192
+ }
193
+ interface EventTrigger {
194
+ /**
195
+ * Required. The type of event to observe. For example: `providers/cloud.storage/eventTypes/object.change` and `providers/cloud.pubsub/eventTypes/topic.publish`. Event types match
196
+ * pattern `providers/*‍/eventTypes/*.*`. The pattern contains: 1. namespace: For example, `cloud.storage` and `google.firebase.analytics`. 2. resource type: The type of resource on
197
+ * which event occurs. For example, the Google Cloud Storage API includes the type `object`. 3. action: The action that generates the event. For example, action for a Google Cloud
198
+ * Storage Object is 'change'. These parts are lower case.
199
+ */
200
+ eventType?: string;
201
+ /** Specifies policy for failed executions. */
202
+ failurePolicy?: FailurePolicy;
203
+ /**
204
+ * Required. The resource(s) from which to observe events, for example, `projects/_/buckets/myBucket`. Not all syntactically correct values are accepted by all services. For example:
205
+ * 1. The authorization model must support it. Google Cloud Functions only allows EventTriggers to be deployed that observe resources in the same project as the `CloudFunction`. 2. The
206
+ * resource type must match the pattern expected for an `event_type`. For example, an `EventTrigger` that has an `event_type` of "google.pubsub.topic.publish" should have a resource
207
+ * that matches Google Cloud Pub/Sub topics. Additionally, some services may support short names when creating an `EventTrigger`. These will always be returned in the normalized "long"
208
+ * format. See each *service's* documentation for supported formats.
209
+ */
210
+ resource?: string;
211
+ /**
212
+ * The hostname of the service that should be observed. If no string is provided, the default service implementing the API will be used. For example, `storage.googleapis.com` is the
213
+ * default for all event types in the `google.storage` namespace.
214
+ */
215
+ service?: string;
216
+ }
217
+ interface Expr {
218
+ /** Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. */
219
+ description?: string;
220
+ /** Textual representation of an expression in Common Expression Language syntax. */
221
+ expression?: string;
222
+ /** Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file. */
223
+ location?: string;
224
+ /** Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression. */
225
+ title?: string;
226
+ }
227
+ interface FailurePolicy {
228
+ /** If specified, then the function will be retried in case of a failure. */
229
+ retry?: any;
230
+ }
231
+ interface GenerateDownloadUrlRequest {
232
+ /** The optional version of function. If not set, default, current version is used. */
233
+ versionId?: string;
234
+ }
235
+ interface GenerateDownloadUrlResponse {
236
+ /** The generated Google Cloud Storage signed URL that should be used for function source code download. */
237
+ downloadUrl?: string;
238
+ }
239
+ interface GenerateUploadUrlRequest {
240
+ /**
241
+ * Resource name of a KMS crypto key (managed by the user) used to encrypt/decrypt function source code objects in staging Cloud Storage buckets. When you generate an upload url and
242
+ * upload your source code, it gets copied to a staging Cloud Storage bucket in an internal regional project. The source code is then copied to a versioned directory in the sources
243
+ * bucket in the consumer project during the function deployment. It must match the pattern `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. The
244
+ * Google Cloud Functions service account (service-{project_number}@gcf-admin-robot.iam.gserviceaccount.com) must be granted the role 'Cloud KMS CryptoKey Encrypter/Decrypter
245
+ * (roles/cloudkms.cryptoKeyEncrypterDecrypter)' on the Key/KeyRing/Project/Organization (least access preferred). GCF will delegate access to the Google Storage service account in the
246
+ * internal project.
247
+ */
248
+ kmsKeyName?: string;
249
+ }
250
+ interface GenerateUploadUrlResponse {
251
+ /** The generated Google Cloud Storage signed URL that should be used for a function source code upload. The uploaded file should be a zip archive which contains a function. */
252
+ uploadUrl?: string;
253
+ }
254
+ interface GoogleCloudFunctionsV2alphaOperationMetadata {
255
+ /** API version used to start the operation. */
256
+ apiVersion?: string;
257
+ /**
258
+ * Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of
259
+ * 1, corresponding to `Code.CANCELLED`.
260
+ */
261
+ cancelRequested?: boolean;
262
+ /** The time the operation was created. */
263
+ createTime?: string;
264
+ /** The time the operation finished running. */
265
+ endTime?: string;
266
+ /** The original request that started the operation. */
267
+ requestResource?: { [P in string]: any };
268
+ /** Mechanism for reporting in-progress stages */
269
+ stages?: GoogleCloudFunctionsV2alphaStage[];
270
+ /** Human-readable status of the operation, if any. */
271
+ statusDetail?: string;
272
+ /** Server-defined resource path for the target of the operation. */
273
+ target?: string;
274
+ /** Name of the verb executed by the operation. */
275
+ verb?: string;
276
+ }
277
+ interface GoogleCloudFunctionsV2alphaStage {
278
+ /** Message describing the Stage */
279
+ message?: string;
280
+ /** Name of the Stage. This will be unique for each Stage. */
281
+ name?: string;
282
+ /** Resource of the Stage */
283
+ resource?: string;
284
+ /** Link to the current Stage resource */
285
+ resourceUri?: string;
286
+ /** Current state of the Stage */
287
+ state?: string;
288
+ /** State messages from the current Stage. */
289
+ stateMessages?: GoogleCloudFunctionsV2alphaStateMessage[];
290
+ }
291
+ interface GoogleCloudFunctionsV2alphaStateMessage {
292
+ /** The message. */
293
+ message?: string;
294
+ /** Severity of the state message. */
295
+ severity?: string;
296
+ /** One-word CamelCase type of the state message. */
297
+ type?: string;
298
+ }
299
+ interface GoogleCloudFunctionsV2betaOperationMetadata {
300
+ /** API version used to start the operation. */
301
+ apiVersion?: string;
302
+ /**
303
+ * Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of
304
+ * 1, corresponding to `Code.CANCELLED`.
305
+ */
306
+ cancelRequested?: boolean;
307
+ /** The time the operation was created. */
308
+ createTime?: string;
309
+ /** The time the operation finished running. */
310
+ endTime?: string;
311
+ /** The original request that started the operation. */
312
+ requestResource?: { [P in string]: any };
313
+ /** Mechanism for reporting in-progress stages */
314
+ stages?: GoogleCloudFunctionsV2betaStage[];
315
+ /** Human-readable status of the operation, if any. */
316
+ statusDetail?: string;
317
+ /** Server-defined resource path for the target of the operation. */
318
+ target?: string;
319
+ /** Name of the verb executed by the operation. */
320
+ verb?: string;
321
+ }
322
+ interface GoogleCloudFunctionsV2betaStage {
323
+ /** Message describing the Stage */
324
+ message?: string;
325
+ /** Name of the Stage. This will be unique for each Stage. */
326
+ name?: string;
327
+ /** Resource of the Stage */
328
+ resource?: string;
329
+ /** Link to the current Stage resource */
330
+ resourceUri?: string;
331
+ /** Current state of the Stage */
332
+ state?: string;
333
+ /** State messages from the current Stage. */
334
+ stateMessages?: GoogleCloudFunctionsV2betaStateMessage[];
335
+ }
336
+ interface GoogleCloudFunctionsV2betaStateMessage {
337
+ /** The message. */
338
+ message?: string;
339
+ /** Severity of the state message. */
340
+ severity?: string;
341
+ /** One-word CamelCase type of the state message. */
342
+ type?: string;
343
+ }
344
+ interface GoogleCloudFunctionsV2OperationMetadata {
345
+ /** API version used to start the operation. */
346
+ apiVersion?: string;
347
+ /**
348
+ * Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of
349
+ * 1, corresponding to `Code.CANCELLED`.
350
+ */
351
+ cancelRequested?: boolean;
352
+ /** The time the operation was created. */
353
+ createTime?: string;
354
+ /** The time the operation finished running. */
355
+ endTime?: string;
356
+ /** The original request that started the operation. */
357
+ requestResource?: { [P in string]: any };
358
+ /** Mechanism for reporting in-progress stages */
359
+ stages?: GoogleCloudFunctionsV2Stage[];
360
+ /** Human-readable status of the operation, if any. */
361
+ statusDetail?: string;
362
+ /** Server-defined resource path for the target of the operation. */
363
+ target?: string;
364
+ /** Name of the verb executed by the operation. */
365
+ verb?: string;
366
+ }
367
+ interface GoogleCloudFunctionsV2Stage {
368
+ /** Message describing the Stage */
369
+ message?: string;
370
+ /** Name of the Stage. This will be unique for each Stage. */
371
+ name?: string;
372
+ /** Resource of the Stage */
373
+ resource?: string;
374
+ /** Link to the current Stage resource */
375
+ resourceUri?: string;
376
+ /** Current state of the Stage */
377
+ state?: string;
378
+ /** State messages from the current Stage. */
379
+ stateMessages?: GoogleCloudFunctionsV2StateMessage[];
380
+ }
381
+ interface GoogleCloudFunctionsV2StateMessage {
382
+ /** The message. */
383
+ message?: string;
384
+ /** Severity of the state message. */
385
+ severity?: string;
386
+ /** One-word CamelCase type of the state message. */
387
+ type?: string;
388
+ }
389
+ interface HttpsTrigger {
390
+ /** The security level for the function. */
391
+ securityLevel?: string;
392
+ /** Output only. The deployed url for the function. */
393
+ url?: string;
394
+ }
395
+ interface ListFunctionsResponse {
396
+ /** The functions that match the request. */
397
+ functions?: CloudFunction[];
398
+ /**
399
+ * If not empty, indicates that there may be more functions that match the request; this value should be passed in a new google.cloud.functions.v1.ListFunctionsRequest to get more
400
+ * functions.
401
+ */
402
+ nextPageToken?: string;
403
+ /** Locations that could not be reached. The response does not include any functions from these locations. */
404
+ unreachable?: string[];
405
+ }
406
+ interface ListLocationsResponse {
407
+ /** A list of locations that matches the specified filter in the request. */
408
+ locations?: Location[];
409
+ /** The standard List next-page token. */
410
+ nextPageToken?: string;
411
+ }
412
+ interface ListOperationsResponse {
413
+ /** The standard List next-page token. */
414
+ nextPageToken?: string;
415
+ /** A list of operations that matches the specified filter in the request. */
416
+ operations?: Operation[];
417
+ }
418
+ interface Location {
419
+ /** The friendly name for this location, typically a nearby city name. For example, "Tokyo". */
420
+ displayName?: string;
421
+ /** Cross-service attributes for the location. For example {"cloud.googleapis.com/region": "us-east1"} */
422
+ labels?: { [P in string]: string };
423
+ /** The canonical id for this location. For example: `"us-east1"`. */
424
+ locationId?: string;
425
+ /** Service-specific metadata. For example the available capacity at the given location. */
426
+ metadata?: { [P in string]: any };
427
+ /** Resource name for the location, which may vary between implementations. For example: `"projects/example-project/locations/us-east1"` */
428
+ name?: string;
429
+ }
430
+ interface Operation {
431
+ /** If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. */
432
+ done?: boolean;
433
+ /** The error result of the operation in case of failure or cancellation. */
434
+ error?: Status;
435
+ /**
436
+ * Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such
437
+ * metadata. Any method that returns a long-running operation should document the metadata type, if any.
438
+ */
439
+ metadata?: { [P in string]: any };
440
+ /**
441
+ * The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending
442
+ * with `operations/{unique_id}`.
443
+ */
444
+ name?: string;
445
+ /**
446
+ * The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the
447
+ * original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the
448
+ * original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
449
+ */
450
+ response?: { [P in string]: any };
451
+ }
452
+ interface OperationMetadataV1 {
453
+ /** The Cloud Build ID of the function created or updated by an API call. This field is only populated for Create and Update operations. */
454
+ buildId?: string;
455
+ /** The Cloud Build Name of the function deployment. This field is only populated for Create and Update operations. `projects//locations//builds/`. */
456
+ buildName?: string;
457
+ /** The original request that started the operation. */
458
+ request?: { [P in string]: any };
459
+ /** An identifier for Firebase function sources. Disclaimer: This field is only supported for Firebase function deployments. */
460
+ sourceToken?: string;
461
+ /** Target of the operation - for example `projects/project-1/locations/region-1/functions/function-1` */
462
+ target?: string;
463
+ /** Type of operation. */
464
+ type?: string;
465
+ /** The last update timestamp of the operation. */
466
+ updateTime?: string;
467
+ /** Version id of the function created or updated by an API call. This field is only populated for Create and Update operations. */
468
+ versionId?: string;
469
+ }
470
+ interface Policy {
471
+ /** Specifies cloud audit logging configuration for this policy. */
472
+ auditConfigs?: AuditConfig[];
473
+ /**
474
+ * Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings`
475
+ * must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a
476
+ * principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another
477
+ * 1,450 principals to the `bindings` in the `Policy`.
478
+ */
479
+ bindings?: Binding[];
480
+ /**
481
+ * `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make
482
+ * use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems
483
+ * are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM
484
+ * Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1`
485
+ * policy, and all of the conditions in the version `3` policy are lost.
486
+ */
487
+ etag?: string;
488
+ /**
489
+ * Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings
490
+ * must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a
491
+ * policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use
492
+ * IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1`
493
+ * policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave
494
+ * the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
495
+ */
496
+ version?: number;
497
+ }
498
+ // tslint:disable-next-line:no-empty-interface
499
+ interface Retry {
500
+ }
501
+ interface SecretEnvVar {
502
+ /** Name of the environment variable. */
503
+ key?: string;
504
+ /**
505
+ * Project identifier (preferrably project number but can also be the project ID) of the project that contains the secret. If not set, it will be populated with the function's project
506
+ * assuming that the secret exists in the same project as of the function.
507
+ */
508
+ projectId?: string;
509
+ /** Name of the secret in secret manager (not the full resource name). */
510
+ secret?: string;
511
+ /**
512
+ * Version of the secret (version number or the string 'latest'). It is recommended to use a numeric version for secret environment variables as any updates to the secret value is not
513
+ * reflected until new instances start.
514
+ */
515
+ version?: string;
516
+ }
517
+ interface SecretVersion {
518
+ /**
519
+ * Relative path of the file under the mount path where the secret value for this version will be fetched and made available. For example, setting the mount_path as '/etc/secrets' and
520
+ * path as `/secret_foo` would mount the secret value file at `/etc/secrets/secret_foo`.
521
+ */
522
+ path?: string;
523
+ /** Version of the secret (version number or the string 'latest'). It is preferrable to use `latest` version with secret volumes as secret value changes are reflected immediately. */
524
+ version?: string;
525
+ }
526
+ interface SecretVolume {
527
+ /**
528
+ * The path within the container to mount the secret volume. For example, setting the mount_path as `/etc/secrets` would mount the secret value files under the `/etc/secrets`
529
+ * directory. This directory will also be completely shadowed and unavailable to mount any other secrets. Recommended mount paths: /etc/secrets Restricted mount paths: /cloudsql,
530
+ * /dev/log, /pod, /proc, /var/log
531
+ */
532
+ mountPath?: string;
533
+ /**
534
+ * Project identifier (preferrably project number but can also be the project ID) of the project that contains the secret. If not set, it will be populated with the function's project
535
+ * assuming that the secret exists in the same project as of the function.
536
+ */
537
+ projectId?: string;
538
+ /** Name of the secret in secret manager (not the full resource name). */
539
+ secret?: string;
540
+ /** List of secret versions to mount for this secret. If empty, the `latest` version of the secret will be made available in a file named after the secret under the mount point. */
541
+ versions?: SecretVersion[];
542
+ }
543
+ interface SetIamPolicyRequest {
544
+ /**
545
+ * REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Google Cloud
546
+ * services (such as Projects) might reject them.
547
+ */
548
+ policy?: Policy;
549
+ /**
550
+ * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used:
551
+ * `paths: "bindings, etag"`
552
+ */
553
+ updateMask?: string;
554
+ }
555
+ interface SourceRepository {
556
+ /**
557
+ * Output only. The URL pointing to the hosted repository where the function were defined at the time of deployment. It always points to a specific commit in the format described
558
+ * above.
559
+ */
560
+ deployedUrl?: string;
561
+ /**
562
+ * The URL pointing to the hosted repository where the function is defined. There are supported Cloud Source Repository URLs in the following formats: To refer to a specific commit:
563
+ * `https://source.developers.google.com/projects/*‍/repos/*‍/revisions/*‍/paths/*` To refer to a moveable alias (branch):
564
+ * `https://source.developers.google.com/projects/*‍/repos/*‍/moveable-aliases/*‍/paths/*` In particular, to refer to HEAD use `master` moveable alias. To refer to a specific fixed
565
+ * alias (tag): `https://source.developers.google.com/projects/*‍/repos/*‍/fixed-aliases/*‍/paths/*` You may omit `paths/*` if you want to use the main directory.
566
+ */
567
+ url?: string;
568
+ }
569
+ interface Status {
570
+ /** The status code, which should be an enum value of google.rpc.Code. */
571
+ code?: number;
572
+ /** A list of messages that carry the error details. There is a common set of message types for APIs to use. */
573
+ details?: Array<{ [P in string]: any }>;
574
+ /**
575
+ * 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
576
+ * client.
577
+ */
578
+ message?: string;
579
+ }
580
+ interface TestIamPermissionsRequest {
581
+ /**
582
+ * The set of permissions to check for the `resource`. Permissions with wildcards (such as `*` or `storage.*`) are not allowed. For more information see [IAM
583
+ * Overview](https://cloud.google.com/iam/docs/overview#permissions).
584
+ */
585
+ permissions?: string[];
586
+ }
587
+ interface TestIamPermissionsResponse {
588
+ /** A subset of `TestPermissionsRequest.permissions` that the caller is allowed. */
589
+ permissions?: string[];
590
+ }
591
+ interface OperationsResource {
592
+ /** 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. */
593
+ get(request?: {
594
+ /** V1 error format. */
595
+ "$.xgafv"?: string;
596
+ /** OAuth access token. */
597
+ access_token?: string;
598
+ /** Data format for response. */
599
+ alt?: string;
600
+ /** JSONP */
601
+ callback?: string;
602
+ /** Selector specifying which fields to include in a partial response. */
603
+ fields?: string;
604
+ /** 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. */
605
+ key?: string;
606
+ /** The name of the operation resource. */
607
+ name: string;
608
+ /** OAuth 2.0 token for the current user. */
609
+ oauth_token?: string;
610
+ /** Returns response with indentations and line breaks. */
611
+ prettyPrint?: boolean;
612
+ /** 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. */
613
+ quotaUser?: string;
614
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
615
+ upload_protocol?: string;
616
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
617
+ uploadType?: string;
618
+ }): Request<Operation>;
619
+ /**
620
+ * Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services
621
+ * to override the binding to use different resource name schemes, such as `users/*‍/operations`. To override the binding, API services can add a binding such as
622
+ * `"/v1/{name=users/*}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must
623
+ * ensure the name binding is the parent resource, without the operations collection id.
624
+ */
625
+ list(request?: {
626
+ /** V1 error format. */
627
+ "$.xgafv"?: string;
628
+ /** OAuth access token. */
629
+ access_token?: string;
630
+ /** Data format for response. */
631
+ alt?: string;
632
+ /** JSONP */
633
+ callback?: string;
634
+ /** Selector specifying which fields to include in a partial response. */
635
+ fields?: string;
636
+ /**
637
+ * Required. A filter for matching the requested operations. The supported formats of *filter* are: To query for a specific function: project:*,location:*,function:* To query for
638
+ * all of the latest operations for a project: project:*,latest:true
639
+ */
640
+ filter?: string;
641
+ /** 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. */
642
+ key?: string;
643
+ /** Must not be set. */
644
+ name?: string;
645
+ /** OAuth 2.0 token for the current user. */
646
+ oauth_token?: string;
647
+ /**
648
+ * The maximum number of records that should be returned. Requested page size cannot exceed 100. If not set, the default page size is 100. Pagination is only supported when
649
+ * querying for a specific function.
650
+ */
651
+ pageSize?: number;
652
+ /** Token identifying which result to start with, which is returned by a previous list call. Pagination is only supported when querying for a specific function. */
653
+ pageToken?: string;
654
+ /** Returns response with indentations and line breaks. */
655
+ prettyPrint?: boolean;
656
+ /** 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. */
657
+ quotaUser?: string;
658
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
659
+ upload_protocol?: string;
660
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
661
+ uploadType?: string;
662
+ }): Request<ListOperationsResponse>;
663
+ }
664
+ interface FunctionsResource {
665
+ /**
666
+ * Synchronously invokes a deployed Cloud Function. To be used for testing purposes as very limited traffic is allowed. For more information on the actual limits, refer to [Rate
667
+ * Limits](https://cloud.google.com/functions/quotas#rate_limits).
668
+ */
669
+ call(request: {
670
+ /** V1 error format. */
671
+ "$.xgafv"?: string;
672
+ /** OAuth access token. */
673
+ access_token?: string;
674
+ /** Data format for response. */
675
+ alt?: string;
676
+ /** JSONP */
677
+ callback?: string;
678
+ /** Selector specifying which fields to include in a partial response. */
679
+ fields?: string;
680
+ /** 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. */
681
+ key?: string;
682
+ /** Required. The name of the function to be called. */
683
+ name: string;
684
+ /** OAuth 2.0 token for the current user. */
685
+ oauth_token?: string;
686
+ /** Returns response with indentations and line breaks. */
687
+ prettyPrint?: boolean;
688
+ /** 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. */
689
+ quotaUser?: string;
690
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
691
+ upload_protocol?: string;
692
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
693
+ uploadType?: string;
694
+ /** Request body */
695
+ resource: CallFunctionRequest;
696
+ }): Request<CallFunctionResponse>;
697
+ call(request: {
698
+ /** V1 error format. */
699
+ "$.xgafv"?: string;
700
+ /** OAuth access token. */
701
+ access_token?: string;
702
+ /** Data format for response. */
703
+ alt?: string;
704
+ /** JSONP */
705
+ callback?: string;
706
+ /** Selector specifying which fields to include in a partial response. */
707
+ fields?: string;
708
+ /** 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. */
709
+ key?: string;
710
+ /** Required. The name of the function to be called. */
711
+ name: string;
712
+ /** OAuth 2.0 token for the current user. */
713
+ oauth_token?: string;
714
+ /** Returns response with indentations and line breaks. */
715
+ prettyPrint?: boolean;
716
+ /** 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. */
717
+ quotaUser?: string;
718
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
719
+ upload_protocol?: string;
720
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
721
+ uploadType?: string;
722
+ },
723
+ body: CallFunctionRequest): Request<CallFunctionResponse>;
724
+ /** Creates a new function. If a function with the given name already exists in the specified project, the long running operation will return `ALREADY_EXISTS` error. */
725
+ create(request: {
726
+ /** V1 error format. */
727
+ "$.xgafv"?: string;
728
+ /** OAuth access token. */
729
+ access_token?: string;
730
+ /** Data format for response. */
731
+ alt?: string;
732
+ /** JSONP */
733
+ callback?: string;
734
+ /** Selector specifying which fields to include in a partial response. */
735
+ fields?: string;
736
+ /** 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. */
737
+ key?: string;
738
+ /** Required. The project and location in which the function should be created, specified in the format `projects/*‍/locations/*` */
739
+ location: string;
740
+ /** OAuth 2.0 token for the current user. */
741
+ oauth_token?: string;
742
+ /** Returns response with indentations and line breaks. */
743
+ prettyPrint?: boolean;
744
+ /** 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. */
745
+ quotaUser?: string;
746
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
747
+ upload_protocol?: string;
748
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
749
+ uploadType?: string;
750
+ /** Request body */
751
+ resource: CloudFunction;
752
+ }): Request<Operation>;
753
+ create(request: {
754
+ /** V1 error format. */
755
+ "$.xgafv"?: string;
756
+ /** OAuth access token. */
757
+ access_token?: string;
758
+ /** Data format for response. */
759
+ alt?: string;
760
+ /** JSONP */
761
+ callback?: string;
762
+ /** Selector specifying which fields to include in a partial response. */
763
+ fields?: string;
764
+ /** 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. */
765
+ key?: string;
766
+ /** Required. The project and location in which the function should be created, specified in the format `projects/*‍/locations/*` */
767
+ location: string;
768
+ /** OAuth 2.0 token for the current user. */
769
+ oauth_token?: string;
770
+ /** Returns response with indentations and line breaks. */
771
+ prettyPrint?: boolean;
772
+ /** 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. */
773
+ quotaUser?: string;
774
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
775
+ upload_protocol?: string;
776
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
777
+ uploadType?: string;
778
+ },
779
+ body: CloudFunction): Request<Operation>;
780
+ /** Deletes a function with the given name from the specified project. If the given function is used by some trigger, the trigger will be updated to remove this function. */
781
+ delete(request?: {
782
+ /** V1 error format. */
783
+ "$.xgafv"?: string;
784
+ /** OAuth access token. */
785
+ access_token?: string;
786
+ /** Data format for response. */
787
+ alt?: string;
788
+ /** JSONP */
789
+ callback?: string;
790
+ /** Selector specifying which fields to include in a partial response. */
791
+ fields?: string;
792
+ /** 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. */
793
+ key?: string;
794
+ /** Required. The name of the function which should be deleted. */
795
+ name: string;
796
+ /** OAuth 2.0 token for the current user. */
797
+ oauth_token?: string;
798
+ /** Returns response with indentations and line breaks. */
799
+ prettyPrint?: boolean;
800
+ /** 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. */
801
+ quotaUser?: string;
802
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
803
+ upload_protocol?: string;
804
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
805
+ uploadType?: string;
806
+ }): Request<Operation>;
807
+ /**
808
+ * Returns a signed URL for downloading deployed function source code. The URL is only valid for a limited period and should be used within minutes after generation. For more
809
+ * information about the signed URL usage see: https://cloud.google.com/storage/docs/access-control/signed-urls
810
+ */
811
+ generateDownloadUrl(request: {
812
+ /** V1 error format. */
813
+ "$.xgafv"?: string;
814
+ /** OAuth access token. */
815
+ access_token?: string;
816
+ /** Data format for response. */
817
+ alt?: string;
818
+ /** JSONP */
819
+ callback?: string;
820
+ /** Selector specifying which fields to include in a partial response. */
821
+ fields?: string;
822
+ /** 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. */
823
+ key?: string;
824
+ /** The name of function for which source code Google Cloud Storage signed URL should be generated. */
825
+ name: string;
826
+ /** OAuth 2.0 token for the current user. */
827
+ oauth_token?: string;
828
+ /** Returns response with indentations and line breaks. */
829
+ prettyPrint?: boolean;
830
+ /** 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. */
831
+ quotaUser?: string;
832
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
833
+ upload_protocol?: string;
834
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
835
+ uploadType?: string;
836
+ /** Request body */
837
+ resource: GenerateDownloadUrlRequest;
838
+ }): Request<GenerateDownloadUrlResponse>;
839
+ generateDownloadUrl(request: {
840
+ /** V1 error format. */
841
+ "$.xgafv"?: string;
842
+ /** OAuth access token. */
843
+ access_token?: string;
844
+ /** Data format for response. */
845
+ alt?: string;
846
+ /** JSONP */
847
+ callback?: string;
848
+ /** Selector specifying which fields to include in a partial response. */
849
+ fields?: string;
850
+ /** 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. */
851
+ key?: string;
852
+ /** The name of function for which source code Google Cloud Storage signed URL should be generated. */
853
+ name: string;
854
+ /** OAuth 2.0 token for the current user. */
855
+ oauth_token?: string;
856
+ /** Returns response with indentations and line breaks. */
857
+ prettyPrint?: boolean;
858
+ /** 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. */
859
+ quotaUser?: string;
860
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
861
+ upload_protocol?: string;
862
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
863
+ uploadType?: string;
864
+ },
865
+ body: GenerateDownloadUrlRequest): Request<GenerateDownloadUrlResponse>;
866
+ /**
867
+ * Returns a signed URL for uploading a function source code. For more information about the signed URL usage see: https://cloud.google.com/storage/docs/access-control/signed-urls.
868
+ * Once the function source code upload is complete, the used signed URL should be provided in CreateFunction or UpdateFunction request as a reference to the function source code. When
869
+ * uploading source code to the generated signed URL, please follow these restrictions: * Source file type should be a zip file. * Source file size should not exceed 100MB limit. * No
870
+ * credentials should be attached - the signed URLs provide access to the target bucket using internal service identity; if credentials were attached, the identity from the credentials
871
+ * would be used, but that identity does not have permissions to upload files to the URL. When making a HTTP PUT request, these two headers need to be specified: * `content-type:
872
+ * application/zip` * `x-goog-content-length-range: 0,104857600` And this header SHOULD NOT be specified: * `Authorization: Bearer YOUR_TOKEN`
873
+ */
874
+ generateUploadUrl(request: {
875
+ /** V1 error format. */
876
+ "$.xgafv"?: string;
877
+ /** OAuth access token. */
878
+ access_token?: string;
879
+ /** Data format for response. */
880
+ alt?: string;
881
+ /** JSONP */
882
+ callback?: string;
883
+ /** Selector specifying which fields to include in a partial response. */
884
+ fields?: string;
885
+ /** 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. */
886
+ key?: string;
887
+ /** OAuth 2.0 token for the current user. */
888
+ oauth_token?: string;
889
+ /** The project and location in which the Google Cloud Storage signed URL should be generated, specified in the format `projects/*‍/locations/*`. */
890
+ parent: string;
891
+ /** Returns response with indentations and line breaks. */
892
+ prettyPrint?: boolean;
893
+ /** 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. */
894
+ quotaUser?: string;
895
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
896
+ upload_protocol?: string;
897
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
898
+ uploadType?: string;
899
+ /** Request body */
900
+ resource: GenerateUploadUrlRequest;
901
+ }): Request<GenerateUploadUrlResponse>;
902
+ generateUploadUrl(request: {
903
+ /** V1 error format. */
904
+ "$.xgafv"?: string;
905
+ /** OAuth access token. */
906
+ access_token?: string;
907
+ /** Data format for response. */
908
+ alt?: string;
909
+ /** JSONP */
910
+ callback?: string;
911
+ /** Selector specifying which fields to include in a partial response. */
912
+ fields?: string;
913
+ /** 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. */
914
+ key?: string;
915
+ /** OAuth 2.0 token for the current user. */
916
+ oauth_token?: string;
917
+ /** The project and location in which the Google Cloud Storage signed URL should be generated, specified in the format `projects/*‍/locations/*`. */
918
+ parent: string;
919
+ /** Returns response with indentations and line breaks. */
920
+ prettyPrint?: boolean;
921
+ /** 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. */
922
+ quotaUser?: string;
923
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
924
+ upload_protocol?: string;
925
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
926
+ uploadType?: string;
927
+ },
928
+ body: GenerateUploadUrlRequest): Request<GenerateUploadUrlResponse>;
929
+ /** Returns a function with the given name from the requested project. */
930
+ get(request?: {
931
+ /** V1 error format. */
932
+ "$.xgafv"?: string;
933
+ /** OAuth access token. */
934
+ access_token?: string;
935
+ /** Data format for response. */
936
+ alt?: string;
937
+ /** JSONP */
938
+ callback?: string;
939
+ /** Selector specifying which fields to include in a partial response. */
940
+ fields?: string;
941
+ /** 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. */
942
+ key?: string;
943
+ /** Required. The name of the function which details should be obtained. */
944
+ name: string;
945
+ /** OAuth 2.0 token for the current user. */
946
+ oauth_token?: string;
947
+ /** Returns response with indentations and line breaks. */
948
+ prettyPrint?: boolean;
949
+ /** 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. */
950
+ quotaUser?: string;
951
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
952
+ upload_protocol?: string;
953
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
954
+ uploadType?: string;
955
+ }): Request<CloudFunction>;
956
+ /** Gets the IAM access control policy for a function. Returns an empty policy if the function exists and does not have a policy set. */
957
+ getIamPolicy(request?: {
958
+ /** V1 error format. */
959
+ "$.xgafv"?: string;
960
+ /** OAuth access token. */
961
+ access_token?: string;
962
+ /** Data format for response. */
963
+ alt?: string;
964
+ /** JSONP */
965
+ callback?: string;
966
+ /** Selector specifying which fields to include in a partial response. */
967
+ fields?: string;
968
+ /** 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. */
969
+ key?: string;
970
+ /** OAuth 2.0 token for the current user. */
971
+ oauth_token?: string;
972
+ /**
973
+ * Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for
974
+ * policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy
975
+ * in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional
976
+ * role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM
977
+ * documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
978
+ */
979
+ "options.requestedPolicyVersion"?: number;
980
+ /** Returns response with indentations and line breaks. */
981
+ prettyPrint?: boolean;
982
+ /** 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. */
983
+ quotaUser?: string;
984
+ /**
985
+ * REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this
986
+ * field.
987
+ */
988
+ resource: string;
989
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
990
+ upload_protocol?: string;
991
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
992
+ uploadType?: string;
993
+ }): Request<Policy>;
994
+ /** Returns a list of functions that belong to the requested project. */
995
+ list(request?: {
996
+ /** V1 error format. */
997
+ "$.xgafv"?: string;
998
+ /** OAuth access token. */
999
+ access_token?: string;
1000
+ /** Data format for response. */
1001
+ alt?: string;
1002
+ /** JSONP */
1003
+ callback?: string;
1004
+ /** Selector specifying which fields to include in a partial response. */
1005
+ fields?: string;
1006
+ /** 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. */
1007
+ key?: string;
1008
+ /** OAuth 2.0 token for the current user. */
1009
+ oauth_token?: string;
1010
+ /** Maximum number of functions to return per call. */
1011
+ pageSize?: number;
1012
+ /**
1013
+ * The value returned by the last `ListFunctionsResponse`; indicates that this is a continuation of a prior `ListFunctions` call, and that the system should return the next page of
1014
+ * data.
1015
+ */
1016
+ pageToken?: string;
1017
+ /**
1018
+ * The project and location from which the function should be listed, specified in the format `projects/*‍/locations/*` If you want to list functions in all locations, use "-" in
1019
+ * place of a location. When listing functions in all locations, if one or more location(s) are unreachable, the response will contain functions from all reachable locations along
1020
+ * with the names of any unreachable locations.
1021
+ */
1022
+ parent: string;
1023
+ /** Returns response with indentations and line breaks. */
1024
+ prettyPrint?: boolean;
1025
+ /** 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. */
1026
+ quotaUser?: string;
1027
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1028
+ upload_protocol?: string;
1029
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1030
+ uploadType?: string;
1031
+ }): Request<ListFunctionsResponse>;
1032
+ /** Updates existing function. */
1033
+ patch(request: {
1034
+ /** V1 error format. */
1035
+ "$.xgafv"?: string;
1036
+ /** OAuth access token. */
1037
+ access_token?: string;
1038
+ /** Data format for response. */
1039
+ alt?: string;
1040
+ /** JSONP */
1041
+ callback?: string;
1042
+ /** Selector specifying which fields to include in a partial response. */
1043
+ fields?: string;
1044
+ /** 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. */
1045
+ key?: string;
1046
+ /** A user-defined name of the function. Function names must be unique globally and match pattern `projects/*‍/locations/*‍/functions/*` */
1047
+ name: string;
1048
+ /** OAuth 2.0 token for the current user. */
1049
+ oauth_token?: string;
1050
+ /** Returns response with indentations and line breaks. */
1051
+ prettyPrint?: boolean;
1052
+ /** 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. */
1053
+ quotaUser?: string;
1054
+ /** Required. The list of fields in `CloudFunction` that have to be updated. */
1055
+ updateMask?: string;
1056
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1057
+ upload_protocol?: string;
1058
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1059
+ uploadType?: string;
1060
+ /** Request body */
1061
+ resource: CloudFunction;
1062
+ }): Request<Operation>;
1063
+ patch(request: {
1064
+ /** V1 error format. */
1065
+ "$.xgafv"?: string;
1066
+ /** OAuth access token. */
1067
+ access_token?: string;
1068
+ /** Data format for response. */
1069
+ alt?: string;
1070
+ /** JSONP */
1071
+ callback?: string;
1072
+ /** Selector specifying which fields to include in a partial response. */
1073
+ fields?: string;
1074
+ /** 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. */
1075
+ key?: string;
1076
+ /** A user-defined name of the function. Function names must be unique globally and match pattern `projects/*‍/locations/*‍/functions/*` */
1077
+ name: string;
1078
+ /** OAuth 2.0 token for the current user. */
1079
+ oauth_token?: string;
1080
+ /** Returns response with indentations and line breaks. */
1081
+ prettyPrint?: boolean;
1082
+ /** 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. */
1083
+ quotaUser?: string;
1084
+ /** Required. The list of fields in `CloudFunction` that have to be updated. */
1085
+ updateMask?: string;
1086
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1087
+ upload_protocol?: string;
1088
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1089
+ uploadType?: string;
1090
+ },
1091
+ body: CloudFunction): Request<Operation>;
1092
+ /** Sets the IAM access control policy on the specified function. Replaces any existing policy. */
1093
+ setIamPolicy(request: {
1094
+ /** V1 error format. */
1095
+ "$.xgafv"?: string;
1096
+ /** OAuth access token. */
1097
+ access_token?: string;
1098
+ /** Data format for response. */
1099
+ alt?: string;
1100
+ /** JSONP */
1101
+ callback?: string;
1102
+ /** Selector specifying which fields to include in a partial response. */
1103
+ fields?: string;
1104
+ /** 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. */
1105
+ key?: string;
1106
+ /** OAuth 2.0 token for the current user. */
1107
+ oauth_token?: string;
1108
+ /** Returns response with indentations and line breaks. */
1109
+ prettyPrint?: boolean;
1110
+ /** 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. */
1111
+ quotaUser?: string;
1112
+ /**
1113
+ * REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this
1114
+ * field.
1115
+ */
1116
+ resource: string;
1117
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1118
+ upload_protocol?: string;
1119
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1120
+ uploadType?: string;
1121
+ },
1122
+ body: SetIamPolicyRequest): Request<Policy>;
1123
+ /**
1124
+ * Tests the specified permissions against the IAM access control policy for a function. If the function does not exist, this will return an empty set of permissions, not a NOT_FOUND
1125
+ * error.
1126
+ */
1127
+ testIamPermissions(request: {
1128
+ /** V1 error format. */
1129
+ "$.xgafv"?: string;
1130
+ /** OAuth access token. */
1131
+ access_token?: string;
1132
+ /** Data format for response. */
1133
+ alt?: string;
1134
+ /** JSONP */
1135
+ callback?: string;
1136
+ /** Selector specifying which fields to include in a partial response. */
1137
+ fields?: string;
1138
+ /** 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. */
1139
+ key?: string;
1140
+ /** OAuth 2.0 token for the current user. */
1141
+ oauth_token?: string;
1142
+ /** Returns response with indentations and line breaks. */
1143
+ prettyPrint?: boolean;
1144
+ /** 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. */
1145
+ quotaUser?: string;
1146
+ /**
1147
+ * REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for
1148
+ * this field.
1149
+ */
1150
+ resource: string;
1151
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1152
+ upload_protocol?: string;
1153
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1154
+ uploadType?: string;
1155
+ },
1156
+ body: TestIamPermissionsRequest): Request<TestIamPermissionsResponse>;
1157
+ }
1158
+ interface LocationsResource {
1159
+ /** Lists information about the supported locations for this service. */
1160
+ list(request?: {
1161
+ /** V1 error format. */
1162
+ "$.xgafv"?: string;
1163
+ /** OAuth access token. */
1164
+ access_token?: string;
1165
+ /** Data format for response. */
1166
+ alt?: string;
1167
+ /** JSONP */
1168
+ callback?: string;
1169
+ /** Selector specifying which fields to include in a partial response. */
1170
+ fields?: string;
1171
+ /**
1172
+ * A filter to narrow down results to a preferred subset. The filtering language accepts strings like `"displayName=tokyo"`, and is documented in more detail in
1173
+ * [AIP-160](https://google.aip.dev/160).
1174
+ */
1175
+ filter?: string;
1176
+ /** 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. */
1177
+ key?: string;
1178
+ /** The resource that owns the locations collection, if applicable. */
1179
+ name: string;
1180
+ /** OAuth 2.0 token for the current user. */
1181
+ oauth_token?: string;
1182
+ /** The maximum number of results to return. If not set, the service selects a default. */
1183
+ pageSize?: number;
1184
+ /** A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. */
1185
+ pageToken?: string;
1186
+ /** Returns response with indentations and line breaks. */
1187
+ prettyPrint?: boolean;
1188
+ /** 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. */
1189
+ quotaUser?: string;
1190
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1191
+ upload_protocol?: string;
1192
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1193
+ uploadType?: string;
1194
+ }): Request<ListLocationsResponse>;
1195
+ functions: FunctionsResource;
1196
+ }
1197
+ interface ProjectsResource {
1198
+ locations: LocationsResource;
1199
+ }
1200
+
1201
+ const operations: OperationsResource;
1202
+
1203
+ const projects: ProjectsResource;
1204
+ }
1205
+ }