google-apis-apphub_v1 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,642 @@
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 ApphubV1
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::ApphubV1::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::ApphubV1::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. Does
124
+ # not include identities that come from external identity providers (IdPs)
125
+ # through identity federation. * `user:`emailid``: An email address that
126
+ # represents a specific Google account. For example, `alice@example.com` . * `
127
+ # serviceAccount:`emailid``: An email address that represents a Google service
128
+ # account. For example, `my-other-app@appspot.gserviceaccount.com`. * `
129
+ # serviceAccount:`projectid`.svc.id.goog[`namespace`/`kubernetes-sa`]`: An
130
+ # identifier for a [Kubernetes service account](https://cloud.google.com/
131
+ # kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-
132
+ # project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:`emailid``: An
133
+ # email address that represents a Google group. For example, `admins@example.com`
134
+ # . * `domain:`domain``: The G Suite domain (primary) that represents all the
135
+ # users of that domain. For example, `google.com` or `example.com`. * `deleted:
136
+ # user:`emailid`?uid=`uniqueid``: An email address (plus unique identifier)
137
+ # representing a user that has been recently deleted. For example, `alice@
138
+ # example.com?uid=123456789012345678901`. If the user is recovered, this value
139
+ # reverts to `user:`emailid`` and the recovered user retains the role in the
140
+ # binding. * `deleted:serviceAccount:`emailid`?uid=`uniqueid``: An email address
141
+ # (plus unique identifier) representing a service account that has been recently
142
+ # deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=
143
+ # 123456789012345678901`. If the service account is undeleted, this value
144
+ # reverts to `serviceAccount:`emailid`` and the undeleted service account
145
+ # retains the role in the binding. * `deleted:group:`emailid`?uid=`uniqueid``:
146
+ # An email address (plus unique identifier) representing a Google group that has
147
+ # been recently deleted. For example, `admins@example.com?uid=
148
+ # 123456789012345678901`. If the group is recovered, this value reverts to `
149
+ # group:`emailid`` and the recovered group retains the role in the binding.
150
+ # Corresponds to the JSON property `members`
151
+ # @return [Array<String>]
152
+ attr_accessor :members
153
+
154
+ # Role that is assigned to the list of `members`, or principals. For example, `
155
+ # roles/viewer`, `roles/editor`, or `roles/owner`.
156
+ # Corresponds to the JSON property `role`
157
+ # @return [String]
158
+ attr_accessor :role
159
+
160
+ def initialize(**args)
161
+ update!(**args)
162
+ end
163
+
164
+ # Update properties of this object
165
+ def update!(**args)
166
+ @condition = args[:condition] if args.key?(:condition)
167
+ @members = args[:members] if args.key?(:members)
168
+ @role = args[:role] if args.key?(:role)
169
+ end
170
+ end
171
+
172
+ # The request message for Operations.CancelOperation.
173
+ class CancelOperationRequest
174
+ include Google::Apis::Core::Hashable
175
+
176
+ def initialize(**args)
177
+ update!(**args)
178
+ end
179
+
180
+ # Update properties of this object
181
+ def update!(**args)
182
+ end
183
+ end
184
+
185
+ # A generic empty message that you can re-use to avoid defining duplicated empty
186
+ # messages in your APIs. A typical example is to use it as the request or the
187
+ # response type of an API method. For instance: service Foo ` rpc Bar(google.
188
+ # protobuf.Empty) returns (google.protobuf.Empty); `
189
+ class Empty
190
+ include Google::Apis::Core::Hashable
191
+
192
+ def initialize(**args)
193
+ update!(**args)
194
+ end
195
+
196
+ # Update properties of this object
197
+ def update!(**args)
198
+ end
199
+ end
200
+
201
+ # Represents a textual expression in the Common Expression Language (CEL) syntax.
202
+ # CEL is a C-like expression language. The syntax and semantics of CEL are
203
+ # documented at https://github.com/google/cel-spec. Example (Comparison): title:
204
+ # "Summary size limit" description: "Determines if a summary is less than 100
205
+ # chars" expression: "document.summary.size() < 100" Example (Equality): title: "
206
+ # Requestor is owner" description: "Determines if requestor is the document
207
+ # owner" expression: "document.owner == request.auth.claims.email" Example (
208
+ # Logic): title: "Public documents" description: "Determine whether the document
209
+ # should be publicly visible" expression: "document.type != 'private' &&
210
+ # document.type != 'internal'" Example (Data Manipulation): title: "Notification
211
+ # string" description: "Create a notification string with a timestamp."
212
+ # expression: "'New message received at ' + string(document.create_time)" The
213
+ # exact variables and functions that may be referenced within an expression are
214
+ # determined by the service that evaluates it. See the service documentation for
215
+ # additional information.
216
+ class Expr
217
+ include Google::Apis::Core::Hashable
218
+
219
+ # Optional. Description of the expression. This is a longer text which describes
220
+ # the expression, e.g. when hovered over it in a UI.
221
+ # Corresponds to the JSON property `description`
222
+ # @return [String]
223
+ attr_accessor :description
224
+
225
+ # Textual representation of an expression in Common Expression Language syntax.
226
+ # Corresponds to the JSON property `expression`
227
+ # @return [String]
228
+ attr_accessor :expression
229
+
230
+ # Optional. String indicating the location of the expression for error reporting,
231
+ # e.g. a file name and a position in the file.
232
+ # Corresponds to the JSON property `location`
233
+ # @return [String]
234
+ attr_accessor :location
235
+
236
+ # Optional. Title for the expression, i.e. a short string describing its purpose.
237
+ # This can be used e.g. in UIs which allow to enter the expression.
238
+ # Corresponds to the JSON property `title`
239
+ # @return [String]
240
+ attr_accessor :title
241
+
242
+ def initialize(**args)
243
+ update!(**args)
244
+ end
245
+
246
+ # Update properties of this object
247
+ def update!(**args)
248
+ @description = args[:description] if args.key?(:description)
249
+ @expression = args[:expression] if args.key?(:expression)
250
+ @location = args[:location] if args.key?(:location)
251
+ @title = args[:title] if args.key?(:title)
252
+ end
253
+ end
254
+
255
+ # The response message for Locations.ListLocations.
256
+ class ListLocationsResponse
257
+ include Google::Apis::Core::Hashable
258
+
259
+ # A list of locations that matches the specified filter in the request.
260
+ # Corresponds to the JSON property `locations`
261
+ # @return [Array<Google::Apis::ApphubV1::Location>]
262
+ attr_accessor :locations
263
+
264
+ # The standard List next-page token.
265
+ # Corresponds to the JSON property `nextPageToken`
266
+ # @return [String]
267
+ attr_accessor :next_page_token
268
+
269
+ def initialize(**args)
270
+ update!(**args)
271
+ end
272
+
273
+ # Update properties of this object
274
+ def update!(**args)
275
+ @locations = args[:locations] if args.key?(:locations)
276
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
277
+ end
278
+ end
279
+
280
+ # The response message for Operations.ListOperations.
281
+ class ListOperationsResponse
282
+ include Google::Apis::Core::Hashable
283
+
284
+ # The standard List next-page token.
285
+ # Corresponds to the JSON property `nextPageToken`
286
+ # @return [String]
287
+ attr_accessor :next_page_token
288
+
289
+ # A list of operations that matches the specified filter in the request.
290
+ # Corresponds to the JSON property `operations`
291
+ # @return [Array<Google::Apis::ApphubV1::Operation>]
292
+ attr_accessor :operations
293
+
294
+ def initialize(**args)
295
+ update!(**args)
296
+ end
297
+
298
+ # Update properties of this object
299
+ def update!(**args)
300
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
301
+ @operations = args[:operations] if args.key?(:operations)
302
+ end
303
+ end
304
+
305
+ # A resource that represents a Google Cloud location.
306
+ class Location
307
+ include Google::Apis::Core::Hashable
308
+
309
+ # The friendly name for this location, typically a nearby city name. For example,
310
+ # "Tokyo".
311
+ # Corresponds to the JSON property `displayName`
312
+ # @return [String]
313
+ attr_accessor :display_name
314
+
315
+ # Cross-service attributes for the location. For example `"cloud.googleapis.com/
316
+ # region": "us-east1"`
317
+ # Corresponds to the JSON property `labels`
318
+ # @return [Hash<String,String>]
319
+ attr_accessor :labels
320
+
321
+ # The canonical id for this location. For example: `"us-east1"`.
322
+ # Corresponds to the JSON property `locationId`
323
+ # @return [String]
324
+ attr_accessor :location_id
325
+
326
+ # Service-specific metadata. For example the available capacity at the given
327
+ # location.
328
+ # Corresponds to the JSON property `metadata`
329
+ # @return [Hash<String,Object>]
330
+ attr_accessor :metadata
331
+
332
+ # Resource name for the location, which may vary between implementations. For
333
+ # example: `"projects/example-project/locations/us-east1"`
334
+ # Corresponds to the JSON property `name`
335
+ # @return [String]
336
+ attr_accessor :name
337
+
338
+ def initialize(**args)
339
+ update!(**args)
340
+ end
341
+
342
+ # Update properties of this object
343
+ def update!(**args)
344
+ @display_name = args[:display_name] if args.key?(:display_name)
345
+ @labels = args[:labels] if args.key?(:labels)
346
+ @location_id = args[:location_id] if args.key?(:location_id)
347
+ @metadata = args[:metadata] if args.key?(:metadata)
348
+ @name = args[:name] if args.key?(:name)
349
+ end
350
+ end
351
+
352
+ # This resource represents a long-running operation that is the result of a
353
+ # network API call.
354
+ class Operation
355
+ include Google::Apis::Core::Hashable
356
+
357
+ # If the value is `false`, it means the operation is still in progress. If `true`
358
+ # , the operation is completed, and either `error` or `response` is available.
359
+ # Corresponds to the JSON property `done`
360
+ # @return [Boolean]
361
+ attr_accessor :done
362
+ alias_method :done?, :done
363
+
364
+ # The `Status` type defines a logical error model that is suitable for different
365
+ # programming environments, including REST APIs and RPC APIs. It is used by [
366
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
367
+ # data: error code, error message, and error details. You can find out more
368
+ # about this error model and how to work with it in the [API Design Guide](https:
369
+ # //cloud.google.com/apis/design/errors).
370
+ # Corresponds to the JSON property `error`
371
+ # @return [Google::Apis::ApphubV1::Status]
372
+ attr_accessor :error
373
+
374
+ # Service-specific metadata associated with the operation. It typically contains
375
+ # progress information and common metadata such as create time. Some services
376
+ # might not provide such metadata. Any method that returns a long-running
377
+ # operation should document the metadata type, if any.
378
+ # Corresponds to the JSON property `metadata`
379
+ # @return [Hash<String,Object>]
380
+ attr_accessor :metadata
381
+
382
+ # The server-assigned name, which is only unique within the same service that
383
+ # originally returns it. If you use the default HTTP mapping, the `name` should
384
+ # be a resource name ending with `operations/`unique_id``.
385
+ # Corresponds to the JSON property `name`
386
+ # @return [String]
387
+ attr_accessor :name
388
+
389
+ # The normal, successful response of the operation. If the original method
390
+ # returns no data on success, such as `Delete`, the response is `google.protobuf.
391
+ # Empty`. If the original method is standard `Get`/`Create`/`Update`, the
392
+ # response should be the resource. For other methods, the response should have
393
+ # the type `XxxResponse`, where `Xxx` is the original method name. For example,
394
+ # if the original method name is `TakeSnapshot()`, the inferred response type is
395
+ # `TakeSnapshotResponse`.
396
+ # Corresponds to the JSON property `response`
397
+ # @return [Hash<String,Object>]
398
+ attr_accessor :response
399
+
400
+ def initialize(**args)
401
+ update!(**args)
402
+ end
403
+
404
+ # Update properties of this object
405
+ def update!(**args)
406
+ @done = args[:done] if args.key?(:done)
407
+ @error = args[:error] if args.key?(:error)
408
+ @metadata = args[:metadata] if args.key?(:metadata)
409
+ @name = args[:name] if args.key?(:name)
410
+ @response = args[:response] if args.key?(:response)
411
+ end
412
+ end
413
+
414
+ # An Identity and Access Management (IAM) policy, which specifies access
415
+ # controls for Google Cloud resources. A `Policy` is a collection of `bindings`.
416
+ # A `binding` binds one or more `members`, or principals, to a single `role`.
417
+ # Principals can be user accounts, service accounts, Google groups, and domains (
418
+ # such as G Suite). A `role` is a named list of permissions; each `role` can be
419
+ # an IAM predefined role or a user-created custom role. For some types of Google
420
+ # Cloud resources, a `binding` can also specify a `condition`, which is a
421
+ # logical expression that allows access to a resource only if the expression
422
+ # evaluates to `true`. A condition can add constraints based on attributes of
423
+ # the request, the resource, or both. To learn which resources support
424
+ # conditions in their IAM policies, see the [IAM documentation](https://cloud.
425
+ # google.com/iam/help/conditions/resource-policies). **JSON example:** ``` ` "
426
+ # bindings": [ ` "role": "roles/resourcemanager.organizationAdmin", "members": [
427
+ # "user:mike@example.com", "group:admins@example.com", "domain:google.com", "
428
+ # serviceAccount:my-project-id@appspot.gserviceaccount.com" ] `, ` "role": "
429
+ # roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com"
430
+ # ], "condition": ` "title": "expirable access", "description": "Does not grant
431
+ # access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:
432
+ # 00:00.000Z')", ` ` ], "etag": "BwWWja0YfJA=", "version": 3 ` ``` **YAML
433
+ # example:** ``` bindings: - members: - user:mike@example.com - group:admins@
434
+ # example.com - domain:google.com - serviceAccount:my-project-id@appspot.
435
+ # gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: -
436
+ # user:eve@example.com role: roles/resourcemanager.organizationViewer condition:
437
+ # title: expirable access description: Does not grant access after Sep 2020
438
+ # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag:
439
+ # BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the
440
+ # [IAM documentation](https://cloud.google.com/iam/docs/).
441
+ class Policy
442
+ include Google::Apis::Core::Hashable
443
+
444
+ # Specifies cloud audit logging configuration for this policy.
445
+ # Corresponds to the JSON property `auditConfigs`
446
+ # @return [Array<Google::Apis::ApphubV1::AuditConfig>]
447
+ attr_accessor :audit_configs
448
+
449
+ # Associates a list of `members`, or principals, with a `role`. Optionally, may
450
+ # specify a `condition` that determines how and when the `bindings` are applied.
451
+ # Each of the `bindings` must contain at least one principal. The `bindings` in
452
+ # a `Policy` can refer to up to 1,500 principals; up to 250 of these principals
453
+ # can be Google groups. Each occurrence of a principal counts towards these
454
+ # limits. For example, if the `bindings` grant 50 different roles to `user:alice@
455
+ # example.com`, and not to any other principal, then you can add another 1,450
456
+ # principals to the `bindings` in the `Policy`.
457
+ # Corresponds to the JSON property `bindings`
458
+ # @return [Array<Google::Apis::ApphubV1::Binding>]
459
+ attr_accessor :bindings
460
+
461
+ # `etag` is used for optimistic concurrency control as a way to help prevent
462
+ # simultaneous updates of a policy from overwriting each other. It is strongly
463
+ # suggested that systems make use of the `etag` in the read-modify-write cycle
464
+ # to perform policy updates in order to avoid race conditions: An `etag` is
465
+ # returned in the response to `getIamPolicy`, and systems are expected to put
466
+ # that etag in the request to `setIamPolicy` to ensure that their change will be
467
+ # applied to the same version of the policy. **Important:** If you use IAM
468
+ # Conditions, you must include the `etag` field whenever you call `setIamPolicy`.
469
+ # If you omit this field, then IAM allows you to overwrite a version `3` policy
470
+ # with a version `1` policy, and all of the conditions in the version `3` policy
471
+ # are lost.
472
+ # Corresponds to the JSON property `etag`
473
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
474
+ # @return [String]
475
+ attr_accessor :etag
476
+
477
+ # Specifies the format of the policy. Valid values are `0`, `1`, and `3`.
478
+ # Requests that specify an invalid value are rejected. Any operation that
479
+ # affects conditional role bindings must specify version `3`. This requirement
480
+ # applies to the following operations: * Getting a policy that includes a
481
+ # conditional role binding * Adding a conditional role binding to a policy *
482
+ # Changing a conditional role binding in a policy * Removing any role binding,
483
+ # with or without a condition, from a policy that includes conditions **
484
+ # Important:** If you use IAM Conditions, you must include the `etag` field
485
+ # whenever you call `setIamPolicy`. If you omit this field, then IAM allows you
486
+ # to overwrite a version `3` policy with a version `1` policy, and all of the
487
+ # conditions in the version `3` policy are lost. If a policy does not include
488
+ # any conditions, operations on that policy may specify any valid version or
489
+ # leave the field unset. To learn which resources support conditions in their
490
+ # IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/
491
+ # conditions/resource-policies).
492
+ # Corresponds to the JSON property `version`
493
+ # @return [Fixnum]
494
+ attr_accessor :version
495
+
496
+ def initialize(**args)
497
+ update!(**args)
498
+ end
499
+
500
+ # Update properties of this object
501
+ def update!(**args)
502
+ @audit_configs = args[:audit_configs] if args.key?(:audit_configs)
503
+ @bindings = args[:bindings] if args.key?(:bindings)
504
+ @etag = args[:etag] if args.key?(:etag)
505
+ @version = args[:version] if args.key?(:version)
506
+ end
507
+ end
508
+
509
+ # Request message for `SetIamPolicy` method.
510
+ class SetIamPolicyRequest
511
+ include Google::Apis::Core::Hashable
512
+
513
+ # An Identity and Access Management (IAM) policy, which specifies access
514
+ # controls for Google Cloud resources. A `Policy` is a collection of `bindings`.
515
+ # A `binding` binds one or more `members`, or principals, to a single `role`.
516
+ # Principals can be user accounts, service accounts, Google groups, and domains (
517
+ # such as G Suite). A `role` is a named list of permissions; each `role` can be
518
+ # an IAM predefined role or a user-created custom role. For some types of Google
519
+ # Cloud resources, a `binding` can also specify a `condition`, which is a
520
+ # logical expression that allows access to a resource only if the expression
521
+ # evaluates to `true`. A condition can add constraints based on attributes of
522
+ # the request, the resource, or both. To learn which resources support
523
+ # conditions in their IAM policies, see the [IAM documentation](https://cloud.
524
+ # google.com/iam/help/conditions/resource-policies). **JSON example:** ``` ` "
525
+ # bindings": [ ` "role": "roles/resourcemanager.organizationAdmin", "members": [
526
+ # "user:mike@example.com", "group:admins@example.com", "domain:google.com", "
527
+ # serviceAccount:my-project-id@appspot.gserviceaccount.com" ] `, ` "role": "
528
+ # roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com"
529
+ # ], "condition": ` "title": "expirable access", "description": "Does not grant
530
+ # access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:
531
+ # 00:00.000Z')", ` ` ], "etag": "BwWWja0YfJA=", "version": 3 ` ``` **YAML
532
+ # example:** ``` bindings: - members: - user:mike@example.com - group:admins@
533
+ # example.com - domain:google.com - serviceAccount:my-project-id@appspot.
534
+ # gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: -
535
+ # user:eve@example.com role: roles/resourcemanager.organizationViewer condition:
536
+ # title: expirable access description: Does not grant access after Sep 2020
537
+ # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag:
538
+ # BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the
539
+ # [IAM documentation](https://cloud.google.com/iam/docs/).
540
+ # Corresponds to the JSON property `policy`
541
+ # @return [Google::Apis::ApphubV1::Policy]
542
+ attr_accessor :policy
543
+
544
+ # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
545
+ # the fields in the mask will be modified. If no mask is provided, the following
546
+ # default mask is used: `paths: "bindings, etag"`
547
+ # Corresponds to the JSON property `updateMask`
548
+ # @return [String]
549
+ attr_accessor :update_mask
550
+
551
+ def initialize(**args)
552
+ update!(**args)
553
+ end
554
+
555
+ # Update properties of this object
556
+ def update!(**args)
557
+ @policy = args[:policy] if args.key?(:policy)
558
+ @update_mask = args[:update_mask] if args.key?(:update_mask)
559
+ end
560
+ end
561
+
562
+ # The `Status` type defines a logical error model that is suitable for different
563
+ # programming environments, including REST APIs and RPC APIs. It is used by [
564
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
565
+ # data: error code, error message, and error details. You can find out more
566
+ # about this error model and how to work with it in the [API Design Guide](https:
567
+ # //cloud.google.com/apis/design/errors).
568
+ class Status
569
+ include Google::Apis::Core::Hashable
570
+
571
+ # The status code, which should be an enum value of google.rpc.Code.
572
+ # Corresponds to the JSON property `code`
573
+ # @return [Fixnum]
574
+ attr_accessor :code
575
+
576
+ # A list of messages that carry the error details. There is a common set of
577
+ # message types for APIs to use.
578
+ # Corresponds to the JSON property `details`
579
+ # @return [Array<Hash<String,Object>>]
580
+ attr_accessor :details
581
+
582
+ # A developer-facing error message, which should be in English. Any user-facing
583
+ # error message should be localized and sent in the google.rpc.Status.details
584
+ # field, or localized by the client.
585
+ # Corresponds to the JSON property `message`
586
+ # @return [String]
587
+ attr_accessor :message
588
+
589
+ def initialize(**args)
590
+ update!(**args)
591
+ end
592
+
593
+ # Update properties of this object
594
+ def update!(**args)
595
+ @code = args[:code] if args.key?(:code)
596
+ @details = args[:details] if args.key?(:details)
597
+ @message = args[:message] if args.key?(:message)
598
+ end
599
+ end
600
+
601
+ # Request message for `TestIamPermissions` method.
602
+ class TestIamPermissionsRequest
603
+ include Google::Apis::Core::Hashable
604
+
605
+ # The set of permissions to check for the `resource`. Permissions with wildcards
606
+ # (such as `*` or `storage.*`) are not allowed. For more information see [IAM
607
+ # Overview](https://cloud.google.com/iam/docs/overview#permissions).
608
+ # Corresponds to the JSON property `permissions`
609
+ # @return [Array<String>]
610
+ attr_accessor :permissions
611
+
612
+ def initialize(**args)
613
+ update!(**args)
614
+ end
615
+
616
+ # Update properties of this object
617
+ def update!(**args)
618
+ @permissions = args[:permissions] if args.key?(:permissions)
619
+ end
620
+ end
621
+
622
+ # Response message for `TestIamPermissions` method.
623
+ class TestIamPermissionsResponse
624
+ include Google::Apis::Core::Hashable
625
+
626
+ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
627
+ # Corresponds to the JSON property `permissions`
628
+ # @return [Array<String>]
629
+ attr_accessor :permissions
630
+
631
+ def initialize(**args)
632
+ update!(**args)
633
+ end
634
+
635
+ # Update properties of this object
636
+ def update!(**args)
637
+ @permissions = args[:permissions] if args.key?(:permissions)
638
+ end
639
+ end
640
+ end
641
+ end
642
+ end
@@ -0,0 +1,28 @@
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
+ module Google
16
+ module Apis
17
+ module ApphubV1
18
+ # Version of the google-apis-apphub_v1 gem
19
+ GEM_VERSION = "0.1.0"
20
+
21
+ # Version of the code generator used to generate this client
22
+ GENERATOR_VERSION = "0.12.0"
23
+
24
+ # Revision of the discovery document this client was generated from
25
+ REVISION = "20231208"
26
+ end
27
+ end
28
+ end