google-apis-cloudasset_v1p5beta1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: febf7053e2abe42e63c32b642040448bf381f0c2bbb22fe61c432d995622c833
4
+ data.tar.gz: 0fa2967136b03d8d9a6d2d630cc0f089fe73e1b1d9476f7af91c7ee96da6fe51
5
+ SHA512:
6
+ metadata.gz: 663ab1b791ce1ba8c22d5a30dbb764caf817c86fd3c2213051042861fdf8d42ddb11f06eadca6b212ed0b2d0eed140be14b6650ec8c768d8bd6ef328a47aaebe
7
+ data.tar.gz: e62675ecbe11ff72e9630585e3a3385dc6b66fff16f7e45390a3f12800871ccc21fbc89363621cde354d960b30c7fe3f64bf522c40b3dbb1975ea38c72129429
@@ -0,0 +1,13 @@
1
+ --hide-void-return
2
+ --no-private
3
+ --verbose
4
+ --title=google-apis-cloudasset_v1p5beta1
5
+ --markup-provider=redcarpet
6
+ --markup=markdown
7
+ --main OVERVIEW.md
8
+ lib/google/apis/cloudasset_v1p5beta1/*.rb
9
+ lib/google/apis/cloudasset_v1p5beta1.rb
10
+ -
11
+ OVERVIEW.md
12
+ CHANGELOG.md
13
+ LICENSE.md
@@ -0,0 +1,7 @@
1
+ # Release history for google-apis-cloudasset_v1p5beta1
2
+
3
+ ### v0.1.0 (2021-01-07)
4
+
5
+ * Regenerated using generator version 0.1.1
6
+ * Regenerated from discovery document revision 20201211
7
+
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,96 @@
1
+ # Simple REST client for version V1p5beta1 of the Cloud Asset API
2
+
3
+ This is a simple client library for version V1p5beta1 of the Cloud Asset API. It provides:
4
+
5
+ * A client object that connects to the HTTP/JSON REST endpoint for the service.
6
+ * Ruby objects for data structures related to the service.
7
+ * Integration with the googleauth gem for authentication using OAuth, API keys, and service accounts.
8
+ * Control of retry, pagination, and timeouts.
9
+
10
+ Note that although this client library is supported and will continue to be updated to track changes to the service, it is otherwise considered complete and not under active development. Many Google services, especially Google Cloud Platform services, may provide a more modern client that is under more active development and improvement. See the section below titled *Which client should I use?* for more information.
11
+
12
+ ## Getting started
13
+
14
+ ### Before you begin
15
+
16
+ There are a few setup steps you need to complete before you can use this library:
17
+
18
+ 1. If you don't already have a Google account, [sign up](https://www.google.com/accounts).
19
+ 2. If you have never created a Google APIs Console project, read about [Managing Projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects) and create a project in the [Google API Console](https://console.cloud.google.com/).
20
+ 3. Most APIs need to be enabled for your project. [Enable it](https://console.cloud.google.com/apis/library/cloudasset.googleapis.com) in the console.
21
+
22
+ ### Installation
23
+
24
+ Add this line to your application's Gemfile:
25
+
26
+ ```ruby
27
+ gem 'google-apis-cloudasset_v1p5beta1', '~> 0.1'
28
+ ```
29
+
30
+ And then execute:
31
+
32
+ ```
33
+ $ bundle
34
+ ```
35
+
36
+ Or install it yourself as:
37
+
38
+ ```
39
+ $ gem install google-apis-cloudasset_v1p5beta1
40
+ ```
41
+
42
+ ### Creating a client object
43
+
44
+ Once the gem is installed, you can load the client code and instantiate a client.
45
+
46
+ ```ruby
47
+ # Load the client
48
+ require "google/apis/cloudasset_v1p5beta1"
49
+
50
+ # Create a client object
51
+ client = Google::Apis::CloudassetV1p5beta1::CloudAssetService.new
52
+
53
+ # Authenticate calls
54
+ client.authentication = # ... use the googleauth gem to create credentials
55
+ ```
56
+
57
+ See the class reference docs for information on the methods you can call from a client.
58
+
59
+ ## Documentation
60
+
61
+ More detailed descriptions of the Google simple REST clients are available in two documents.
62
+
63
+ * The [Usage Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/usage-guide.md) discusses how to make API calls, how to use the provided data structures, and how to work the various features of the client library, including media upload and download, error handling, retries, pagination, and logging.
64
+ * The [Auth Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/auth-guide.md) discusses authentication in the client libraries, including API keys, OAuth 2.0, service accounts, and environment variables.
65
+
66
+ (Note: the above documents are written for the simple REST clients in general, and their examples may not reflect the Cloudasset service in particular.)
67
+
68
+ For reference information on specific calls in the Cloud Asset API, see the {Google::Apis::CloudassetV1p5beta1::CloudAssetService class reference docs}.
69
+
70
+ ## Which client should I use?
71
+
72
+ Google provides two types of Ruby API client libraries: **simple REST clients** and **modern clients**.
73
+
74
+ This library, `google-apis-cloudasset_v1p5beta1`, is a simple REST client. You can identify these clients by their gem names, which are always in the form `google-apis-<servicename>_<serviceversion>`. The simple REST clients connect to HTTP/JSON REST endpoints and are automatically generated from service discovery documents. They support most API functionality, but their class interfaces are sometimes awkward.
75
+
76
+ Modern clients are produced by a modern code generator, sometimes combined with hand-crafted functionality. Most modern clients connect to high-performance gRPC endpoints, although a few are backed by REST services. Modern clients are available for many Google services, especially Google Cloud Platform services, but do not yet support all the services covered by the simple clients.
77
+
78
+ Gem names for modern clients are often of the form `google-cloud-<service_name>`. (For example, [google-cloud-pubsub](https://rubygems.org/gems/google-cloud-pubsub).) Note that most modern clients also have corresponding "versioned" gems with names like `google-cloud-<service_name>-<version>`. (For example, [google-cloud-pubsub-v1](https://rubygems.org/gems/google-cloud-pubsub-v1).) The "versioned" gems can be used directly, but often provide lower-level interfaces. In most cases, the main gem is recommended.
79
+
80
+ **For most users, we recommend the modern client, if one is available.** Compared with simple clients, modern clients are generally much easier to use and more Ruby-like, support more advanced features such as streaming and long-running operations, and often provide much better performance. You may consider using a simple client instead, if a modern client is not yet available for the service you want to use, or if you are not able to use gRPC on your infrastructure.
81
+
82
+ The [product documentation](https://cloud.google.com/asset-inventory/docs/quickstart) may provide guidance regarding the preferred client library to use.
83
+
84
+ ## Supported Ruby versions
85
+
86
+ This library is supported on Ruby 2.5+.
87
+
88
+ Google provides official support for Ruby versions that are actively supported by Ruby Core -- that is, Ruby versions that are either in normal maintenance or in security maintenance, and not end of life. Currently, this means Ruby 2.5 and later. Older versions of Ruby _may_ still work, but are unsupported and not recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby support schedule.
89
+
90
+ ## License
91
+
92
+ This library is licensed under Apache 2.0. Full license text is available in the {file:LICENSE.md LICENSE}.
93
+
94
+ ## Support
95
+
96
+ Please [report bugs at the project on Github](https://github.com/google/google-api-ruby-client/issues). Don't hesitate to [ask questions](http://stackoverflow.com/questions/tagged/google-api-ruby-client) about the client or APIs on [StackOverflow](http://stackoverflow.com).
@@ -0,0 +1,15 @@
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 "google/apis/cloudasset_v1p5beta1"
@@ -0,0 +1,36 @@
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 'google/apis/cloudasset_v1p5beta1/service.rb'
16
+ require 'google/apis/cloudasset_v1p5beta1/classes.rb'
17
+ require 'google/apis/cloudasset_v1p5beta1/representations.rb'
18
+ require 'google/apis/cloudasset_v1p5beta1/gem_version.rb'
19
+
20
+ module Google
21
+ module Apis
22
+ # Cloud Asset API
23
+ #
24
+ # The cloud asset API manages the history and inventory of cloud resources.
25
+ #
26
+ # @see https://cloud.google.com/asset-inventory/docs/quickstart
27
+ module CloudassetV1p5beta1
28
+ # Version of the Cloud Asset API this client connects to.
29
+ # This is NOT the gem version.
30
+ VERSION = 'V1p5beta1'
31
+
32
+ # View and manage your data across Google Cloud Platform services
33
+ AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,1626 @@
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 CloudassetV1p5beta1
24
+
25
+ # An asset in Google Cloud. An asset can be any resource in the Google Cloud [
26
+ # resource hierarchy](https://cloud.google.com/resource-manager/docs/cloud-
27
+ # platform-resource-hierarchy), a resource outside the Google Cloud resource
28
+ # hierarchy (such as Google Kubernetes Engine clusters and objects), or a policy
29
+ # (e.g. Cloud IAM policy). See [Supported asset types](https://cloud.google.com/
30
+ # asset-inventory/docs/supported-asset-types) for more information.
31
+ class Asset
32
+ include Google::Apis::Core::Hashable
33
+
34
+ # An `AccessLevel` is a label that can be applied to requests to Google Cloud
35
+ # services, along with a list of requirements necessary for the label to be
36
+ # applied.
37
+ # Corresponds to the JSON property `accessLevel`
38
+ # @return [Google::Apis::CloudassetV1p5beta1::GoogleIdentityAccesscontextmanagerV1AccessLevel]
39
+ attr_accessor :access_level
40
+
41
+ # `AccessPolicy` is a container for `AccessLevels` (which define the necessary
42
+ # attributes to use Google Cloud services) and `ServicePerimeters` (which define
43
+ # regions of services able to freely pass data within a perimeter). An access
44
+ # policy is globally visible within an organization, and the restrictions it
45
+ # specifies apply to all projects within an organization.
46
+ # Corresponds to the JSON property `accessPolicy`
47
+ # @return [Google::Apis::CloudassetV1p5beta1::GoogleIdentityAccesscontextmanagerV1AccessPolicy]
48
+ attr_accessor :access_policy
49
+
50
+ # The ancestry path of an asset in Google Cloud [resource hierarchy](https://
51
+ # cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
52
+ # represented as a list of relative resource names. An ancestry path starts with
53
+ # the closest ancestor in the hierarchy and ends at root. If the asset is a
54
+ # project, folder, or organization, the ancestry path starts from the asset
55
+ # itself. Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
56
+ # Corresponds to the JSON property `ancestors`
57
+ # @return [Array<String>]
58
+ attr_accessor :ancestors
59
+
60
+ # The type of the asset. Example: `compute.googleapis.com/Disk` See [Supported
61
+ # asset types](https://cloud.google.com/asset-inventory/docs/supported-asset-
62
+ # types) for more information.
63
+ # Corresponds to the JSON property `assetType`
64
+ # @return [String]
65
+ attr_accessor :asset_type
66
+
67
+ # An Identity and Access Management (IAM) policy, which specifies access
68
+ # controls for Google Cloud resources. A `Policy` is a collection of `bindings`.
69
+ # A `binding` binds one or more `members` to a single `role`. Members can be
70
+ # user accounts, service accounts, Google groups, and domains (such as G Suite).
71
+ # A `role` is a named list of permissions; each `role` can be an IAM predefined
72
+ # role or a user-created custom role. For some types of Google Cloud resources,
73
+ # a `binding` can also specify a `condition`, which is a logical expression that
74
+ # allows access to a resource only if the expression evaluates to `true`. A
75
+ # condition can add constraints based on attributes of the request, the resource,
76
+ # or both. To learn which resources support conditions in their IAM policies,
77
+ # see the [IAM documentation](https://cloud.google.com/iam/help/conditions/
78
+ # resource-policies). **JSON example:** ` "bindings": [ ` "role": "roles/
79
+ # resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "
80
+ # group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@
81
+ # appspot.gserviceaccount.com" ] `, ` "role": "roles/resourcemanager.
82
+ # organizationViewer", "members": [ "user:eve@example.com" ], "condition": ` "
83
+ # title": "expirable access", "description": "Does not grant access after Sep
84
+ # 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", `
85
+ # ` ], "etag": "BwWWja0YfJA=", "version": 3 ` **YAML example:** bindings: -
86
+ # members: - user:mike@example.com - group:admins@example.com - domain:google.
87
+ # com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/
88
+ # resourcemanager.organizationAdmin - members: - user:eve@example.com role:
89
+ # roles/resourcemanager.organizationViewer condition: title: expirable access
90
+ # description: Does not grant access after Sep 2020 expression: request.time <
91
+ # timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 3 For a
92
+ # description of IAM and its features, see the [IAM documentation](https://cloud.
93
+ # google.com/iam/docs/).
94
+ # Corresponds to the JSON property `iamPolicy`
95
+ # @return [Google::Apis::CloudassetV1p5beta1::Policy]
96
+ attr_accessor :iam_policy
97
+
98
+ # The full name of the asset. Example: `//compute.googleapis.com/projects/
99
+ # my_project_123/zones/zone1/instances/instance1` See [Resource names](https://
100
+ # cloud.google.com/apis/design/resource_names#full_resource_name) for more
101
+ # information.
102
+ # Corresponds to the JSON property `name`
103
+ # @return [String]
104
+ attr_accessor :name
105
+
106
+ # A representation of an [organization policy](https://cloud.google.com/resource-
107
+ # manager/docs/organization-policy/overview#organization_policy). There can be
108
+ # more than one organization policy with different constraints set on a given
109
+ # resource.
110
+ # Corresponds to the JSON property `orgPolicy`
111
+ # @return [Array<Google::Apis::CloudassetV1p5beta1::GoogleCloudOrgpolicyV1Policy>]
112
+ attr_accessor :org_policy
113
+
114
+ # A representation of a Google Cloud resource.
115
+ # Corresponds to the JSON property `resource`
116
+ # @return [Google::Apis::CloudassetV1p5beta1::Resource]
117
+ attr_accessor :resource
118
+
119
+ # `ServicePerimeter` describes a set of Google Cloud resources which can freely
120
+ # import and export data amongst themselves, but not export outside of the `
121
+ # ServicePerimeter`. If a request with a source within this `ServicePerimeter`
122
+ # has a target outside of the `ServicePerimeter`, the request will be blocked.
123
+ # Otherwise the request is allowed. There are two types of Service Perimeter -
124
+ # Regular and Bridge. Regular Service Perimeters cannot overlap, a single Google
125
+ # Cloud project can only belong to a single regular Service Perimeter. Service
126
+ # Perimeter Bridges can contain only Google Cloud projects as members, a single
127
+ # Google Cloud project may belong to multiple Service Perimeter Bridges.
128
+ # Corresponds to the JSON property `servicePerimeter`
129
+ # @return [Google::Apis::CloudassetV1p5beta1::GoogleIdentityAccesscontextmanagerV1ServicePerimeter]
130
+ attr_accessor :service_perimeter
131
+
132
+ def initialize(**args)
133
+ update!(**args)
134
+ end
135
+
136
+ # Update properties of this object
137
+ def update!(**args)
138
+ @access_level = args[:access_level] if args.key?(:access_level)
139
+ @access_policy = args[:access_policy] if args.key?(:access_policy)
140
+ @ancestors = args[:ancestors] if args.key?(:ancestors)
141
+ @asset_type = args[:asset_type] if args.key?(:asset_type)
142
+ @iam_policy = args[:iam_policy] if args.key?(:iam_policy)
143
+ @name = args[:name] if args.key?(:name)
144
+ @org_policy = args[:org_policy] if args.key?(:org_policy)
145
+ @resource = args[:resource] if args.key?(:resource)
146
+ @service_perimeter = args[:service_perimeter] if args.key?(:service_perimeter)
147
+ end
148
+ end
149
+
150
+ # Specifies the audit configuration for a service. The configuration determines
151
+ # which permission types are logged, and what identities, if any, are exempted
152
+ # from logging. An AuditConfig must have one or more AuditLogConfigs. If there
153
+ # are AuditConfigs for both `allServices` and a specific service, the union of
154
+ # the two AuditConfigs is used for that service: the log_types specified in each
155
+ # AuditConfig are enabled, and the exempted_members in each AuditLogConfig are
156
+ # exempted. Example Policy with multiple AuditConfigs: ` "audit_configs": [ ` "
157
+ # service": "allServices", "audit_log_configs": [ ` "log_type": "DATA_READ", "
158
+ # exempted_members": [ "user:jose@example.com" ] `, ` "log_type": "DATA_WRITE" `,
159
+ # ` "log_type": "ADMIN_READ" ` ] `, ` "service": "sampleservice.googleapis.com",
160
+ # "audit_log_configs": [ ` "log_type": "DATA_READ" `, ` "log_type": "DATA_WRITE"
161
+ # , "exempted_members": [ "user:aliya@example.com" ] ` ] ` ] ` For sampleservice,
162
+ # this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also
163
+ # exempts jose@example.com from DATA_READ logging, and aliya@example.com from
164
+ # DATA_WRITE logging.
165
+ class AuditConfig
166
+ include Google::Apis::Core::Hashable
167
+
168
+ # The configuration for logging of each type of permission.
169
+ # Corresponds to the JSON property `auditLogConfigs`
170
+ # @return [Array<Google::Apis::CloudassetV1p5beta1::AuditLogConfig>]
171
+ attr_accessor :audit_log_configs
172
+
173
+ # Specifies a service that will be enabled for audit logging. For example, `
174
+ # storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special
175
+ # value that covers all services.
176
+ # Corresponds to the JSON property `service`
177
+ # @return [String]
178
+ attr_accessor :service
179
+
180
+ def initialize(**args)
181
+ update!(**args)
182
+ end
183
+
184
+ # Update properties of this object
185
+ def update!(**args)
186
+ @audit_log_configs = args[:audit_log_configs] if args.key?(:audit_log_configs)
187
+ @service = args[:service] if args.key?(:service)
188
+ end
189
+ end
190
+
191
+ # Provides the configuration for logging a type of permissions. Example: ` "
192
+ # audit_log_configs": [ ` "log_type": "DATA_READ", "exempted_members": [ "user:
193
+ # jose@example.com" ] `, ` "log_type": "DATA_WRITE" ` ] ` This enables '
194
+ # DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from
195
+ # DATA_READ logging.
196
+ class AuditLogConfig
197
+ include Google::Apis::Core::Hashable
198
+
199
+ # Specifies the identities that do not cause logging for this type of permission.
200
+ # Follows the same format of Binding.members.
201
+ # Corresponds to the JSON property `exemptedMembers`
202
+ # @return [Array<String>]
203
+ attr_accessor :exempted_members
204
+
205
+ # The log type that this config enables.
206
+ # Corresponds to the JSON property `logType`
207
+ # @return [String]
208
+ attr_accessor :log_type
209
+
210
+ def initialize(**args)
211
+ update!(**args)
212
+ end
213
+
214
+ # Update properties of this object
215
+ def update!(**args)
216
+ @exempted_members = args[:exempted_members] if args.key?(:exempted_members)
217
+ @log_type = args[:log_type] if args.key?(:log_type)
218
+ end
219
+ end
220
+
221
+ # Associates `members` with a `role`.
222
+ class Binding
223
+ include Google::Apis::Core::Hashable
224
+
225
+ # Represents a textual expression in the Common Expression Language (CEL) syntax.
226
+ # CEL is a C-like expression language. The syntax and semantics of CEL are
227
+ # documented at https://github.com/google/cel-spec. Example (Comparison): title:
228
+ # "Summary size limit" description: "Determines if a summary is less than 100
229
+ # chars" expression: "document.summary.size() < 100" Example (Equality): title: "
230
+ # Requestor is owner" description: "Determines if requestor is the document
231
+ # owner" expression: "document.owner == request.auth.claims.email" Example (
232
+ # Logic): title: "Public documents" description: "Determine whether the document
233
+ # should be publicly visible" expression: "document.type != 'private' &&
234
+ # document.type != 'internal'" Example (Data Manipulation): title: "Notification
235
+ # string" description: "Create a notification string with a timestamp."
236
+ # expression: "'New message received at ' + string(document.create_time)" The
237
+ # exact variables and functions that may be referenced within an expression are
238
+ # determined by the service that evaluates it. See the service documentation for
239
+ # additional information.
240
+ # Corresponds to the JSON property `condition`
241
+ # @return [Google::Apis::CloudassetV1p5beta1::Expr]
242
+ attr_accessor :condition
243
+
244
+ # Specifies the identities requesting access for a Cloud Platform resource. `
245
+ # members` can have the following values: * `allUsers`: A special identifier
246
+ # that represents anyone who is on the internet; with or without a Google
247
+ # account. * `allAuthenticatedUsers`: A special identifier that represents
248
+ # anyone who is authenticated with a Google account or a service account. * `
249
+ # user:`emailid``: An email address that represents a specific Google account.
250
+ # For example, `alice@example.com` . * `serviceAccount:`emailid``: An email
251
+ # address that represents a service account. For example, `my-other-app@appspot.
252
+ # gserviceaccount.com`. * `group:`emailid``: An email address that represents a
253
+ # Google group. For example, `admins@example.com`. * `deleted:user:`emailid`?uid=
254
+ # `uniqueid``: An email address (plus unique identifier) representing a user
255
+ # that has been recently deleted. For example, `alice@example.com?uid=
256
+ # 123456789012345678901`. If the user is recovered, this value reverts to `user:`
257
+ # emailid`` and the recovered user retains the role in the binding. * `deleted:
258
+ # serviceAccount:`emailid`?uid=`uniqueid``: An email address (plus unique
259
+ # identifier) representing a service account that has been recently deleted. For
260
+ # example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
261
+ # If the service account is undeleted, this value reverts to `serviceAccount:`
262
+ # emailid`` and the undeleted service account retains the role in the binding. *
263
+ # `deleted:group:`emailid`?uid=`uniqueid``: An email address (plus unique
264
+ # identifier) representing a Google group that has been recently deleted. For
265
+ # example, `admins@example.com?uid=123456789012345678901`. If the group is
266
+ # recovered, this value reverts to `group:`emailid`` and the recovered group
267
+ # retains the role in the binding. * `domain:`domain``: The G Suite domain (
268
+ # primary) that represents all the users of that domain. For example, `google.
269
+ # com` or `example.com`.
270
+ # Corresponds to the JSON property `members`
271
+ # @return [Array<String>]
272
+ attr_accessor :members
273
+
274
+ # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`
275
+ # , or `roles/owner`.
276
+ # Corresponds to the JSON property `role`
277
+ # @return [String]
278
+ attr_accessor :role
279
+
280
+ def initialize(**args)
281
+ update!(**args)
282
+ end
283
+
284
+ # Update properties of this object
285
+ def update!(**args)
286
+ @condition = args[:condition] if args.key?(:condition)
287
+ @members = args[:members] if args.key?(:members)
288
+ @role = args[:role] if args.key?(:role)
289
+ end
290
+ end
291
+
292
+ # Represents a textual expression in the Common Expression Language (CEL) syntax.
293
+ # CEL is a C-like expression language. The syntax and semantics of CEL are
294
+ # documented at https://github.com/google/cel-spec. Example (Comparison): title:
295
+ # "Summary size limit" description: "Determines if a summary is less than 100
296
+ # chars" expression: "document.summary.size() < 100" Example (Equality): title: "
297
+ # Requestor is owner" description: "Determines if requestor is the document
298
+ # owner" expression: "document.owner == request.auth.claims.email" Example (
299
+ # Logic): title: "Public documents" description: "Determine whether the document
300
+ # should be publicly visible" expression: "document.type != 'private' &&
301
+ # document.type != 'internal'" Example (Data Manipulation): title: "Notification
302
+ # string" description: "Create a notification string with a timestamp."
303
+ # expression: "'New message received at ' + string(document.create_time)" The
304
+ # exact variables and functions that may be referenced within an expression are
305
+ # determined by the service that evaluates it. See the service documentation for
306
+ # additional information.
307
+ class Expr
308
+ include Google::Apis::Core::Hashable
309
+
310
+ # Optional. Description of the expression. This is a longer text which describes
311
+ # the expression, e.g. when hovered over it in a UI.
312
+ # Corresponds to the JSON property `description`
313
+ # @return [String]
314
+ attr_accessor :description
315
+
316
+ # Textual representation of an expression in Common Expression Language syntax.
317
+ # Corresponds to the JSON property `expression`
318
+ # @return [String]
319
+ attr_accessor :expression
320
+
321
+ # Optional. String indicating the location of the expression for error reporting,
322
+ # e.g. a file name and a position in the file.
323
+ # Corresponds to the JSON property `location`
324
+ # @return [String]
325
+ attr_accessor :location
326
+
327
+ # Optional. Title for the expression, i.e. a short string describing its purpose.
328
+ # This can be used e.g. in UIs which allow to enter the expression.
329
+ # Corresponds to the JSON property `title`
330
+ # @return [String]
331
+ attr_accessor :title
332
+
333
+ def initialize(**args)
334
+ update!(**args)
335
+ end
336
+
337
+ # Update properties of this object
338
+ def update!(**args)
339
+ @description = args[:description] if args.key?(:description)
340
+ @expression = args[:expression] if args.key?(:expression)
341
+ @location = args[:location] if args.key?(:location)
342
+ @title = args[:title] if args.key?(:title)
343
+ end
344
+ end
345
+
346
+ # Used in `policy_type` to specify how `boolean_policy` will behave at this
347
+ # resource.
348
+ class GoogleCloudOrgpolicyV1BooleanPolicy
349
+ include Google::Apis::Core::Hashable
350
+
351
+ # If `true`, then the `Policy` is enforced. If `false`, then any configuration
352
+ # is acceptable. Suppose you have a `Constraint` `constraints/compute.
353
+ # disableSerialPortAccess` with `constraint_default` set to `ALLOW`. A `Policy`
354
+ # for that `Constraint` exhibits the following behavior: - If the `Policy` at
355
+ # this resource has enforced set to `false`, serial port connection attempts
356
+ # will be allowed. - If the `Policy` at this resource has enforced set to `true`,
357
+ # serial port connection attempts will be refused. - If the `Policy` at this
358
+ # resource is `RestoreDefault`, serial port connection attempts will be allowed.
359
+ # - If no `Policy` is set at this resource or anywhere higher in the resource
360
+ # hierarchy, serial port connection attempts will be allowed. - If no `Policy`
361
+ # is set at this resource, but one exists higher in the resource hierarchy, the
362
+ # behavior is as if the`Policy` were set at this resource. The following
363
+ # examples demonstrate the different possible layerings: Example 1 (nearest `
364
+ # Constraint` wins): `organizations/foo` has a `Policy` with: `enforced: false` `
365
+ # projects/bar` has no `Policy` set. The constraint at `projects/bar` and `
366
+ # organizations/foo` will not be enforced. Example 2 (enforcement gets replaced):
367
+ # `organizations/foo` has a `Policy` with: `enforced: false` `projects/bar` has
368
+ # a `Policy` with: `enforced: true` The constraint at `organizations/foo` is not
369
+ # enforced. The constraint at `projects/bar` is enforced. Example 3 (
370
+ # RestoreDefault): `organizations/foo` has a `Policy` with: `enforced: true` `
371
+ # projects/bar` has a `Policy` with: `RestoreDefault: ``` The constraint at `
372
+ # organizations/foo` is enforced. The constraint at `projects/bar` is not
373
+ # enforced, because `constraint_default` for the `Constraint` is `ALLOW`.
374
+ # Corresponds to the JSON property `enforced`
375
+ # @return [Boolean]
376
+ attr_accessor :enforced
377
+ alias_method :enforced?, :enforced
378
+
379
+ def initialize(**args)
380
+ update!(**args)
381
+ end
382
+
383
+ # Update properties of this object
384
+ def update!(**args)
385
+ @enforced = args[:enforced] if args.key?(:enforced)
386
+ end
387
+ end
388
+
389
+ # Used in `policy_type` to specify how `list_policy` behaves at this resource. `
390
+ # ListPolicy` can define specific values and subtrees of Cloud Resource Manager
391
+ # resource hierarchy (`Organizations`, `Folders`, `Projects`) that are allowed
392
+ # or denied by setting the `allowed_values` and `denied_values` fields. This is
393
+ # achieved by using the `under:` and optional `is:` prefixes. The `under:`
394
+ # prefix is used to denote resource subtree values. The `is:` prefix is used to
395
+ # denote specific values, and is required only if the value contains a ":".
396
+ # Values prefixed with "is:" are treated the same as values with no prefix.
397
+ # Ancestry subtrees must be in one of the following formats: - "projects/", e.g.
398
+ # "projects/tokyo-rain-123" - "folders/", e.g. "folders/1234" - "organizations/",
399
+ # e.g. "organizations/1234" The `supports_under` field of the associated `
400
+ # Constraint` defines whether ancestry prefixes can be used. You can set `
401
+ # allowed_values` and `denied_values` in the same `Policy` if `all_values` is `
402
+ # ALL_VALUES_UNSPECIFIED`. `ALLOW` or `DENY` are used to allow or deny all
403
+ # values. If `all_values` is set to either `ALLOW` or `DENY`, `allowed_values`
404
+ # and `denied_values` must be unset.
405
+ class GoogleCloudOrgpolicyV1ListPolicy
406
+ include Google::Apis::Core::Hashable
407
+
408
+ # The policy all_values state.
409
+ # Corresponds to the JSON property `allValues`
410
+ # @return [String]
411
+ attr_accessor :all_values
412
+
413
+ # List of values allowed at this resource. Can only be set if `all_values` is
414
+ # set to `ALL_VALUES_UNSPECIFIED`.
415
+ # Corresponds to the JSON property `allowedValues`
416
+ # @return [Array<String>]
417
+ attr_accessor :allowed_values
418
+
419
+ # List of values denied at this resource. Can only be set if `all_values` is set
420
+ # to `ALL_VALUES_UNSPECIFIED`.
421
+ # Corresponds to the JSON property `deniedValues`
422
+ # @return [Array<String>]
423
+ attr_accessor :denied_values
424
+
425
+ # Determines the inheritance behavior for this `Policy`. By default, a `
426
+ # ListPolicy` set at a resource supersedes any `Policy` set anywhere up the
427
+ # resource hierarchy. However, if `inherit_from_parent` is set to `true`, then
428
+ # the values from the effective `Policy` of the parent resource are inherited,
429
+ # meaning the values set in this `Policy` are added to the values inherited up
430
+ # the hierarchy. Setting `Policy` hierarchies that inherit both allowed values
431
+ # and denied values isn't recommended in most circumstances to keep the
432
+ # configuration simple and understandable. However, it is possible to set a `
433
+ # Policy` with `allowed_values` set that inherits a `Policy` with `denied_values`
434
+ # set. In this case, the values that are allowed must be in `allowed_values`
435
+ # and not present in `denied_values`. For example, suppose you have a `
436
+ # Constraint` `constraints/serviceuser.services`, which has a `constraint_type`
437
+ # of `list_constraint`, and with `constraint_default` set to `ALLOW`. Suppose
438
+ # that at the Organization level, a `Policy` is applied that restricts the
439
+ # allowed API activations to ``E1`, `E2``. Then, if a `Policy` is applied to a
440
+ # project below the Organization that has `inherit_from_parent` set to `false`
441
+ # and field all_values set to DENY, then an attempt to activate any API will be
442
+ # denied. The following examples demonstrate different possible layerings for `
443
+ # projects/bar` parented by `organizations/foo`: Example 1 (no inherited values):
444
+ # `organizations/foo` has a `Policy` with values: `allowed_values: "E1"
445
+ # allowed_values:"E2"` `projects/bar` has `inherit_from_parent` `false` and
446
+ # values: `allowed_values: "E3" allowed_values: "E4"` The accepted values at `
447
+ # organizations/foo` are `E1`, `E2`. The accepted values at `projects/bar` are `
448
+ # E3`, and `E4`. Example 2 (inherited values): `organizations/foo` has a `Policy`
449
+ # with values: `allowed_values: "E1" allowed_values:"E2"` `projects/bar` has a `
450
+ # Policy` with values: `value: "E3" value: "E4" inherit_from_parent: true` The
451
+ # accepted values at `organizations/foo` are `E1`, `E2`. The accepted values at `
452
+ # projects/bar` are `E1`, `E2`, `E3`, and `E4`. Example 3 (inheriting both
453
+ # allowed and denied values): `organizations/foo` has a `Policy` with values: `
454
+ # allowed_values: "E1" allowed_values: "E2"` `projects/bar` has a `Policy` with:
455
+ # `denied_values: "E1"` The accepted values at `organizations/foo` are `E1`, `E2`
456
+ # . The value accepted at `projects/bar` is `E2`. Example 4 (RestoreDefault): `
457
+ # organizations/foo` has a `Policy` with values: `allowed_values: "E1"
458
+ # allowed_values:"E2"` `projects/bar` has a `Policy` with values: `
459
+ # RestoreDefault: ``` The accepted values at `organizations/foo` are `E1`, `E2`.
460
+ # The accepted values at `projects/bar` are either all or none depending on the
461
+ # value of `constraint_default` (if `ALLOW`, all; if `DENY`, none). Example 5 (
462
+ # no policy inherits parent policy): `organizations/foo` has no `Policy` set. `
463
+ # projects/bar` has no `Policy` set. The accepted values at both levels are
464
+ # either all or none depending on the value of `constraint_default` (if `ALLOW`,
465
+ # all; if `DENY`, none). Example 6 (ListConstraint allowing all): `organizations/
466
+ # foo` has a `Policy` with values: `allowed_values: "E1" allowed_values: "E2"` `
467
+ # projects/bar` has a `Policy` with: `all: ALLOW` The accepted values at `
468
+ # organizations/foo` are `E1`, E2`. Any value is accepted at `projects/bar`.
469
+ # Example 7 (ListConstraint allowing none): `organizations/foo` has a `Policy`
470
+ # with values: `allowed_values: "E1" allowed_values: "E2"` `projects/bar` has a `
471
+ # Policy` with: `all: DENY` The accepted values at `organizations/foo` are `E1`,
472
+ # E2`. No value is accepted at `projects/bar`. Example 10 (allowed and denied
473
+ # subtrees of Resource Manager hierarchy): Given the following resource
474
+ # hierarchy O1->`F1, F2`; F1->`P1`; F2->`P2, P3`, `organizations/foo` has a `
475
+ # Policy` with values: `allowed_values: "under:organizations/O1"` `projects/bar`
476
+ # has a `Policy` with: `allowed_values: "under:projects/P3"` `denied_values: "
477
+ # under:folders/F2"` The accepted values at `organizations/foo` are `
478
+ # organizations/O1`, `folders/F1`, `folders/F2`, `projects/P1`, `projects/P2`, `
479
+ # projects/P3`. The accepted values at `projects/bar` are `organizations/O1`, `
480
+ # folders/F1`, `projects/P1`.
481
+ # Corresponds to the JSON property `inheritFromParent`
482
+ # @return [Boolean]
483
+ attr_accessor :inherit_from_parent
484
+ alias_method :inherit_from_parent?, :inherit_from_parent
485
+
486
+ # Optional. The Google Cloud Console will try to default to a configuration that
487
+ # matches the value specified in this `Policy`. If `suggested_value` is not set,
488
+ # it will inherit the value specified higher in the hierarchy, unless `
489
+ # inherit_from_parent` is `false`.
490
+ # Corresponds to the JSON property `suggestedValue`
491
+ # @return [String]
492
+ attr_accessor :suggested_value
493
+
494
+ def initialize(**args)
495
+ update!(**args)
496
+ end
497
+
498
+ # Update properties of this object
499
+ def update!(**args)
500
+ @all_values = args[:all_values] if args.key?(:all_values)
501
+ @allowed_values = args[:allowed_values] if args.key?(:allowed_values)
502
+ @denied_values = args[:denied_values] if args.key?(:denied_values)
503
+ @inherit_from_parent = args[:inherit_from_parent] if args.key?(:inherit_from_parent)
504
+ @suggested_value = args[:suggested_value] if args.key?(:suggested_value)
505
+ end
506
+ end
507
+
508
+ # Defines a Cloud Organization `Policy` which is used to specify `Constraints`
509
+ # for configurations of Cloud Platform resources.
510
+ class GoogleCloudOrgpolicyV1Policy
511
+ include Google::Apis::Core::Hashable
512
+
513
+ # Used in `policy_type` to specify how `boolean_policy` will behave at this
514
+ # resource.
515
+ # Corresponds to the JSON property `booleanPolicy`
516
+ # @return [Google::Apis::CloudassetV1p5beta1::GoogleCloudOrgpolicyV1BooleanPolicy]
517
+ attr_accessor :boolean_policy
518
+
519
+ # The name of the `Constraint` the `Policy` is configuring, for example, `
520
+ # constraints/serviceuser.services`. A [list of available constraints](/resource-
521
+ # manager/docs/organization-policy/org-policy-constraints) is available.
522
+ # Immutable after creation.
523
+ # Corresponds to the JSON property `constraint`
524
+ # @return [String]
525
+ attr_accessor :constraint
526
+
527
+ # An opaque tag indicating the current version of the `Policy`, used for
528
+ # concurrency control. When the `Policy` is returned from either a `GetPolicy`
529
+ # or a `ListOrgPolicy` request, this `etag` indicates the version of the current
530
+ # `Policy` to use when executing a read-modify-write loop. When the `Policy` is
531
+ # returned from a `GetEffectivePolicy` request, the `etag` will be unset. When
532
+ # the `Policy` is used in a `SetOrgPolicy` method, use the `etag` value that was
533
+ # returned from a `GetOrgPolicy` request as part of a read-modify-write loop for
534
+ # concurrency control. Not setting the `etag`in a `SetOrgPolicy` request will
535
+ # result in an unconditional write of the `Policy`.
536
+ # Corresponds to the JSON property `etag`
537
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
538
+ # @return [String]
539
+ attr_accessor :etag
540
+
541
+ # Used in `policy_type` to specify how `list_policy` behaves at this resource. `
542
+ # ListPolicy` can define specific values and subtrees of Cloud Resource Manager
543
+ # resource hierarchy (`Organizations`, `Folders`, `Projects`) that are allowed
544
+ # or denied by setting the `allowed_values` and `denied_values` fields. This is
545
+ # achieved by using the `under:` and optional `is:` prefixes. The `under:`
546
+ # prefix is used to denote resource subtree values. The `is:` prefix is used to
547
+ # denote specific values, and is required only if the value contains a ":".
548
+ # Values prefixed with "is:" are treated the same as values with no prefix.
549
+ # Ancestry subtrees must be in one of the following formats: - "projects/", e.g.
550
+ # "projects/tokyo-rain-123" - "folders/", e.g. "folders/1234" - "organizations/",
551
+ # e.g. "organizations/1234" The `supports_under` field of the associated `
552
+ # Constraint` defines whether ancestry prefixes can be used. You can set `
553
+ # allowed_values` and `denied_values` in the same `Policy` if `all_values` is `
554
+ # ALL_VALUES_UNSPECIFIED`. `ALLOW` or `DENY` are used to allow or deny all
555
+ # values. If `all_values` is set to either `ALLOW` or `DENY`, `allowed_values`
556
+ # and `denied_values` must be unset.
557
+ # Corresponds to the JSON property `listPolicy`
558
+ # @return [Google::Apis::CloudassetV1p5beta1::GoogleCloudOrgpolicyV1ListPolicy]
559
+ attr_accessor :list_policy
560
+
561
+ # Ignores policies set above this resource and restores the `constraint_default`
562
+ # enforcement behavior of the specific `Constraint` at this resource. Suppose
563
+ # that `constraint_default` is set to `ALLOW` for the `Constraint` `constraints/
564
+ # serviceuser.services`. Suppose that organization foo.com sets a `Policy` at
565
+ # their Organization resource node that restricts the allowed service
566
+ # activations to deny all service activations. They could then set a `Policy`
567
+ # with the `policy_type` `restore_default` on several experimental projects,
568
+ # restoring the `constraint_default` enforcement of the `Constraint` for only
569
+ # those projects, allowing those projects to have all services activated.
570
+ # Corresponds to the JSON property `restoreDefault`
571
+ # @return [Google::Apis::CloudassetV1p5beta1::GoogleCloudOrgpolicyV1RestoreDefault]
572
+ attr_accessor :restore_default
573
+
574
+ # The time stamp the `Policy` was previously updated. This is set by the server,
575
+ # not specified by the caller, and represents the last time a call to `
576
+ # SetOrgPolicy` was made for that `Policy`. Any value set by the client will be
577
+ # ignored.
578
+ # Corresponds to the JSON property `updateTime`
579
+ # @return [String]
580
+ attr_accessor :update_time
581
+
582
+ # Version of the `Policy`. Default version is 0;
583
+ # Corresponds to the JSON property `version`
584
+ # @return [Fixnum]
585
+ attr_accessor :version
586
+
587
+ def initialize(**args)
588
+ update!(**args)
589
+ end
590
+
591
+ # Update properties of this object
592
+ def update!(**args)
593
+ @boolean_policy = args[:boolean_policy] if args.key?(:boolean_policy)
594
+ @constraint = args[:constraint] if args.key?(:constraint)
595
+ @etag = args[:etag] if args.key?(:etag)
596
+ @list_policy = args[:list_policy] if args.key?(:list_policy)
597
+ @restore_default = args[:restore_default] if args.key?(:restore_default)
598
+ @update_time = args[:update_time] if args.key?(:update_time)
599
+ @version = args[:version] if args.key?(:version)
600
+ end
601
+ end
602
+
603
+ # Ignores policies set above this resource and restores the `constraint_default`
604
+ # enforcement behavior of the specific `Constraint` at this resource. Suppose
605
+ # that `constraint_default` is set to `ALLOW` for the `Constraint` `constraints/
606
+ # serviceuser.services`. Suppose that organization foo.com sets a `Policy` at
607
+ # their Organization resource node that restricts the allowed service
608
+ # activations to deny all service activations. They could then set a `Policy`
609
+ # with the `policy_type` `restore_default` on several experimental projects,
610
+ # restoring the `constraint_default` enforcement of the `Constraint` for only
611
+ # those projects, allowing those projects to have all services activated.
612
+ class GoogleCloudOrgpolicyV1RestoreDefault
613
+ include Google::Apis::Core::Hashable
614
+
615
+ def initialize(**args)
616
+ update!(**args)
617
+ end
618
+
619
+ # Update properties of this object
620
+ def update!(**args)
621
+ end
622
+ end
623
+
624
+ # An `AccessLevel` is a label that can be applied to requests to Google Cloud
625
+ # services, along with a list of requirements necessary for the label to be
626
+ # applied.
627
+ class GoogleIdentityAccesscontextmanagerV1AccessLevel
628
+ include Google::Apis::Core::Hashable
629
+
630
+ # `BasicLevel` is an `AccessLevel` using a set of recommended features.
631
+ # Corresponds to the JSON property `basic`
632
+ # @return [Google::Apis::CloudassetV1p5beta1::GoogleIdentityAccesscontextmanagerV1BasicLevel]
633
+ attr_accessor :basic
634
+
635
+ # `CustomLevel` is an `AccessLevel` using the Cloud Common Expression Language
636
+ # to represent the necessary conditions for the level to apply to a request. See
637
+ # CEL spec at: https://github.com/google/cel-spec
638
+ # Corresponds to the JSON property `custom`
639
+ # @return [Google::Apis::CloudassetV1p5beta1::GoogleIdentityAccesscontextmanagerV1CustomLevel]
640
+ attr_accessor :custom
641
+
642
+ # Description of the `AccessLevel` and its use. Does not affect behavior.
643
+ # Corresponds to the JSON property `description`
644
+ # @return [String]
645
+ attr_accessor :description
646
+
647
+ # Required. Resource name for the Access Level. The `short_name` component must
648
+ # begin with a letter and only include alphanumeric and '_'. Format: `
649
+ # accessPolicies/`policy_id`/accessLevels/`short_name``. The maximum length of
650
+ # the `short_name` component is 50 characters.
651
+ # Corresponds to the JSON property `name`
652
+ # @return [String]
653
+ attr_accessor :name
654
+
655
+ # Human readable title. Must be unique within the Policy.
656
+ # Corresponds to the JSON property `title`
657
+ # @return [String]
658
+ attr_accessor :title
659
+
660
+ def initialize(**args)
661
+ update!(**args)
662
+ end
663
+
664
+ # Update properties of this object
665
+ def update!(**args)
666
+ @basic = args[:basic] if args.key?(:basic)
667
+ @custom = args[:custom] if args.key?(:custom)
668
+ @description = args[:description] if args.key?(:description)
669
+ @name = args[:name] if args.key?(:name)
670
+ @title = args[:title] if args.key?(:title)
671
+ end
672
+ end
673
+
674
+ # `AccessPolicy` is a container for `AccessLevels` (which define the necessary
675
+ # attributes to use Google Cloud services) and `ServicePerimeters` (which define
676
+ # regions of services able to freely pass data within a perimeter). An access
677
+ # policy is globally visible within an organization, and the restrictions it
678
+ # specifies apply to all projects within an organization.
679
+ class GoogleIdentityAccesscontextmanagerV1AccessPolicy
680
+ include Google::Apis::Core::Hashable
681
+
682
+ # Output only. An opaque identifier for the current version of the `AccessPolicy`
683
+ # . This will always be a strongly validated etag, meaning that two Access
684
+ # Polices will be identical if and only if their etags are identical. Clients
685
+ # should not expect this to be in any specific format.
686
+ # Corresponds to the JSON property `etag`
687
+ # @return [String]
688
+ attr_accessor :etag
689
+
690
+ # Output only. Resource name of the `AccessPolicy`. Format: `accessPolicies/`
691
+ # policy_id``
692
+ # Corresponds to the JSON property `name`
693
+ # @return [String]
694
+ attr_accessor :name
695
+
696
+ # Required. The parent of this `AccessPolicy` in the Cloud Resource Hierarchy.
697
+ # Currently immutable once created. Format: `organizations/`organization_id``
698
+ # Corresponds to the JSON property `parent`
699
+ # @return [String]
700
+ attr_accessor :parent
701
+
702
+ # Required. Human readable title. Does not affect behavior.
703
+ # Corresponds to the JSON property `title`
704
+ # @return [String]
705
+ attr_accessor :title
706
+
707
+ def initialize(**args)
708
+ update!(**args)
709
+ end
710
+
711
+ # Update properties of this object
712
+ def update!(**args)
713
+ @etag = args[:etag] if args.key?(:etag)
714
+ @name = args[:name] if args.key?(:name)
715
+ @parent = args[:parent] if args.key?(:parent)
716
+ @title = args[:title] if args.key?(:title)
717
+ end
718
+ end
719
+
720
+ # Identification for an API Operation.
721
+ class GoogleIdentityAccesscontextmanagerV1ApiOperation
722
+ include Google::Apis::Core::Hashable
723
+
724
+ # API methods or permissions to allow. Method or permission must belong to the
725
+ # service specified by `service_name` field. A single MethodSelector entry with `
726
+ # *` specified for the `method` field will allow all methods AND permissions for
727
+ # the service specified in `service_name`.
728
+ # Corresponds to the JSON property `methodSelectors`
729
+ # @return [Array<Google::Apis::CloudassetV1p5beta1::GoogleIdentityAccesscontextmanagerV1MethodSelector>]
730
+ attr_accessor :method_selectors
731
+
732
+ # The name of the API whose methods or permissions the IngressPolicy or
733
+ # EgressPolicy want to allow. A single ApiOperation with `service_name` field
734
+ # set to `*` will allow all methods AND permissions for all services.
735
+ # Corresponds to the JSON property `serviceName`
736
+ # @return [String]
737
+ attr_accessor :service_name
738
+
739
+ def initialize(**args)
740
+ update!(**args)
741
+ end
742
+
743
+ # Update properties of this object
744
+ def update!(**args)
745
+ @method_selectors = args[:method_selectors] if args.key?(:method_selectors)
746
+ @service_name = args[:service_name] if args.key?(:service_name)
747
+ end
748
+ end
749
+
750
+ # `BasicLevel` is an `AccessLevel` using a set of recommended features.
751
+ class GoogleIdentityAccesscontextmanagerV1BasicLevel
752
+ include Google::Apis::Core::Hashable
753
+
754
+ # How the `conditions` list should be combined to determine if a request is
755
+ # granted this `AccessLevel`. If AND is used, each `Condition` in `conditions`
756
+ # must be satisfied for the `AccessLevel` to be applied. If OR is used, at least
757
+ # one `Condition` in `conditions` must be satisfied for the `AccessLevel` to be
758
+ # applied. Default behavior is AND.
759
+ # Corresponds to the JSON property `combiningFunction`
760
+ # @return [String]
761
+ attr_accessor :combining_function
762
+
763
+ # Required. A list of requirements for the `AccessLevel` to be granted.
764
+ # Corresponds to the JSON property `conditions`
765
+ # @return [Array<Google::Apis::CloudassetV1p5beta1::GoogleIdentityAccesscontextmanagerV1Condition>]
766
+ attr_accessor :conditions
767
+
768
+ def initialize(**args)
769
+ update!(**args)
770
+ end
771
+
772
+ # Update properties of this object
773
+ def update!(**args)
774
+ @combining_function = args[:combining_function] if args.key?(:combining_function)
775
+ @conditions = args[:conditions] if args.key?(:conditions)
776
+ end
777
+ end
778
+
779
+ # A condition necessary for an `AccessLevel` to be granted. The Condition is an
780
+ # AND over its fields. So a Condition is true if: 1) the request IP is from one
781
+ # of the listed subnetworks AND 2) the originating device complies with the
782
+ # listed device policy AND 3) all listed access levels are granted AND 4) the
783
+ # request was sent at a time allowed by the DateTimeRestriction.
784
+ class GoogleIdentityAccesscontextmanagerV1Condition
785
+ include Google::Apis::Core::Hashable
786
+
787
+ # `DevicePolicy` specifies device specific restrictions necessary to acquire a
788
+ # given access level. A `DevicePolicy` specifies requirements for requests from
789
+ # devices to be granted access levels, it does not do any enforcement on the
790
+ # device. `DevicePolicy` acts as an AND over all specified fields, and each
791
+ # repeated field is an OR over its elements. Any unset fields are ignored. For
792
+ # example, if the proto is ` os_type : DESKTOP_WINDOWS, os_type : DESKTOP_LINUX,
793
+ # encryption_status: ENCRYPTED`, then the DevicePolicy will be true for requests
794
+ # originating from encrypted Linux desktops and encrypted Windows desktops.
795
+ # Corresponds to the JSON property `devicePolicy`
796
+ # @return [Google::Apis::CloudassetV1p5beta1::GoogleIdentityAccesscontextmanagerV1DevicePolicy]
797
+ attr_accessor :device_policy
798
+
799
+ # CIDR block IP subnetwork specification. May be IPv4 or IPv6. Note that for a
800
+ # CIDR IP address block, the specified IP address portion must be properly
801
+ # truncated (i.e. all the host bits must be zero) or the input is considered
802
+ # malformed. For example, "192.0.2.0/24" is accepted but "192.0.2.1/24" is not.
803
+ # Similarly, for IPv6, "2001:db8::/32" is accepted whereas "2001:db8::1/32" is
804
+ # not. The originating IP of a request must be in one of the listed subnets in
805
+ # order for this Condition to be true. If empty, all IP addresses are allowed.
806
+ # Corresponds to the JSON property `ipSubnetworks`
807
+ # @return [Array<String>]
808
+ attr_accessor :ip_subnetworks
809
+
810
+ # The request must be made by one of the provided user or service accounts.
811
+ # Groups are not supported. Syntax: `user:`emailid`` `serviceAccount:`emailid``
812
+ # If not specified, a request may come from any user.
813
+ # Corresponds to the JSON property `members`
814
+ # @return [Array<String>]
815
+ attr_accessor :members
816
+
817
+ # Whether to negate the Condition. If true, the Condition becomes a NAND over
818
+ # its non-empty fields, each field must be false for the Condition overall to be
819
+ # satisfied. Defaults to false.
820
+ # Corresponds to the JSON property `negate`
821
+ # @return [Boolean]
822
+ attr_accessor :negate
823
+ alias_method :negate?, :negate
824
+
825
+ # The request must originate from one of the provided countries/regions. Must be
826
+ # valid ISO 3166-1 alpha-2 codes.
827
+ # Corresponds to the JSON property `regions`
828
+ # @return [Array<String>]
829
+ attr_accessor :regions
830
+
831
+ # A list of other access levels defined in the same `Policy`, referenced by
832
+ # resource name. Referencing an `AccessLevel` which does not exist is an error.
833
+ # All access levels listed must be granted for the Condition to be true. Example:
834
+ # "`accessPolicies/MY_POLICY/accessLevels/LEVEL_NAME"`
835
+ # Corresponds to the JSON property `requiredAccessLevels`
836
+ # @return [Array<String>]
837
+ attr_accessor :required_access_levels
838
+
839
+ def initialize(**args)
840
+ update!(**args)
841
+ end
842
+
843
+ # Update properties of this object
844
+ def update!(**args)
845
+ @device_policy = args[:device_policy] if args.key?(:device_policy)
846
+ @ip_subnetworks = args[:ip_subnetworks] if args.key?(:ip_subnetworks)
847
+ @members = args[:members] if args.key?(:members)
848
+ @negate = args[:negate] if args.key?(:negate)
849
+ @regions = args[:regions] if args.key?(:regions)
850
+ @required_access_levels = args[:required_access_levels] if args.key?(:required_access_levels)
851
+ end
852
+ end
853
+
854
+ # `CustomLevel` is an `AccessLevel` using the Cloud Common Expression Language
855
+ # to represent the necessary conditions for the level to apply to a request. See
856
+ # CEL spec at: https://github.com/google/cel-spec
857
+ class GoogleIdentityAccesscontextmanagerV1CustomLevel
858
+ include Google::Apis::Core::Hashable
859
+
860
+ # Represents a textual expression in the Common Expression Language (CEL) syntax.
861
+ # CEL is a C-like expression language. The syntax and semantics of CEL are
862
+ # documented at https://github.com/google/cel-spec. Example (Comparison): title:
863
+ # "Summary size limit" description: "Determines if a summary is less than 100
864
+ # chars" expression: "document.summary.size() < 100" Example (Equality): title: "
865
+ # Requestor is owner" description: "Determines if requestor is the document
866
+ # owner" expression: "document.owner == request.auth.claims.email" Example (
867
+ # Logic): title: "Public documents" description: "Determine whether the document
868
+ # should be publicly visible" expression: "document.type != 'private' &&
869
+ # document.type != 'internal'" Example (Data Manipulation): title: "Notification
870
+ # string" description: "Create a notification string with a timestamp."
871
+ # expression: "'New message received at ' + string(document.create_time)" The
872
+ # exact variables and functions that may be referenced within an expression are
873
+ # determined by the service that evaluates it. See the service documentation for
874
+ # additional information.
875
+ # Corresponds to the JSON property `expr`
876
+ # @return [Google::Apis::CloudassetV1p5beta1::Expr]
877
+ attr_accessor :expr
878
+
879
+ def initialize(**args)
880
+ update!(**args)
881
+ end
882
+
883
+ # Update properties of this object
884
+ def update!(**args)
885
+ @expr = args[:expr] if args.key?(:expr)
886
+ end
887
+ end
888
+
889
+ # `DevicePolicy` specifies device specific restrictions necessary to acquire a
890
+ # given access level. A `DevicePolicy` specifies requirements for requests from
891
+ # devices to be granted access levels, it does not do any enforcement on the
892
+ # device. `DevicePolicy` acts as an AND over all specified fields, and each
893
+ # repeated field is an OR over its elements. Any unset fields are ignored. For
894
+ # example, if the proto is ` os_type : DESKTOP_WINDOWS, os_type : DESKTOP_LINUX,
895
+ # encryption_status: ENCRYPTED`, then the DevicePolicy will be true for requests
896
+ # originating from encrypted Linux desktops and encrypted Windows desktops.
897
+ class GoogleIdentityAccesscontextmanagerV1DevicePolicy
898
+ include Google::Apis::Core::Hashable
899
+
900
+ # Allowed device management levels, an empty list allows all management levels.
901
+ # Corresponds to the JSON property `allowedDeviceManagementLevels`
902
+ # @return [Array<String>]
903
+ attr_accessor :allowed_device_management_levels
904
+
905
+ # Allowed encryptions statuses, an empty list allows all statuses.
906
+ # Corresponds to the JSON property `allowedEncryptionStatuses`
907
+ # @return [Array<String>]
908
+ attr_accessor :allowed_encryption_statuses
909
+
910
+ # Allowed OS versions, an empty list allows all types and all versions.
911
+ # Corresponds to the JSON property `osConstraints`
912
+ # @return [Array<Google::Apis::CloudassetV1p5beta1::GoogleIdentityAccesscontextmanagerV1OsConstraint>]
913
+ attr_accessor :os_constraints
914
+
915
+ # Whether the device needs to be approved by the customer admin.
916
+ # Corresponds to the JSON property `requireAdminApproval`
917
+ # @return [Boolean]
918
+ attr_accessor :require_admin_approval
919
+ alias_method :require_admin_approval?, :require_admin_approval
920
+
921
+ # Whether the device needs to be corp owned.
922
+ # Corresponds to the JSON property `requireCorpOwned`
923
+ # @return [Boolean]
924
+ attr_accessor :require_corp_owned
925
+ alias_method :require_corp_owned?, :require_corp_owned
926
+
927
+ # Whether or not screenlock is required for the DevicePolicy to be true.
928
+ # Defaults to `false`.
929
+ # Corresponds to the JSON property `requireScreenlock`
930
+ # @return [Boolean]
931
+ attr_accessor :require_screenlock
932
+ alias_method :require_screenlock?, :require_screenlock
933
+
934
+ def initialize(**args)
935
+ update!(**args)
936
+ end
937
+
938
+ # Update properties of this object
939
+ def update!(**args)
940
+ @allowed_device_management_levels = args[:allowed_device_management_levels] if args.key?(:allowed_device_management_levels)
941
+ @allowed_encryption_statuses = args[:allowed_encryption_statuses] if args.key?(:allowed_encryption_statuses)
942
+ @os_constraints = args[:os_constraints] if args.key?(:os_constraints)
943
+ @require_admin_approval = args[:require_admin_approval] if args.key?(:require_admin_approval)
944
+ @require_corp_owned = args[:require_corp_owned] if args.key?(:require_corp_owned)
945
+ @require_screenlock = args[:require_screenlock] if args.key?(:require_screenlock)
946
+ end
947
+ end
948
+
949
+ # Defines the conditions under which an EgressPolicy matches a request.
950
+ # Conditions based on information about the source of the request. Note that if
951
+ # the destination of the request is protected by a ServicePerimeter, then that
952
+ # ServicePerimeter must have an IngressPolicy which allows access in order for
953
+ # this request to succeed.
954
+ class GoogleIdentityAccesscontextmanagerV1EgressFrom
955
+ include Google::Apis::Core::Hashable
956
+
957
+ # A list of identities that are allowed access through this [EgressPolicy].
958
+ # Should be in the format of email address. The email address should represent
959
+ # individual user or service account only.
960
+ # Corresponds to the JSON property `identities`
961
+ # @return [Array<String>]
962
+ attr_accessor :identities
963
+
964
+ # Specifies the type of identities that are allowed access to outside the
965
+ # perimeter. If left unspecified, then members of `identities` field will be
966
+ # allowed access.
967
+ # Corresponds to the JSON property `identityType`
968
+ # @return [String]
969
+ attr_accessor :identity_type
970
+
971
+ def initialize(**args)
972
+ update!(**args)
973
+ end
974
+
975
+ # Update properties of this object
976
+ def update!(**args)
977
+ @identities = args[:identities] if args.key?(:identities)
978
+ @identity_type = args[:identity_type] if args.key?(:identity_type)
979
+ end
980
+ end
981
+
982
+ # Policy for egress from perimeter. EgressPolicies match requests based on `
983
+ # egress_from` and `egress_to` stanzas. For an EgressPolicy to match, both `
984
+ # egress_from` and `egress_to` stanzas must be matched. If an EgressPolicy
985
+ # matches a request, the request is allowed to span the ServicePerimeter
986
+ # boundary. For example, an EgressPolicy can be used to allow VMs on networks
987
+ # within the ServicePerimeter to access a defined set of projects outside the
988
+ # perimeter in certain contexts (e.g. to read data from a Cloud Storage bucket
989
+ # or query against a BigQuery dataset). EgressPolicies are concerned with the *
990
+ # resources* that a request relates as well as the API services and API actions
991
+ # being used. They do not related to the direction of data movement. More
992
+ # detailed documentation for this concept can be found in the descriptions of
993
+ # EgressFrom and EgressTo.
994
+ class GoogleIdentityAccesscontextmanagerV1EgressPolicy
995
+ include Google::Apis::Core::Hashable
996
+
997
+ # Defines the conditions under which an EgressPolicy matches a request.
998
+ # Conditions based on information about the source of the request. Note that if
999
+ # the destination of the request is protected by a ServicePerimeter, then that
1000
+ # ServicePerimeter must have an IngressPolicy which allows access in order for
1001
+ # this request to succeed.
1002
+ # Corresponds to the JSON property `egressFrom`
1003
+ # @return [Google::Apis::CloudassetV1p5beta1::GoogleIdentityAccesscontextmanagerV1EgressFrom]
1004
+ attr_accessor :egress_from
1005
+
1006
+ # Defines the conditions under which an EgressPolicy matches a request.
1007
+ # Conditions are based on information about the ApiOperation intended to be
1008
+ # performed on the `resources` specified. Note that if the destination of the
1009
+ # request is protected by a ServicePerimeter, then that ServicePerimeter must
1010
+ # have an IngressPolicy which allows access in order for this request to succeed.
1011
+ # Corresponds to the JSON property `egressTo`
1012
+ # @return [Google::Apis::CloudassetV1p5beta1::GoogleIdentityAccesscontextmanagerV1EgressTo]
1013
+ attr_accessor :egress_to
1014
+
1015
+ def initialize(**args)
1016
+ update!(**args)
1017
+ end
1018
+
1019
+ # Update properties of this object
1020
+ def update!(**args)
1021
+ @egress_from = args[:egress_from] if args.key?(:egress_from)
1022
+ @egress_to = args[:egress_to] if args.key?(:egress_to)
1023
+ end
1024
+ end
1025
+
1026
+ # Defines the conditions under which an EgressPolicy matches a request.
1027
+ # Conditions are based on information about the ApiOperation intended to be
1028
+ # performed on the `resources` specified. Note that if the destination of the
1029
+ # request is protected by a ServicePerimeter, then that ServicePerimeter must
1030
+ # have an IngressPolicy which allows access in order for this request to succeed.
1031
+ class GoogleIdentityAccesscontextmanagerV1EgressTo
1032
+ include Google::Apis::Core::Hashable
1033
+
1034
+ # A list of ApiOperations that this egress rule applies to. A request matches if
1035
+ # it contains an operation/service in this list.
1036
+ # Corresponds to the JSON property `operations`
1037
+ # @return [Array<Google::Apis::CloudassetV1p5beta1::GoogleIdentityAccesscontextmanagerV1ApiOperation>]
1038
+ attr_accessor :operations
1039
+
1040
+ # A list of resources, currently only projects in the form `projects/`, that
1041
+ # match this to stanza. A request matches if it contains a resource in this list.
1042
+ # If `*` is specified for resources, then this EgressTo rule will authorize
1043
+ # access to all resources outside the perimeter.
1044
+ # Corresponds to the JSON property `resources`
1045
+ # @return [Array<String>]
1046
+ attr_accessor :resources
1047
+
1048
+ def initialize(**args)
1049
+ update!(**args)
1050
+ end
1051
+
1052
+ # Update properties of this object
1053
+ def update!(**args)
1054
+ @operations = args[:operations] if args.key?(:operations)
1055
+ @resources = args[:resources] if args.key?(:resources)
1056
+ end
1057
+ end
1058
+
1059
+ # Defines the conditions under which an IngressPolicy matches a request.
1060
+ # Conditions are based on information about the source of the request.
1061
+ class GoogleIdentityAccesscontextmanagerV1IngressFrom
1062
+ include Google::Apis::Core::Hashable
1063
+
1064
+ # A list of identities that are allowed access through this ingress policy.
1065
+ # Should be in the format of email address. The email address should represent
1066
+ # individual user or service account only.
1067
+ # Corresponds to the JSON property `identities`
1068
+ # @return [Array<String>]
1069
+ attr_accessor :identities
1070
+
1071
+ # Specifies the type of identities that are allowed access from outside the
1072
+ # perimeter. If left unspecified, then members of `identities` field will be
1073
+ # allowed access.
1074
+ # Corresponds to the JSON property `identityType`
1075
+ # @return [String]
1076
+ attr_accessor :identity_type
1077
+
1078
+ # Sources that this IngressPolicy authorizes access from.
1079
+ # Corresponds to the JSON property `sources`
1080
+ # @return [Array<Google::Apis::CloudassetV1p5beta1::GoogleIdentityAccesscontextmanagerV1IngressSource>]
1081
+ attr_accessor :sources
1082
+
1083
+ def initialize(**args)
1084
+ update!(**args)
1085
+ end
1086
+
1087
+ # Update properties of this object
1088
+ def update!(**args)
1089
+ @identities = args[:identities] if args.key?(:identities)
1090
+ @identity_type = args[:identity_type] if args.key?(:identity_type)
1091
+ @sources = args[:sources] if args.key?(:sources)
1092
+ end
1093
+ end
1094
+
1095
+ # Policy for ingress into ServicePerimeter. IngressPolicies match requests based
1096
+ # on `ingress_from` and `ingress_to` stanzas. For an ingress policy to match,
1097
+ # both the `ingress_from` and `ingress_to` stanzas must be matched. If an
1098
+ # IngressPolicy matches a request, the request is allowed through the perimeter
1099
+ # boundary from outside the perimeter. For example, access from the internet can
1100
+ # be allowed either based on an AccessLevel or, for traffic hosted on Google
1101
+ # Cloud, the project of the source network. For access from private networks,
1102
+ # using the project of the hosting network is required. Individual ingress
1103
+ # policies can be limited by restricting which services and/or actions they
1104
+ # match using the `ingress_to` field.
1105
+ class GoogleIdentityAccesscontextmanagerV1IngressPolicy
1106
+ include Google::Apis::Core::Hashable
1107
+
1108
+ # Defines the conditions under which an IngressPolicy matches a request.
1109
+ # Conditions are based on information about the source of the request.
1110
+ # Corresponds to the JSON property `ingressFrom`
1111
+ # @return [Google::Apis::CloudassetV1p5beta1::GoogleIdentityAccesscontextmanagerV1IngressFrom]
1112
+ attr_accessor :ingress_from
1113
+
1114
+ # Defines the conditions under which an IngressPolicy matches a request.
1115
+ # Conditions are based on information about the ApiOperation intended to be
1116
+ # performed on the destination of the request.
1117
+ # Corresponds to the JSON property `ingressTo`
1118
+ # @return [Google::Apis::CloudassetV1p5beta1::GoogleIdentityAccesscontextmanagerV1IngressTo]
1119
+ attr_accessor :ingress_to
1120
+
1121
+ def initialize(**args)
1122
+ update!(**args)
1123
+ end
1124
+
1125
+ # Update properties of this object
1126
+ def update!(**args)
1127
+ @ingress_from = args[:ingress_from] if args.key?(:ingress_from)
1128
+ @ingress_to = args[:ingress_to] if args.key?(:ingress_to)
1129
+ end
1130
+ end
1131
+
1132
+ # The source that IngressPolicy authorizes access from.
1133
+ class GoogleIdentityAccesscontextmanagerV1IngressSource
1134
+ include Google::Apis::Core::Hashable
1135
+
1136
+ # An AccessLevel resource name that allow resources within the ServicePerimeters
1137
+ # to be accessed from the internet. AccessLevels listed must be in the same
1138
+ # policy as this ServicePerimeter. Referencing a nonexistent AccessLevel will
1139
+ # cause an error. If no AccessLevel names are listed, resources within the
1140
+ # perimeter can only be accessed via Google Cloud calls with request origins
1141
+ # within the perimeter. Example: `accessPolicies/MY_POLICY/accessLevels/MY_LEVEL`
1142
+ # . If `*` is specified, then all IngressSources will be allowed.
1143
+ # Corresponds to the JSON property `accessLevel`
1144
+ # @return [String]
1145
+ attr_accessor :access_level
1146
+
1147
+ # A Google Cloud resource that is allowed to ingress the perimeter. Requests
1148
+ # from these resources will be allowed to access perimeter data. Currently only
1149
+ # projects are allowed. Format: `projects/`project_number`` The project may be
1150
+ # in any Google Cloud organization, not just the organization that the perimeter
1151
+ # is defined in. `*` is not allowed, the case of allowing all Google Cloud
1152
+ # resources only is not supported.
1153
+ # Corresponds to the JSON property `resource`
1154
+ # @return [String]
1155
+ attr_accessor :resource
1156
+
1157
+ def initialize(**args)
1158
+ update!(**args)
1159
+ end
1160
+
1161
+ # Update properties of this object
1162
+ def update!(**args)
1163
+ @access_level = args[:access_level] if args.key?(:access_level)
1164
+ @resource = args[:resource] if args.key?(:resource)
1165
+ end
1166
+ end
1167
+
1168
+ # Defines the conditions under which an IngressPolicy matches a request.
1169
+ # Conditions are based on information about the ApiOperation intended to be
1170
+ # performed on the destination of the request.
1171
+ class GoogleIdentityAccesscontextmanagerV1IngressTo
1172
+ include Google::Apis::Core::Hashable
1173
+
1174
+ # A list of ApiOperations the sources specified in corresponding IngressFrom are
1175
+ # allowed to perform in this ServicePerimeter.
1176
+ # Corresponds to the JSON property `operations`
1177
+ # @return [Array<Google::Apis::CloudassetV1p5beta1::GoogleIdentityAccesscontextmanagerV1ApiOperation>]
1178
+ attr_accessor :operations
1179
+
1180
+ # A list of resources, currently only projects in the form `projects/`,
1181
+ # protected by this ServicePerimeter that are allowed to be accessed by sources
1182
+ # defined in the corresponding IngressFrom. A request matches if it contains a
1183
+ # resource in this list. If `*` is specified for resources, then this IngressTo
1184
+ # rule will authorize access to all resources inside the perimeter, provided
1185
+ # that the request also matches the `operations` field.
1186
+ # Corresponds to the JSON property `resources`
1187
+ # @return [Array<String>]
1188
+ attr_accessor :resources
1189
+
1190
+ def initialize(**args)
1191
+ update!(**args)
1192
+ end
1193
+
1194
+ # Update properties of this object
1195
+ def update!(**args)
1196
+ @operations = args[:operations] if args.key?(:operations)
1197
+ @resources = args[:resources] if args.key?(:resources)
1198
+ end
1199
+ end
1200
+
1201
+ # An allowed method or permission of a service specified in ApiOperation.
1202
+ class GoogleIdentityAccesscontextmanagerV1MethodSelector
1203
+ include Google::Apis::Core::Hashable
1204
+
1205
+ # Value for `method` should be a valid method name for the corresponding `
1206
+ # service_name` in ApiOperation. If `*` used as value for `method`, then ALL
1207
+ # methods and permissions are allowed.
1208
+ # Corresponds to the JSON property `method`
1209
+ # @return [String]
1210
+ attr_accessor :method_prop
1211
+
1212
+ # Value for `permission` should be a valid Cloud IAM permission for the
1213
+ # corresponding `service_name` in ApiOperation.
1214
+ # Corresponds to the JSON property `permission`
1215
+ # @return [String]
1216
+ attr_accessor :permission
1217
+
1218
+ def initialize(**args)
1219
+ update!(**args)
1220
+ end
1221
+
1222
+ # Update properties of this object
1223
+ def update!(**args)
1224
+ @method_prop = args[:method_prop] if args.key?(:method_prop)
1225
+ @permission = args[:permission] if args.key?(:permission)
1226
+ end
1227
+ end
1228
+
1229
+ # A restriction on the OS type and version of devices making requests.
1230
+ class GoogleIdentityAccesscontextmanagerV1OsConstraint
1231
+ include Google::Apis::Core::Hashable
1232
+
1233
+ # The minimum allowed OS version. If not set, any version of this OS satisfies
1234
+ # the constraint. Format: `"major.minor.patch"`. Examples: `"10.5.301"`, `"9.2.1"
1235
+ # `.
1236
+ # Corresponds to the JSON property `minimumVersion`
1237
+ # @return [String]
1238
+ attr_accessor :minimum_version
1239
+
1240
+ # Required. The allowed OS type.
1241
+ # Corresponds to the JSON property `osType`
1242
+ # @return [String]
1243
+ attr_accessor :os_type
1244
+
1245
+ # Only allows requests from devices with a verified Chrome OS. Verifications
1246
+ # includes requirements that the device is enterprise-managed, conformant to
1247
+ # domain policies, and the caller has permission to call the API targeted by the
1248
+ # request.
1249
+ # Corresponds to the JSON property `requireVerifiedChromeOs`
1250
+ # @return [Boolean]
1251
+ attr_accessor :require_verified_chrome_os
1252
+ alias_method :require_verified_chrome_os?, :require_verified_chrome_os
1253
+
1254
+ def initialize(**args)
1255
+ update!(**args)
1256
+ end
1257
+
1258
+ # Update properties of this object
1259
+ def update!(**args)
1260
+ @minimum_version = args[:minimum_version] if args.key?(:minimum_version)
1261
+ @os_type = args[:os_type] if args.key?(:os_type)
1262
+ @require_verified_chrome_os = args[:require_verified_chrome_os] if args.key?(:require_verified_chrome_os)
1263
+ end
1264
+ end
1265
+
1266
+ # `ServicePerimeter` describes a set of Google Cloud resources which can freely
1267
+ # import and export data amongst themselves, but not export outside of the `
1268
+ # ServicePerimeter`. If a request with a source within this `ServicePerimeter`
1269
+ # has a target outside of the `ServicePerimeter`, the request will be blocked.
1270
+ # Otherwise the request is allowed. There are two types of Service Perimeter -
1271
+ # Regular and Bridge. Regular Service Perimeters cannot overlap, a single Google
1272
+ # Cloud project can only belong to a single regular Service Perimeter. Service
1273
+ # Perimeter Bridges can contain only Google Cloud projects as members, a single
1274
+ # Google Cloud project may belong to multiple Service Perimeter Bridges.
1275
+ class GoogleIdentityAccesscontextmanagerV1ServicePerimeter
1276
+ include Google::Apis::Core::Hashable
1277
+
1278
+ # Description of the `ServicePerimeter` and its use. Does not affect behavior.
1279
+ # Corresponds to the JSON property `description`
1280
+ # @return [String]
1281
+ attr_accessor :description
1282
+
1283
+ # Required. Resource name for the ServicePerimeter. The `short_name` component
1284
+ # must begin with a letter and only include alphanumeric and '_'. Format: `
1285
+ # accessPolicies/`policy_id`/servicePerimeters/`short_name``
1286
+ # Corresponds to the JSON property `name`
1287
+ # @return [String]
1288
+ attr_accessor :name
1289
+
1290
+ # Perimeter type indicator. A single project is allowed to be a member of single
1291
+ # regular perimeter, but multiple service perimeter bridges. A project cannot be
1292
+ # a included in a perimeter bridge without being included in regular perimeter.
1293
+ # For perimeter bridges, the restricted service list as well as access level
1294
+ # lists must be empty.
1295
+ # Corresponds to the JSON property `perimeterType`
1296
+ # @return [String]
1297
+ attr_accessor :perimeter_type
1298
+
1299
+ # `ServicePerimeterConfig` specifies a set of Google Cloud resources that
1300
+ # describe specific Service Perimeter configuration.
1301
+ # Corresponds to the JSON property `spec`
1302
+ # @return [Google::Apis::CloudassetV1p5beta1::GoogleIdentityAccesscontextmanagerV1ServicePerimeterConfig]
1303
+ attr_accessor :spec
1304
+
1305
+ # `ServicePerimeterConfig` specifies a set of Google Cloud resources that
1306
+ # describe specific Service Perimeter configuration.
1307
+ # Corresponds to the JSON property `status`
1308
+ # @return [Google::Apis::CloudassetV1p5beta1::GoogleIdentityAccesscontextmanagerV1ServicePerimeterConfig]
1309
+ attr_accessor :status
1310
+
1311
+ # Human readable title. Must be unique within the Policy.
1312
+ # Corresponds to the JSON property `title`
1313
+ # @return [String]
1314
+ attr_accessor :title
1315
+
1316
+ # Use explicit dry run spec flag. Ordinarily, a dry-run spec implicitly exists
1317
+ # for all Service Perimeters, and that spec is identical to the status for those
1318
+ # Service Perimeters. When this flag is set, it inhibits the generation of the
1319
+ # implicit spec, thereby allowing the user to explicitly provide a configuration
1320
+ # ("spec") to use in a dry-run version of the Service Perimeter. This allows the
1321
+ # user to test changes to the enforced config ("status") without actually
1322
+ # enforcing them. This testing is done through analyzing the differences between
1323
+ # currently enforced and suggested restrictions. use_explicit_dry_run_spec must
1324
+ # bet set to True if any of the fields in the spec are set to non-default values.
1325
+ # Corresponds to the JSON property `useExplicitDryRunSpec`
1326
+ # @return [Boolean]
1327
+ attr_accessor :use_explicit_dry_run_spec
1328
+ alias_method :use_explicit_dry_run_spec?, :use_explicit_dry_run_spec
1329
+
1330
+ def initialize(**args)
1331
+ update!(**args)
1332
+ end
1333
+
1334
+ # Update properties of this object
1335
+ def update!(**args)
1336
+ @description = args[:description] if args.key?(:description)
1337
+ @name = args[:name] if args.key?(:name)
1338
+ @perimeter_type = args[:perimeter_type] if args.key?(:perimeter_type)
1339
+ @spec = args[:spec] if args.key?(:spec)
1340
+ @status = args[:status] if args.key?(:status)
1341
+ @title = args[:title] if args.key?(:title)
1342
+ @use_explicit_dry_run_spec = args[:use_explicit_dry_run_spec] if args.key?(:use_explicit_dry_run_spec)
1343
+ end
1344
+ end
1345
+
1346
+ # `ServicePerimeterConfig` specifies a set of Google Cloud resources that
1347
+ # describe specific Service Perimeter configuration.
1348
+ class GoogleIdentityAccesscontextmanagerV1ServicePerimeterConfig
1349
+ include Google::Apis::Core::Hashable
1350
+
1351
+ # A list of `AccessLevel` resource names that allow resources within the `
1352
+ # ServicePerimeter` to be accessed from the internet. `AccessLevels` listed must
1353
+ # be in the same policy as this `ServicePerimeter`. Referencing a nonexistent `
1354
+ # AccessLevel` is a syntax error. If no `AccessLevel` names are listed,
1355
+ # resources within the perimeter can only be accessed via Google Cloud calls
1356
+ # with request origins within the perimeter. Example: `"accessPolicies/MY_POLICY/
1357
+ # accessLevels/MY_LEVEL"`. For Service Perimeter Bridge, must be empty.
1358
+ # Corresponds to the JSON property `accessLevels`
1359
+ # @return [Array<String>]
1360
+ attr_accessor :access_levels
1361
+
1362
+ # List of EgressPolicies to apply to the perimeter. A perimeter may have
1363
+ # multiple EgressPolicies, each of which is evaluated separately. Access is
1364
+ # granted if any EgressPolicy grants it. Must be empty for a perimeter bridge.
1365
+ # Corresponds to the JSON property `egressPolicies`
1366
+ # @return [Array<Google::Apis::CloudassetV1p5beta1::GoogleIdentityAccesscontextmanagerV1EgressPolicy>]
1367
+ attr_accessor :egress_policies
1368
+
1369
+ # List of IngressPolicies to apply to the perimeter. A perimeter may have
1370
+ # multiple IngressPolicies, each of which is evaluated separately. Access is
1371
+ # granted if any Ingress Policy grants it. Must be empty for a perimeter bridge.
1372
+ # Corresponds to the JSON property `ingressPolicies`
1373
+ # @return [Array<Google::Apis::CloudassetV1p5beta1::GoogleIdentityAccesscontextmanagerV1IngressPolicy>]
1374
+ attr_accessor :ingress_policies
1375
+
1376
+ # A list of Google Cloud resources that are inside of the service perimeter.
1377
+ # Currently only projects are allowed. Format: `projects/`project_number``
1378
+ # Corresponds to the JSON property `resources`
1379
+ # @return [Array<String>]
1380
+ attr_accessor :resources
1381
+
1382
+ # Google Cloud services that are subject to the Service Perimeter restrictions.
1383
+ # For example, if `storage.googleapis.com` is specified, access to the storage
1384
+ # buckets inside the perimeter must meet the perimeter's access restrictions.
1385
+ # Corresponds to the JSON property `restrictedServices`
1386
+ # @return [Array<String>]
1387
+ attr_accessor :restricted_services
1388
+
1389
+ # Specifies how APIs are allowed to communicate within the Service Perimeter.
1390
+ # Corresponds to the JSON property `vpcAccessibleServices`
1391
+ # @return [Google::Apis::CloudassetV1p5beta1::GoogleIdentityAccesscontextmanagerV1VpcAccessibleServices]
1392
+ attr_accessor :vpc_accessible_services
1393
+
1394
+ def initialize(**args)
1395
+ update!(**args)
1396
+ end
1397
+
1398
+ # Update properties of this object
1399
+ def update!(**args)
1400
+ @access_levels = args[:access_levels] if args.key?(:access_levels)
1401
+ @egress_policies = args[:egress_policies] if args.key?(:egress_policies)
1402
+ @ingress_policies = args[:ingress_policies] if args.key?(:ingress_policies)
1403
+ @resources = args[:resources] if args.key?(:resources)
1404
+ @restricted_services = args[:restricted_services] if args.key?(:restricted_services)
1405
+ @vpc_accessible_services = args[:vpc_accessible_services] if args.key?(:vpc_accessible_services)
1406
+ end
1407
+ end
1408
+
1409
+ # Specifies how APIs are allowed to communicate within the Service Perimeter.
1410
+ class GoogleIdentityAccesscontextmanagerV1VpcAccessibleServices
1411
+ include Google::Apis::Core::Hashable
1412
+
1413
+ # The list of APIs usable within the Service Perimeter. Must be empty unless '
1414
+ # enable_restriction' is True. You can specify a list of individual services, as
1415
+ # well as include the 'RESTRICTED-SERVICES' value, which automatically includes
1416
+ # all of the services protected by the perimeter.
1417
+ # Corresponds to the JSON property `allowedServices`
1418
+ # @return [Array<String>]
1419
+ attr_accessor :allowed_services
1420
+
1421
+ # Whether to restrict API calls within the Service Perimeter to the list of APIs
1422
+ # specified in 'allowed_services'.
1423
+ # Corresponds to the JSON property `enableRestriction`
1424
+ # @return [Boolean]
1425
+ attr_accessor :enable_restriction
1426
+ alias_method :enable_restriction?, :enable_restriction
1427
+
1428
+ def initialize(**args)
1429
+ update!(**args)
1430
+ end
1431
+
1432
+ # Update properties of this object
1433
+ def update!(**args)
1434
+ @allowed_services = args[:allowed_services] if args.key?(:allowed_services)
1435
+ @enable_restriction = args[:enable_restriction] if args.key?(:enable_restriction)
1436
+ end
1437
+ end
1438
+
1439
+ # ListAssets response.
1440
+ class ListAssetsResponse
1441
+ include Google::Apis::Core::Hashable
1442
+
1443
+ # Assets.
1444
+ # Corresponds to the JSON property `assets`
1445
+ # @return [Array<Google::Apis::CloudassetV1p5beta1::Asset>]
1446
+ attr_accessor :assets
1447
+
1448
+ # Token to retrieve the next page of results. Set to empty if there are no
1449
+ # remaining results.
1450
+ # Corresponds to the JSON property `nextPageToken`
1451
+ # @return [String]
1452
+ attr_accessor :next_page_token
1453
+
1454
+ # Time the snapshot was taken.
1455
+ # Corresponds to the JSON property `readTime`
1456
+ # @return [String]
1457
+ attr_accessor :read_time
1458
+
1459
+ def initialize(**args)
1460
+ update!(**args)
1461
+ end
1462
+
1463
+ # Update properties of this object
1464
+ def update!(**args)
1465
+ @assets = args[:assets] if args.key?(:assets)
1466
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1467
+ @read_time = args[:read_time] if args.key?(:read_time)
1468
+ end
1469
+ end
1470
+
1471
+ # An Identity and Access Management (IAM) policy, which specifies access
1472
+ # controls for Google Cloud resources. A `Policy` is a collection of `bindings`.
1473
+ # A `binding` binds one or more `members` to a single `role`. Members can be
1474
+ # user accounts, service accounts, Google groups, and domains (such as G Suite).
1475
+ # A `role` is a named list of permissions; each `role` can be an IAM predefined
1476
+ # role or a user-created custom role. For some types of Google Cloud resources,
1477
+ # a `binding` can also specify a `condition`, which is a logical expression that
1478
+ # allows access to a resource only if the expression evaluates to `true`. A
1479
+ # condition can add constraints based on attributes of the request, the resource,
1480
+ # or both. To learn which resources support conditions in their IAM policies,
1481
+ # see the [IAM documentation](https://cloud.google.com/iam/help/conditions/
1482
+ # resource-policies). **JSON example:** ` "bindings": [ ` "role": "roles/
1483
+ # resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "
1484
+ # group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@
1485
+ # appspot.gserviceaccount.com" ] `, ` "role": "roles/resourcemanager.
1486
+ # organizationViewer", "members": [ "user:eve@example.com" ], "condition": ` "
1487
+ # title": "expirable access", "description": "Does not grant access after Sep
1488
+ # 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", `
1489
+ # ` ], "etag": "BwWWja0YfJA=", "version": 3 ` **YAML example:** bindings: -
1490
+ # members: - user:mike@example.com - group:admins@example.com - domain:google.
1491
+ # com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/
1492
+ # resourcemanager.organizationAdmin - members: - user:eve@example.com role:
1493
+ # roles/resourcemanager.organizationViewer condition: title: expirable access
1494
+ # description: Does not grant access after Sep 2020 expression: request.time <
1495
+ # timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 3 For a
1496
+ # description of IAM and its features, see the [IAM documentation](https://cloud.
1497
+ # google.com/iam/docs/).
1498
+ class Policy
1499
+ include Google::Apis::Core::Hashable
1500
+
1501
+ # Specifies cloud audit logging configuration for this policy.
1502
+ # Corresponds to the JSON property `auditConfigs`
1503
+ # @return [Array<Google::Apis::CloudassetV1p5beta1::AuditConfig>]
1504
+ attr_accessor :audit_configs
1505
+
1506
+ # Associates a list of `members` to a `role`. Optionally, may specify a `
1507
+ # condition` that determines how and when the `bindings` are applied. Each of
1508
+ # the `bindings` must contain at least one member.
1509
+ # Corresponds to the JSON property `bindings`
1510
+ # @return [Array<Google::Apis::CloudassetV1p5beta1::Binding>]
1511
+ attr_accessor :bindings
1512
+
1513
+ # `etag` is used for optimistic concurrency control as a way to help prevent
1514
+ # simultaneous updates of a policy from overwriting each other. It is strongly
1515
+ # suggested that systems make use of the `etag` in the read-modify-write cycle
1516
+ # to perform policy updates in order to avoid race conditions: An `etag` is
1517
+ # returned in the response to `getIamPolicy`, and systems are expected to put
1518
+ # that etag in the request to `setIamPolicy` to ensure that their change will be
1519
+ # applied to the same version of the policy. **Important:** If you use IAM
1520
+ # Conditions, you must include the `etag` field whenever you call `setIamPolicy`.
1521
+ # If you omit this field, then IAM allows you to overwrite a version `3` policy
1522
+ # with a version `1` policy, and all of the conditions in the version `3` policy
1523
+ # are lost.
1524
+ # Corresponds to the JSON property `etag`
1525
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
1526
+ # @return [String]
1527
+ attr_accessor :etag
1528
+
1529
+ # Specifies the format of the policy. Valid values are `0`, `1`, and `3`.
1530
+ # Requests that specify an invalid value are rejected. Any operation that
1531
+ # affects conditional role bindings must specify version `3`. This requirement
1532
+ # applies to the following operations: * Getting a policy that includes a
1533
+ # conditional role binding * Adding a conditional role binding to a policy *
1534
+ # Changing a conditional role binding in a policy * Removing any role binding,
1535
+ # with or without a condition, from a policy that includes conditions **
1536
+ # Important:** If you use IAM Conditions, you must include the `etag` field
1537
+ # whenever you call `setIamPolicy`. If you omit this field, then IAM allows you
1538
+ # to overwrite a version `3` policy with a version `1` policy, and all of the
1539
+ # conditions in the version `3` policy are lost. If a policy does not include
1540
+ # any conditions, operations on that policy may specify any valid version or
1541
+ # leave the field unset. To learn which resources support conditions in their
1542
+ # IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/
1543
+ # conditions/resource-policies).
1544
+ # Corresponds to the JSON property `version`
1545
+ # @return [Fixnum]
1546
+ attr_accessor :version
1547
+
1548
+ def initialize(**args)
1549
+ update!(**args)
1550
+ end
1551
+
1552
+ # Update properties of this object
1553
+ def update!(**args)
1554
+ @audit_configs = args[:audit_configs] if args.key?(:audit_configs)
1555
+ @bindings = args[:bindings] if args.key?(:bindings)
1556
+ @etag = args[:etag] if args.key?(:etag)
1557
+ @version = args[:version] if args.key?(:version)
1558
+ end
1559
+ end
1560
+
1561
+ # A representation of a Google Cloud resource.
1562
+ class Resource
1563
+ include Google::Apis::Core::Hashable
1564
+
1565
+ # The content of the resource, in which some sensitive fields are removed and
1566
+ # may not be present.
1567
+ # Corresponds to the JSON property `data`
1568
+ # @return [Hash<String,Object>]
1569
+ attr_accessor :data
1570
+
1571
+ # The URL of the discovery document containing the resource's JSON schema.
1572
+ # Example: `https://www.googleapis.com/discovery/v1/apis/compute/v1/rest` This
1573
+ # value is unspecified for resources that do not have an API based on a
1574
+ # discovery document, such as Cloud Bigtable.
1575
+ # Corresponds to the JSON property `discoveryDocumentUri`
1576
+ # @return [String]
1577
+ attr_accessor :discovery_document_uri
1578
+
1579
+ # The JSON schema name listed in the discovery document. Example: `Project` This
1580
+ # value is unspecified for resources that do not have an API based on a
1581
+ # discovery document, such as Cloud Bigtable.
1582
+ # Corresponds to the JSON property `discoveryName`
1583
+ # @return [String]
1584
+ attr_accessor :discovery_name
1585
+
1586
+ # The full name of the immediate parent of this resource. See [Resource Names](
1587
+ # https://cloud.google.com/apis/design/resource_names#full_resource_name) for
1588
+ # more information. For Google Cloud assets, this value is the parent resource
1589
+ # defined in the [Cloud IAM policy hierarchy](https://cloud.google.com/iam/docs/
1590
+ # overview#policy_hierarchy). Example: `//cloudresourcemanager.googleapis.com/
1591
+ # projects/my_project_123` For third-party assets, this field may be set
1592
+ # differently.
1593
+ # Corresponds to the JSON property `parent`
1594
+ # @return [String]
1595
+ attr_accessor :parent
1596
+
1597
+ # The REST URL for accessing the resource. An HTTP `GET` request using this URL
1598
+ # returns the resource itself. Example: `https://cloudresourcemanager.googleapis.
1599
+ # com/v1/projects/my-project-123` This value is unspecified for resources
1600
+ # without a REST API.
1601
+ # Corresponds to the JSON property `resourceUrl`
1602
+ # @return [String]
1603
+ attr_accessor :resource_url
1604
+
1605
+ # The API version. Example: "v1".
1606
+ # Corresponds to the JSON property `version`
1607
+ # @return [String]
1608
+ attr_accessor :version
1609
+
1610
+ def initialize(**args)
1611
+ update!(**args)
1612
+ end
1613
+
1614
+ # Update properties of this object
1615
+ def update!(**args)
1616
+ @data = args[:data] if args.key?(:data)
1617
+ @discovery_document_uri = args[:discovery_document_uri] if args.key?(:discovery_document_uri)
1618
+ @discovery_name = args[:discovery_name] if args.key?(:discovery_name)
1619
+ @parent = args[:parent] if args.key?(:parent)
1620
+ @resource_url = args[:resource_url] if args.key?(:resource_url)
1621
+ @version = args[:version] if args.key?(:version)
1622
+ end
1623
+ end
1624
+ end
1625
+ end
1626
+ end