google-cloud-functions-v2 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,903 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2022 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Cloud
22
+ module Functions
23
+ module V2
24
+ # Describes a Cloud Function that contains user computation executed in
25
+ # response to an event. It encapsulates function and trigger configurations.
26
+ # @!attribute [rw] name
27
+ # @return [::String]
28
+ # A user-defined name of the function. Function names must be unique
29
+ # globally and match pattern `projects/*/locations/*/functions/*`
30
+ # @!attribute [rw] environment
31
+ # @return [::Google::Cloud::Functions::V2::Environment]
32
+ # Describe whether the function is gen1 or gen2.
33
+ # @!attribute [rw] description
34
+ # @return [::String]
35
+ # User-provided description of a function.
36
+ # @!attribute [rw] build_config
37
+ # @return [::Google::Cloud::Functions::V2::BuildConfig]
38
+ # Describes the Build step of the function that builds a container from the
39
+ # given source.
40
+ # @!attribute [rw] service_config
41
+ # @return [::Google::Cloud::Functions::V2::ServiceConfig]
42
+ # Describes the Service being deployed. Currently deploys services to Cloud
43
+ # Run (fully managed).
44
+ # @!attribute [rw] event_trigger
45
+ # @return [::Google::Cloud::Functions::V2::EventTrigger]
46
+ # An Eventarc trigger managed by Google Cloud Functions that fires events in
47
+ # response to a condition in another service.
48
+ # @!attribute [r] state
49
+ # @return [::Google::Cloud::Functions::V2::Function::State]
50
+ # Output only. State of the function.
51
+ # @!attribute [r] update_time
52
+ # @return [::Google::Protobuf::Timestamp]
53
+ # Output only. The last update timestamp of a Cloud Function.
54
+ # @!attribute [rw] labels
55
+ # @return [::Google::Protobuf::Map{::String => ::String}]
56
+ # Labels associated with this Cloud Function.
57
+ # @!attribute [r] state_messages
58
+ # @return [::Array<::Google::Cloud::Functions::V2::StateMessage>]
59
+ # Output only. State Messages for this Cloud Function.
60
+ class Function
61
+ include ::Google::Protobuf::MessageExts
62
+ extend ::Google::Protobuf::MessageExts::ClassMethods
63
+
64
+ # @!attribute [rw] key
65
+ # @return [::String]
66
+ # @!attribute [rw] value
67
+ # @return [::String]
68
+ class LabelsEntry
69
+ include ::Google::Protobuf::MessageExts
70
+ extend ::Google::Protobuf::MessageExts::ClassMethods
71
+ end
72
+
73
+ # Describes the current state of the function.
74
+ module State
75
+ # Not specified. Invalid state.
76
+ STATE_UNSPECIFIED = 0
77
+
78
+ # Function has been successfully deployed and is serving.
79
+ ACTIVE = 1
80
+
81
+ # Function deployment failed and the function is not serving.
82
+ FAILED = 2
83
+
84
+ # Function is being created or updated.
85
+ DEPLOYING = 3
86
+
87
+ # Function is being deleted.
88
+ DELETING = 4
89
+
90
+ # Function deployment failed and the function serving state is undefined.
91
+ # The function should be updated or deleted to move it out of this state.
92
+ UNKNOWN = 5
93
+ end
94
+ end
95
+
96
+ # Informational messages about the state of the Cloud Function or Operation.
97
+ # @!attribute [rw] severity
98
+ # @return [::Google::Cloud::Functions::V2::StateMessage::Severity]
99
+ # Severity of the state message.
100
+ # @!attribute [rw] type
101
+ # @return [::String]
102
+ # One-word CamelCase type of the state message.
103
+ # @!attribute [rw] message
104
+ # @return [::String]
105
+ # The message.
106
+ class StateMessage
107
+ include ::Google::Protobuf::MessageExts
108
+ extend ::Google::Protobuf::MessageExts::ClassMethods
109
+
110
+ # Severity of the state message.
111
+ module Severity
112
+ # Not specified. Invalid severity.
113
+ SEVERITY_UNSPECIFIED = 0
114
+
115
+ # ERROR-level severity.
116
+ ERROR = 1
117
+
118
+ # WARNING-level severity.
119
+ WARNING = 2
120
+
121
+ # INFO-level severity.
122
+ INFO = 3
123
+ end
124
+ end
125
+
126
+ # Location of the source in an archive file in Google Cloud Storage.
127
+ # @!attribute [rw] bucket
128
+ # @return [::String]
129
+ # Google Cloud Storage bucket containing the source (see
130
+ # [Bucket Name
131
+ # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
132
+ # @!attribute [rw] object
133
+ # @return [::String]
134
+ # Google Cloud Storage object containing the source.
135
+ #
136
+ # This object must be a gzipped archive file (`.tar.gz`) containing source to
137
+ # build.
138
+ # @!attribute [rw] generation
139
+ # @return [::Integer]
140
+ # Google Cloud Storage generation for the object. If the generation is
141
+ # omitted, the latest generation will be used.
142
+ class StorageSource
143
+ include ::Google::Protobuf::MessageExts
144
+ extend ::Google::Protobuf::MessageExts::ClassMethods
145
+ end
146
+
147
+ # Location of the source in a Google Cloud Source Repository.
148
+ # @!attribute [rw] branch_name
149
+ # @return [::String]
150
+ # Regex matching branches to build.
151
+ #
152
+ # The syntax of the regular expressions accepted is the syntax accepted by
153
+ # RE2 and described at https://github.com/google/re2/wiki/Syntax
154
+ # @!attribute [rw] tag_name
155
+ # @return [::String]
156
+ # Regex matching tags to build.
157
+ #
158
+ # The syntax of the regular expressions accepted is the syntax accepted by
159
+ # RE2 and described at https://github.com/google/re2/wiki/Syntax
160
+ # @!attribute [rw] commit_sha
161
+ # @return [::String]
162
+ # Explicit commit SHA to build.
163
+ # @!attribute [rw] project_id
164
+ # @return [::String]
165
+ # ID of the project that owns the Cloud Source Repository. If omitted, the
166
+ # project ID requesting the build is assumed.
167
+ # @!attribute [rw] repo_name
168
+ # @return [::String]
169
+ # Name of the Cloud Source Repository.
170
+ # @!attribute [rw] dir
171
+ # @return [::String]
172
+ # Directory, relative to the source root, in which to run the build.
173
+ #
174
+ # This must be a relative path. If a step's `dir` is specified and is an
175
+ # absolute path, this value is ignored for that step's execution.
176
+ # eg. helloworld (no leading slash allowed)
177
+ # @!attribute [rw] invert_regex
178
+ # @return [::Boolean]
179
+ # Only trigger a build if the revision regex does NOT match the revision
180
+ # regex.
181
+ class RepoSource
182
+ include ::Google::Protobuf::MessageExts
183
+ extend ::Google::Protobuf::MessageExts::ClassMethods
184
+ end
185
+
186
+ # The location of the function source code.
187
+ # @!attribute [rw] storage_source
188
+ # @return [::Google::Cloud::Functions::V2::StorageSource]
189
+ # If provided, get the source from this location in Google Cloud Storage.
190
+ # @!attribute [rw] repo_source
191
+ # @return [::Google::Cloud::Functions::V2::RepoSource]
192
+ # If provided, get the source from this location in a Cloud Source
193
+ # Repository.
194
+ class Source
195
+ include ::Google::Protobuf::MessageExts
196
+ extend ::Google::Protobuf::MessageExts::ClassMethods
197
+ end
198
+
199
+ # Provenance of the source. Ways to find the original source, or verify that
200
+ # some source was used for this build.
201
+ # @!attribute [rw] resolved_storage_source
202
+ # @return [::Google::Cloud::Functions::V2::StorageSource]
203
+ # A copy of the build's `source.storage_source`, if exists, with any
204
+ # generations resolved.
205
+ # @!attribute [rw] resolved_repo_source
206
+ # @return [::Google::Cloud::Functions::V2::RepoSource]
207
+ # A copy of the build's `source.repo_source`, if exists, with any
208
+ # revisions resolved.
209
+ class SourceProvenance
210
+ include ::Google::Protobuf::MessageExts
211
+ extend ::Google::Protobuf::MessageExts::ClassMethods
212
+ end
213
+
214
+ # Describes the Build step of the function that builds a container from the
215
+ # given source.
216
+ # @!attribute [r] build
217
+ # @return [::String]
218
+ # Output only. The Cloud Build name of the latest successful deployment of the
219
+ # function.
220
+ # @!attribute [rw] runtime
221
+ # @return [::String]
222
+ # The runtime in which to run the function. Required when deploying a new
223
+ # function, optional when updating an existing function. For a complete
224
+ # list of possible choices, see the
225
+ # [`gcloud` command
226
+ # reference](https://cloud.google.com/sdk/gcloud/reference/functions/deploy#--runtime).
227
+ # @!attribute [rw] entry_point
228
+ # @return [::String]
229
+ # The name of the function (as defined in source code) that will be
230
+ # executed. Defaults to the resource name suffix, if not specified. For
231
+ # backward compatibility, if function with given name is not found, then the
232
+ # system will try to use function named "function".
233
+ # For Node.js this is name of a function exported by the module specified
234
+ # in `source_location`.
235
+ # @!attribute [rw] source
236
+ # @return [::Google::Cloud::Functions::V2::Source]
237
+ # The location of the function source code.
238
+ # @!attribute [r] source_provenance
239
+ # @return [::Google::Cloud::Functions::V2::SourceProvenance]
240
+ # Output only. A permanent fixed identifier for source.
241
+ # @!attribute [rw] worker_pool
242
+ # @return [::String]
243
+ # Name of the Cloud Build Custom Worker Pool that should be used to build the
244
+ # function. The format of this field is
245
+ # `projects/{project}/locations/{region}/workerPools/{workerPool}` where
246
+ # \\{project} and \\{region} are the project id and region respectively where the
247
+ # worker pool is defined and \\{workerPool} is the short name of the worker
248
+ # pool.
249
+ #
250
+ # If the project id is not the same as the function, then the Cloud
251
+ # Functions Service Agent
252
+ # (service-<project_number>@gcf-admin-robot.iam.gserviceaccount.com) must be
253
+ # granted the role Cloud Build Custom Workers Builder
254
+ # (roles/cloudbuild.customworkers.builder) in the project.
255
+ # @!attribute [rw] environment_variables
256
+ # @return [::Google::Protobuf::Map{::String => ::String}]
257
+ # User-provided build-time environment variables for the function
258
+ # @!attribute [rw] docker_repository
259
+ # @return [::String]
260
+ # Optional. User managed repository created in Artifact Registry optionally with a
261
+ # customer managed encryption key. This is the repository to which the
262
+ # function docker image will be pushed after it is built by Cloud Build.
263
+ # If unspecified, GCF will create and use a repository named 'gcf-artifacts'
264
+ # for every deployed region.
265
+ #
266
+ # It must match the pattern
267
+ # `projects/{project}/locations/{location}/repositories/{repository}`.
268
+ #
269
+ # Cross-project repositories are not supported.
270
+ # Cross-location repositories are not supported.
271
+ # Repository format must be 'DOCKER'.
272
+ class BuildConfig
273
+ include ::Google::Protobuf::MessageExts
274
+ extend ::Google::Protobuf::MessageExts::ClassMethods
275
+
276
+ # @!attribute [rw] key
277
+ # @return [::String]
278
+ # @!attribute [rw] value
279
+ # @return [::String]
280
+ class EnvironmentVariablesEntry
281
+ include ::Google::Protobuf::MessageExts
282
+ extend ::Google::Protobuf::MessageExts::ClassMethods
283
+ end
284
+ end
285
+
286
+ # Describes the Service being deployed.
287
+ # Currently Supported : Cloud Run (fully managed).
288
+ # @!attribute [r] service
289
+ # @return [::String]
290
+ # Output only. Name of the service associated with a Function.
291
+ # The format of this field is
292
+ # `projects/{project}/locations/{region}/services/{service}`
293
+ # @!attribute [rw] timeout_seconds
294
+ # @return [::Integer]
295
+ # The function execution timeout. Execution is considered failed and
296
+ # can be terminated if the function is not completed at the end of the
297
+ # timeout period. Defaults to 60 seconds.
298
+ # @!attribute [rw] available_memory
299
+ # @return [::String]
300
+ # The amount of memory available for a function.
301
+ # Defaults to 256M. Supported units are k, M, G, Mi, Gi. If no unit is
302
+ # supplied the value is interpreted as bytes.
303
+ # See
304
+ # https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go
305
+ # a full description.
306
+ # @!attribute [rw] environment_variables
307
+ # @return [::Google::Protobuf::Map{::String => ::String}]
308
+ # Environment variables that shall be available during function execution.
309
+ # @!attribute [rw] max_instance_count
310
+ # @return [::Integer]
311
+ # The limit on the maximum number of function instances that may coexist at a
312
+ # given time.
313
+ #
314
+ # In some cases, such as rapid traffic surges, Cloud Functions may, for a
315
+ # short period of time, create more instances than the specified max
316
+ # instances limit. If your function cannot tolerate this temporary behavior,
317
+ # you may want to factor in a safety margin and set a lower max instances
318
+ # value than your function can tolerate.
319
+ #
320
+ # See the [Max
321
+ # Instances](https://cloud.google.com/functions/docs/max-instances) Guide for
322
+ # more details.
323
+ # @!attribute [rw] min_instance_count
324
+ # @return [::Integer]
325
+ # The limit on the minimum number of function instances that may coexist at a
326
+ # given time.
327
+ #
328
+ # Function instances are kept in idle state for a short period after they
329
+ # finished executing the request to reduce cold start time for subsequent
330
+ # requests. Setting a minimum instance count will ensure that the given
331
+ # number of instances are kept running in idle state always. This can help
332
+ # with cold start times when jump in incoming request count occurs after the
333
+ # idle instance would have been stopped in the default case.
334
+ # @!attribute [rw] vpc_connector
335
+ # @return [::String]
336
+ # The Serverless VPC Access connector that this cloud function can connect
337
+ # to. The format of this field is `projects/*/locations/*/connectors/*`.
338
+ # @!attribute [rw] vpc_connector_egress_settings
339
+ # @return [::Google::Cloud::Functions::V2::ServiceConfig::VpcConnectorEgressSettings]
340
+ # The egress settings for the connector, controlling what traffic is diverted
341
+ # through it.
342
+ # @!attribute [rw] ingress_settings
343
+ # @return [::Google::Cloud::Functions::V2::ServiceConfig::IngressSettings]
344
+ # The ingress settings for the function, controlling what traffic can reach
345
+ # it.
346
+ # @!attribute [r] uri
347
+ # @return [::String]
348
+ # Output only. URI of the Service deployed.
349
+ # @!attribute [rw] service_account_email
350
+ # @return [::String]
351
+ # The email of the service's service account. If empty, defaults to
352
+ # `{project_number}-compute@developer.gserviceaccount.com`.
353
+ # @!attribute [rw] all_traffic_on_latest_revision
354
+ # @return [::Boolean]
355
+ # Whether 100% of traffic is routed to the latest revision.
356
+ # On CreateFunction and UpdateFunction, when set to true, the revision being
357
+ # deployed will serve 100% of traffic, ignoring any traffic split settings,
358
+ # if any. On GetFunction, true will be returned if the latest revision is
359
+ # serving 100% of traffic.
360
+ # @!attribute [rw] secret_environment_variables
361
+ # @return [::Array<::Google::Cloud::Functions::V2::SecretEnvVar>]
362
+ # Secret environment variables configuration.
363
+ # @!attribute [rw] secret_volumes
364
+ # @return [::Array<::Google::Cloud::Functions::V2::SecretVolume>]
365
+ # Secret volumes configuration.
366
+ # @!attribute [r] revision
367
+ # @return [::String]
368
+ # Output only. The name of service revision.
369
+ class ServiceConfig
370
+ include ::Google::Protobuf::MessageExts
371
+ extend ::Google::Protobuf::MessageExts::ClassMethods
372
+
373
+ # @!attribute [rw] key
374
+ # @return [::String]
375
+ # @!attribute [rw] value
376
+ # @return [::String]
377
+ class EnvironmentVariablesEntry
378
+ include ::Google::Protobuf::MessageExts
379
+ extend ::Google::Protobuf::MessageExts::ClassMethods
380
+ end
381
+
382
+ # Available egress settings.
383
+ #
384
+ # This controls what traffic is diverted through the VPC Access Connector
385
+ # resource. By default PRIVATE_RANGES_ONLY will be used.
386
+ module VpcConnectorEgressSettings
387
+ # Unspecified.
388
+ VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED = 0
389
+
390
+ # Use the VPC Access Connector only for private IP space from RFC1918.
391
+ PRIVATE_RANGES_ONLY = 1
392
+
393
+ # Force the use of VPC Access Connector for all egress traffic from the
394
+ # function.
395
+ ALL_TRAFFIC = 2
396
+ end
397
+
398
+ # Available ingress settings.
399
+ #
400
+ # This controls what traffic can reach the function.
401
+ #
402
+ # If unspecified, ALLOW_ALL will be used.
403
+ module IngressSettings
404
+ # Unspecified.
405
+ INGRESS_SETTINGS_UNSPECIFIED = 0
406
+
407
+ # Allow HTTP traffic from public and private sources.
408
+ ALLOW_ALL = 1
409
+
410
+ # Allow HTTP traffic from only private VPC sources.
411
+ ALLOW_INTERNAL_ONLY = 2
412
+
413
+ # Allow HTTP traffic from private VPC sources and through GCLB.
414
+ ALLOW_INTERNAL_AND_GCLB = 3
415
+ end
416
+ end
417
+
418
+ # Configuration for a secret environment variable. It has the information
419
+ # necessary to fetch the secret value from secret manager and expose it as an
420
+ # environment variable.
421
+ # @!attribute [rw] key
422
+ # @return [::String]
423
+ # Name of the environment variable.
424
+ # @!attribute [rw] project_id
425
+ # @return [::String]
426
+ # Project identifier (preferably project number but can also be the
427
+ # project ID) of the project that contains the secret. If not set, it is
428
+ # assumed that the secret is in the same project as the function.
429
+ # @!attribute [rw] secret
430
+ # @return [::String]
431
+ # Name of the secret in secret manager (not the full resource name).
432
+ # @!attribute [rw] version
433
+ # @return [::String]
434
+ # Version of the secret (version number or the string 'latest'). It is
435
+ # recommended to use a numeric version for secret environment variables as
436
+ # any updates to the secret value is not reflected until new instances
437
+ # start.
438
+ class SecretEnvVar
439
+ include ::Google::Protobuf::MessageExts
440
+ extend ::Google::Protobuf::MessageExts::ClassMethods
441
+ end
442
+
443
+ # Configuration for a secret volume. It has the information necessary to fetch
444
+ # the secret value from secret manager and make it available as files mounted
445
+ # at the requested paths within the application container.
446
+ # @!attribute [rw] mount_path
447
+ # @return [::String]
448
+ # The path within the container to mount the secret volume. For example,
449
+ # setting the mount_path as `/etc/secrets` would mount the secret value files
450
+ # under the `/etc/secrets` directory. This directory will also be completely
451
+ # shadowed and unavailable to mount any other secrets.
452
+ # Recommended mount path: /etc/secrets
453
+ # @!attribute [rw] project_id
454
+ # @return [::String]
455
+ # Project identifier (preferably project number but can also be the project
456
+ # ID) of the project that contains the secret. If not set, it is
457
+ # assumed that the secret is in the same project as the function.
458
+ # @!attribute [rw] secret
459
+ # @return [::String]
460
+ # Name of the secret in secret manager (not the full resource name).
461
+ # @!attribute [rw] versions
462
+ # @return [::Array<::Google::Cloud::Functions::V2::SecretVolume::SecretVersion>]
463
+ # List of secret versions to mount for this secret. If empty, the `latest`
464
+ # version of the secret will be made available in a file named after the
465
+ # secret under the mount point.
466
+ class SecretVolume
467
+ include ::Google::Protobuf::MessageExts
468
+ extend ::Google::Protobuf::MessageExts::ClassMethods
469
+
470
+ # Configuration for a single version.
471
+ # @!attribute [rw] version
472
+ # @return [::String]
473
+ # Version of the secret (version number or the string 'latest'). It is
474
+ # preferable to use `latest` version with secret volumes as secret value
475
+ # changes are reflected immediately.
476
+ # @!attribute [rw] path
477
+ # @return [::String]
478
+ # Relative path of the file under the mount path where the secret value for
479
+ # this version will be fetched and made available. For example, setting the
480
+ # mount_path as '/etc/secrets' and path as `secret_foo` would mount the
481
+ # secret value file at `/etc/secrets/secret_foo`.
482
+ class SecretVersion
483
+ include ::Google::Protobuf::MessageExts
484
+ extend ::Google::Protobuf::MessageExts::ClassMethods
485
+ end
486
+ end
487
+
488
+ # Describes EventTrigger, used to request events to be sent from another
489
+ # service.
490
+ # @!attribute [r] trigger
491
+ # @return [::String]
492
+ # Output only. The resource name of the Eventarc trigger. The format of this field is
493
+ # `projects/{project}/locations/{region}/triggers/{trigger}`.
494
+ # @!attribute [rw] trigger_region
495
+ # @return [::String]
496
+ # The region that the trigger will be in. The trigger will only receive
497
+ # events originating in this region. It can be the same
498
+ # region as the function, a different region or multi-region, or the global
499
+ # region. If not provided, defaults to the same region as the function.
500
+ # @!attribute [rw] event_type
501
+ # @return [::String]
502
+ # Required. The type of event to observe. For example:
503
+ # `google.cloud.audit.log.v1.written` or
504
+ # `google.cloud.pubsub.topic.v1.messagePublished`.
505
+ # @!attribute [rw] event_filters
506
+ # @return [::Array<::Google::Cloud::Functions::V2::EventFilter>]
507
+ # Criteria used to filter events.
508
+ # @!attribute [rw] pubsub_topic
509
+ # @return [::String]
510
+ # Optional. The name of a Pub/Sub topic in the same project that will be used
511
+ # as the transport topic for the event delivery. Format:
512
+ # `projects/{project}/topics/{topic}`.
513
+ #
514
+ # This is only valid for events of type
515
+ # `google.cloud.pubsub.topic.v1.messagePublished`. The topic provided here
516
+ # will not be deleted at function deletion.
517
+ # @!attribute [rw] service_account_email
518
+ # @return [::String]
519
+ # Optional. The email of the trigger's service account. The service account must have
520
+ # permission to invoke Cloud Run services, the permission is
521
+ # `run.routes.invoke`.
522
+ # If empty, defaults to the Compute Engine default service account:
523
+ # `{project_number}-compute@developer.gserviceaccount.com`.
524
+ # @!attribute [rw] retry_policy
525
+ # @return [::Google::Cloud::Functions::V2::EventTrigger::RetryPolicy]
526
+ # Optional. If unset, then defaults to ignoring failures (i.e. not retrying them).
527
+ # @!attribute [rw] channel
528
+ # @return [::String]
529
+ # Optional. The name of the channel associated with the trigger in
530
+ # `projects/{project}/locations/{location}/channels/{channel}` format.
531
+ # You must provide a channel to receive events from Eventarc SaaS partners.
532
+ class EventTrigger
533
+ include ::Google::Protobuf::MessageExts
534
+ extend ::Google::Protobuf::MessageExts::ClassMethods
535
+
536
+ # Describes the retry policy in case of function's execution failure.
537
+ # Retried execution is charged as any other execution.
538
+ module RetryPolicy
539
+ # Not specified.
540
+ RETRY_POLICY_UNSPECIFIED = 0
541
+
542
+ # Do not retry.
543
+ RETRY_POLICY_DO_NOT_RETRY = 1
544
+
545
+ # Retry on any failure, retry up to 7 days with an exponential backoff
546
+ # (capped at 10 seconds).
547
+ RETRY_POLICY_RETRY = 2
548
+ end
549
+ end
550
+
551
+ # Filters events based on exact matches on the CloudEvents attributes.
552
+ # @!attribute [rw] attribute
553
+ # @return [::String]
554
+ # Required. The name of a CloudEvents attribute.
555
+ # @!attribute [rw] value
556
+ # @return [::String]
557
+ # Required. The value for the attribute.
558
+ # @!attribute [rw] operator
559
+ # @return [::String]
560
+ # Optional. The operator used for matching the events with the value of the
561
+ # filter. If not specified, only events that have an exact key-value pair
562
+ # specified in the filter are matched. The only allowed value is
563
+ # `match-path-pattern`.
564
+ class EventFilter
565
+ include ::Google::Protobuf::MessageExts
566
+ extend ::Google::Protobuf::MessageExts::ClassMethods
567
+ end
568
+
569
+ # Request for the `GetFunction` method.
570
+ # @!attribute [rw] name
571
+ # @return [::String]
572
+ # Required. The name of the function which details should be obtained.
573
+ class GetFunctionRequest
574
+ include ::Google::Protobuf::MessageExts
575
+ extend ::Google::Protobuf::MessageExts::ClassMethods
576
+ end
577
+
578
+ # Request for the `ListFunctions` method.
579
+ # @!attribute [rw] parent
580
+ # @return [::String]
581
+ # Required. The project and location from which the function should be listed,
582
+ # specified in the format `projects/*/locations/*`
583
+ # If you want to list functions in all locations, use "-" in place of a
584
+ # location. When listing functions in all locations, if one or more
585
+ # location(s) are unreachable, the response will contain functions from all
586
+ # reachable locations along with the names of any unreachable locations.
587
+ # @!attribute [rw] page_size
588
+ # @return [::Integer]
589
+ # Maximum number of functions to return per call.
590
+ # @!attribute [rw] page_token
591
+ # @return [::String]
592
+ # The value returned by the last
593
+ # `ListFunctionsResponse`; indicates that
594
+ # this is a continuation of a prior `ListFunctions` call, and that the
595
+ # system should return the next page of data.
596
+ # @!attribute [rw] filter
597
+ # @return [::String]
598
+ # The filter for Functions that match the filter expression,
599
+ # following the syntax outlined in https://google.aip.dev/160.
600
+ # @!attribute [rw] order_by
601
+ # @return [::String]
602
+ # The sorting order of the resources returned. Value should be a comma
603
+ # separated list of fields. The default sorting oder is ascending.
604
+ # See https://google.aip.dev/132#ordering.
605
+ class ListFunctionsRequest
606
+ include ::Google::Protobuf::MessageExts
607
+ extend ::Google::Protobuf::MessageExts::ClassMethods
608
+ end
609
+
610
+ # Response for the `ListFunctions` method.
611
+ # @!attribute [rw] functions
612
+ # @return [::Array<::Google::Cloud::Functions::V2::Function>]
613
+ # The functions that match the request.
614
+ # @!attribute [rw] next_page_token
615
+ # @return [::String]
616
+ # A token, which can be sent as `page_token` to retrieve the next page.
617
+ # If this field is omitted, there are no subsequent pages.
618
+ # @!attribute [rw] unreachable
619
+ # @return [::Array<::String>]
620
+ # Locations that could not be reached. The response does not include any
621
+ # functions from these locations.
622
+ class ListFunctionsResponse
623
+ include ::Google::Protobuf::MessageExts
624
+ extend ::Google::Protobuf::MessageExts::ClassMethods
625
+ end
626
+
627
+ # Request for the `CreateFunction` method.
628
+ # @!attribute [rw] parent
629
+ # @return [::String]
630
+ # Required. The project and location in which the function should be created, specified
631
+ # in the format `projects/*/locations/*`
632
+ # @!attribute [rw] function
633
+ # @return [::Google::Cloud::Functions::V2::Function]
634
+ # Required. Function to be created.
635
+ # @!attribute [rw] function_id
636
+ # @return [::String]
637
+ # The ID to use for the function, which will become the final component of
638
+ # the function's resource name.
639
+ #
640
+ # This value should be 4-63 characters, and valid characters
641
+ # are /[a-z][0-9]-/.
642
+ class CreateFunctionRequest
643
+ include ::Google::Protobuf::MessageExts
644
+ extend ::Google::Protobuf::MessageExts::ClassMethods
645
+ end
646
+
647
+ # Request for the `UpdateFunction` method.
648
+ # @!attribute [rw] function
649
+ # @return [::Google::Cloud::Functions::V2::Function]
650
+ # Required. New version of the function.
651
+ # @!attribute [rw] update_mask
652
+ # @return [::Google::Protobuf::FieldMask]
653
+ # The list of fields to be updated.
654
+ # If no field mask is provided, all provided fields in the request will be
655
+ # updated.
656
+ class UpdateFunctionRequest
657
+ include ::Google::Protobuf::MessageExts
658
+ extend ::Google::Protobuf::MessageExts::ClassMethods
659
+ end
660
+
661
+ # Request for the `DeleteFunction` method.
662
+ # @!attribute [rw] name
663
+ # @return [::String]
664
+ # Required. The name of the function which should be deleted.
665
+ class DeleteFunctionRequest
666
+ include ::Google::Protobuf::MessageExts
667
+ extend ::Google::Protobuf::MessageExts::ClassMethods
668
+ end
669
+
670
+ # Request of `GenerateSourceUploadUrl` method.
671
+ # @!attribute [rw] parent
672
+ # @return [::String]
673
+ # Required. The project and location in which the Google Cloud Storage signed URL
674
+ # should be generated, specified in the format `projects/*/locations/*`.
675
+ class GenerateUploadUrlRequest
676
+ include ::Google::Protobuf::MessageExts
677
+ extend ::Google::Protobuf::MessageExts::ClassMethods
678
+ end
679
+
680
+ # Response of `GenerateSourceUploadUrl` method.
681
+ # @!attribute [rw] upload_url
682
+ # @return [::String]
683
+ # The generated Google Cloud Storage signed URL that should be used for a
684
+ # function source code upload. The uploaded file should be a zip archive
685
+ # which contains a function.
686
+ # @!attribute [rw] storage_source
687
+ # @return [::Google::Cloud::Functions::V2::StorageSource]
688
+ # The location of the source code in the upload bucket.
689
+ #
690
+ # Once the archive is uploaded using the `upload_url` use this field to
691
+ # set the `function.build_config.source.storage_source`
692
+ # during CreateFunction and UpdateFunction.
693
+ #
694
+ # Generation defaults to 0, as Cloud Storage provides a new generation only
695
+ # upon uploading a new object or version of an object.
696
+ class GenerateUploadUrlResponse
697
+ include ::Google::Protobuf::MessageExts
698
+ extend ::Google::Protobuf::MessageExts::ClassMethods
699
+ end
700
+
701
+ # Request of `GenerateDownloadUrl` method.
702
+ # @!attribute [rw] name
703
+ # @return [::String]
704
+ # Required. The name of function for which source code Google Cloud Storage signed
705
+ # URL should be generated.
706
+ class GenerateDownloadUrlRequest
707
+ include ::Google::Protobuf::MessageExts
708
+ extend ::Google::Protobuf::MessageExts::ClassMethods
709
+ end
710
+
711
+ # Response of `GenerateDownloadUrl` method.
712
+ # @!attribute [rw] download_url
713
+ # @return [::String]
714
+ # The generated Google Cloud Storage signed URL that should be used for
715
+ # function source code download.
716
+ class GenerateDownloadUrlResponse
717
+ include ::Google::Protobuf::MessageExts
718
+ extend ::Google::Protobuf::MessageExts::ClassMethods
719
+ end
720
+
721
+ # Request for the `ListRuntimes` method.
722
+ # @!attribute [rw] parent
723
+ # @return [::String]
724
+ # Required. The project and location from which the runtimes should be listed,
725
+ # specified in the format `projects/*/locations/*`
726
+ # @!attribute [rw] filter
727
+ # @return [::String]
728
+ # The filter for Runtimes that match the filter expression,
729
+ # following the syntax outlined in https://google.aip.dev/160.
730
+ class ListRuntimesRequest
731
+ include ::Google::Protobuf::MessageExts
732
+ extend ::Google::Protobuf::MessageExts::ClassMethods
733
+ end
734
+
735
+ # Response for the `ListRuntimes` method.
736
+ # @!attribute [rw] runtimes
737
+ # @return [::Array<::Google::Cloud::Functions::V2::ListRuntimesResponse::Runtime>]
738
+ # The runtimes that match the request.
739
+ class ListRuntimesResponse
740
+ include ::Google::Protobuf::MessageExts
741
+ extend ::Google::Protobuf::MessageExts::ClassMethods
742
+
743
+ # Describes a runtime and any special information (e.g., deprecation status)
744
+ # related to it.
745
+ # @!attribute [rw] name
746
+ # @return [::String]
747
+ # The name of the runtime, e.g., 'go113', 'nodejs12', etc.
748
+ # @!attribute [rw] display_name
749
+ # @return [::String]
750
+ # The user facing name, eg 'Go 1.13', 'Node.js 12', etc.
751
+ # @!attribute [rw] stage
752
+ # @return [::Google::Cloud::Functions::V2::ListRuntimesResponse::RuntimeStage]
753
+ # The stage of life this runtime is in, e.g., BETA, GA, etc.
754
+ # @!attribute [rw] warnings
755
+ # @return [::Array<::String>]
756
+ # Warning messages, e.g., a deprecation warning.
757
+ # @!attribute [rw] environment
758
+ # @return [::Google::Cloud::Functions::V2::Environment]
759
+ # The environment for the runtime.
760
+ class Runtime
761
+ include ::Google::Protobuf::MessageExts
762
+ extend ::Google::Protobuf::MessageExts::ClassMethods
763
+ end
764
+
765
+ # The various stages that a runtime can be in.
766
+ module RuntimeStage
767
+ # Not specified.
768
+ RUNTIME_STAGE_UNSPECIFIED = 0
769
+
770
+ # The runtime is in development.
771
+ DEVELOPMENT = 1
772
+
773
+ # The runtime is in the Alpha stage.
774
+ ALPHA = 2
775
+
776
+ # The runtime is in the Beta stage.
777
+ BETA = 3
778
+
779
+ # The runtime is generally available.
780
+ GA = 4
781
+
782
+ # The runtime is deprecated.
783
+ DEPRECATED = 5
784
+
785
+ # The runtime is no longer supported.
786
+ DECOMMISSIONED = 6
787
+ end
788
+ end
789
+
790
+ # Represents the metadata of the long-running operation.
791
+ # @!attribute [rw] create_time
792
+ # @return [::Google::Protobuf::Timestamp]
793
+ # The time the operation was created.
794
+ # @!attribute [rw] end_time
795
+ # @return [::Google::Protobuf::Timestamp]
796
+ # The time the operation finished running.
797
+ # @!attribute [rw] target
798
+ # @return [::String]
799
+ # Server-defined resource path for the target of the operation.
800
+ # @!attribute [rw] verb
801
+ # @return [::String]
802
+ # Name of the verb executed by the operation.
803
+ # @!attribute [rw] status_detail
804
+ # @return [::String]
805
+ # Human-readable status of the operation, if any.
806
+ # @!attribute [rw] cancel_requested
807
+ # @return [::Boolean]
808
+ # Identifies whether the user has requested cancellation
809
+ # of the operation. Operations that have successfully been cancelled
810
+ # have [Operation.error][] value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1,
811
+ # corresponding to `Code.CANCELLED`.
812
+ # @!attribute [rw] api_version
813
+ # @return [::String]
814
+ # API version used to start the operation.
815
+ # @!attribute [rw] request_resource
816
+ # @return [::Google::Protobuf::Any]
817
+ # The original request that started the operation.
818
+ # @!attribute [rw] stages
819
+ # @return [::Array<::Google::Cloud::Functions::V2::Stage>]
820
+ # Mechanism for reporting in-progress stages
821
+ class OperationMetadata
822
+ include ::Google::Protobuf::MessageExts
823
+ extend ::Google::Protobuf::MessageExts::ClassMethods
824
+ end
825
+
826
+ # Each Stage of the deployment process
827
+ # @!attribute [rw] name
828
+ # @return [::Google::Cloud::Functions::V2::Stage::Name]
829
+ # Name of the Stage. This will be unique for each Stage.
830
+ # @!attribute [rw] message
831
+ # @return [::String]
832
+ # Message describing the Stage
833
+ # @!attribute [rw] state
834
+ # @return [::Google::Cloud::Functions::V2::Stage::State]
835
+ # Current state of the Stage
836
+ # @!attribute [rw] resource
837
+ # @return [::String]
838
+ # Resource of the Stage
839
+ # @!attribute [rw] resource_uri
840
+ # @return [::String]
841
+ # Link to the current Stage resource
842
+ # @!attribute [rw] state_messages
843
+ # @return [::Array<::Google::Cloud::Functions::V2::StateMessage>]
844
+ # State messages from the current Stage.
845
+ class Stage
846
+ include ::Google::Protobuf::MessageExts
847
+ extend ::Google::Protobuf::MessageExts::ClassMethods
848
+
849
+ # Possible names for a Stage
850
+ module Name
851
+ # Not specified. Invalid name.
852
+ NAME_UNSPECIFIED = 0
853
+
854
+ # Artifact Regsitry Stage
855
+ ARTIFACT_REGISTRY = 1
856
+
857
+ # Build Stage
858
+ BUILD = 2
859
+
860
+ # Service Stage
861
+ SERVICE = 3
862
+
863
+ # Trigger Stage
864
+ TRIGGER = 4
865
+
866
+ # Service Rollback Stage
867
+ SERVICE_ROLLBACK = 5
868
+
869
+ # Trigger Rollback Stage
870
+ TRIGGER_ROLLBACK = 6
871
+ end
872
+
873
+ # Possible states for a Stage
874
+ module State
875
+ # Not specified. Invalid state.
876
+ STATE_UNSPECIFIED = 0
877
+
878
+ # Stage has not started.
879
+ NOT_STARTED = 1
880
+
881
+ # Stage is in progress.
882
+ IN_PROGRESS = 2
883
+
884
+ # Stage has completed.
885
+ COMPLETE = 3
886
+ end
887
+ end
888
+
889
+ # The environment the function is hosted on.
890
+ module Environment
891
+ # Unspecified
892
+ ENVIRONMENT_UNSPECIFIED = 0
893
+
894
+ # Gen 1
895
+ GEN_1 = 1
896
+
897
+ # Gen 2
898
+ GEN_2 = 2
899
+ end
900
+ end
901
+ end
902
+ end
903
+ end