google-apis-cloudfunctions_v2 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,974 @@
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 CloudfunctionsV2
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`
39
+ # from 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::CloudfunctionsV2::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::CloudfunctionsV2::Expr]
117
+ attr_accessor :condition
118
+
119
+ # Specifies the principals requesting access for a Google Cloud 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
+ # Represents a textual expression in the Common Expression Language (CEL) syntax.
168
+ # CEL is a C-like expression language. The syntax and semantics of CEL are
169
+ # documented at https://github.com/google/cel-spec. Example (Comparison): title:
170
+ # "Summary size limit" description: "Determines if a summary is less than 100
171
+ # chars" expression: "document.summary.size() < 100" Example (Equality): title: "
172
+ # Requestor is owner" description: "Determines if requestor is the document
173
+ # owner" expression: "document.owner == request.auth.claims.email" Example (
174
+ # Logic): title: "Public documents" description: "Determine whether the document
175
+ # should be publicly visible" expression: "document.type != 'private' &&
176
+ # document.type != 'internal'" Example (Data Manipulation): title: "Notification
177
+ # string" description: "Create a notification string with a timestamp."
178
+ # expression: "'New message received at ' + string(document.create_time)" The
179
+ # exact variables and functions that may be referenced within an expression are
180
+ # determined by the service that evaluates it. See the service documentation for
181
+ # additional information.
182
+ class Expr
183
+ include Google::Apis::Core::Hashable
184
+
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`
193
+ # @return [String]
194
+ attr_accessor :expression
195
+
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`
199
+ # @return [String]
200
+ attr_accessor :location
201
+
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`
205
+ # @return [String]
206
+ attr_accessor :title
207
+
208
+ def initialize(**args)
209
+ update!(**args)
210
+ end
211
+
212
+ # Update properties of this object
213
+ 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)
218
+ end
219
+ end
220
+
221
+ # Represents the metadata of the long-running operation.
222
+ class GoogleCloudFunctionsV2alphaOperationMetadata
223
+ include Google::Apis::Core::Hashable
224
+
225
+ # API version used to start the operation.
226
+ # Corresponds to the JSON property `apiVersion`
227
+ # @return [String]
228
+ attr_accessor :api_version
229
+
230
+ # Identifies whether the user has requested cancellation of the operation.
231
+ # Operations that have successfully been cancelled have Operation.error value
232
+ # with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
233
+ # Corresponds to the JSON property `cancelRequested`
234
+ # @return [Boolean]
235
+ attr_accessor :cancel_requested
236
+ alias_method :cancel_requested?, :cancel_requested
237
+
238
+ # The time the operation was created.
239
+ # Corresponds to the JSON property `createTime`
240
+ # @return [String]
241
+ attr_accessor :create_time
242
+
243
+ # The time the operation finished running.
244
+ # Corresponds to the JSON property `endTime`
245
+ # @return [String]
246
+ attr_accessor :end_time
247
+
248
+ # The original request that started the operation.
249
+ # Corresponds to the JSON property `requestResource`
250
+ # @return [Hash<String,Object>]
251
+ attr_accessor :request_resource
252
+
253
+ # Mechanism for reporting in-progress stages
254
+ # Corresponds to the JSON property `stages`
255
+ # @return [Array<Google::Apis::CloudfunctionsV2::GoogleCloudFunctionsV2alphaStage>]
256
+ attr_accessor :stages
257
+
258
+ # Human-readable status of the operation, if any.
259
+ # Corresponds to the JSON property `statusDetail`
260
+ # @return [String]
261
+ attr_accessor :status_detail
262
+
263
+ # Server-defined resource path for the target of the operation.
264
+ # Corresponds to the JSON property `target`
265
+ # @return [String]
266
+ attr_accessor :target
267
+
268
+ # Name of the verb executed by the operation.
269
+ # Corresponds to the JSON property `verb`
270
+ # @return [String]
271
+ attr_accessor :verb
272
+
273
+ def initialize(**args)
274
+ update!(**args)
275
+ end
276
+
277
+ # Update properties of this object
278
+ def update!(**args)
279
+ @api_version = args[:api_version] if args.key?(:api_version)
280
+ @cancel_requested = args[:cancel_requested] if args.key?(:cancel_requested)
281
+ @create_time = args[:create_time] if args.key?(:create_time)
282
+ @end_time = args[:end_time] if args.key?(:end_time)
283
+ @request_resource = args[:request_resource] if args.key?(:request_resource)
284
+ @stages = args[:stages] if args.key?(:stages)
285
+ @status_detail = args[:status_detail] if args.key?(:status_detail)
286
+ @target = args[:target] if args.key?(:target)
287
+ @verb = args[:verb] if args.key?(:verb)
288
+ end
289
+ end
290
+
291
+ # Each Stage of the deployment process
292
+ class GoogleCloudFunctionsV2alphaStage
293
+ include Google::Apis::Core::Hashable
294
+
295
+ # Message describing the Stage
296
+ # Corresponds to the JSON property `message`
297
+ # @return [String]
298
+ attr_accessor :message
299
+
300
+ # Name of the Stage. This will be unique for each Stage.
301
+ # Corresponds to the JSON property `name`
302
+ # @return [String]
303
+ attr_accessor :name
304
+
305
+ # Resource of the Stage
306
+ # Corresponds to the JSON property `resource`
307
+ # @return [String]
308
+ attr_accessor :resource
309
+
310
+ # Link to the current Stage resource
311
+ # Corresponds to the JSON property `resourceUri`
312
+ # @return [String]
313
+ attr_accessor :resource_uri
314
+
315
+ # Current state of the Stage
316
+ # Corresponds to the JSON property `state`
317
+ # @return [String]
318
+ attr_accessor :state
319
+
320
+ # State messages from the current Stage.
321
+ # Corresponds to the JSON property `stateMessages`
322
+ # @return [Array<Google::Apis::CloudfunctionsV2::GoogleCloudFunctionsV2alphaStateMessage>]
323
+ attr_accessor :state_messages
324
+
325
+ def initialize(**args)
326
+ update!(**args)
327
+ end
328
+
329
+ # Update properties of this object
330
+ def update!(**args)
331
+ @message = args[:message] if args.key?(:message)
332
+ @name = args[:name] if args.key?(:name)
333
+ @resource = args[:resource] if args.key?(:resource)
334
+ @resource_uri = args[:resource_uri] if args.key?(:resource_uri)
335
+ @state = args[:state] if args.key?(:state)
336
+ @state_messages = args[:state_messages] if args.key?(:state_messages)
337
+ end
338
+ end
339
+
340
+ # Informational messages about the state of the Cloud Function or Operation.
341
+ class GoogleCloudFunctionsV2alphaStateMessage
342
+ include Google::Apis::Core::Hashable
343
+
344
+ # The message.
345
+ # Corresponds to the JSON property `message`
346
+ # @return [String]
347
+ attr_accessor :message
348
+
349
+ # Severity of the state message.
350
+ # Corresponds to the JSON property `severity`
351
+ # @return [String]
352
+ attr_accessor :severity
353
+
354
+ # One-word CamelCase type of the state message.
355
+ # Corresponds to the JSON property `type`
356
+ # @return [String]
357
+ attr_accessor :type
358
+
359
+ def initialize(**args)
360
+ update!(**args)
361
+ end
362
+
363
+ # Update properties of this object
364
+ def update!(**args)
365
+ @message = args[:message] if args.key?(:message)
366
+ @severity = args[:severity] if args.key?(:severity)
367
+ @type = args[:type] if args.key?(:type)
368
+ end
369
+ end
370
+
371
+ # Represents the metadata of the long-running operation.
372
+ class GoogleCloudFunctionsV2betaOperationMetadata
373
+ include Google::Apis::Core::Hashable
374
+
375
+ # API version used to start the operation.
376
+ # Corresponds to the JSON property `apiVersion`
377
+ # @return [String]
378
+ attr_accessor :api_version
379
+
380
+ # Identifies whether the user has requested cancellation of the operation.
381
+ # Operations that have successfully been cancelled have Operation.error value
382
+ # with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
383
+ # Corresponds to the JSON property `cancelRequested`
384
+ # @return [Boolean]
385
+ attr_accessor :cancel_requested
386
+ alias_method :cancel_requested?, :cancel_requested
387
+
388
+ # The time the operation was created.
389
+ # Corresponds to the JSON property `createTime`
390
+ # @return [String]
391
+ attr_accessor :create_time
392
+
393
+ # The time the operation finished running.
394
+ # Corresponds to the JSON property `endTime`
395
+ # @return [String]
396
+ attr_accessor :end_time
397
+
398
+ # The original request that started the operation.
399
+ # Corresponds to the JSON property `requestResource`
400
+ # @return [Hash<String,Object>]
401
+ attr_accessor :request_resource
402
+
403
+ # Mechanism for reporting in-progress stages
404
+ # Corresponds to the JSON property `stages`
405
+ # @return [Array<Google::Apis::CloudfunctionsV2::GoogleCloudFunctionsV2betaStage>]
406
+ attr_accessor :stages
407
+
408
+ # Human-readable status of the operation, if any.
409
+ # Corresponds to the JSON property `statusDetail`
410
+ # @return [String]
411
+ attr_accessor :status_detail
412
+
413
+ # Server-defined resource path for the target of the operation.
414
+ # Corresponds to the JSON property `target`
415
+ # @return [String]
416
+ attr_accessor :target
417
+
418
+ # Name of the verb executed by the operation.
419
+ # Corresponds to the JSON property `verb`
420
+ # @return [String]
421
+ attr_accessor :verb
422
+
423
+ def initialize(**args)
424
+ update!(**args)
425
+ end
426
+
427
+ # Update properties of this object
428
+ def update!(**args)
429
+ @api_version = args[:api_version] if args.key?(:api_version)
430
+ @cancel_requested = args[:cancel_requested] if args.key?(:cancel_requested)
431
+ @create_time = args[:create_time] if args.key?(:create_time)
432
+ @end_time = args[:end_time] if args.key?(:end_time)
433
+ @request_resource = args[:request_resource] if args.key?(:request_resource)
434
+ @stages = args[:stages] if args.key?(:stages)
435
+ @status_detail = args[:status_detail] if args.key?(:status_detail)
436
+ @target = args[:target] if args.key?(:target)
437
+ @verb = args[:verb] if args.key?(:verb)
438
+ end
439
+ end
440
+
441
+ # Each Stage of the deployment process
442
+ class GoogleCloudFunctionsV2betaStage
443
+ include Google::Apis::Core::Hashable
444
+
445
+ # Message describing the Stage
446
+ # Corresponds to the JSON property `message`
447
+ # @return [String]
448
+ attr_accessor :message
449
+
450
+ # Name of the Stage. This will be unique for each Stage.
451
+ # Corresponds to the JSON property `name`
452
+ # @return [String]
453
+ attr_accessor :name
454
+
455
+ # Resource of the Stage
456
+ # Corresponds to the JSON property `resource`
457
+ # @return [String]
458
+ attr_accessor :resource
459
+
460
+ # Link to the current Stage resource
461
+ # Corresponds to the JSON property `resourceUri`
462
+ # @return [String]
463
+ attr_accessor :resource_uri
464
+
465
+ # Current state of the Stage
466
+ # Corresponds to the JSON property `state`
467
+ # @return [String]
468
+ attr_accessor :state
469
+
470
+ # State messages from the current Stage.
471
+ # Corresponds to the JSON property `stateMessages`
472
+ # @return [Array<Google::Apis::CloudfunctionsV2::GoogleCloudFunctionsV2betaStateMessage>]
473
+ attr_accessor :state_messages
474
+
475
+ def initialize(**args)
476
+ update!(**args)
477
+ end
478
+
479
+ # Update properties of this object
480
+ def update!(**args)
481
+ @message = args[:message] if args.key?(:message)
482
+ @name = args[:name] if args.key?(:name)
483
+ @resource = args[:resource] if args.key?(:resource)
484
+ @resource_uri = args[:resource_uri] if args.key?(:resource_uri)
485
+ @state = args[:state] if args.key?(:state)
486
+ @state_messages = args[:state_messages] if args.key?(:state_messages)
487
+ end
488
+ end
489
+
490
+ # Informational messages about the state of the Cloud Function or Operation.
491
+ class GoogleCloudFunctionsV2betaStateMessage
492
+ include Google::Apis::Core::Hashable
493
+
494
+ # The message.
495
+ # Corresponds to the JSON property `message`
496
+ # @return [String]
497
+ attr_accessor :message
498
+
499
+ # Severity of the state message.
500
+ # Corresponds to the JSON property `severity`
501
+ # @return [String]
502
+ attr_accessor :severity
503
+
504
+ # One-word CamelCase type of the state message.
505
+ # Corresponds to the JSON property `type`
506
+ # @return [String]
507
+ attr_accessor :type
508
+
509
+ def initialize(**args)
510
+ update!(**args)
511
+ end
512
+
513
+ # Update properties of this object
514
+ def update!(**args)
515
+ @message = args[:message] if args.key?(:message)
516
+ @severity = args[:severity] if args.key?(:severity)
517
+ @type = args[:type] if args.key?(:type)
518
+ end
519
+ end
520
+
521
+ # The response message for Locations.ListLocations.
522
+ class ListLocationsResponse
523
+ include Google::Apis::Core::Hashable
524
+
525
+ # A list of locations that matches the specified filter in the request.
526
+ # Corresponds to the JSON property `locations`
527
+ # @return [Array<Google::Apis::CloudfunctionsV2::Location>]
528
+ attr_accessor :locations
529
+
530
+ # The standard List next-page token.
531
+ # Corresponds to the JSON property `nextPageToken`
532
+ # @return [String]
533
+ attr_accessor :next_page_token
534
+
535
+ def initialize(**args)
536
+ update!(**args)
537
+ end
538
+
539
+ # Update properties of this object
540
+ def update!(**args)
541
+ @locations = args[:locations] if args.key?(:locations)
542
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
543
+ end
544
+ end
545
+
546
+ # The response message for Operations.ListOperations.
547
+ class ListOperationsResponse
548
+ include Google::Apis::Core::Hashable
549
+
550
+ # The standard List next-page token.
551
+ # Corresponds to the JSON property `nextPageToken`
552
+ # @return [String]
553
+ attr_accessor :next_page_token
554
+
555
+ # A list of operations that matches the specified filter in the request.
556
+ # Corresponds to the JSON property `operations`
557
+ # @return [Array<Google::Apis::CloudfunctionsV2::Operation>]
558
+ attr_accessor :operations
559
+
560
+ def initialize(**args)
561
+ update!(**args)
562
+ end
563
+
564
+ # Update properties of this object
565
+ def update!(**args)
566
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
567
+ @operations = args[:operations] if args.key?(:operations)
568
+ end
569
+ end
570
+
571
+ # A resource that represents Google Cloud Platform location.
572
+ class Location
573
+ include Google::Apis::Core::Hashable
574
+
575
+ # The friendly name for this location, typically a nearby city name. For example,
576
+ # "Tokyo".
577
+ # Corresponds to the JSON property `displayName`
578
+ # @return [String]
579
+ attr_accessor :display_name
580
+
581
+ # Cross-service attributes for the location. For example `"cloud.googleapis.com/
582
+ # region": "us-east1"`
583
+ # Corresponds to the JSON property `labels`
584
+ # @return [Hash<String,String>]
585
+ attr_accessor :labels
586
+
587
+ # The canonical id for this location. For example: `"us-east1"`.
588
+ # Corresponds to the JSON property `locationId`
589
+ # @return [String]
590
+ attr_accessor :location_id
591
+
592
+ # Service-specific metadata. For example the available capacity at the given
593
+ # location.
594
+ # Corresponds to the JSON property `metadata`
595
+ # @return [Hash<String,Object>]
596
+ attr_accessor :metadata
597
+
598
+ # Resource name for the location, which may vary between implementations. For
599
+ # example: `"projects/example-project/locations/us-east1"`
600
+ # Corresponds to the JSON property `name`
601
+ # @return [String]
602
+ attr_accessor :name
603
+
604
+ def initialize(**args)
605
+ update!(**args)
606
+ end
607
+
608
+ # Update properties of this object
609
+ def update!(**args)
610
+ @display_name = args[:display_name] if args.key?(:display_name)
611
+ @labels = args[:labels] if args.key?(:labels)
612
+ @location_id = args[:location_id] if args.key?(:location_id)
613
+ @metadata = args[:metadata] if args.key?(:metadata)
614
+ @name = args[:name] if args.key?(:name)
615
+ end
616
+ end
617
+
618
+ # This resource represents a long-running operation that is the result of a
619
+ # network API call.
620
+ class Operation
621
+ include Google::Apis::Core::Hashable
622
+
623
+ # If the value is `false`, it means the operation is still in progress. If `true`
624
+ # , the operation is completed, and either `error` or `response` is available.
625
+ # Corresponds to the JSON property `done`
626
+ # @return [Boolean]
627
+ attr_accessor :done
628
+ alias_method :done?, :done
629
+
630
+ # The `Status` type defines a logical error model that is suitable for different
631
+ # programming environments, including REST APIs and RPC APIs. It is used by [
632
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
633
+ # data: error code, error message, and error details. You can find out more
634
+ # about this error model and how to work with it in the [API Design Guide](https:
635
+ # //cloud.google.com/apis/design/errors).
636
+ # Corresponds to the JSON property `error`
637
+ # @return [Google::Apis::CloudfunctionsV2::Status]
638
+ attr_accessor :error
639
+
640
+ # Service-specific metadata associated with the operation. It typically contains
641
+ # progress information and common metadata such as create time. Some services
642
+ # might not provide such metadata. Any method that returns a long-running
643
+ # operation should document the metadata type, if any.
644
+ # Corresponds to the JSON property `metadata`
645
+ # @return [Hash<String,Object>]
646
+ attr_accessor :metadata
647
+
648
+ # The server-assigned name, which is only unique within the same service that
649
+ # originally returns it. If you use the default HTTP mapping, the `name` should
650
+ # be a resource name ending with `operations/`unique_id``.
651
+ # Corresponds to the JSON property `name`
652
+ # @return [String]
653
+ attr_accessor :name
654
+
655
+ # The normal response of the operation in case of success. If the original
656
+ # method returns no data on success, such as `Delete`, the response is `google.
657
+ # protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`,
658
+ # the response should be the resource. For other methods, the response should
659
+ # have the type `XxxResponse`, where `Xxx` is the original method name. For
660
+ # example, if the original method name is `TakeSnapshot()`, the inferred
661
+ # response type is `TakeSnapshotResponse`.
662
+ # Corresponds to the JSON property `response`
663
+ # @return [Hash<String,Object>]
664
+ attr_accessor :response
665
+
666
+ def initialize(**args)
667
+ update!(**args)
668
+ end
669
+
670
+ # Update properties of this object
671
+ def update!(**args)
672
+ @done = args[:done] if args.key?(:done)
673
+ @error = args[:error] if args.key?(:error)
674
+ @metadata = args[:metadata] if args.key?(:metadata)
675
+ @name = args[:name] if args.key?(:name)
676
+ @response = args[:response] if args.key?(:response)
677
+ end
678
+ end
679
+
680
+ # Metadata describing an Operation
681
+ class OperationMetadataV1
682
+ include Google::Apis::Core::Hashable
683
+
684
+ # The Cloud Build ID of the function created or updated by an API call. This
685
+ # field is only populated for Create and Update operations.
686
+ # Corresponds to the JSON property `buildId`
687
+ # @return [String]
688
+ attr_accessor :build_id
689
+
690
+ # The Cloud Build Name of the function deployment. This field is only populated
691
+ # for Create and Update operations. `projects//locations//builds/`.
692
+ # Corresponds to the JSON property `buildName`
693
+ # @return [String]
694
+ attr_accessor :build_name
695
+
696
+ # The original request that started the operation.
697
+ # Corresponds to the JSON property `request`
698
+ # @return [Hash<String,Object>]
699
+ attr_accessor :request
700
+
701
+ # An identifier for Firebase function sources. Disclaimer: This field is only
702
+ # supported for Firebase function deployments.
703
+ # Corresponds to the JSON property `sourceToken`
704
+ # @return [String]
705
+ attr_accessor :source_token
706
+
707
+ # Target of the operation - for example `projects/project-1/locations/region-1/
708
+ # functions/function-1`
709
+ # Corresponds to the JSON property `target`
710
+ # @return [String]
711
+ attr_accessor :target
712
+
713
+ # Type of operation.
714
+ # Corresponds to the JSON property `type`
715
+ # @return [String]
716
+ attr_accessor :type
717
+
718
+ # The last update timestamp of the operation.
719
+ # Corresponds to the JSON property `updateTime`
720
+ # @return [String]
721
+ attr_accessor :update_time
722
+
723
+ # Version id of the function created or updated by an API call. This field is
724
+ # only populated for Create and Update operations.
725
+ # Corresponds to the JSON property `versionId`
726
+ # @return [Fixnum]
727
+ attr_accessor :version_id
728
+
729
+ def initialize(**args)
730
+ update!(**args)
731
+ end
732
+
733
+ # Update properties of this object
734
+ def update!(**args)
735
+ @build_id = args[:build_id] if args.key?(:build_id)
736
+ @build_name = args[:build_name] if args.key?(:build_name)
737
+ @request = args[:request] if args.key?(:request)
738
+ @source_token = args[:source_token] if args.key?(:source_token)
739
+ @target = args[:target] if args.key?(:target)
740
+ @type = args[:type] if args.key?(:type)
741
+ @update_time = args[:update_time] if args.key?(:update_time)
742
+ @version_id = args[:version_id] if args.key?(:version_id)
743
+ end
744
+ end
745
+
746
+ # An Identity and Access Management (IAM) policy, which specifies access
747
+ # controls for Google Cloud resources. A `Policy` is a collection of `bindings`.
748
+ # A `binding` binds one or more `members`, or principals, to a single `role`.
749
+ # Principals can be user accounts, service accounts, Google groups, and domains (
750
+ # such as G Suite). A `role` is a named list of permissions; each `role` can be
751
+ # an IAM predefined role or a user-created custom role. For some types of Google
752
+ # Cloud resources, a `binding` can also specify a `condition`, which is a
753
+ # logical expression that allows access to a resource only if the expression
754
+ # evaluates to `true`. A condition can add constraints based on attributes of
755
+ # the request, the resource, or both. To learn which resources support
756
+ # conditions in their IAM policies, see the [IAM documentation](https://cloud.
757
+ # google.com/iam/help/conditions/resource-policies). **JSON example:** ` "
758
+ # bindings": [ ` "role": "roles/resourcemanager.organizationAdmin", "members": [
759
+ # "user:mike@example.com", "group:admins@example.com", "domain:google.com", "
760
+ # serviceAccount:my-project-id@appspot.gserviceaccount.com" ] `, ` "role": "
761
+ # roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com"
762
+ # ], "condition": ` "title": "expirable access", "description": "Does not grant
763
+ # access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:
764
+ # 00:00.000Z')", ` ` ], "etag": "BwWWja0YfJA=", "version": 3 ` **YAML example:**
765
+ # bindings: - members: - user:mike@example.com - group:admins@example.com -
766
+ # domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com
767
+ # role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.
768
+ # com role: roles/resourcemanager.organizationViewer condition: title: expirable
769
+ # access description: Does not grant access after Sep 2020 expression: request.
770
+ # time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For
771
+ # a description of IAM and its features, see the [IAM documentation](https://
772
+ # cloud.google.com/iam/docs/).
773
+ class Policy
774
+ include Google::Apis::Core::Hashable
775
+
776
+ # Specifies cloud audit logging configuration for this policy.
777
+ # Corresponds to the JSON property `auditConfigs`
778
+ # @return [Array<Google::Apis::CloudfunctionsV2::AuditConfig>]
779
+ attr_accessor :audit_configs
780
+
781
+ # Associates a list of `members`, or principals, with a `role`. Optionally, may
782
+ # specify a `condition` that determines how and when the `bindings` are applied.
783
+ # Each of the `bindings` must contain at least one principal. The `bindings` in
784
+ # a `Policy` can refer to up to 1,500 principals; up to 250 of these principals
785
+ # can be Google groups. Each occurrence of a principal counts towards these
786
+ # limits. For example, if the `bindings` grant 50 different roles to `user:alice@
787
+ # example.com`, and not to any other principal, then you can add another 1,450
788
+ # principals to the `bindings` in the `Policy`.
789
+ # Corresponds to the JSON property `bindings`
790
+ # @return [Array<Google::Apis::CloudfunctionsV2::Binding>]
791
+ attr_accessor :bindings
792
+
793
+ # `etag` is used for optimistic concurrency control as a way to help prevent
794
+ # simultaneous updates of a policy from overwriting each other. It is strongly
795
+ # suggested that systems make use of the `etag` in the read-modify-write cycle
796
+ # to perform policy updates in order to avoid race conditions: An `etag` is
797
+ # returned in the response to `getIamPolicy`, and systems are expected to put
798
+ # that etag in the request to `setIamPolicy` to ensure that their change will be
799
+ # applied to the same version of the policy. **Important:** If you use IAM
800
+ # Conditions, you must include the `etag` field whenever you call `setIamPolicy`.
801
+ # If you omit this field, then IAM allows you to overwrite a version `3` policy
802
+ # with a version `1` policy, and all of the conditions in the version `3` policy
803
+ # are lost.
804
+ # Corresponds to the JSON property `etag`
805
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
806
+ # @return [String]
807
+ attr_accessor :etag
808
+
809
+ # Specifies the format of the policy. Valid values are `0`, `1`, and `3`.
810
+ # Requests that specify an invalid value are rejected. Any operation that
811
+ # affects conditional role bindings must specify version `3`. This requirement
812
+ # applies to the following operations: * Getting a policy that includes a
813
+ # conditional role binding * Adding a conditional role binding to a policy *
814
+ # Changing a conditional role binding in a policy * Removing any role binding,
815
+ # with or without a condition, from a policy that includes conditions **
816
+ # Important:** If you use IAM Conditions, you must include the `etag` field
817
+ # whenever you call `setIamPolicy`. If you omit this field, then IAM allows you
818
+ # to overwrite a version `3` policy with a version `1` policy, and all of the
819
+ # conditions in the version `3` policy are lost. If a policy does not include
820
+ # any conditions, operations on that policy may specify any valid version or
821
+ # leave the field unset. To learn which resources support conditions in their
822
+ # IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/
823
+ # conditions/resource-policies).
824
+ # Corresponds to the JSON property `version`
825
+ # @return [Fixnum]
826
+ attr_accessor :version
827
+
828
+ def initialize(**args)
829
+ update!(**args)
830
+ end
831
+
832
+ # Update properties of this object
833
+ def update!(**args)
834
+ @audit_configs = args[:audit_configs] if args.key?(:audit_configs)
835
+ @bindings = args[:bindings] if args.key?(:bindings)
836
+ @etag = args[:etag] if args.key?(:etag)
837
+ @version = args[:version] if args.key?(:version)
838
+ end
839
+ end
840
+
841
+ # Request message for `SetIamPolicy` method.
842
+ class SetIamPolicyRequest
843
+ include Google::Apis::Core::Hashable
844
+
845
+ # An Identity and Access Management (IAM) policy, which specifies access
846
+ # controls for Google Cloud resources. A `Policy` is a collection of `bindings`.
847
+ # A `binding` binds one or more `members`, or principals, to a single `role`.
848
+ # Principals can be user accounts, service accounts, Google groups, and domains (
849
+ # such as G Suite). A `role` is a named list of permissions; each `role` can be
850
+ # an IAM predefined role or a user-created custom role. For some types of Google
851
+ # Cloud resources, a `binding` can also specify a `condition`, which is a
852
+ # logical expression that allows access to a resource only if the expression
853
+ # evaluates to `true`. A condition can add constraints based on attributes of
854
+ # the request, the resource, or both. To learn which resources support
855
+ # conditions in their IAM policies, see the [IAM documentation](https://cloud.
856
+ # google.com/iam/help/conditions/resource-policies). **JSON example:** ` "
857
+ # bindings": [ ` "role": "roles/resourcemanager.organizationAdmin", "members": [
858
+ # "user:mike@example.com", "group:admins@example.com", "domain:google.com", "
859
+ # serviceAccount:my-project-id@appspot.gserviceaccount.com" ] `, ` "role": "
860
+ # roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com"
861
+ # ], "condition": ` "title": "expirable access", "description": "Does not grant
862
+ # access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:
863
+ # 00:00.000Z')", ` ` ], "etag": "BwWWja0YfJA=", "version": 3 ` **YAML example:**
864
+ # bindings: - members: - user:mike@example.com - group:admins@example.com -
865
+ # domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com
866
+ # role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.
867
+ # com role: roles/resourcemanager.organizationViewer condition: title: expirable
868
+ # access description: Does not grant access after Sep 2020 expression: request.
869
+ # time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For
870
+ # a description of IAM and its features, see the [IAM documentation](https://
871
+ # cloud.google.com/iam/docs/).
872
+ # Corresponds to the JSON property `policy`
873
+ # @return [Google::Apis::CloudfunctionsV2::Policy]
874
+ attr_accessor :policy
875
+
876
+ # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
877
+ # the fields in the mask will be modified. If no mask is provided, the following
878
+ # default mask is used: `paths: "bindings, etag"`
879
+ # Corresponds to the JSON property `updateMask`
880
+ # @return [String]
881
+ attr_accessor :update_mask
882
+
883
+ def initialize(**args)
884
+ update!(**args)
885
+ end
886
+
887
+ # Update properties of this object
888
+ def update!(**args)
889
+ @policy = args[:policy] if args.key?(:policy)
890
+ @update_mask = args[:update_mask] if args.key?(:update_mask)
891
+ end
892
+ end
893
+
894
+ # The `Status` type defines a logical error model that is suitable for different
895
+ # programming environments, including REST APIs and RPC APIs. It is used by [
896
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
897
+ # data: error code, error message, and error details. You can find out more
898
+ # about this error model and how to work with it in the [API Design Guide](https:
899
+ # //cloud.google.com/apis/design/errors).
900
+ class Status
901
+ include Google::Apis::Core::Hashable
902
+
903
+ # The status code, which should be an enum value of google.rpc.Code.
904
+ # Corresponds to the JSON property `code`
905
+ # @return [Fixnum]
906
+ attr_accessor :code
907
+
908
+ # A list of messages that carry the error details. There is a common set of
909
+ # message types for APIs to use.
910
+ # Corresponds to the JSON property `details`
911
+ # @return [Array<Hash<String,Object>>]
912
+ attr_accessor :details
913
+
914
+ # A developer-facing error message, which should be in English. Any user-facing
915
+ # error message should be localized and sent in the google.rpc.Status.details
916
+ # field, or localized by the client.
917
+ # Corresponds to the JSON property `message`
918
+ # @return [String]
919
+ attr_accessor :message
920
+
921
+ def initialize(**args)
922
+ update!(**args)
923
+ end
924
+
925
+ # Update properties of this object
926
+ def update!(**args)
927
+ @code = args[:code] if args.key?(:code)
928
+ @details = args[:details] if args.key?(:details)
929
+ @message = args[:message] if args.key?(:message)
930
+ end
931
+ end
932
+
933
+ # Request message for `TestIamPermissions` method.
934
+ class TestIamPermissionsRequest
935
+ include Google::Apis::Core::Hashable
936
+
937
+ # The set of permissions to check for the `resource`. Permissions with wildcards
938
+ # (such as `*` or `storage.*`) are not allowed. For more information see [IAM
939
+ # Overview](https://cloud.google.com/iam/docs/overview#permissions).
940
+ # Corresponds to the JSON property `permissions`
941
+ # @return [Array<String>]
942
+ attr_accessor :permissions
943
+
944
+ def initialize(**args)
945
+ update!(**args)
946
+ end
947
+
948
+ # Update properties of this object
949
+ def update!(**args)
950
+ @permissions = args[:permissions] if args.key?(:permissions)
951
+ end
952
+ end
953
+
954
+ # Response message for `TestIamPermissions` method.
955
+ class TestIamPermissionsResponse
956
+ include Google::Apis::Core::Hashable
957
+
958
+ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
959
+ # Corresponds to the JSON property `permissions`
960
+ # @return [Array<String>]
961
+ attr_accessor :permissions
962
+
963
+ def initialize(**args)
964
+ update!(**args)
965
+ end
966
+
967
+ # Update properties of this object
968
+ def update!(**args)
969
+ @permissions = args[:permissions] if args.key?(:permissions)
970
+ end
971
+ end
972
+ end
973
+ end
974
+ end