google-apis-cloudfunctions_v2 0.3.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -164,6 +164,201 @@ module Google
164
164
  end
165
165
  end
166
166
 
167
+ # Describes the Build step of the function that builds a container from the
168
+ # given source.
169
+ class BuildConfig
170
+ include Google::Apis::Core::Hashable
171
+
172
+ # Output only. The Cloud Build name of the latest successful deployment of the
173
+ # function.
174
+ # Corresponds to the JSON property `build`
175
+ # @return [String]
176
+ attr_accessor :build
177
+
178
+ # Optional. User managed repository created in Artifact Registry optionally with
179
+ # a customer managed encryption key. This is the repository to which the
180
+ # function docker image will be pushed after it is built by Cloud Build. If
181
+ # unspecified, GCF will create and use a repository named 'gcf-artifacts' for
182
+ # every deployed region. It must match the pattern `projects/`project`/locations/
183
+ # `location`/repositories/`repository``. Cross-project repositories are not
184
+ # supported. Cross-location repositories are not supported. Repository format
185
+ # must be 'DOCKER'.
186
+ # Corresponds to the JSON property `dockerRepository`
187
+ # @return [String]
188
+ attr_accessor :docker_repository
189
+
190
+ # The name of the function (as defined in source code) that will be executed.
191
+ # Defaults to the resource name suffix, if not specified. For backward
192
+ # compatibility, if function with given name is not found, then the system will
193
+ # try to use function named "function". For Node.js this is name of a function
194
+ # exported by the module specified in `source_location`.
195
+ # Corresponds to the JSON property `entryPoint`
196
+ # @return [String]
197
+ attr_accessor :entry_point
198
+
199
+ # User-provided build-time environment variables for the function
200
+ # Corresponds to the JSON property `environmentVariables`
201
+ # @return [Hash<String,String>]
202
+ attr_accessor :environment_variables
203
+
204
+ # The runtime in which to run the function. Required when deploying a new
205
+ # function, optional when updating an existing function. For a complete list of
206
+ # possible choices, see the [`gcloud` command reference](https://cloud.google.
207
+ # com/sdk/gcloud/reference/functions/deploy#--runtime).
208
+ # Corresponds to the JSON property `runtime`
209
+ # @return [String]
210
+ attr_accessor :runtime
211
+
212
+ # The location of the function source code.
213
+ # Corresponds to the JSON property `source`
214
+ # @return [Google::Apis::CloudfunctionsV2::Source]
215
+ attr_accessor :source
216
+
217
+ # Provenance of the source. Ways to find the original source, or verify that
218
+ # some source was used for this build.
219
+ # Corresponds to the JSON property `sourceProvenance`
220
+ # @return [Google::Apis::CloudfunctionsV2::SourceProvenance]
221
+ attr_accessor :source_provenance
222
+
223
+ # Name of the Cloud Build Custom Worker Pool that should be used to build the
224
+ # function. The format of this field is `projects/`project`/locations/`region`/
225
+ # workerPools/`workerPool`` where `project` and `region` are the project id and
226
+ # region respectively where the worker pool is defined and `workerPool` is the
227
+ # short name of the worker pool. If the project id is not the same as the
228
+ # function, then the Cloud Functions Service Agent (service-@gcf-admin-robot.iam.
229
+ # gserviceaccount.com) must be granted the role Cloud Build Custom Workers
230
+ # Builder (roles/cloudbuild.customworkers.builder) in the project.
231
+ # Corresponds to the JSON property `workerPool`
232
+ # @return [String]
233
+ attr_accessor :worker_pool
234
+
235
+ def initialize(**args)
236
+ update!(**args)
237
+ end
238
+
239
+ # Update properties of this object
240
+ def update!(**args)
241
+ @build = args[:build] if args.key?(:build)
242
+ @docker_repository = args[:docker_repository] if args.key?(:docker_repository)
243
+ @entry_point = args[:entry_point] if args.key?(:entry_point)
244
+ @environment_variables = args[:environment_variables] if args.key?(:environment_variables)
245
+ @runtime = args[:runtime] if args.key?(:runtime)
246
+ @source = args[:source] if args.key?(:source)
247
+ @source_provenance = args[:source_provenance] if args.key?(:source_provenance)
248
+ @worker_pool = args[:worker_pool] if args.key?(:worker_pool)
249
+ end
250
+ end
251
+
252
+ # Filters events based on exact matches on the CloudEvents attributes.
253
+ class EventFilter
254
+ include Google::Apis::Core::Hashable
255
+
256
+ # Required. The name of a CloudEvents attribute.
257
+ # Corresponds to the JSON property `attribute`
258
+ # @return [String]
259
+ attr_accessor :attribute
260
+
261
+ # Optional. The operator used for matching the events with the value of the
262
+ # filter. If not specified, only events that have an exact key-value pair
263
+ # specified in the filter are matched. The only allowed value is `match-path-
264
+ # pattern`.
265
+ # Corresponds to the JSON property `operator`
266
+ # @return [String]
267
+ attr_accessor :operator
268
+
269
+ # Required. The value for the attribute.
270
+ # Corresponds to the JSON property `value`
271
+ # @return [String]
272
+ attr_accessor :value
273
+
274
+ def initialize(**args)
275
+ update!(**args)
276
+ end
277
+
278
+ # Update properties of this object
279
+ def update!(**args)
280
+ @attribute = args[:attribute] if args.key?(:attribute)
281
+ @operator = args[:operator] if args.key?(:operator)
282
+ @value = args[:value] if args.key?(:value)
283
+ end
284
+ end
285
+
286
+ # Describes EventTrigger, used to request events to be sent from another service.
287
+ class EventTrigger
288
+ include Google::Apis::Core::Hashable
289
+
290
+ # Optional. The name of the channel associated with the trigger in `projects/`
291
+ # project`/locations/`location`/channels/`channel`` format. You must provide a
292
+ # channel to receive events from Eventarc SaaS partners.
293
+ # Corresponds to the JSON property `channel`
294
+ # @return [String]
295
+ attr_accessor :channel
296
+
297
+ # Criteria used to filter events.
298
+ # Corresponds to the JSON property `eventFilters`
299
+ # @return [Array<Google::Apis::CloudfunctionsV2::EventFilter>]
300
+ attr_accessor :event_filters
301
+
302
+ # Required. The type of event to observe. For example: `google.cloud.audit.log.
303
+ # v1.written` or `google.cloud.pubsub.topic.v1.messagePublished`.
304
+ # Corresponds to the JSON property `eventType`
305
+ # @return [String]
306
+ attr_accessor :event_type
307
+
308
+ # Optional. The name of a Pub/Sub topic in the same project that will be used as
309
+ # the transport topic for the event delivery. Format: `projects/`project`/topics/
310
+ # `topic``. This is only valid for events of type `google.cloud.pubsub.topic.v1.
311
+ # messagePublished`. The topic provided here will not be deleted at function
312
+ # deletion.
313
+ # Corresponds to the JSON property `pubsubTopic`
314
+ # @return [String]
315
+ attr_accessor :pubsub_topic
316
+
317
+ # Optional. If unset, then defaults to ignoring failures (i.e. not retrying them)
318
+ # .
319
+ # Corresponds to the JSON property `retryPolicy`
320
+ # @return [String]
321
+ attr_accessor :retry_policy
322
+
323
+ # Optional. The email of the trigger's service account. The service account must
324
+ # have permission to invoke Cloud Run services, the permission is `run.routes.
325
+ # invoke`. If empty, defaults to the Compute Engine default service account: ``
326
+ # project_number`-compute@developer.gserviceaccount.com`.
327
+ # Corresponds to the JSON property `serviceAccountEmail`
328
+ # @return [String]
329
+ attr_accessor :service_account_email
330
+
331
+ # Output only. The resource name of the Eventarc trigger. The format of this
332
+ # field is `projects/`project`/locations/`region`/triggers/`trigger``.
333
+ # Corresponds to the JSON property `trigger`
334
+ # @return [String]
335
+ attr_accessor :trigger
336
+
337
+ # The region that the trigger will be in. The trigger will only receive events
338
+ # originating in this region. It can be the same region as the function, a
339
+ # different region or multi-region, or the global region. If not provided,
340
+ # defaults to the same region as the function.
341
+ # Corresponds to the JSON property `triggerRegion`
342
+ # @return [String]
343
+ attr_accessor :trigger_region
344
+
345
+ def initialize(**args)
346
+ update!(**args)
347
+ end
348
+
349
+ # Update properties of this object
350
+ def update!(**args)
351
+ @channel = args[:channel] if args.key?(:channel)
352
+ @event_filters = args[:event_filters] if args.key?(:event_filters)
353
+ @event_type = args[:event_type] if args.key?(:event_type)
354
+ @pubsub_topic = args[:pubsub_topic] if args.key?(:pubsub_topic)
355
+ @retry_policy = args[:retry_policy] if args.key?(:retry_policy)
356
+ @service_account_email = args[:service_account_email] if args.key?(:service_account_email)
357
+ @trigger = args[:trigger] if args.key?(:trigger)
358
+ @trigger_region = args[:trigger_region] if args.key?(:trigger_region)
359
+ end
360
+ end
361
+
167
362
  # Represents a textual expression in the Common Expression Language (CEL) syntax.
168
363
  # CEL is a C-like expression language. The syntax and semantics of CEL are
169
364
  # documented at https://github.com/google/cel-spec. Example (Comparison): title:
@@ -182,28 +377,329 @@ module Google
182
377
  class Expr
183
378
  include Google::Apis::Core::Hashable
184
379
 
185
- # Optional. Description of the expression. This is a longer text which describes
186
- # the expression, e.g. when hovered over it in a UI.
187
- # Corresponds to the JSON property `description`
188
- # @return [String]
189
- attr_accessor :description
190
-
191
- # Textual representation of an expression in Common Expression Language syntax.
192
- # Corresponds to the JSON property `expression`
380
+ # Optional. Description of the expression. This is a longer text which describes
381
+ # the expression, e.g. when hovered over it in a UI.
382
+ # Corresponds to the JSON property `description`
383
+ # @return [String]
384
+ attr_accessor :description
385
+
386
+ # Textual representation of an expression in Common Expression Language syntax.
387
+ # Corresponds to the JSON property `expression`
388
+ # @return [String]
389
+ attr_accessor :expression
390
+
391
+ # Optional. String indicating the location of the expression for error reporting,
392
+ # e.g. a file name and a position in the file.
393
+ # Corresponds to the JSON property `location`
394
+ # @return [String]
395
+ attr_accessor :location
396
+
397
+ # Optional. Title for the expression, i.e. a short string describing its purpose.
398
+ # This can be used e.g. in UIs which allow to enter the expression.
399
+ # Corresponds to the JSON property `title`
400
+ # @return [String]
401
+ attr_accessor :title
402
+
403
+ def initialize(**args)
404
+ update!(**args)
405
+ end
406
+
407
+ # Update properties of this object
408
+ def update!(**args)
409
+ @description = args[:description] if args.key?(:description)
410
+ @expression = args[:expression] if args.key?(:expression)
411
+ @location = args[:location] if args.key?(:location)
412
+ @title = args[:title] if args.key?(:title)
413
+ end
414
+ end
415
+
416
+ # Describes a Cloud Function that contains user computation executed in response
417
+ # to an event. It encapsulates function and trigger configurations.
418
+ class Function
419
+ include Google::Apis::Core::Hashable
420
+
421
+ # Describes the Build step of the function that builds a container from the
422
+ # given source.
423
+ # Corresponds to the JSON property `buildConfig`
424
+ # @return [Google::Apis::CloudfunctionsV2::BuildConfig]
425
+ attr_accessor :build_config
426
+
427
+ # User-provided description of a function.
428
+ # Corresponds to the JSON property `description`
429
+ # @return [String]
430
+ attr_accessor :description
431
+
432
+ # Describe whether the function is gen1 or gen2.
433
+ # Corresponds to the JSON property `environment`
434
+ # @return [String]
435
+ attr_accessor :environment
436
+
437
+ # Describes EventTrigger, used to request events to be sent from another service.
438
+ # Corresponds to the JSON property `eventTrigger`
439
+ # @return [Google::Apis::CloudfunctionsV2::EventTrigger]
440
+ attr_accessor :event_trigger
441
+
442
+ # Labels associated with this Cloud Function.
443
+ # Corresponds to the JSON property `labels`
444
+ # @return [Hash<String,String>]
445
+ attr_accessor :labels
446
+
447
+ # A user-defined name of the function. Function names must be unique globally
448
+ # and match pattern `projects/*/locations/*/functions/*`
449
+ # Corresponds to the JSON property `name`
450
+ # @return [String]
451
+ attr_accessor :name
452
+
453
+ # Describes the Service being deployed. Currently Supported : Cloud Run (fully
454
+ # managed).
455
+ # Corresponds to the JSON property `serviceConfig`
456
+ # @return [Google::Apis::CloudfunctionsV2::ServiceConfig]
457
+ attr_accessor :service_config
458
+
459
+ # Output only. State of the function.
460
+ # Corresponds to the JSON property `state`
461
+ # @return [String]
462
+ attr_accessor :state
463
+
464
+ # Output only. State Messages for this Cloud Function.
465
+ # Corresponds to the JSON property `stateMessages`
466
+ # @return [Array<Google::Apis::CloudfunctionsV2::GoogleCloudFunctionsV2StateMessage>]
467
+ attr_accessor :state_messages
468
+
469
+ # Output only. The last update timestamp of a Cloud Function.
470
+ # Corresponds to the JSON property `updateTime`
471
+ # @return [String]
472
+ attr_accessor :update_time
473
+
474
+ def initialize(**args)
475
+ update!(**args)
476
+ end
477
+
478
+ # Update properties of this object
479
+ def update!(**args)
480
+ @build_config = args[:build_config] if args.key?(:build_config)
481
+ @description = args[:description] if args.key?(:description)
482
+ @environment = args[:environment] if args.key?(:environment)
483
+ @event_trigger = args[:event_trigger] if args.key?(:event_trigger)
484
+ @labels = args[:labels] if args.key?(:labels)
485
+ @name = args[:name] if args.key?(:name)
486
+ @service_config = args[:service_config] if args.key?(:service_config)
487
+ @state = args[:state] if args.key?(:state)
488
+ @state_messages = args[:state_messages] if args.key?(:state_messages)
489
+ @update_time = args[:update_time] if args.key?(:update_time)
490
+ end
491
+ end
492
+
493
+ # Request of `GenerateDownloadUrl` method.
494
+ class GenerateDownloadUrlRequest
495
+ include Google::Apis::Core::Hashable
496
+
497
+ def initialize(**args)
498
+ update!(**args)
499
+ end
500
+
501
+ # Update properties of this object
502
+ def update!(**args)
503
+ end
504
+ end
505
+
506
+ # Response of `GenerateDownloadUrl` method.
507
+ class GenerateDownloadUrlResponse
508
+ include Google::Apis::Core::Hashable
509
+
510
+ # The generated Google Cloud Storage signed URL that should be used for function
511
+ # source code download.
512
+ # Corresponds to the JSON property `downloadUrl`
513
+ # @return [String]
514
+ attr_accessor :download_url
515
+
516
+ def initialize(**args)
517
+ update!(**args)
518
+ end
519
+
520
+ # Update properties of this object
521
+ def update!(**args)
522
+ @download_url = args[:download_url] if args.key?(:download_url)
523
+ end
524
+ end
525
+
526
+ # Request of `GenerateSourceUploadUrl` method.
527
+ class GenerateUploadUrlRequest
528
+ include Google::Apis::Core::Hashable
529
+
530
+ def initialize(**args)
531
+ update!(**args)
532
+ end
533
+
534
+ # Update properties of this object
535
+ def update!(**args)
536
+ end
537
+ end
538
+
539
+ # Response of `GenerateSourceUploadUrl` method.
540
+ class GenerateUploadUrlResponse
541
+ include Google::Apis::Core::Hashable
542
+
543
+ # Location of the source in an archive file in Google Cloud Storage.
544
+ # Corresponds to the JSON property `storageSource`
545
+ # @return [Google::Apis::CloudfunctionsV2::StorageSource]
546
+ attr_accessor :storage_source
547
+
548
+ # The generated Google Cloud Storage signed URL that should be used for a
549
+ # function source code upload. The uploaded file should be a zip archive which
550
+ # contains a function.
551
+ # Corresponds to the JSON property `uploadUrl`
552
+ # @return [String]
553
+ attr_accessor :upload_url
554
+
555
+ def initialize(**args)
556
+ update!(**args)
557
+ end
558
+
559
+ # Update properties of this object
560
+ def update!(**args)
561
+ @storage_source = args[:storage_source] if args.key?(:storage_source)
562
+ @upload_url = args[:upload_url] if args.key?(:upload_url)
563
+ end
564
+ end
565
+
566
+ # Represents the metadata of the long-running operation.
567
+ class GoogleCloudFunctionsV2OperationMetadata
568
+ include Google::Apis::Core::Hashable
569
+
570
+ # API version used to start the operation.
571
+ # Corresponds to the JSON property `apiVersion`
572
+ # @return [String]
573
+ attr_accessor :api_version
574
+
575
+ # Identifies whether the user has requested cancellation of the operation.
576
+ # Operations that have successfully been cancelled have Operation.error value
577
+ # with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
578
+ # Corresponds to the JSON property `cancelRequested`
579
+ # @return [Boolean]
580
+ attr_accessor :cancel_requested
581
+ alias_method :cancel_requested?, :cancel_requested
582
+
583
+ # The time the operation was created.
584
+ # Corresponds to the JSON property `createTime`
585
+ # @return [String]
586
+ attr_accessor :create_time
587
+
588
+ # The time the operation finished running.
589
+ # Corresponds to the JSON property `endTime`
590
+ # @return [String]
591
+ attr_accessor :end_time
592
+
593
+ # The original request that started the operation.
594
+ # Corresponds to the JSON property `requestResource`
595
+ # @return [Hash<String,Object>]
596
+ attr_accessor :request_resource
597
+
598
+ # Mechanism for reporting in-progress stages
599
+ # Corresponds to the JSON property `stages`
600
+ # @return [Array<Google::Apis::CloudfunctionsV2::GoogleCloudFunctionsV2Stage>]
601
+ attr_accessor :stages
602
+
603
+ # Human-readable status of the operation, if any.
604
+ # Corresponds to the JSON property `statusDetail`
605
+ # @return [String]
606
+ attr_accessor :status_detail
607
+
608
+ # Server-defined resource path for the target of the operation.
609
+ # Corresponds to the JSON property `target`
610
+ # @return [String]
611
+ attr_accessor :target
612
+
613
+ # Name of the verb executed by the operation.
614
+ # Corresponds to the JSON property `verb`
615
+ # @return [String]
616
+ attr_accessor :verb
617
+
618
+ def initialize(**args)
619
+ update!(**args)
620
+ end
621
+
622
+ # Update properties of this object
623
+ def update!(**args)
624
+ @api_version = args[:api_version] if args.key?(:api_version)
625
+ @cancel_requested = args[:cancel_requested] if args.key?(:cancel_requested)
626
+ @create_time = args[:create_time] if args.key?(:create_time)
627
+ @end_time = args[:end_time] if args.key?(:end_time)
628
+ @request_resource = args[:request_resource] if args.key?(:request_resource)
629
+ @stages = args[:stages] if args.key?(:stages)
630
+ @status_detail = args[:status_detail] if args.key?(:status_detail)
631
+ @target = args[:target] if args.key?(:target)
632
+ @verb = args[:verb] if args.key?(:verb)
633
+ end
634
+ end
635
+
636
+ # Each Stage of the deployment process
637
+ class GoogleCloudFunctionsV2Stage
638
+ include Google::Apis::Core::Hashable
639
+
640
+ # Message describing the Stage
641
+ # Corresponds to the JSON property `message`
642
+ # @return [String]
643
+ attr_accessor :message
644
+
645
+ # Name of the Stage. This will be unique for each Stage.
646
+ # Corresponds to the JSON property `name`
647
+ # @return [String]
648
+ attr_accessor :name
649
+
650
+ # Resource of the Stage
651
+ # Corresponds to the JSON property `resource`
652
+ # @return [String]
653
+ attr_accessor :resource
654
+
655
+ # Link to the current Stage resource
656
+ # Corresponds to the JSON property `resourceUri`
657
+ # @return [String]
658
+ attr_accessor :resource_uri
659
+
660
+ # Current state of the Stage
661
+ # Corresponds to the JSON property `state`
662
+ # @return [String]
663
+ attr_accessor :state
664
+
665
+ # State messages from the current Stage.
666
+ # Corresponds to the JSON property `stateMessages`
667
+ # @return [Array<Google::Apis::CloudfunctionsV2::GoogleCloudFunctionsV2StateMessage>]
668
+ attr_accessor :state_messages
669
+
670
+ def initialize(**args)
671
+ update!(**args)
672
+ end
673
+
674
+ # Update properties of this object
675
+ def update!(**args)
676
+ @message = args[:message] if args.key?(:message)
677
+ @name = args[:name] if args.key?(:name)
678
+ @resource = args[:resource] if args.key?(:resource)
679
+ @resource_uri = args[:resource_uri] if args.key?(:resource_uri)
680
+ @state = args[:state] if args.key?(:state)
681
+ @state_messages = args[:state_messages] if args.key?(:state_messages)
682
+ end
683
+ end
684
+
685
+ # Informational messages about the state of the Cloud Function or Operation.
686
+ class GoogleCloudFunctionsV2StateMessage
687
+ include Google::Apis::Core::Hashable
688
+
689
+ # The message.
690
+ # Corresponds to the JSON property `message`
193
691
  # @return [String]
194
- attr_accessor :expression
692
+ attr_accessor :message
195
693
 
196
- # Optional. String indicating the location of the expression for error reporting,
197
- # e.g. a file name and a position in the file.
198
- # Corresponds to the JSON property `location`
694
+ # Severity of the state message.
695
+ # Corresponds to the JSON property `severity`
199
696
  # @return [String]
200
- attr_accessor :location
697
+ attr_accessor :severity
201
698
 
202
- # Optional. Title for the expression, i.e. a short string describing its purpose.
203
- # This can be used e.g. in UIs which allow to enter the expression.
204
- # Corresponds to the JSON property `title`
699
+ # One-word CamelCase type of the state message.
700
+ # Corresponds to the JSON property `type`
205
701
  # @return [String]
206
- attr_accessor :title
702
+ attr_accessor :type
207
703
 
208
704
  def initialize(**args)
209
705
  update!(**args)
@@ -211,10 +707,9 @@ module Google
211
707
 
212
708
  # Update properties of this object
213
709
  def update!(**args)
214
- @description = args[:description] if args.key?(:description)
215
- @expression = args[:expression] if args.key?(:expression)
216
- @location = args[:location] if args.key?(:location)
217
- @title = args[:title] if args.key?(:title)
710
+ @message = args[:message] if args.key?(:message)
711
+ @severity = args[:severity] if args.key?(:severity)
712
+ @type = args[:type] if args.key?(:type)
218
713
  end
219
714
  end
220
715
 
@@ -518,6 +1013,39 @@ module Google
518
1013
  end
519
1014
  end
520
1015
 
1016
+ # Response for the `ListFunctions` method.
1017
+ class ListFunctionsResponse
1018
+ include Google::Apis::Core::Hashable
1019
+
1020
+ # The functions that match the request.
1021
+ # Corresponds to the JSON property `functions`
1022
+ # @return [Array<Google::Apis::CloudfunctionsV2::Function>]
1023
+ attr_accessor :functions
1024
+
1025
+ # A token, which can be sent as `page_token` to retrieve the next page. If this
1026
+ # field is omitted, there are no subsequent pages.
1027
+ # Corresponds to the JSON property `nextPageToken`
1028
+ # @return [String]
1029
+ attr_accessor :next_page_token
1030
+
1031
+ # Locations that could not be reached. The response does not include any
1032
+ # functions from these locations.
1033
+ # Corresponds to the JSON property `unreachable`
1034
+ # @return [Array<String>]
1035
+ attr_accessor :unreachable
1036
+
1037
+ def initialize(**args)
1038
+ update!(**args)
1039
+ end
1040
+
1041
+ # Update properties of this object
1042
+ def update!(**args)
1043
+ @functions = args[:functions] if args.key?(:functions)
1044
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1045
+ @unreachable = args[:unreachable] if args.key?(:unreachable)
1046
+ end
1047
+ end
1048
+
521
1049
  # The response message for Locations.ListLocations.
522
1050
  class ListLocationsResponse
523
1051
  include Google::Apis::Core::Hashable
@@ -568,6 +1096,25 @@ module Google
568
1096
  end
569
1097
  end
570
1098
 
1099
+ # Response for the `ListRuntimes` method.
1100
+ class ListRuntimesResponse
1101
+ include Google::Apis::Core::Hashable
1102
+
1103
+ # The runtimes that match the request.
1104
+ # Corresponds to the JSON property `runtimes`
1105
+ # @return [Array<Google::Apis::CloudfunctionsV2::Runtime>]
1106
+ attr_accessor :runtimes
1107
+
1108
+ def initialize(**args)
1109
+ update!(**args)
1110
+ end
1111
+
1112
+ # Update properties of this object
1113
+ def update!(**args)
1114
+ @runtimes = args[:runtimes] if args.key?(:runtimes)
1115
+ end
1116
+ end
1117
+
571
1118
  # A resource that represents Google Cloud Platform location.
572
1119
  class Location
573
1120
  include Google::Apis::Core::Hashable
@@ -838,6 +1385,362 @@ module Google
838
1385
  end
839
1386
  end
840
1387
 
1388
+ # Location of the source in a Google Cloud Source Repository.
1389
+ class RepoSource
1390
+ include Google::Apis::Core::Hashable
1391
+
1392
+ # Regex matching branches to build. The syntax of the regular expressions
1393
+ # accepted is the syntax accepted by RE2 and described at https://github.com/
1394
+ # google/re2/wiki/Syntax
1395
+ # Corresponds to the JSON property `branchName`
1396
+ # @return [String]
1397
+ attr_accessor :branch_name
1398
+
1399
+ # Explicit commit SHA to build.
1400
+ # Corresponds to the JSON property `commitSha`
1401
+ # @return [String]
1402
+ attr_accessor :commit_sha
1403
+
1404
+ # Directory, relative to the source root, in which to run the build. This must
1405
+ # be a relative path. If a step's `dir` is specified and is an absolute path,
1406
+ # this value is ignored for that step's execution. eg. helloworld (no leading
1407
+ # slash allowed)
1408
+ # Corresponds to the JSON property `dir`
1409
+ # @return [String]
1410
+ attr_accessor :dir
1411
+
1412
+ # Only trigger a build if the revision regex does NOT match the revision regex.
1413
+ # Corresponds to the JSON property `invertRegex`
1414
+ # @return [Boolean]
1415
+ attr_accessor :invert_regex
1416
+ alias_method :invert_regex?, :invert_regex
1417
+
1418
+ # ID of the project that owns the Cloud Source Repository. If omitted, the
1419
+ # project ID requesting the build is assumed.
1420
+ # Corresponds to the JSON property `projectId`
1421
+ # @return [String]
1422
+ attr_accessor :project_id
1423
+
1424
+ # Name of the Cloud Source Repository.
1425
+ # Corresponds to the JSON property `repoName`
1426
+ # @return [String]
1427
+ attr_accessor :repo_name
1428
+
1429
+ # Regex matching tags to build. The syntax of the regular expressions accepted
1430
+ # is the syntax accepted by RE2 and described at https://github.com/google/re2/
1431
+ # wiki/Syntax
1432
+ # Corresponds to the JSON property `tagName`
1433
+ # @return [String]
1434
+ attr_accessor :tag_name
1435
+
1436
+ def initialize(**args)
1437
+ update!(**args)
1438
+ end
1439
+
1440
+ # Update properties of this object
1441
+ def update!(**args)
1442
+ @branch_name = args[:branch_name] if args.key?(:branch_name)
1443
+ @commit_sha = args[:commit_sha] if args.key?(:commit_sha)
1444
+ @dir = args[:dir] if args.key?(:dir)
1445
+ @invert_regex = args[:invert_regex] if args.key?(:invert_regex)
1446
+ @project_id = args[:project_id] if args.key?(:project_id)
1447
+ @repo_name = args[:repo_name] if args.key?(:repo_name)
1448
+ @tag_name = args[:tag_name] if args.key?(:tag_name)
1449
+ end
1450
+ end
1451
+
1452
+ # Describes a runtime and any special information (e.g., deprecation status)
1453
+ # related to it.
1454
+ class Runtime
1455
+ include Google::Apis::Core::Hashable
1456
+
1457
+ # The user facing name, eg 'Go 1.13', 'Node.js 12', etc.
1458
+ # Corresponds to the JSON property `displayName`
1459
+ # @return [String]
1460
+ attr_accessor :display_name
1461
+
1462
+ # The environment for the runtime.
1463
+ # Corresponds to the JSON property `environment`
1464
+ # @return [String]
1465
+ attr_accessor :environment
1466
+
1467
+ # The name of the runtime, e.g., 'go113', 'nodejs12', etc.
1468
+ # Corresponds to the JSON property `name`
1469
+ # @return [String]
1470
+ attr_accessor :name
1471
+
1472
+ # The stage of life this runtime is in, e.g., BETA, GA, etc.
1473
+ # Corresponds to the JSON property `stage`
1474
+ # @return [String]
1475
+ attr_accessor :stage
1476
+
1477
+ # Warning messages, e.g., a deprecation warning.
1478
+ # Corresponds to the JSON property `warnings`
1479
+ # @return [Array<String>]
1480
+ attr_accessor :warnings
1481
+
1482
+ def initialize(**args)
1483
+ update!(**args)
1484
+ end
1485
+
1486
+ # Update properties of this object
1487
+ def update!(**args)
1488
+ @display_name = args[:display_name] if args.key?(:display_name)
1489
+ @environment = args[:environment] if args.key?(:environment)
1490
+ @name = args[:name] if args.key?(:name)
1491
+ @stage = args[:stage] if args.key?(:stage)
1492
+ @warnings = args[:warnings] if args.key?(:warnings)
1493
+ end
1494
+ end
1495
+
1496
+ # Configuration for a secret environment variable. It has the information
1497
+ # necessary to fetch the secret value from secret manager and expose it as an
1498
+ # environment variable.
1499
+ class SecretEnvVar
1500
+ include Google::Apis::Core::Hashable
1501
+
1502
+ # Name of the environment variable.
1503
+ # Corresponds to the JSON property `key`
1504
+ # @return [String]
1505
+ attr_accessor :key
1506
+
1507
+ # Project identifier (preferably project number but can also be the project ID)
1508
+ # of the project that contains the secret. If not set, it is assumed that the
1509
+ # secret is in the same project as the function.
1510
+ # Corresponds to the JSON property `projectId`
1511
+ # @return [String]
1512
+ attr_accessor :project_id
1513
+
1514
+ # Name of the secret in secret manager (not the full resource name).
1515
+ # Corresponds to the JSON property `secret`
1516
+ # @return [String]
1517
+ attr_accessor :secret
1518
+
1519
+ # Version of the secret (version number or the string 'latest'). It is
1520
+ # recommended to use a numeric version for secret environment variables as any
1521
+ # updates to the secret value is not reflected until new instances start.
1522
+ # Corresponds to the JSON property `version`
1523
+ # @return [String]
1524
+ attr_accessor :version
1525
+
1526
+ def initialize(**args)
1527
+ update!(**args)
1528
+ end
1529
+
1530
+ # Update properties of this object
1531
+ def update!(**args)
1532
+ @key = args[:key] if args.key?(:key)
1533
+ @project_id = args[:project_id] if args.key?(:project_id)
1534
+ @secret = args[:secret] if args.key?(:secret)
1535
+ @version = args[:version] if args.key?(:version)
1536
+ end
1537
+ end
1538
+
1539
+ # Configuration for a single version.
1540
+ class SecretVersion
1541
+ include Google::Apis::Core::Hashable
1542
+
1543
+ # Relative path of the file under the mount path where the secret value for this
1544
+ # version will be fetched and made available. For example, setting the
1545
+ # mount_path as '/etc/secrets' and path as `secret_foo` would mount the secret
1546
+ # value file at `/etc/secrets/secret_foo`.
1547
+ # Corresponds to the JSON property `path`
1548
+ # @return [String]
1549
+ attr_accessor :path
1550
+
1551
+ # Version of the secret (version number or the string 'latest'). It is
1552
+ # preferable to use `latest` version with secret volumes as secret value changes
1553
+ # are reflected immediately.
1554
+ # Corresponds to the JSON property `version`
1555
+ # @return [String]
1556
+ attr_accessor :version
1557
+
1558
+ def initialize(**args)
1559
+ update!(**args)
1560
+ end
1561
+
1562
+ # Update properties of this object
1563
+ def update!(**args)
1564
+ @path = args[:path] if args.key?(:path)
1565
+ @version = args[:version] if args.key?(:version)
1566
+ end
1567
+ end
1568
+
1569
+ # Configuration for a secret volume. It has the information necessary to fetch
1570
+ # the secret value from secret manager and make it available as files mounted at
1571
+ # the requested paths within the application container.
1572
+ class SecretVolume
1573
+ include Google::Apis::Core::Hashable
1574
+
1575
+ # The path within the container to mount the secret volume. For example, setting
1576
+ # the mount_path as `/etc/secrets` would mount the secret value files under the `
1577
+ # /etc/secrets` directory. This directory will also be completely shadowed and
1578
+ # unavailable to mount any other secrets. Recommended mount path: /etc/secrets
1579
+ # Corresponds to the JSON property `mountPath`
1580
+ # @return [String]
1581
+ attr_accessor :mount_path
1582
+
1583
+ # Project identifier (preferably project number but can also be the project ID)
1584
+ # of the project that contains the secret. If not set, it is assumed that the
1585
+ # secret is in the same project as the function.
1586
+ # Corresponds to the JSON property `projectId`
1587
+ # @return [String]
1588
+ attr_accessor :project_id
1589
+
1590
+ # Name of the secret in secret manager (not the full resource name).
1591
+ # Corresponds to the JSON property `secret`
1592
+ # @return [String]
1593
+ attr_accessor :secret
1594
+
1595
+ # List of secret versions to mount for this secret. If empty, the `latest`
1596
+ # version of the secret will be made available in a file named after the secret
1597
+ # under the mount point.
1598
+ # Corresponds to the JSON property `versions`
1599
+ # @return [Array<Google::Apis::CloudfunctionsV2::SecretVersion>]
1600
+ attr_accessor :versions
1601
+
1602
+ def initialize(**args)
1603
+ update!(**args)
1604
+ end
1605
+
1606
+ # Update properties of this object
1607
+ def update!(**args)
1608
+ @mount_path = args[:mount_path] if args.key?(:mount_path)
1609
+ @project_id = args[:project_id] if args.key?(:project_id)
1610
+ @secret = args[:secret] if args.key?(:secret)
1611
+ @versions = args[:versions] if args.key?(:versions)
1612
+ end
1613
+ end
1614
+
1615
+ # Describes the Service being deployed. Currently Supported : Cloud Run (fully
1616
+ # managed).
1617
+ class ServiceConfig
1618
+ include Google::Apis::Core::Hashable
1619
+
1620
+ # Whether 100% of traffic is routed to the latest revision. On CreateFunction
1621
+ # and UpdateFunction, when set to true, the revision being deployed will serve
1622
+ # 100% of traffic, ignoring any traffic split settings, if any. On GetFunction,
1623
+ # true will be returned if the latest revision is serving 100% of traffic.
1624
+ # Corresponds to the JSON property `allTrafficOnLatestRevision`
1625
+ # @return [Boolean]
1626
+ attr_accessor :all_traffic_on_latest_revision
1627
+ alias_method :all_traffic_on_latest_revision?, :all_traffic_on_latest_revision
1628
+
1629
+ # The amount of memory available for a function. Defaults to 256M. Supported
1630
+ # units are k, M, G, Mi, Gi. If no unit is supplied the value is interpreted as
1631
+ # bytes. See https://github.com/kubernetes/kubernetes/blob/master/staging/src/
1632
+ # k8s.io/apimachinery/pkg/api/resource/quantity.go a full description.
1633
+ # Corresponds to the JSON property `availableMemory`
1634
+ # @return [String]
1635
+ attr_accessor :available_memory
1636
+
1637
+ # Environment variables that shall be available during function execution.
1638
+ # Corresponds to the JSON property `environmentVariables`
1639
+ # @return [Hash<String,String>]
1640
+ attr_accessor :environment_variables
1641
+
1642
+ # The ingress settings for the function, controlling what traffic can reach it.
1643
+ # Corresponds to the JSON property `ingressSettings`
1644
+ # @return [String]
1645
+ attr_accessor :ingress_settings
1646
+
1647
+ # The limit on the maximum number of function instances that may coexist at a
1648
+ # given time. In some cases, such as rapid traffic surges, Cloud Functions may,
1649
+ # for a short period of time, create more instances than the specified max
1650
+ # instances limit. If your function cannot tolerate this temporary behavior, you
1651
+ # may want to factor in a safety margin and set a lower max instances value than
1652
+ # your function can tolerate. See the [Max Instances](https://cloud.google.com/
1653
+ # functions/docs/max-instances) Guide for more details.
1654
+ # Corresponds to the JSON property `maxInstanceCount`
1655
+ # @return [Fixnum]
1656
+ attr_accessor :max_instance_count
1657
+
1658
+ # The limit on the minimum number of function instances that may coexist at a
1659
+ # given time. Function instances are kept in idle state for a short period after
1660
+ # they finished executing the request to reduce cold start time for subsequent
1661
+ # requests. Setting a minimum instance count will ensure that the given number
1662
+ # of instances are kept running in idle state always. This can help with cold
1663
+ # start times when jump in incoming request count occurs after the idle instance
1664
+ # would have been stopped in the default case.
1665
+ # Corresponds to the JSON property `minInstanceCount`
1666
+ # @return [Fixnum]
1667
+ attr_accessor :min_instance_count
1668
+
1669
+ # Output only. The name of service revision.
1670
+ # Corresponds to the JSON property `revision`
1671
+ # @return [String]
1672
+ attr_accessor :revision
1673
+
1674
+ # Secret environment variables configuration.
1675
+ # Corresponds to the JSON property `secretEnvironmentVariables`
1676
+ # @return [Array<Google::Apis::CloudfunctionsV2::SecretEnvVar>]
1677
+ attr_accessor :secret_environment_variables
1678
+
1679
+ # Secret volumes configuration.
1680
+ # Corresponds to the JSON property `secretVolumes`
1681
+ # @return [Array<Google::Apis::CloudfunctionsV2::SecretVolume>]
1682
+ attr_accessor :secret_volumes
1683
+
1684
+ # Output only. Name of the service associated with a Function. The format of
1685
+ # this field is `projects/`project`/locations/`region`/services/`service``
1686
+ # Corresponds to the JSON property `service`
1687
+ # @return [String]
1688
+ attr_accessor :service
1689
+
1690
+ # The email of the service's service account. If empty, defaults to ``
1691
+ # project_number`-compute@developer.gserviceaccount.com`.
1692
+ # Corresponds to the JSON property `serviceAccountEmail`
1693
+ # @return [String]
1694
+ attr_accessor :service_account_email
1695
+
1696
+ # The function execution timeout. Execution is considered failed and can be
1697
+ # terminated if the function is not completed at the end of the timeout period.
1698
+ # Defaults to 60 seconds.
1699
+ # Corresponds to the JSON property `timeoutSeconds`
1700
+ # @return [Fixnum]
1701
+ attr_accessor :timeout_seconds
1702
+
1703
+ # Output only. URI of the Service deployed.
1704
+ # Corresponds to the JSON property `uri`
1705
+ # @return [String]
1706
+ attr_accessor :uri
1707
+
1708
+ # The Serverless VPC Access connector that this cloud function can connect to.
1709
+ # The format of this field is `projects/*/locations/*/connectors/*`.
1710
+ # Corresponds to the JSON property `vpcConnector`
1711
+ # @return [String]
1712
+ attr_accessor :vpc_connector
1713
+
1714
+ # The egress settings for the connector, controlling what traffic is diverted
1715
+ # through it.
1716
+ # Corresponds to the JSON property `vpcConnectorEgressSettings`
1717
+ # @return [String]
1718
+ attr_accessor :vpc_connector_egress_settings
1719
+
1720
+ def initialize(**args)
1721
+ update!(**args)
1722
+ end
1723
+
1724
+ # Update properties of this object
1725
+ def update!(**args)
1726
+ @all_traffic_on_latest_revision = args[:all_traffic_on_latest_revision] if args.key?(:all_traffic_on_latest_revision)
1727
+ @available_memory = args[:available_memory] if args.key?(:available_memory)
1728
+ @environment_variables = args[:environment_variables] if args.key?(:environment_variables)
1729
+ @ingress_settings = args[:ingress_settings] if args.key?(:ingress_settings)
1730
+ @max_instance_count = args[:max_instance_count] if args.key?(:max_instance_count)
1731
+ @min_instance_count = args[:min_instance_count] if args.key?(:min_instance_count)
1732
+ @revision = args[:revision] if args.key?(:revision)
1733
+ @secret_environment_variables = args[:secret_environment_variables] if args.key?(:secret_environment_variables)
1734
+ @secret_volumes = args[:secret_volumes] if args.key?(:secret_volumes)
1735
+ @service = args[:service] if args.key?(:service)
1736
+ @service_account_email = args[:service_account_email] if args.key?(:service_account_email)
1737
+ @timeout_seconds = args[:timeout_seconds] if args.key?(:timeout_seconds)
1738
+ @uri = args[:uri] if args.key?(:uri)
1739
+ @vpc_connector = args[:vpc_connector] if args.key?(:vpc_connector)
1740
+ @vpc_connector_egress_settings = args[:vpc_connector_egress_settings] if args.key?(:vpc_connector_egress_settings)
1741
+ end
1742
+ end
1743
+
841
1744
  # Request message for `SetIamPolicy` method.
842
1745
  class SetIamPolicyRequest
843
1746
  include Google::Apis::Core::Hashable
@@ -891,6 +1794,57 @@ module Google
891
1794
  end
892
1795
  end
893
1796
 
1797
+ # The location of the function source code.
1798
+ class Source
1799
+ include Google::Apis::Core::Hashable
1800
+
1801
+ # Location of the source in a Google Cloud Source Repository.
1802
+ # Corresponds to the JSON property `repoSource`
1803
+ # @return [Google::Apis::CloudfunctionsV2::RepoSource]
1804
+ attr_accessor :repo_source
1805
+
1806
+ # Location of the source in an archive file in Google Cloud Storage.
1807
+ # Corresponds to the JSON property `storageSource`
1808
+ # @return [Google::Apis::CloudfunctionsV2::StorageSource]
1809
+ attr_accessor :storage_source
1810
+
1811
+ def initialize(**args)
1812
+ update!(**args)
1813
+ end
1814
+
1815
+ # Update properties of this object
1816
+ def update!(**args)
1817
+ @repo_source = args[:repo_source] if args.key?(:repo_source)
1818
+ @storage_source = args[:storage_source] if args.key?(:storage_source)
1819
+ end
1820
+ end
1821
+
1822
+ # Provenance of the source. Ways to find the original source, or verify that
1823
+ # some source was used for this build.
1824
+ class SourceProvenance
1825
+ include Google::Apis::Core::Hashable
1826
+
1827
+ # Location of the source in a Google Cloud Source Repository.
1828
+ # Corresponds to the JSON property `resolvedRepoSource`
1829
+ # @return [Google::Apis::CloudfunctionsV2::RepoSource]
1830
+ attr_accessor :resolved_repo_source
1831
+
1832
+ # Location of the source in an archive file in Google Cloud Storage.
1833
+ # Corresponds to the JSON property `resolvedStorageSource`
1834
+ # @return [Google::Apis::CloudfunctionsV2::StorageSource]
1835
+ attr_accessor :resolved_storage_source
1836
+
1837
+ def initialize(**args)
1838
+ update!(**args)
1839
+ end
1840
+
1841
+ # Update properties of this object
1842
+ def update!(**args)
1843
+ @resolved_repo_source = args[:resolved_repo_source] if args.key?(:resolved_repo_source)
1844
+ @resolved_storage_source = args[:resolved_storage_source] if args.key?(:resolved_storage_source)
1845
+ end
1846
+ end
1847
+
894
1848
  # The `Status` type defines a logical error model that is suitable for different
895
1849
  # programming environments, including REST APIs and RPC APIs. It is used by [
896
1850
  # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
@@ -930,6 +1884,41 @@ module Google
930
1884
  end
931
1885
  end
932
1886
 
1887
+ # Location of the source in an archive file in Google Cloud Storage.
1888
+ class StorageSource
1889
+ include Google::Apis::Core::Hashable
1890
+
1891
+ # Google Cloud Storage bucket containing the source (see [Bucket Name
1892
+ # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)
1893
+ # ).
1894
+ # Corresponds to the JSON property `bucket`
1895
+ # @return [String]
1896
+ attr_accessor :bucket
1897
+
1898
+ # Google Cloud Storage generation for the object. If the generation is omitted,
1899
+ # the latest generation will be used.
1900
+ # Corresponds to the JSON property `generation`
1901
+ # @return [Fixnum]
1902
+ attr_accessor :generation
1903
+
1904
+ # Google Cloud Storage object containing the source. This object must be a
1905
+ # gzipped archive file (`.tar.gz`) containing source to build.
1906
+ # Corresponds to the JSON property `object`
1907
+ # @return [String]
1908
+ attr_accessor :object
1909
+
1910
+ def initialize(**args)
1911
+ update!(**args)
1912
+ end
1913
+
1914
+ # Update properties of this object
1915
+ def update!(**args)
1916
+ @bucket = args[:bucket] if args.key?(:bucket)
1917
+ @generation = args[:generation] if args.key?(:generation)
1918
+ @object = args[:object] if args.key?(:object)
1919
+ end
1920
+ end
1921
+
933
1922
  # Request message for `TestIamPermissions` method.
934
1923
  class TestIamPermissionsRequest
935
1924
  include Google::Apis::Core::Hashable