google-apis-cloudfunctions_v2alpha 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +13 -0
- data/CHANGELOG.md +7 -0
- data/LICENSE.md +202 -0
- data/OVERVIEW.md +96 -0
- data/lib/google/apis/cloudfunctions_v2alpha/classes.rb +1659 -0
- data/lib/google/apis/cloudfunctions_v2alpha/gem_version.rb +28 -0
- data/lib/google/apis/cloudfunctions_v2alpha/representations.rb +629 -0
- data/lib/google/apis/cloudfunctions_v2alpha/service.rb +616 -0
- data/lib/google/apis/cloudfunctions_v2alpha.rb +36 -0
- data/lib/google-apis-cloudfunctions_v2alpha.rb +15 -0
- metadata +82 -0
@@ -0,0 +1,1659 @@
|
|
1
|
+
# Copyright 2020 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require 'date'
|
16
|
+
require 'google/apis/core/base_service'
|
17
|
+
require 'google/apis/core/json_representation'
|
18
|
+
require 'google/apis/core/hashable'
|
19
|
+
require 'google/apis/errors'
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Apis
|
23
|
+
module CloudfunctionsV2alpha
|
24
|
+
|
25
|
+
# Specifies the audit configuration for a service. The configuration determines
|
26
|
+
# which permission types are logged, and what identities, if any, are exempted
|
27
|
+
# from logging. An AuditConfig must have one or more AuditLogConfigs. If there
|
28
|
+
# are AuditConfigs for both `allServices` and a specific service, the union of
|
29
|
+
# the two AuditConfigs is used for that service: the log_types specified in each
|
30
|
+
# AuditConfig are enabled, and the exempted_members in each AuditLogConfig are
|
31
|
+
# exempted. Example Policy with multiple AuditConfigs: ` "audit_configs": [ ` "
|
32
|
+
# service": "allServices", "audit_log_configs": [ ` "log_type": "DATA_READ", "
|
33
|
+
# exempted_members": [ "user:jose@example.com" ] `, ` "log_type": "DATA_WRITE" `,
|
34
|
+
# ` "log_type": "ADMIN_READ" ` ] `, ` "service": "sampleservice.googleapis.com",
|
35
|
+
# "audit_log_configs": [ ` "log_type": "DATA_READ" `, ` "log_type": "DATA_WRITE"
|
36
|
+
# , "exempted_members": [ "user:aliya@example.com" ] ` ] ` ] ` For sampleservice,
|
37
|
+
# this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also
|
38
|
+
# exempts jose@example.com from DATA_READ logging, and aliya@example.com from
|
39
|
+
# DATA_WRITE logging.
|
40
|
+
class AuditConfig
|
41
|
+
include Google::Apis::Core::Hashable
|
42
|
+
|
43
|
+
# The configuration for logging of each type of permission.
|
44
|
+
# Corresponds to the JSON property `auditLogConfigs`
|
45
|
+
# @return [Array<Google::Apis::CloudfunctionsV2alpha::AuditLogConfig>]
|
46
|
+
attr_accessor :audit_log_configs
|
47
|
+
|
48
|
+
# Specifies a service that will be enabled for audit logging. For example, `
|
49
|
+
# storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special
|
50
|
+
# value that covers all services.
|
51
|
+
# Corresponds to the JSON property `service`
|
52
|
+
# @return [String]
|
53
|
+
attr_accessor :service
|
54
|
+
|
55
|
+
def initialize(**args)
|
56
|
+
update!(**args)
|
57
|
+
end
|
58
|
+
|
59
|
+
# Update properties of this object
|
60
|
+
def update!(**args)
|
61
|
+
@audit_log_configs = args[:audit_log_configs] if args.key?(:audit_log_configs)
|
62
|
+
@service = args[:service] if args.key?(:service)
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
# Provides the configuration for logging a type of permissions. Example: ` "
|
67
|
+
# audit_log_configs": [ ` "log_type": "DATA_READ", "exempted_members": [ "user:
|
68
|
+
# jose@example.com" ] `, ` "log_type": "DATA_WRITE" ` ] ` This enables '
|
69
|
+
# DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from
|
70
|
+
# DATA_READ logging.
|
71
|
+
class AuditLogConfig
|
72
|
+
include Google::Apis::Core::Hashable
|
73
|
+
|
74
|
+
# Specifies the identities that do not cause logging for this type of permission.
|
75
|
+
# Follows the same format of Binding.members.
|
76
|
+
# Corresponds to the JSON property `exemptedMembers`
|
77
|
+
# @return [Array<String>]
|
78
|
+
attr_accessor :exempted_members
|
79
|
+
|
80
|
+
# The log type that this config enables.
|
81
|
+
# Corresponds to the JSON property `logType`
|
82
|
+
# @return [String]
|
83
|
+
attr_accessor :log_type
|
84
|
+
|
85
|
+
def initialize(**args)
|
86
|
+
update!(**args)
|
87
|
+
end
|
88
|
+
|
89
|
+
# Update properties of this object
|
90
|
+
def update!(**args)
|
91
|
+
@exempted_members = args[:exempted_members] if args.key?(:exempted_members)
|
92
|
+
@log_type = args[:log_type] if args.key?(:log_type)
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
96
|
+
# Associates `members`, or principals, with a `role`.
|
97
|
+
class Binding
|
98
|
+
include Google::Apis::Core::Hashable
|
99
|
+
|
100
|
+
# Represents a textual expression in the Common Expression Language (CEL) syntax.
|
101
|
+
# CEL is a C-like expression language. The syntax and semantics of CEL are
|
102
|
+
# documented at https://github.com/google/cel-spec. Example (Comparison): title:
|
103
|
+
# "Summary size limit" description: "Determines if a summary is less than 100
|
104
|
+
# chars" expression: "document.summary.size() < 100" Example (Equality): title: "
|
105
|
+
# Requestor is owner" description: "Determines if requestor is the document
|
106
|
+
# owner" expression: "document.owner == request.auth.claims.email" Example (
|
107
|
+
# Logic): title: "Public documents" description: "Determine whether the document
|
108
|
+
# should be publicly visible" expression: "document.type != 'private' &&
|
109
|
+
# document.type != 'internal'" Example (Data Manipulation): title: "Notification
|
110
|
+
# string" description: "Create a notification string with a timestamp."
|
111
|
+
# expression: "'New message received at ' + string(document.create_time)" The
|
112
|
+
# exact variables and functions that may be referenced within an expression are
|
113
|
+
# determined by the service that evaluates it. See the service documentation for
|
114
|
+
# additional information.
|
115
|
+
# Corresponds to the JSON property `condition`
|
116
|
+
# @return [Google::Apis::CloudfunctionsV2alpha::Expr]
|
117
|
+
attr_accessor :condition
|
118
|
+
|
119
|
+
# Specifies the principals requesting access for a Cloud Platform resource. `
|
120
|
+
# members` can have the following values: * `allUsers`: A special identifier
|
121
|
+
# that represents anyone who is on the internet; with or without a Google
|
122
|
+
# account. * `allAuthenticatedUsers`: A special identifier that represents
|
123
|
+
# anyone who is authenticated with a Google account or a service account. * `
|
124
|
+
# user:`emailid``: An email address that represents a specific Google account.
|
125
|
+
# For example, `alice@example.com` . * `serviceAccount:`emailid``: An email
|
126
|
+
# address that represents a service account. For example, `my-other-app@appspot.
|
127
|
+
# gserviceaccount.com`. * `group:`emailid``: An email address that represents a
|
128
|
+
# Google group. For example, `admins@example.com`. * `deleted:user:`emailid`?uid=
|
129
|
+
# `uniqueid``: An email address (plus unique identifier) representing a user
|
130
|
+
# that has been recently deleted. For example, `alice@example.com?uid=
|
131
|
+
# 123456789012345678901`. If the user is recovered, this value reverts to `user:`
|
132
|
+
# emailid`` and the recovered user retains the role in the binding. * `deleted:
|
133
|
+
# serviceAccount:`emailid`?uid=`uniqueid``: An email address (plus unique
|
134
|
+
# identifier) representing a service account that has been recently deleted. For
|
135
|
+
# example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
|
136
|
+
# If the service account is undeleted, this value reverts to `serviceAccount:`
|
137
|
+
# emailid`` and the undeleted service account retains the role in the binding. *
|
138
|
+
# `deleted:group:`emailid`?uid=`uniqueid``: An email address (plus unique
|
139
|
+
# identifier) representing a Google group that has been recently deleted. For
|
140
|
+
# example, `admins@example.com?uid=123456789012345678901`. If the group is
|
141
|
+
# recovered, this value reverts to `group:`emailid`` and the recovered group
|
142
|
+
# retains the role in the binding. * `domain:`domain``: The G Suite domain (
|
143
|
+
# primary) that represents all the users of that domain. For example, `google.
|
144
|
+
# com` or `example.com`.
|
145
|
+
# Corresponds to the JSON property `members`
|
146
|
+
# @return [Array<String>]
|
147
|
+
attr_accessor :members
|
148
|
+
|
149
|
+
# Role that is assigned to the list of `members`, or principals. For example, `
|
150
|
+
# roles/viewer`, `roles/editor`, or `roles/owner`.
|
151
|
+
# Corresponds to the JSON property `role`
|
152
|
+
# @return [String]
|
153
|
+
attr_accessor :role
|
154
|
+
|
155
|
+
def initialize(**args)
|
156
|
+
update!(**args)
|
157
|
+
end
|
158
|
+
|
159
|
+
# Update properties of this object
|
160
|
+
def update!(**args)
|
161
|
+
@condition = args[:condition] if args.key?(:condition)
|
162
|
+
@members = args[:members] if args.key?(:members)
|
163
|
+
@role = args[:role] if args.key?(:role)
|
164
|
+
end
|
165
|
+
end
|
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::CloudfunctionsV2alpha::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::CloudfunctionsV2alpha::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
|
+
# Required. The value for the attribute.
|
262
|
+
# Corresponds to the JSON property `value`
|
263
|
+
# @return [String]
|
264
|
+
attr_accessor :value
|
265
|
+
|
266
|
+
def initialize(**args)
|
267
|
+
update!(**args)
|
268
|
+
end
|
269
|
+
|
270
|
+
# Update properties of this object
|
271
|
+
def update!(**args)
|
272
|
+
@attribute = args[:attribute] if args.key?(:attribute)
|
273
|
+
@value = args[:value] if args.key?(:value)
|
274
|
+
end
|
275
|
+
end
|
276
|
+
|
277
|
+
# Describes EventTrigger, used to request events to be sent from another service.
|
278
|
+
class EventTrigger
|
279
|
+
include Google::Apis::Core::Hashable
|
280
|
+
|
281
|
+
# Criteria used to filter events.
|
282
|
+
# Corresponds to the JSON property `eventFilters`
|
283
|
+
# @return [Array<Google::Apis::CloudfunctionsV2alpha::EventFilter>]
|
284
|
+
attr_accessor :event_filters
|
285
|
+
|
286
|
+
# Required. The type of event to observe. For example: `google.cloud.audit.log.
|
287
|
+
# v1.written` or `google.cloud.pubsub.topic.v1.messagePublished`.
|
288
|
+
# Corresponds to the JSON property `eventType`
|
289
|
+
# @return [String]
|
290
|
+
attr_accessor :event_type
|
291
|
+
|
292
|
+
# Optional. The name of a Pub/Sub topic in the same project that will be used as
|
293
|
+
# the transport topic for the event delivery. Format: `projects/`project`/topics/
|
294
|
+
# `topic``. This is only valid for events of type `google.cloud.pubsub.topic.v1.
|
295
|
+
# messagePublished`. The topic provided here will not be deleted at function
|
296
|
+
# deletion.
|
297
|
+
# Corresponds to the JSON property `pubsubTopic`
|
298
|
+
# @return [String]
|
299
|
+
attr_accessor :pubsub_topic
|
300
|
+
|
301
|
+
# Optional. If unset, then defaults to ignoring failures (i.e. not retrying them)
|
302
|
+
# .
|
303
|
+
# Corresponds to the JSON property `retryPolicy`
|
304
|
+
# @return [String]
|
305
|
+
attr_accessor :retry_policy
|
306
|
+
|
307
|
+
# Optional. The email of the trigger's service account. The service account must
|
308
|
+
# have permission to invoke Cloud Run services, the permission is `run.routes.
|
309
|
+
# invoke`. If empty, defaults to the Compute Engine default service account: ``
|
310
|
+
# project_number`-compute@developer.gserviceaccount.com`.
|
311
|
+
# Corresponds to the JSON property `serviceAccountEmail`
|
312
|
+
# @return [String]
|
313
|
+
attr_accessor :service_account_email
|
314
|
+
|
315
|
+
# Output only. The resource name of the Eventarc trigger. The format of this
|
316
|
+
# field is `projects/`project`/locations/`region`/triggers/`trigger``.
|
317
|
+
# Corresponds to the JSON property `trigger`
|
318
|
+
# @return [String]
|
319
|
+
attr_accessor :trigger
|
320
|
+
|
321
|
+
# The region that the trigger will be in. The trigger will only receive events
|
322
|
+
# originating in this region. It can be the same region as the function, a
|
323
|
+
# different region or multi-region, or the global region. If not provided,
|
324
|
+
# defaults to the same region as the function.
|
325
|
+
# Corresponds to the JSON property `triggerRegion`
|
326
|
+
# @return [String]
|
327
|
+
attr_accessor :trigger_region
|
328
|
+
|
329
|
+
def initialize(**args)
|
330
|
+
update!(**args)
|
331
|
+
end
|
332
|
+
|
333
|
+
# Update properties of this object
|
334
|
+
def update!(**args)
|
335
|
+
@event_filters = args[:event_filters] if args.key?(:event_filters)
|
336
|
+
@event_type = args[:event_type] if args.key?(:event_type)
|
337
|
+
@pubsub_topic = args[:pubsub_topic] if args.key?(:pubsub_topic)
|
338
|
+
@retry_policy = args[:retry_policy] if args.key?(:retry_policy)
|
339
|
+
@service_account_email = args[:service_account_email] if args.key?(:service_account_email)
|
340
|
+
@trigger = args[:trigger] if args.key?(:trigger)
|
341
|
+
@trigger_region = args[:trigger_region] if args.key?(:trigger_region)
|
342
|
+
end
|
343
|
+
end
|
344
|
+
|
345
|
+
# Represents a textual expression in the Common Expression Language (CEL) syntax.
|
346
|
+
# CEL is a C-like expression language. The syntax and semantics of CEL are
|
347
|
+
# documented at https://github.com/google/cel-spec. Example (Comparison): title:
|
348
|
+
# "Summary size limit" description: "Determines if a summary is less than 100
|
349
|
+
# chars" expression: "document.summary.size() < 100" Example (Equality): title: "
|
350
|
+
# Requestor is owner" description: "Determines if requestor is the document
|
351
|
+
# owner" expression: "document.owner == request.auth.claims.email" Example (
|
352
|
+
# Logic): title: "Public documents" description: "Determine whether the document
|
353
|
+
# should be publicly visible" expression: "document.type != 'private' &&
|
354
|
+
# document.type != 'internal'" Example (Data Manipulation): title: "Notification
|
355
|
+
# string" description: "Create a notification string with a timestamp."
|
356
|
+
# expression: "'New message received at ' + string(document.create_time)" The
|
357
|
+
# exact variables and functions that may be referenced within an expression are
|
358
|
+
# determined by the service that evaluates it. See the service documentation for
|
359
|
+
# additional information.
|
360
|
+
class Expr
|
361
|
+
include Google::Apis::Core::Hashable
|
362
|
+
|
363
|
+
# Optional. Description of the expression. This is a longer text which describes
|
364
|
+
# the expression, e.g. when hovered over it in a UI.
|
365
|
+
# Corresponds to the JSON property `description`
|
366
|
+
# @return [String]
|
367
|
+
attr_accessor :description
|
368
|
+
|
369
|
+
# Textual representation of an expression in Common Expression Language syntax.
|
370
|
+
# Corresponds to the JSON property `expression`
|
371
|
+
# @return [String]
|
372
|
+
attr_accessor :expression
|
373
|
+
|
374
|
+
# Optional. String indicating the location of the expression for error reporting,
|
375
|
+
# e.g. a file name and a position in the file.
|
376
|
+
# Corresponds to the JSON property `location`
|
377
|
+
# @return [String]
|
378
|
+
attr_accessor :location
|
379
|
+
|
380
|
+
# Optional. Title for the expression, i.e. a short string describing its purpose.
|
381
|
+
# This can be used e.g. in UIs which allow to enter the expression.
|
382
|
+
# Corresponds to the JSON property `title`
|
383
|
+
# @return [String]
|
384
|
+
attr_accessor :title
|
385
|
+
|
386
|
+
def initialize(**args)
|
387
|
+
update!(**args)
|
388
|
+
end
|
389
|
+
|
390
|
+
# Update properties of this object
|
391
|
+
def update!(**args)
|
392
|
+
@description = args[:description] if args.key?(:description)
|
393
|
+
@expression = args[:expression] if args.key?(:expression)
|
394
|
+
@location = args[:location] if args.key?(:location)
|
395
|
+
@title = args[:title] if args.key?(:title)
|
396
|
+
end
|
397
|
+
end
|
398
|
+
|
399
|
+
# Describes a Cloud Function that contains user computation executed in response
|
400
|
+
# to an event. It encapsulate function and triggers configurations.
|
401
|
+
class Function
|
402
|
+
include Google::Apis::Core::Hashable
|
403
|
+
|
404
|
+
# Describes the Build step of the function that builds a container from the
|
405
|
+
# given source.
|
406
|
+
# Corresponds to the JSON property `buildConfig`
|
407
|
+
# @return [Google::Apis::CloudfunctionsV2alpha::BuildConfig]
|
408
|
+
attr_accessor :build_config
|
409
|
+
|
410
|
+
# User-provided description of a function.
|
411
|
+
# Corresponds to the JSON property `description`
|
412
|
+
# @return [String]
|
413
|
+
attr_accessor :description
|
414
|
+
|
415
|
+
# Describe whether the function is gen1 or gen2.
|
416
|
+
# Corresponds to the JSON property `environment`
|
417
|
+
# @return [String]
|
418
|
+
attr_accessor :environment
|
419
|
+
|
420
|
+
# Describes EventTrigger, used to request events to be sent from another service.
|
421
|
+
# Corresponds to the JSON property `eventTrigger`
|
422
|
+
# @return [Google::Apis::CloudfunctionsV2alpha::EventTrigger]
|
423
|
+
attr_accessor :event_trigger
|
424
|
+
|
425
|
+
# Labels associated with this Cloud Function.
|
426
|
+
# Corresponds to the JSON property `labels`
|
427
|
+
# @return [Hash<String,String>]
|
428
|
+
attr_accessor :labels
|
429
|
+
|
430
|
+
# A user-defined name of the function. Function names must be unique globally
|
431
|
+
# and match pattern `projects/*/locations/*/functions/*`
|
432
|
+
# Corresponds to the JSON property `name`
|
433
|
+
# @return [String]
|
434
|
+
attr_accessor :name
|
435
|
+
|
436
|
+
# Describes the Service being deployed. Currently Supported : Cloud Run (fully
|
437
|
+
# managed).
|
438
|
+
# Corresponds to the JSON property `serviceConfig`
|
439
|
+
# @return [Google::Apis::CloudfunctionsV2alpha::ServiceConfig]
|
440
|
+
attr_accessor :service_config
|
441
|
+
|
442
|
+
# Output only. State of the function.
|
443
|
+
# Corresponds to the JSON property `state`
|
444
|
+
# @return [String]
|
445
|
+
attr_accessor :state
|
446
|
+
|
447
|
+
# Output only. State Messages for this Cloud Function.
|
448
|
+
# Corresponds to the JSON property `stateMessages`
|
449
|
+
# @return [Array<Google::Apis::CloudfunctionsV2alpha::GoogleCloudFunctionsV2alphaStateMessage>]
|
450
|
+
attr_accessor :state_messages
|
451
|
+
|
452
|
+
# Output only. The last update timestamp of a Cloud Function.
|
453
|
+
# Corresponds to the JSON property `updateTime`
|
454
|
+
# @return [String]
|
455
|
+
attr_accessor :update_time
|
456
|
+
|
457
|
+
def initialize(**args)
|
458
|
+
update!(**args)
|
459
|
+
end
|
460
|
+
|
461
|
+
# Update properties of this object
|
462
|
+
def update!(**args)
|
463
|
+
@build_config = args[:build_config] if args.key?(:build_config)
|
464
|
+
@description = args[:description] if args.key?(:description)
|
465
|
+
@environment = args[:environment] if args.key?(:environment)
|
466
|
+
@event_trigger = args[:event_trigger] if args.key?(:event_trigger)
|
467
|
+
@labels = args[:labels] if args.key?(:labels)
|
468
|
+
@name = args[:name] if args.key?(:name)
|
469
|
+
@service_config = args[:service_config] if args.key?(:service_config)
|
470
|
+
@state = args[:state] if args.key?(:state)
|
471
|
+
@state_messages = args[:state_messages] if args.key?(:state_messages)
|
472
|
+
@update_time = args[:update_time] if args.key?(:update_time)
|
473
|
+
end
|
474
|
+
end
|
475
|
+
|
476
|
+
# Request of `GenerateDownloadUrl` method.
|
477
|
+
class GenerateDownloadUrlRequest
|
478
|
+
include Google::Apis::Core::Hashable
|
479
|
+
|
480
|
+
def initialize(**args)
|
481
|
+
update!(**args)
|
482
|
+
end
|
483
|
+
|
484
|
+
# Update properties of this object
|
485
|
+
def update!(**args)
|
486
|
+
end
|
487
|
+
end
|
488
|
+
|
489
|
+
# Response of `GenerateDownloadUrl` method.
|
490
|
+
class GenerateDownloadUrlResponse
|
491
|
+
include Google::Apis::Core::Hashable
|
492
|
+
|
493
|
+
# The generated Google Cloud Storage signed URL that should be used for function
|
494
|
+
# source code download.
|
495
|
+
# Corresponds to the JSON property `downloadUrl`
|
496
|
+
# @return [String]
|
497
|
+
attr_accessor :download_url
|
498
|
+
|
499
|
+
def initialize(**args)
|
500
|
+
update!(**args)
|
501
|
+
end
|
502
|
+
|
503
|
+
# Update properties of this object
|
504
|
+
def update!(**args)
|
505
|
+
@download_url = args[:download_url] if args.key?(:download_url)
|
506
|
+
end
|
507
|
+
end
|
508
|
+
|
509
|
+
# Request of `GenerateSourceUploadUrl` method.
|
510
|
+
class GenerateUploadUrlRequest
|
511
|
+
include Google::Apis::Core::Hashable
|
512
|
+
|
513
|
+
def initialize(**args)
|
514
|
+
update!(**args)
|
515
|
+
end
|
516
|
+
|
517
|
+
# Update properties of this object
|
518
|
+
def update!(**args)
|
519
|
+
end
|
520
|
+
end
|
521
|
+
|
522
|
+
# Response of `GenerateSourceUploadUrl` method.
|
523
|
+
class GenerateUploadUrlResponse
|
524
|
+
include Google::Apis::Core::Hashable
|
525
|
+
|
526
|
+
# Location of the source in an archive file in Google Cloud Storage.
|
527
|
+
# Corresponds to the JSON property `storageSource`
|
528
|
+
# @return [Google::Apis::CloudfunctionsV2alpha::StorageSource]
|
529
|
+
attr_accessor :storage_source
|
530
|
+
|
531
|
+
# The generated Google Cloud Storage signed URL that should be used for a
|
532
|
+
# function source code upload. The uploaded file should be a zip archive which
|
533
|
+
# contains a function.
|
534
|
+
# Corresponds to the JSON property `uploadUrl`
|
535
|
+
# @return [String]
|
536
|
+
attr_accessor :upload_url
|
537
|
+
|
538
|
+
def initialize(**args)
|
539
|
+
update!(**args)
|
540
|
+
end
|
541
|
+
|
542
|
+
# Update properties of this object
|
543
|
+
def update!(**args)
|
544
|
+
@storage_source = args[:storage_source] if args.key?(:storage_source)
|
545
|
+
@upload_url = args[:upload_url] if args.key?(:upload_url)
|
546
|
+
end
|
547
|
+
end
|
548
|
+
|
549
|
+
# Represents the metadata of the long-running operation.
|
550
|
+
class GoogleCloudFunctionsV2alphaOperationMetadata
|
551
|
+
include Google::Apis::Core::Hashable
|
552
|
+
|
553
|
+
# API version used to start the operation.
|
554
|
+
# Corresponds to the JSON property `apiVersion`
|
555
|
+
# @return [String]
|
556
|
+
attr_accessor :api_version
|
557
|
+
|
558
|
+
# Identifies whether the user has requested cancellation of the operation.
|
559
|
+
# Operations that have successfully been cancelled have Operation.error value
|
560
|
+
# with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
|
561
|
+
# Corresponds to the JSON property `cancelRequested`
|
562
|
+
# @return [Boolean]
|
563
|
+
attr_accessor :cancel_requested
|
564
|
+
alias_method :cancel_requested?, :cancel_requested
|
565
|
+
|
566
|
+
# The time the operation was created.
|
567
|
+
# Corresponds to the JSON property `createTime`
|
568
|
+
# @return [String]
|
569
|
+
attr_accessor :create_time
|
570
|
+
|
571
|
+
# The time the operation finished running.
|
572
|
+
# Corresponds to the JSON property `endTime`
|
573
|
+
# @return [String]
|
574
|
+
attr_accessor :end_time
|
575
|
+
|
576
|
+
# The original request that started the operation.
|
577
|
+
# Corresponds to the JSON property `requestResource`
|
578
|
+
# @return [Hash<String,Object>]
|
579
|
+
attr_accessor :request_resource
|
580
|
+
|
581
|
+
# Mechanism for reporting in-progress stages
|
582
|
+
# Corresponds to the JSON property `stages`
|
583
|
+
# @return [Array<Google::Apis::CloudfunctionsV2alpha::GoogleCloudFunctionsV2alphaStage>]
|
584
|
+
attr_accessor :stages
|
585
|
+
|
586
|
+
# Human-readable status of the operation, if any.
|
587
|
+
# Corresponds to the JSON property `statusDetail`
|
588
|
+
# @return [String]
|
589
|
+
attr_accessor :status_detail
|
590
|
+
|
591
|
+
# Server-defined resource path for the target of the operation.
|
592
|
+
# Corresponds to the JSON property `target`
|
593
|
+
# @return [String]
|
594
|
+
attr_accessor :target
|
595
|
+
|
596
|
+
# Name of the verb executed by the operation.
|
597
|
+
# Corresponds to the JSON property `verb`
|
598
|
+
# @return [String]
|
599
|
+
attr_accessor :verb
|
600
|
+
|
601
|
+
def initialize(**args)
|
602
|
+
update!(**args)
|
603
|
+
end
|
604
|
+
|
605
|
+
# Update properties of this object
|
606
|
+
def update!(**args)
|
607
|
+
@api_version = args[:api_version] if args.key?(:api_version)
|
608
|
+
@cancel_requested = args[:cancel_requested] if args.key?(:cancel_requested)
|
609
|
+
@create_time = args[:create_time] if args.key?(:create_time)
|
610
|
+
@end_time = args[:end_time] if args.key?(:end_time)
|
611
|
+
@request_resource = args[:request_resource] if args.key?(:request_resource)
|
612
|
+
@stages = args[:stages] if args.key?(:stages)
|
613
|
+
@status_detail = args[:status_detail] if args.key?(:status_detail)
|
614
|
+
@target = args[:target] if args.key?(:target)
|
615
|
+
@verb = args[:verb] if args.key?(:verb)
|
616
|
+
end
|
617
|
+
end
|
618
|
+
|
619
|
+
# Each Stage of the deployment process
|
620
|
+
class GoogleCloudFunctionsV2alphaStage
|
621
|
+
include Google::Apis::Core::Hashable
|
622
|
+
|
623
|
+
# Message describing the Stage
|
624
|
+
# Corresponds to the JSON property `message`
|
625
|
+
# @return [String]
|
626
|
+
attr_accessor :message
|
627
|
+
|
628
|
+
# Name of the Stage. This will be unique for each Stage.
|
629
|
+
# Corresponds to the JSON property `name`
|
630
|
+
# @return [String]
|
631
|
+
attr_accessor :name
|
632
|
+
|
633
|
+
# Resource of the Stage
|
634
|
+
# Corresponds to the JSON property `resource`
|
635
|
+
# @return [String]
|
636
|
+
attr_accessor :resource
|
637
|
+
|
638
|
+
# Link to the current Stage resource
|
639
|
+
# Corresponds to the JSON property `resourceUri`
|
640
|
+
# @return [String]
|
641
|
+
attr_accessor :resource_uri
|
642
|
+
|
643
|
+
# Current state of the Stage
|
644
|
+
# Corresponds to the JSON property `state`
|
645
|
+
# @return [String]
|
646
|
+
attr_accessor :state
|
647
|
+
|
648
|
+
# State messages from the current Stage.
|
649
|
+
# Corresponds to the JSON property `stateMessages`
|
650
|
+
# @return [Array<Google::Apis::CloudfunctionsV2alpha::GoogleCloudFunctionsV2alphaStateMessage>]
|
651
|
+
attr_accessor :state_messages
|
652
|
+
|
653
|
+
def initialize(**args)
|
654
|
+
update!(**args)
|
655
|
+
end
|
656
|
+
|
657
|
+
# Update properties of this object
|
658
|
+
def update!(**args)
|
659
|
+
@message = args[:message] if args.key?(:message)
|
660
|
+
@name = args[:name] if args.key?(:name)
|
661
|
+
@resource = args[:resource] if args.key?(:resource)
|
662
|
+
@resource_uri = args[:resource_uri] if args.key?(:resource_uri)
|
663
|
+
@state = args[:state] if args.key?(:state)
|
664
|
+
@state_messages = args[:state_messages] if args.key?(:state_messages)
|
665
|
+
end
|
666
|
+
end
|
667
|
+
|
668
|
+
# Informational messages about the state of the Cloud Function or Operation.
|
669
|
+
class GoogleCloudFunctionsV2alphaStateMessage
|
670
|
+
include Google::Apis::Core::Hashable
|
671
|
+
|
672
|
+
# The message.
|
673
|
+
# Corresponds to the JSON property `message`
|
674
|
+
# @return [String]
|
675
|
+
attr_accessor :message
|
676
|
+
|
677
|
+
# Severity of the state message.
|
678
|
+
# Corresponds to the JSON property `severity`
|
679
|
+
# @return [String]
|
680
|
+
attr_accessor :severity
|
681
|
+
|
682
|
+
# One-word CamelCase type of the state message.
|
683
|
+
# Corresponds to the JSON property `type`
|
684
|
+
# @return [String]
|
685
|
+
attr_accessor :type
|
686
|
+
|
687
|
+
def initialize(**args)
|
688
|
+
update!(**args)
|
689
|
+
end
|
690
|
+
|
691
|
+
# Update properties of this object
|
692
|
+
def update!(**args)
|
693
|
+
@message = args[:message] if args.key?(:message)
|
694
|
+
@severity = args[:severity] if args.key?(:severity)
|
695
|
+
@type = args[:type] if args.key?(:type)
|
696
|
+
end
|
697
|
+
end
|
698
|
+
|
699
|
+
# Represents the metadata of the long-running operation.
|
700
|
+
class GoogleCloudFunctionsV2betaOperationMetadata
|
701
|
+
include Google::Apis::Core::Hashable
|
702
|
+
|
703
|
+
# API version used to start the operation.
|
704
|
+
# Corresponds to the JSON property `apiVersion`
|
705
|
+
# @return [String]
|
706
|
+
attr_accessor :api_version
|
707
|
+
|
708
|
+
# Identifies whether the user has requested cancellation of the operation.
|
709
|
+
# Operations that have successfully been cancelled have Operation.error value
|
710
|
+
# with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
|
711
|
+
# Corresponds to the JSON property `cancelRequested`
|
712
|
+
# @return [Boolean]
|
713
|
+
attr_accessor :cancel_requested
|
714
|
+
alias_method :cancel_requested?, :cancel_requested
|
715
|
+
|
716
|
+
# The time the operation was created.
|
717
|
+
# Corresponds to the JSON property `createTime`
|
718
|
+
# @return [String]
|
719
|
+
attr_accessor :create_time
|
720
|
+
|
721
|
+
# The time the operation finished running.
|
722
|
+
# Corresponds to the JSON property `endTime`
|
723
|
+
# @return [String]
|
724
|
+
attr_accessor :end_time
|
725
|
+
|
726
|
+
# The original request that started the operation.
|
727
|
+
# Corresponds to the JSON property `requestResource`
|
728
|
+
# @return [Hash<String,Object>]
|
729
|
+
attr_accessor :request_resource
|
730
|
+
|
731
|
+
# Mechanism for reporting in-progress stages
|
732
|
+
# Corresponds to the JSON property `stages`
|
733
|
+
# @return [Array<Google::Apis::CloudfunctionsV2alpha::GoogleCloudFunctionsV2betaStage>]
|
734
|
+
attr_accessor :stages
|
735
|
+
|
736
|
+
# Human-readable status of the operation, if any.
|
737
|
+
# Corresponds to the JSON property `statusDetail`
|
738
|
+
# @return [String]
|
739
|
+
attr_accessor :status_detail
|
740
|
+
|
741
|
+
# Server-defined resource path for the target of the operation.
|
742
|
+
# Corresponds to the JSON property `target`
|
743
|
+
# @return [String]
|
744
|
+
attr_accessor :target
|
745
|
+
|
746
|
+
# Name of the verb executed by the operation.
|
747
|
+
# Corresponds to the JSON property `verb`
|
748
|
+
# @return [String]
|
749
|
+
attr_accessor :verb
|
750
|
+
|
751
|
+
def initialize(**args)
|
752
|
+
update!(**args)
|
753
|
+
end
|
754
|
+
|
755
|
+
# Update properties of this object
|
756
|
+
def update!(**args)
|
757
|
+
@api_version = args[:api_version] if args.key?(:api_version)
|
758
|
+
@cancel_requested = args[:cancel_requested] if args.key?(:cancel_requested)
|
759
|
+
@create_time = args[:create_time] if args.key?(:create_time)
|
760
|
+
@end_time = args[:end_time] if args.key?(:end_time)
|
761
|
+
@request_resource = args[:request_resource] if args.key?(:request_resource)
|
762
|
+
@stages = args[:stages] if args.key?(:stages)
|
763
|
+
@status_detail = args[:status_detail] if args.key?(:status_detail)
|
764
|
+
@target = args[:target] if args.key?(:target)
|
765
|
+
@verb = args[:verb] if args.key?(:verb)
|
766
|
+
end
|
767
|
+
end
|
768
|
+
|
769
|
+
# Each Stage of the deployment process
|
770
|
+
class GoogleCloudFunctionsV2betaStage
|
771
|
+
include Google::Apis::Core::Hashable
|
772
|
+
|
773
|
+
# Message describing the Stage
|
774
|
+
# Corresponds to the JSON property `message`
|
775
|
+
# @return [String]
|
776
|
+
attr_accessor :message
|
777
|
+
|
778
|
+
# Name of the Stage. This will be unique for each Stage.
|
779
|
+
# Corresponds to the JSON property `name`
|
780
|
+
# @return [String]
|
781
|
+
attr_accessor :name
|
782
|
+
|
783
|
+
# Resource of the Stage
|
784
|
+
# Corresponds to the JSON property `resource`
|
785
|
+
# @return [String]
|
786
|
+
attr_accessor :resource
|
787
|
+
|
788
|
+
# Link to the current Stage resource
|
789
|
+
# Corresponds to the JSON property `resourceUri`
|
790
|
+
# @return [String]
|
791
|
+
attr_accessor :resource_uri
|
792
|
+
|
793
|
+
# Current state of the Stage
|
794
|
+
# Corresponds to the JSON property `state`
|
795
|
+
# @return [String]
|
796
|
+
attr_accessor :state
|
797
|
+
|
798
|
+
# State messages from the current Stage.
|
799
|
+
# Corresponds to the JSON property `stateMessages`
|
800
|
+
# @return [Array<Google::Apis::CloudfunctionsV2alpha::GoogleCloudFunctionsV2betaStateMessage>]
|
801
|
+
attr_accessor :state_messages
|
802
|
+
|
803
|
+
def initialize(**args)
|
804
|
+
update!(**args)
|
805
|
+
end
|
806
|
+
|
807
|
+
# Update properties of this object
|
808
|
+
def update!(**args)
|
809
|
+
@message = args[:message] if args.key?(:message)
|
810
|
+
@name = args[:name] if args.key?(:name)
|
811
|
+
@resource = args[:resource] if args.key?(:resource)
|
812
|
+
@resource_uri = args[:resource_uri] if args.key?(:resource_uri)
|
813
|
+
@state = args[:state] if args.key?(:state)
|
814
|
+
@state_messages = args[:state_messages] if args.key?(:state_messages)
|
815
|
+
end
|
816
|
+
end
|
817
|
+
|
818
|
+
# Informational messages about the state of the Cloud Function or Operation.
|
819
|
+
class GoogleCloudFunctionsV2betaStateMessage
|
820
|
+
include Google::Apis::Core::Hashable
|
821
|
+
|
822
|
+
# The message.
|
823
|
+
# Corresponds to the JSON property `message`
|
824
|
+
# @return [String]
|
825
|
+
attr_accessor :message
|
826
|
+
|
827
|
+
# Severity of the state message.
|
828
|
+
# Corresponds to the JSON property `severity`
|
829
|
+
# @return [String]
|
830
|
+
attr_accessor :severity
|
831
|
+
|
832
|
+
# One-word CamelCase type of the state message.
|
833
|
+
# Corresponds to the JSON property `type`
|
834
|
+
# @return [String]
|
835
|
+
attr_accessor :type
|
836
|
+
|
837
|
+
def initialize(**args)
|
838
|
+
update!(**args)
|
839
|
+
end
|
840
|
+
|
841
|
+
# Update properties of this object
|
842
|
+
def update!(**args)
|
843
|
+
@message = args[:message] if args.key?(:message)
|
844
|
+
@severity = args[:severity] if args.key?(:severity)
|
845
|
+
@type = args[:type] if args.key?(:type)
|
846
|
+
end
|
847
|
+
end
|
848
|
+
|
849
|
+
# Response for the `ListFunctions` method.
|
850
|
+
class ListFunctionsResponse
|
851
|
+
include Google::Apis::Core::Hashable
|
852
|
+
|
853
|
+
# The functions that match the request.
|
854
|
+
# Corresponds to the JSON property `functions`
|
855
|
+
# @return [Array<Google::Apis::CloudfunctionsV2alpha::Function>]
|
856
|
+
attr_accessor :functions
|
857
|
+
|
858
|
+
# A token, which can be sent as `page_token` to retrieve the next page. If this
|
859
|
+
# field is omitted, there are no subsequent pages.
|
860
|
+
# Corresponds to the JSON property `nextPageToken`
|
861
|
+
# @return [String]
|
862
|
+
attr_accessor :next_page_token
|
863
|
+
|
864
|
+
# Locations that could not be reached. The response does not include any
|
865
|
+
# functions from these locations.
|
866
|
+
# Corresponds to the JSON property `unreachable`
|
867
|
+
# @return [Array<String>]
|
868
|
+
attr_accessor :unreachable
|
869
|
+
|
870
|
+
def initialize(**args)
|
871
|
+
update!(**args)
|
872
|
+
end
|
873
|
+
|
874
|
+
# Update properties of this object
|
875
|
+
def update!(**args)
|
876
|
+
@functions = args[:functions] if args.key?(:functions)
|
877
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
878
|
+
@unreachable = args[:unreachable] if args.key?(:unreachable)
|
879
|
+
end
|
880
|
+
end
|
881
|
+
|
882
|
+
# The response message for Locations.ListLocations.
|
883
|
+
class ListLocationsResponse
|
884
|
+
include Google::Apis::Core::Hashable
|
885
|
+
|
886
|
+
# A list of locations that matches the specified filter in the request.
|
887
|
+
# Corresponds to the JSON property `locations`
|
888
|
+
# @return [Array<Google::Apis::CloudfunctionsV2alpha::Location>]
|
889
|
+
attr_accessor :locations
|
890
|
+
|
891
|
+
# The standard List next-page token.
|
892
|
+
# Corresponds to the JSON property `nextPageToken`
|
893
|
+
# @return [String]
|
894
|
+
attr_accessor :next_page_token
|
895
|
+
|
896
|
+
def initialize(**args)
|
897
|
+
update!(**args)
|
898
|
+
end
|
899
|
+
|
900
|
+
# Update properties of this object
|
901
|
+
def update!(**args)
|
902
|
+
@locations = args[:locations] if args.key?(:locations)
|
903
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
904
|
+
end
|
905
|
+
end
|
906
|
+
|
907
|
+
# The response message for Operations.ListOperations.
|
908
|
+
class ListOperationsResponse
|
909
|
+
include Google::Apis::Core::Hashable
|
910
|
+
|
911
|
+
# The standard List next-page token.
|
912
|
+
# Corresponds to the JSON property `nextPageToken`
|
913
|
+
# @return [String]
|
914
|
+
attr_accessor :next_page_token
|
915
|
+
|
916
|
+
# A list of operations that matches the specified filter in the request.
|
917
|
+
# Corresponds to the JSON property `operations`
|
918
|
+
# @return [Array<Google::Apis::CloudfunctionsV2alpha::Operation>]
|
919
|
+
attr_accessor :operations
|
920
|
+
|
921
|
+
def initialize(**args)
|
922
|
+
update!(**args)
|
923
|
+
end
|
924
|
+
|
925
|
+
# Update properties of this object
|
926
|
+
def update!(**args)
|
927
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
928
|
+
@operations = args[:operations] if args.key?(:operations)
|
929
|
+
end
|
930
|
+
end
|
931
|
+
|
932
|
+
# Response for the `ListRuntimes` method.
|
933
|
+
class ListRuntimesResponse
|
934
|
+
include Google::Apis::Core::Hashable
|
935
|
+
|
936
|
+
# The runtimes that match the request.
|
937
|
+
# Corresponds to the JSON property `runtimes`
|
938
|
+
# @return [Array<Google::Apis::CloudfunctionsV2alpha::Runtime>]
|
939
|
+
attr_accessor :runtimes
|
940
|
+
|
941
|
+
def initialize(**args)
|
942
|
+
update!(**args)
|
943
|
+
end
|
944
|
+
|
945
|
+
# Update properties of this object
|
946
|
+
def update!(**args)
|
947
|
+
@runtimes = args[:runtimes] if args.key?(:runtimes)
|
948
|
+
end
|
949
|
+
end
|
950
|
+
|
951
|
+
# A resource that represents Google Cloud Platform location.
|
952
|
+
class Location
|
953
|
+
include Google::Apis::Core::Hashable
|
954
|
+
|
955
|
+
# The friendly name for this location, typically a nearby city name. For example,
|
956
|
+
# "Tokyo".
|
957
|
+
# Corresponds to the JSON property `displayName`
|
958
|
+
# @return [String]
|
959
|
+
attr_accessor :display_name
|
960
|
+
|
961
|
+
# Cross-service attributes for the location. For example `"cloud.googleapis.com/
|
962
|
+
# region": "us-east1"`
|
963
|
+
# Corresponds to the JSON property `labels`
|
964
|
+
# @return [Hash<String,String>]
|
965
|
+
attr_accessor :labels
|
966
|
+
|
967
|
+
# The canonical id for this location. For example: `"us-east1"`.
|
968
|
+
# Corresponds to the JSON property `locationId`
|
969
|
+
# @return [String]
|
970
|
+
attr_accessor :location_id
|
971
|
+
|
972
|
+
# Service-specific metadata. For example the available capacity at the given
|
973
|
+
# location.
|
974
|
+
# Corresponds to the JSON property `metadata`
|
975
|
+
# @return [Hash<String,Object>]
|
976
|
+
attr_accessor :metadata
|
977
|
+
|
978
|
+
# Resource name for the location, which may vary between implementations. For
|
979
|
+
# example: `"projects/example-project/locations/us-east1"`
|
980
|
+
# Corresponds to the JSON property `name`
|
981
|
+
# @return [String]
|
982
|
+
attr_accessor :name
|
983
|
+
|
984
|
+
def initialize(**args)
|
985
|
+
update!(**args)
|
986
|
+
end
|
987
|
+
|
988
|
+
# Update properties of this object
|
989
|
+
def update!(**args)
|
990
|
+
@display_name = args[:display_name] if args.key?(:display_name)
|
991
|
+
@labels = args[:labels] if args.key?(:labels)
|
992
|
+
@location_id = args[:location_id] if args.key?(:location_id)
|
993
|
+
@metadata = args[:metadata] if args.key?(:metadata)
|
994
|
+
@name = args[:name] if args.key?(:name)
|
995
|
+
end
|
996
|
+
end
|
997
|
+
|
998
|
+
# This resource represents a long-running operation that is the result of a
|
999
|
+
# network API call.
|
1000
|
+
class Operation
|
1001
|
+
include Google::Apis::Core::Hashable
|
1002
|
+
|
1003
|
+
# If the value is `false`, it means the operation is still in progress. If `true`
|
1004
|
+
# , the operation is completed, and either `error` or `response` is available.
|
1005
|
+
# Corresponds to the JSON property `done`
|
1006
|
+
# @return [Boolean]
|
1007
|
+
attr_accessor :done
|
1008
|
+
alias_method :done?, :done
|
1009
|
+
|
1010
|
+
# The `Status` type defines a logical error model that is suitable for different
|
1011
|
+
# programming environments, including REST APIs and RPC APIs. It is used by [
|
1012
|
+
# gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
|
1013
|
+
# data: error code, error message, and error details. You can find out more
|
1014
|
+
# about this error model and how to work with it in the [API Design Guide](https:
|
1015
|
+
# //cloud.google.com/apis/design/errors).
|
1016
|
+
# Corresponds to the JSON property `error`
|
1017
|
+
# @return [Google::Apis::CloudfunctionsV2alpha::Status]
|
1018
|
+
attr_accessor :error
|
1019
|
+
|
1020
|
+
# Service-specific metadata associated with the operation. It typically contains
|
1021
|
+
# progress information and common metadata such as create time. Some services
|
1022
|
+
# might not provide such metadata. Any method that returns a long-running
|
1023
|
+
# operation should document the metadata type, if any.
|
1024
|
+
# Corresponds to the JSON property `metadata`
|
1025
|
+
# @return [Hash<String,Object>]
|
1026
|
+
attr_accessor :metadata
|
1027
|
+
|
1028
|
+
# The server-assigned name, which is only unique within the same service that
|
1029
|
+
# originally returns it. If you use the default HTTP mapping, the `name` should
|
1030
|
+
# be a resource name ending with `operations/`unique_id``.
|
1031
|
+
# Corresponds to the JSON property `name`
|
1032
|
+
# @return [String]
|
1033
|
+
attr_accessor :name
|
1034
|
+
|
1035
|
+
# The normal response of the operation in case of success. If the original
|
1036
|
+
# method returns no data on success, such as `Delete`, the response is `google.
|
1037
|
+
# protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`,
|
1038
|
+
# the response should be the resource. For other methods, the response should
|
1039
|
+
# have the type `XxxResponse`, where `Xxx` is the original method name. For
|
1040
|
+
# example, if the original method name is `TakeSnapshot()`, the inferred
|
1041
|
+
# response type is `TakeSnapshotResponse`.
|
1042
|
+
# Corresponds to the JSON property `response`
|
1043
|
+
# @return [Hash<String,Object>]
|
1044
|
+
attr_accessor :response
|
1045
|
+
|
1046
|
+
def initialize(**args)
|
1047
|
+
update!(**args)
|
1048
|
+
end
|
1049
|
+
|
1050
|
+
# Update properties of this object
|
1051
|
+
def update!(**args)
|
1052
|
+
@done = args[:done] if args.key?(:done)
|
1053
|
+
@error = args[:error] if args.key?(:error)
|
1054
|
+
@metadata = args[:metadata] if args.key?(:metadata)
|
1055
|
+
@name = args[:name] if args.key?(:name)
|
1056
|
+
@response = args[:response] if args.key?(:response)
|
1057
|
+
end
|
1058
|
+
end
|
1059
|
+
|
1060
|
+
# Metadata describing an Operation
|
1061
|
+
class OperationMetadataV1
|
1062
|
+
include Google::Apis::Core::Hashable
|
1063
|
+
|
1064
|
+
# The Cloud Build ID of the function created or updated by an API call. This
|
1065
|
+
# field is only populated for Create and Update operations.
|
1066
|
+
# Corresponds to the JSON property `buildId`
|
1067
|
+
# @return [String]
|
1068
|
+
attr_accessor :build_id
|
1069
|
+
|
1070
|
+
# The Cloud Build Name of the function deployment. This field is only populated
|
1071
|
+
# for Create and Update operations. `projects//locations//builds/`.
|
1072
|
+
# Corresponds to the JSON property `buildName`
|
1073
|
+
# @return [String]
|
1074
|
+
attr_accessor :build_name
|
1075
|
+
|
1076
|
+
# The original request that started the operation.
|
1077
|
+
# Corresponds to the JSON property `request`
|
1078
|
+
# @return [Hash<String,Object>]
|
1079
|
+
attr_accessor :request
|
1080
|
+
|
1081
|
+
# An identifier for Firebase function sources. Disclaimer: This field is only
|
1082
|
+
# supported for Firebase function deployments.
|
1083
|
+
# Corresponds to the JSON property `sourceToken`
|
1084
|
+
# @return [String]
|
1085
|
+
attr_accessor :source_token
|
1086
|
+
|
1087
|
+
# Target of the operation - for example `projects/project-1/locations/region-1/
|
1088
|
+
# functions/function-1`
|
1089
|
+
# Corresponds to the JSON property `target`
|
1090
|
+
# @return [String]
|
1091
|
+
attr_accessor :target
|
1092
|
+
|
1093
|
+
# Type of operation.
|
1094
|
+
# Corresponds to the JSON property `type`
|
1095
|
+
# @return [String]
|
1096
|
+
attr_accessor :type
|
1097
|
+
|
1098
|
+
# The last update timestamp of the operation.
|
1099
|
+
# Corresponds to the JSON property `updateTime`
|
1100
|
+
# @return [String]
|
1101
|
+
attr_accessor :update_time
|
1102
|
+
|
1103
|
+
# Version id of the function created or updated by an API call. This field is
|
1104
|
+
# only populated for Create and Update operations.
|
1105
|
+
# Corresponds to the JSON property `versionId`
|
1106
|
+
# @return [Fixnum]
|
1107
|
+
attr_accessor :version_id
|
1108
|
+
|
1109
|
+
def initialize(**args)
|
1110
|
+
update!(**args)
|
1111
|
+
end
|
1112
|
+
|
1113
|
+
# Update properties of this object
|
1114
|
+
def update!(**args)
|
1115
|
+
@build_id = args[:build_id] if args.key?(:build_id)
|
1116
|
+
@build_name = args[:build_name] if args.key?(:build_name)
|
1117
|
+
@request = args[:request] if args.key?(:request)
|
1118
|
+
@source_token = args[:source_token] if args.key?(:source_token)
|
1119
|
+
@target = args[:target] if args.key?(:target)
|
1120
|
+
@type = args[:type] if args.key?(:type)
|
1121
|
+
@update_time = args[:update_time] if args.key?(:update_time)
|
1122
|
+
@version_id = args[:version_id] if args.key?(:version_id)
|
1123
|
+
end
|
1124
|
+
end
|
1125
|
+
|
1126
|
+
# An Identity and Access Management (IAM) policy, which specifies access
|
1127
|
+
# controls for Google Cloud resources. A `Policy` is a collection of `bindings`.
|
1128
|
+
# A `binding` binds one or more `members`, or principals, to a single `role`.
|
1129
|
+
# Principals can be user accounts, service accounts, Google groups, and domains (
|
1130
|
+
# such as G Suite). A `role` is a named list of permissions; each `role` can be
|
1131
|
+
# an IAM predefined role or a user-created custom role. For some types of Google
|
1132
|
+
# Cloud resources, a `binding` can also specify a `condition`, which is a
|
1133
|
+
# logical expression that allows access to a resource only if the expression
|
1134
|
+
# evaluates to `true`. A condition can add constraints based on attributes of
|
1135
|
+
# the request, the resource, or both. To learn which resources support
|
1136
|
+
# conditions in their IAM policies, see the [IAM documentation](https://cloud.
|
1137
|
+
# google.com/iam/help/conditions/resource-policies). **JSON example:** ` "
|
1138
|
+
# bindings": [ ` "role": "roles/resourcemanager.organizationAdmin", "members": [
|
1139
|
+
# "user:mike@example.com", "group:admins@example.com", "domain:google.com", "
|
1140
|
+
# serviceAccount:my-project-id@appspot.gserviceaccount.com" ] `, ` "role": "
|
1141
|
+
# roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com"
|
1142
|
+
# ], "condition": ` "title": "expirable access", "description": "Does not grant
|
1143
|
+
# access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:
|
1144
|
+
# 00:00.000Z')", ` ` ], "etag": "BwWWja0YfJA=", "version": 3 ` **YAML example:**
|
1145
|
+
# bindings: - members: - user:mike@example.com - group:admins@example.com -
|
1146
|
+
# domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com
|
1147
|
+
# role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.
|
1148
|
+
# com role: roles/resourcemanager.organizationViewer condition: title: expirable
|
1149
|
+
# access description: Does not grant access after Sep 2020 expression: request.
|
1150
|
+
# time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For
|
1151
|
+
# a description of IAM and its features, see the [IAM documentation](https://
|
1152
|
+
# cloud.google.com/iam/docs/).
|
1153
|
+
class Policy
|
1154
|
+
include Google::Apis::Core::Hashable
|
1155
|
+
|
1156
|
+
# Specifies cloud audit logging configuration for this policy.
|
1157
|
+
# Corresponds to the JSON property `auditConfigs`
|
1158
|
+
# @return [Array<Google::Apis::CloudfunctionsV2alpha::AuditConfig>]
|
1159
|
+
attr_accessor :audit_configs
|
1160
|
+
|
1161
|
+
# Associates a list of `members`, or principals, with a `role`. Optionally, may
|
1162
|
+
# specify a `condition` that determines how and when the `bindings` are applied.
|
1163
|
+
# Each of the `bindings` must contain at least one principal. The `bindings` in
|
1164
|
+
# a `Policy` can refer to up to 1,500 principals; up to 250 of these principals
|
1165
|
+
# can be Google groups. Each occurrence of a principal counts towards these
|
1166
|
+
# limits. For example, if the `bindings` grant 50 different roles to `user:alice@
|
1167
|
+
# example.com`, and not to any other principal, then you can add another 1,450
|
1168
|
+
# principals to the `bindings` in the `Policy`.
|
1169
|
+
# Corresponds to the JSON property `bindings`
|
1170
|
+
# @return [Array<Google::Apis::CloudfunctionsV2alpha::Binding>]
|
1171
|
+
attr_accessor :bindings
|
1172
|
+
|
1173
|
+
# `etag` is used for optimistic concurrency control as a way to help prevent
|
1174
|
+
# simultaneous updates of a policy from overwriting each other. It is strongly
|
1175
|
+
# suggested that systems make use of the `etag` in the read-modify-write cycle
|
1176
|
+
# to perform policy updates in order to avoid race conditions: An `etag` is
|
1177
|
+
# returned in the response to `getIamPolicy`, and systems are expected to put
|
1178
|
+
# that etag in the request to `setIamPolicy` to ensure that their change will be
|
1179
|
+
# applied to the same version of the policy. **Important:** If you use IAM
|
1180
|
+
# Conditions, you must include the `etag` field whenever you call `setIamPolicy`.
|
1181
|
+
# If you omit this field, then IAM allows you to overwrite a version `3` policy
|
1182
|
+
# with a version `1` policy, and all of the conditions in the version `3` policy
|
1183
|
+
# are lost.
|
1184
|
+
# Corresponds to the JSON property `etag`
|
1185
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
1186
|
+
# @return [String]
|
1187
|
+
attr_accessor :etag
|
1188
|
+
|
1189
|
+
# Specifies the format of the policy. Valid values are `0`, `1`, and `3`.
|
1190
|
+
# Requests that specify an invalid value are rejected. Any operation that
|
1191
|
+
# affects conditional role bindings must specify version `3`. This requirement
|
1192
|
+
# applies to the following operations: * Getting a policy that includes a
|
1193
|
+
# conditional role binding * Adding a conditional role binding to a policy *
|
1194
|
+
# Changing a conditional role binding in a policy * Removing any role binding,
|
1195
|
+
# with or without a condition, from a policy that includes conditions **
|
1196
|
+
# Important:** If you use IAM Conditions, you must include the `etag` field
|
1197
|
+
# whenever you call `setIamPolicy`. If you omit this field, then IAM allows you
|
1198
|
+
# to overwrite a version `3` policy with a version `1` policy, and all of the
|
1199
|
+
# conditions in the version `3` policy are lost. If a policy does not include
|
1200
|
+
# any conditions, operations on that policy may specify any valid version or
|
1201
|
+
# leave the field unset. To learn which resources support conditions in their
|
1202
|
+
# IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/
|
1203
|
+
# conditions/resource-policies).
|
1204
|
+
# Corresponds to the JSON property `version`
|
1205
|
+
# @return [Fixnum]
|
1206
|
+
attr_accessor :version
|
1207
|
+
|
1208
|
+
def initialize(**args)
|
1209
|
+
update!(**args)
|
1210
|
+
end
|
1211
|
+
|
1212
|
+
# Update properties of this object
|
1213
|
+
def update!(**args)
|
1214
|
+
@audit_configs = args[:audit_configs] if args.key?(:audit_configs)
|
1215
|
+
@bindings = args[:bindings] if args.key?(:bindings)
|
1216
|
+
@etag = args[:etag] if args.key?(:etag)
|
1217
|
+
@version = args[:version] if args.key?(:version)
|
1218
|
+
end
|
1219
|
+
end
|
1220
|
+
|
1221
|
+
# Location of the source in a Google Cloud Source Repository.
|
1222
|
+
class RepoSource
|
1223
|
+
include Google::Apis::Core::Hashable
|
1224
|
+
|
1225
|
+
# Regex matching branches to build. The syntax of the regular expressions
|
1226
|
+
# accepted is the syntax accepted by RE2 and described at https://github.com/
|
1227
|
+
# google/re2/wiki/Syntax
|
1228
|
+
# Corresponds to the JSON property `branchName`
|
1229
|
+
# @return [String]
|
1230
|
+
attr_accessor :branch_name
|
1231
|
+
|
1232
|
+
# Explicit commit SHA to build.
|
1233
|
+
# Corresponds to the JSON property `commitSha`
|
1234
|
+
# @return [String]
|
1235
|
+
attr_accessor :commit_sha
|
1236
|
+
|
1237
|
+
# Directory, relative to the source root, in which to run the build. This must
|
1238
|
+
# be a relative path. If a step's `dir` is specified and is an absolute path,
|
1239
|
+
# this value is ignored for that step's execution. eg. helloworld (no leading
|
1240
|
+
# slash allowed)
|
1241
|
+
# Corresponds to the JSON property `dir`
|
1242
|
+
# @return [String]
|
1243
|
+
attr_accessor :dir
|
1244
|
+
|
1245
|
+
# Only trigger a build if the revision regex does NOT match the revision regex.
|
1246
|
+
# Corresponds to the JSON property `invertRegex`
|
1247
|
+
# @return [Boolean]
|
1248
|
+
attr_accessor :invert_regex
|
1249
|
+
alias_method :invert_regex?, :invert_regex
|
1250
|
+
|
1251
|
+
# ID of the project that owns the Cloud Source Repository. If omitted, the
|
1252
|
+
# project ID requesting the build is assumed.
|
1253
|
+
# Corresponds to the JSON property `projectId`
|
1254
|
+
# @return [String]
|
1255
|
+
attr_accessor :project_id
|
1256
|
+
|
1257
|
+
# Name of the Cloud Source Repository.
|
1258
|
+
# Corresponds to the JSON property `repoName`
|
1259
|
+
# @return [String]
|
1260
|
+
attr_accessor :repo_name
|
1261
|
+
|
1262
|
+
# Regex matching tags to build. The syntax of the regular expressions accepted
|
1263
|
+
# is the syntax accepted by RE2 and described at https://github.com/google/re2/
|
1264
|
+
# wiki/Syntax
|
1265
|
+
# Corresponds to the JSON property `tagName`
|
1266
|
+
# @return [String]
|
1267
|
+
attr_accessor :tag_name
|
1268
|
+
|
1269
|
+
def initialize(**args)
|
1270
|
+
update!(**args)
|
1271
|
+
end
|
1272
|
+
|
1273
|
+
# Update properties of this object
|
1274
|
+
def update!(**args)
|
1275
|
+
@branch_name = args[:branch_name] if args.key?(:branch_name)
|
1276
|
+
@commit_sha = args[:commit_sha] if args.key?(:commit_sha)
|
1277
|
+
@dir = args[:dir] if args.key?(:dir)
|
1278
|
+
@invert_regex = args[:invert_regex] if args.key?(:invert_regex)
|
1279
|
+
@project_id = args[:project_id] if args.key?(:project_id)
|
1280
|
+
@repo_name = args[:repo_name] if args.key?(:repo_name)
|
1281
|
+
@tag_name = args[:tag_name] if args.key?(:tag_name)
|
1282
|
+
end
|
1283
|
+
end
|
1284
|
+
|
1285
|
+
# Describes a runtime and any special information (e.g., deprecation status)
|
1286
|
+
# related to it.
|
1287
|
+
class Runtime
|
1288
|
+
include Google::Apis::Core::Hashable
|
1289
|
+
|
1290
|
+
# The user facing name, eg 'Go 1.13', 'Node.js 12', etc.
|
1291
|
+
# Corresponds to the JSON property `displayName`
|
1292
|
+
# @return [String]
|
1293
|
+
attr_accessor :display_name
|
1294
|
+
|
1295
|
+
# The environment for the runtime.
|
1296
|
+
# Corresponds to the JSON property `environment`
|
1297
|
+
# @return [String]
|
1298
|
+
attr_accessor :environment
|
1299
|
+
|
1300
|
+
# The name of the runtime, e.g., 'go113', 'nodejs12', etc.
|
1301
|
+
# Corresponds to the JSON property `name`
|
1302
|
+
# @return [String]
|
1303
|
+
attr_accessor :name
|
1304
|
+
|
1305
|
+
# The stage of life this runtime is in, e.g., BETA, GA, etc.
|
1306
|
+
# Corresponds to the JSON property `stage`
|
1307
|
+
# @return [String]
|
1308
|
+
attr_accessor :stage
|
1309
|
+
|
1310
|
+
# Warning messages, e.g., a deprecation warning.
|
1311
|
+
# Corresponds to the JSON property `warnings`
|
1312
|
+
# @return [Array<String>]
|
1313
|
+
attr_accessor :warnings
|
1314
|
+
|
1315
|
+
def initialize(**args)
|
1316
|
+
update!(**args)
|
1317
|
+
end
|
1318
|
+
|
1319
|
+
# Update properties of this object
|
1320
|
+
def update!(**args)
|
1321
|
+
@display_name = args[:display_name] if args.key?(:display_name)
|
1322
|
+
@environment = args[:environment] if args.key?(:environment)
|
1323
|
+
@name = args[:name] if args.key?(:name)
|
1324
|
+
@stage = args[:stage] if args.key?(:stage)
|
1325
|
+
@warnings = args[:warnings] if args.key?(:warnings)
|
1326
|
+
end
|
1327
|
+
end
|
1328
|
+
|
1329
|
+
# Describes the Service being deployed. Currently Supported : Cloud Run (fully
|
1330
|
+
# managed).
|
1331
|
+
class ServiceConfig
|
1332
|
+
include Google::Apis::Core::Hashable
|
1333
|
+
|
1334
|
+
# Whether 100% of traffic is routed to the latest revision. On CreateFunction
|
1335
|
+
# and UpdateFunction, when set to true, the revision being deployed will serve
|
1336
|
+
# 100% of traffic, ignoring any traffic split settings, if any. On GetFunction,
|
1337
|
+
# true will be returned if the latest revision is serving 100% of traffic.
|
1338
|
+
# Corresponds to the JSON property `allTrafficOnLatestRevision`
|
1339
|
+
# @return [Boolean]
|
1340
|
+
attr_accessor :all_traffic_on_latest_revision
|
1341
|
+
alias_method :all_traffic_on_latest_revision?, :all_traffic_on_latest_revision
|
1342
|
+
|
1343
|
+
# The amount of memory available for a function. Defaults to 256M. Supported
|
1344
|
+
# units are k, M, G, Mi, Gi. If no unit is supplied the value is interpreted as
|
1345
|
+
# bytes. See https://github.com/kubernetes/kubernetes/blob/master/staging/src/
|
1346
|
+
# k8s.io/apimachinery/pkg/api/resource/quantity.go a full description.
|
1347
|
+
# Corresponds to the JSON property `availableMemory`
|
1348
|
+
# @return [String]
|
1349
|
+
attr_accessor :available_memory
|
1350
|
+
|
1351
|
+
# Environment variables that shall be available during function execution.
|
1352
|
+
# Corresponds to the JSON property `environmentVariables`
|
1353
|
+
# @return [Hash<String,String>]
|
1354
|
+
attr_accessor :environment_variables
|
1355
|
+
|
1356
|
+
# The ingress settings for the function, controlling what traffic can reach it.
|
1357
|
+
# Corresponds to the JSON property `ingressSettings`
|
1358
|
+
# @return [String]
|
1359
|
+
attr_accessor :ingress_settings
|
1360
|
+
|
1361
|
+
# The limit on the maximum number of function instances that may coexist at a
|
1362
|
+
# given time. In some cases, such as rapid traffic surges, Cloud Functions may,
|
1363
|
+
# for a short period of time, create more instances than the specified max
|
1364
|
+
# instances limit. If your function cannot tolerate this temporary behavior, you
|
1365
|
+
# may want to factor in a safety margin and set a lower max instances value than
|
1366
|
+
# your function can tolerate. See the [Max Instances](https://cloud.google.com/
|
1367
|
+
# functions/docs/max-instances) Guide for more details.
|
1368
|
+
# Corresponds to the JSON property `maxInstanceCount`
|
1369
|
+
# @return [Fixnum]
|
1370
|
+
attr_accessor :max_instance_count
|
1371
|
+
|
1372
|
+
# The limit on the minimum number of function instances that may coexist at a
|
1373
|
+
# given time. Function instances are kept in idle state for a short period after
|
1374
|
+
# they finished executing the request to reduce cold start time for subsequent
|
1375
|
+
# requests. Setting a minimum instance count will ensure that the given number
|
1376
|
+
# of instances are kept running in idle state always. This can help with cold
|
1377
|
+
# start times when jump in incoming request count occurs after the idle instance
|
1378
|
+
# would have been stopped in the default case.
|
1379
|
+
# Corresponds to the JSON property `minInstanceCount`
|
1380
|
+
# @return [Fixnum]
|
1381
|
+
attr_accessor :min_instance_count
|
1382
|
+
|
1383
|
+
# Output only. Name of the service associated with a Function. The format of
|
1384
|
+
# this field is `projects/`project`/locations/`region`/services/`service``
|
1385
|
+
# Corresponds to the JSON property `service`
|
1386
|
+
# @return [String]
|
1387
|
+
attr_accessor :service
|
1388
|
+
|
1389
|
+
# The email of the service's service account. If empty, defaults to ``
|
1390
|
+
# project_number`-compute@developer.gserviceaccount.com`.
|
1391
|
+
# Corresponds to the JSON property `serviceAccountEmail`
|
1392
|
+
# @return [String]
|
1393
|
+
attr_accessor :service_account_email
|
1394
|
+
|
1395
|
+
# The function execution timeout. Execution is considered failed and can be
|
1396
|
+
# terminated if the function is not completed at the end of the timeout period.
|
1397
|
+
# Defaults to 60 seconds.
|
1398
|
+
# Corresponds to the JSON property `timeoutSeconds`
|
1399
|
+
# @return [Fixnum]
|
1400
|
+
attr_accessor :timeout_seconds
|
1401
|
+
|
1402
|
+
# Output only. URI of the Service deployed.
|
1403
|
+
# Corresponds to the JSON property `uri`
|
1404
|
+
# @return [String]
|
1405
|
+
attr_accessor :uri
|
1406
|
+
|
1407
|
+
# The Serverless VPC Access connector that this cloud function can connect to.
|
1408
|
+
# The format of this field is `projects/*/locations/*/connectors/*`.
|
1409
|
+
# Corresponds to the JSON property `vpcConnector`
|
1410
|
+
# @return [String]
|
1411
|
+
attr_accessor :vpc_connector
|
1412
|
+
|
1413
|
+
# The egress settings for the connector, controlling what traffic is diverted
|
1414
|
+
# through it.
|
1415
|
+
# Corresponds to the JSON property `vpcConnectorEgressSettings`
|
1416
|
+
# @return [String]
|
1417
|
+
attr_accessor :vpc_connector_egress_settings
|
1418
|
+
|
1419
|
+
def initialize(**args)
|
1420
|
+
update!(**args)
|
1421
|
+
end
|
1422
|
+
|
1423
|
+
# Update properties of this object
|
1424
|
+
def update!(**args)
|
1425
|
+
@all_traffic_on_latest_revision = args[:all_traffic_on_latest_revision] if args.key?(:all_traffic_on_latest_revision)
|
1426
|
+
@available_memory = args[:available_memory] if args.key?(:available_memory)
|
1427
|
+
@environment_variables = args[:environment_variables] if args.key?(:environment_variables)
|
1428
|
+
@ingress_settings = args[:ingress_settings] if args.key?(:ingress_settings)
|
1429
|
+
@max_instance_count = args[:max_instance_count] if args.key?(:max_instance_count)
|
1430
|
+
@min_instance_count = args[:min_instance_count] if args.key?(:min_instance_count)
|
1431
|
+
@service = args[:service] if args.key?(:service)
|
1432
|
+
@service_account_email = args[:service_account_email] if args.key?(:service_account_email)
|
1433
|
+
@timeout_seconds = args[:timeout_seconds] if args.key?(:timeout_seconds)
|
1434
|
+
@uri = args[:uri] if args.key?(:uri)
|
1435
|
+
@vpc_connector = args[:vpc_connector] if args.key?(:vpc_connector)
|
1436
|
+
@vpc_connector_egress_settings = args[:vpc_connector_egress_settings] if args.key?(:vpc_connector_egress_settings)
|
1437
|
+
end
|
1438
|
+
end
|
1439
|
+
|
1440
|
+
# Request message for `SetIamPolicy` method.
|
1441
|
+
class SetIamPolicyRequest
|
1442
|
+
include Google::Apis::Core::Hashable
|
1443
|
+
|
1444
|
+
# An Identity and Access Management (IAM) policy, which specifies access
|
1445
|
+
# controls for Google Cloud resources. A `Policy` is a collection of `bindings`.
|
1446
|
+
# A `binding` binds one or more `members`, or principals, to a single `role`.
|
1447
|
+
# Principals can be user accounts, service accounts, Google groups, and domains (
|
1448
|
+
# such as G Suite). A `role` is a named list of permissions; each `role` can be
|
1449
|
+
# an IAM predefined role or a user-created custom role. For some types of Google
|
1450
|
+
# Cloud resources, a `binding` can also specify a `condition`, which is a
|
1451
|
+
# logical expression that allows access to a resource only if the expression
|
1452
|
+
# evaluates to `true`. A condition can add constraints based on attributes of
|
1453
|
+
# the request, the resource, or both. To learn which resources support
|
1454
|
+
# conditions in their IAM policies, see the [IAM documentation](https://cloud.
|
1455
|
+
# google.com/iam/help/conditions/resource-policies). **JSON example:** ` "
|
1456
|
+
# bindings": [ ` "role": "roles/resourcemanager.organizationAdmin", "members": [
|
1457
|
+
# "user:mike@example.com", "group:admins@example.com", "domain:google.com", "
|
1458
|
+
# serviceAccount:my-project-id@appspot.gserviceaccount.com" ] `, ` "role": "
|
1459
|
+
# roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com"
|
1460
|
+
# ], "condition": ` "title": "expirable access", "description": "Does not grant
|
1461
|
+
# access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:
|
1462
|
+
# 00:00.000Z')", ` ` ], "etag": "BwWWja0YfJA=", "version": 3 ` **YAML example:**
|
1463
|
+
# bindings: - members: - user:mike@example.com - group:admins@example.com -
|
1464
|
+
# domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com
|
1465
|
+
# role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.
|
1466
|
+
# com role: roles/resourcemanager.organizationViewer condition: title: expirable
|
1467
|
+
# access description: Does not grant access after Sep 2020 expression: request.
|
1468
|
+
# time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For
|
1469
|
+
# a description of IAM and its features, see the [IAM documentation](https://
|
1470
|
+
# cloud.google.com/iam/docs/).
|
1471
|
+
# Corresponds to the JSON property `policy`
|
1472
|
+
# @return [Google::Apis::CloudfunctionsV2alpha::Policy]
|
1473
|
+
attr_accessor :policy
|
1474
|
+
|
1475
|
+
# OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
|
1476
|
+
# the fields in the mask will be modified. If no mask is provided, the following
|
1477
|
+
# default mask is used: `paths: "bindings, etag"`
|
1478
|
+
# Corresponds to the JSON property `updateMask`
|
1479
|
+
# @return [String]
|
1480
|
+
attr_accessor :update_mask
|
1481
|
+
|
1482
|
+
def initialize(**args)
|
1483
|
+
update!(**args)
|
1484
|
+
end
|
1485
|
+
|
1486
|
+
# Update properties of this object
|
1487
|
+
def update!(**args)
|
1488
|
+
@policy = args[:policy] if args.key?(:policy)
|
1489
|
+
@update_mask = args[:update_mask] if args.key?(:update_mask)
|
1490
|
+
end
|
1491
|
+
end
|
1492
|
+
|
1493
|
+
# The location of the function source code.
|
1494
|
+
class Source
|
1495
|
+
include Google::Apis::Core::Hashable
|
1496
|
+
|
1497
|
+
# Location of the source in a Google Cloud Source Repository.
|
1498
|
+
# Corresponds to the JSON property `repoSource`
|
1499
|
+
# @return [Google::Apis::CloudfunctionsV2alpha::RepoSource]
|
1500
|
+
attr_accessor :repo_source
|
1501
|
+
|
1502
|
+
# Location of the source in an archive file in Google Cloud Storage.
|
1503
|
+
# Corresponds to the JSON property `storageSource`
|
1504
|
+
# @return [Google::Apis::CloudfunctionsV2alpha::StorageSource]
|
1505
|
+
attr_accessor :storage_source
|
1506
|
+
|
1507
|
+
def initialize(**args)
|
1508
|
+
update!(**args)
|
1509
|
+
end
|
1510
|
+
|
1511
|
+
# Update properties of this object
|
1512
|
+
def update!(**args)
|
1513
|
+
@repo_source = args[:repo_source] if args.key?(:repo_source)
|
1514
|
+
@storage_source = args[:storage_source] if args.key?(:storage_source)
|
1515
|
+
end
|
1516
|
+
end
|
1517
|
+
|
1518
|
+
# Provenance of the source. Ways to find the original source, or verify that
|
1519
|
+
# some source was used for this build.
|
1520
|
+
class SourceProvenance
|
1521
|
+
include Google::Apis::Core::Hashable
|
1522
|
+
|
1523
|
+
# Location of the source in a Google Cloud Source Repository.
|
1524
|
+
# Corresponds to the JSON property `resolvedRepoSource`
|
1525
|
+
# @return [Google::Apis::CloudfunctionsV2alpha::RepoSource]
|
1526
|
+
attr_accessor :resolved_repo_source
|
1527
|
+
|
1528
|
+
# Location of the source in an archive file in Google Cloud Storage.
|
1529
|
+
# Corresponds to the JSON property `resolvedStorageSource`
|
1530
|
+
# @return [Google::Apis::CloudfunctionsV2alpha::StorageSource]
|
1531
|
+
attr_accessor :resolved_storage_source
|
1532
|
+
|
1533
|
+
def initialize(**args)
|
1534
|
+
update!(**args)
|
1535
|
+
end
|
1536
|
+
|
1537
|
+
# Update properties of this object
|
1538
|
+
def update!(**args)
|
1539
|
+
@resolved_repo_source = args[:resolved_repo_source] if args.key?(:resolved_repo_source)
|
1540
|
+
@resolved_storage_source = args[:resolved_storage_source] if args.key?(:resolved_storage_source)
|
1541
|
+
end
|
1542
|
+
end
|
1543
|
+
|
1544
|
+
# The `Status` type defines a logical error model that is suitable for different
|
1545
|
+
# programming environments, including REST APIs and RPC APIs. It is used by [
|
1546
|
+
# gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
|
1547
|
+
# data: error code, error message, and error details. You can find out more
|
1548
|
+
# about this error model and how to work with it in the [API Design Guide](https:
|
1549
|
+
# //cloud.google.com/apis/design/errors).
|
1550
|
+
class Status
|
1551
|
+
include Google::Apis::Core::Hashable
|
1552
|
+
|
1553
|
+
# The status code, which should be an enum value of google.rpc.Code.
|
1554
|
+
# Corresponds to the JSON property `code`
|
1555
|
+
# @return [Fixnum]
|
1556
|
+
attr_accessor :code
|
1557
|
+
|
1558
|
+
# A list of messages that carry the error details. There is a common set of
|
1559
|
+
# message types for APIs to use.
|
1560
|
+
# Corresponds to the JSON property `details`
|
1561
|
+
# @return [Array<Hash<String,Object>>]
|
1562
|
+
attr_accessor :details
|
1563
|
+
|
1564
|
+
# A developer-facing error message, which should be in English. Any user-facing
|
1565
|
+
# error message should be localized and sent in the google.rpc.Status.details
|
1566
|
+
# field, or localized by the client.
|
1567
|
+
# Corresponds to the JSON property `message`
|
1568
|
+
# @return [String]
|
1569
|
+
attr_accessor :message
|
1570
|
+
|
1571
|
+
def initialize(**args)
|
1572
|
+
update!(**args)
|
1573
|
+
end
|
1574
|
+
|
1575
|
+
# Update properties of this object
|
1576
|
+
def update!(**args)
|
1577
|
+
@code = args[:code] if args.key?(:code)
|
1578
|
+
@details = args[:details] if args.key?(:details)
|
1579
|
+
@message = args[:message] if args.key?(:message)
|
1580
|
+
end
|
1581
|
+
end
|
1582
|
+
|
1583
|
+
# Location of the source in an archive file in Google Cloud Storage.
|
1584
|
+
class StorageSource
|
1585
|
+
include Google::Apis::Core::Hashable
|
1586
|
+
|
1587
|
+
# Google Cloud Storage bucket containing the source (see [Bucket Name
|
1588
|
+
# Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)
|
1589
|
+
# ).
|
1590
|
+
# Corresponds to the JSON property `bucket`
|
1591
|
+
# @return [String]
|
1592
|
+
attr_accessor :bucket
|
1593
|
+
|
1594
|
+
# Google Cloud Storage generation for the object. If the generation is omitted,
|
1595
|
+
# the latest generation will be used.
|
1596
|
+
# Corresponds to the JSON property `generation`
|
1597
|
+
# @return [Fixnum]
|
1598
|
+
attr_accessor :generation
|
1599
|
+
|
1600
|
+
# Google Cloud Storage object containing the source. This object must be a
|
1601
|
+
# gzipped archive file (`.tar.gz`) containing source to build.
|
1602
|
+
# Corresponds to the JSON property `object`
|
1603
|
+
# @return [String]
|
1604
|
+
attr_accessor :object
|
1605
|
+
|
1606
|
+
def initialize(**args)
|
1607
|
+
update!(**args)
|
1608
|
+
end
|
1609
|
+
|
1610
|
+
# Update properties of this object
|
1611
|
+
def update!(**args)
|
1612
|
+
@bucket = args[:bucket] if args.key?(:bucket)
|
1613
|
+
@generation = args[:generation] if args.key?(:generation)
|
1614
|
+
@object = args[:object] if args.key?(:object)
|
1615
|
+
end
|
1616
|
+
end
|
1617
|
+
|
1618
|
+
# Request message for `TestIamPermissions` method.
|
1619
|
+
class TestIamPermissionsRequest
|
1620
|
+
include Google::Apis::Core::Hashable
|
1621
|
+
|
1622
|
+
# The set of permissions to check for the `resource`. Permissions with wildcards
|
1623
|
+
# (such as '*' or 'storage.*') are not allowed. For more information see [IAM
|
1624
|
+
# Overview](https://cloud.google.com/iam/docs/overview#permissions).
|
1625
|
+
# Corresponds to the JSON property `permissions`
|
1626
|
+
# @return [Array<String>]
|
1627
|
+
attr_accessor :permissions
|
1628
|
+
|
1629
|
+
def initialize(**args)
|
1630
|
+
update!(**args)
|
1631
|
+
end
|
1632
|
+
|
1633
|
+
# Update properties of this object
|
1634
|
+
def update!(**args)
|
1635
|
+
@permissions = args[:permissions] if args.key?(:permissions)
|
1636
|
+
end
|
1637
|
+
end
|
1638
|
+
|
1639
|
+
# Response message for `TestIamPermissions` method.
|
1640
|
+
class TestIamPermissionsResponse
|
1641
|
+
include Google::Apis::Core::Hashable
|
1642
|
+
|
1643
|
+
# A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
|
1644
|
+
# Corresponds to the JSON property `permissions`
|
1645
|
+
# @return [Array<String>]
|
1646
|
+
attr_accessor :permissions
|
1647
|
+
|
1648
|
+
def initialize(**args)
|
1649
|
+
update!(**args)
|
1650
|
+
end
|
1651
|
+
|
1652
|
+
# Update properties of this object
|
1653
|
+
def update!(**args)
|
1654
|
+
@permissions = args[:permissions] if args.key?(:permissions)
|
1655
|
+
end
|
1656
|
+
end
|
1657
|
+
end
|
1658
|
+
end
|
1659
|
+
end
|