google-apis-policysimulator_v1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 8b044c2ed882693f67e53898893f908bea4a49cd7f8b5b8b97543f23d51413b0
4
+ data.tar.gz: f6f8ca1bb7190b74d47e89e5d3ed5f28e1d07476216c802f36958f673a360c89
5
+ SHA512:
6
+ metadata.gz: bdcc400ae00e396b78169dc4a1ed473f96633616263c83d72435e9b6b9dbce16c665c491da5b8d51ba21d32f85dfd9d90e4498a821f1c6888205eb523536d82f
7
+ data.tar.gz: 6191188bcfe48725d3172ea74f3dc2c1eee658b3d3c3a12157118615d8983a3059e73e1e377318ba728e8b6ac2f14bf17ebf0825f08b78c238b1d3f4d269671d
data/.yardopts ADDED
@@ -0,0 +1,13 @@
1
+ --hide-void-return
2
+ --no-private
3
+ --verbose
4
+ --title=google-apis-policysimulator_v1
5
+ --markup-provider=redcarpet
6
+ --markup=markdown
7
+ --main OVERVIEW.md
8
+ lib/google/apis/policysimulator_v1/*.rb
9
+ lib/google/apis/policysimulator_v1.rb
10
+ -
11
+ OVERVIEW.md
12
+ CHANGELOG.md
13
+ LICENSE.md
data/CHANGELOG.md ADDED
@@ -0,0 +1,7 @@
1
+ # Release history for google-apis-policysimulator_v1
2
+
3
+ ### v0.1.0 (2021-03-31)
4
+
5
+ * Regenerated from discovery document revision 20210330
6
+ * Regenerated using generator version 0.2.0
7
+
data/LICENSE.md ADDED
@@ -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.
data/OVERVIEW.md ADDED
@@ -0,0 +1,96 @@
1
+ # Simple REST client for version V1 of the Policy Simulator API
2
+
3
+ This is a simple client library for version V1 of the Policy Simulator 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/policysimulator.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-policysimulator_v1', '~> 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-policysimulator_v1
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/policysimulator_v1"
49
+
50
+ # Create a client object
51
+ client = Google::Apis::PolicysimulatorV1::PolicySimulatorService.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 Policysimulator service in particular.)
67
+
68
+ For reference information on specific calls in the Policy Simulator API, see the {Google::Apis::PolicysimulatorV1::PolicySimulatorService 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-policysimulator_v1`, 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/iam/docs/simulating-access) 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/policysimulator_v1"
@@ -0,0 +1,42 @@
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/policysimulator_v1/service.rb'
16
+ require 'google/apis/policysimulator_v1/classes.rb'
17
+ require 'google/apis/policysimulator_v1/representations.rb'
18
+ require 'google/apis/policysimulator_v1/gem_version.rb'
19
+
20
+ module Google
21
+ module Apis
22
+ # Policy Simulator API
23
+ #
24
+ # Policy Simulator is a collection of endpoints for creating, running, and
25
+ # viewing a Replay. A `Replay` is a type of simulation that lets you see how
26
+ # your members' access to resources might change if you changed your IAM policy.
27
+ # During a `Replay`, Policy Simulator re-evaluates, or replays, past access
28
+ # attempts under both the current policy and your proposed policy, and compares
29
+ # those results to determine how your members' access might change under the
30
+ # proposed policy.
31
+ #
32
+ # @see https://cloud.google.com/iam/docs/simulating-access
33
+ module PolicysimulatorV1
34
+ # Version of the Policy Simulator API this client connects to.
35
+ # This is NOT the gem version.
36
+ VERSION = 'V1'
37
+
38
+ # See, edit, configure, and delete your Google Cloud Platform data
39
+ AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,1226 @@
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 PolicysimulatorV1
24
+
25
+ # A summary and comparison of the member's access under the current (baseline)
26
+ # policies and the proposed (simulated) policies for a single access tuple.
27
+ class GoogleCloudPolicysimulatorV1AccessStateDiff
28
+ include Google::Apis::Core::Hashable
29
+
30
+ # How the member's access, specified in the AccessState field, changed between
31
+ # the current (baseline) policies and proposed (simulated) policies.
32
+ # Corresponds to the JSON property `accessChange`
33
+ # @return [String]
34
+ attr_accessor :access_change
35
+
36
+ # Details about how a set of policies, listed in ExplainedPolicy, resulted in a
37
+ # certain AccessState when replaying an access tuple.
38
+ # Corresponds to the JSON property `baseline`
39
+ # @return [Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1ExplainedAccess]
40
+ attr_accessor :baseline
41
+
42
+ # Details about how a set of policies, listed in ExplainedPolicy, resulted in a
43
+ # certain AccessState when replaying an access tuple.
44
+ # Corresponds to the JSON property `simulated`
45
+ # @return [Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1ExplainedAccess]
46
+ attr_accessor :simulated
47
+
48
+ def initialize(**args)
49
+ update!(**args)
50
+ end
51
+
52
+ # Update properties of this object
53
+ def update!(**args)
54
+ @access_change = args[:access_change] if args.key?(:access_change)
55
+ @baseline = args[:baseline] if args.key?(:baseline)
56
+ @simulated = args[:simulated] if args.key?(:simulated)
57
+ end
58
+ end
59
+
60
+ # Information about the member, resource, and permission to check.
61
+ class GoogleCloudPolicysimulatorV1AccessTuple
62
+ include Google::Apis::Core::Hashable
63
+
64
+ # Required. The full resource name that identifies the resource. For example, `//
65
+ # compute.googleapis.com/projects/my-project/zones/us-central1-a/instances/my-
66
+ # instance`. For examples of full resource names for Google Cloud services, see
67
+ # https://cloud.google.com/iam/help/troubleshooter/full-resource-names.
68
+ # Corresponds to the JSON property `fullResourceName`
69
+ # @return [String]
70
+ attr_accessor :full_resource_name
71
+
72
+ # Required. The IAM permission to check for the specified member and resource.
73
+ # For a complete list of IAM permissions, see https://cloud.google.com/iam/help/
74
+ # permissions/reference. For a complete list of predefined IAM roles and the
75
+ # permissions in each role, see https://cloud.google.com/iam/help/roles/
76
+ # reference.
77
+ # Corresponds to the JSON property `permission`
78
+ # @return [String]
79
+ attr_accessor :permission
80
+
81
+ # Required. The member, or principal, whose access you want to check, in the
82
+ # form of the email address that represents that member. For example, `alice@
83
+ # example.com` or `my-service-account@my-project.iam.gserviceaccount.com`. The
84
+ # member must be a Google Account or a service account. Other types of members
85
+ # are not supported.
86
+ # Corresponds to the JSON property `principal`
87
+ # @return [String]
88
+ attr_accessor :principal
89
+
90
+ def initialize(**args)
91
+ update!(**args)
92
+ end
93
+
94
+ # Update properties of this object
95
+ def update!(**args)
96
+ @full_resource_name = args[:full_resource_name] if args.key?(:full_resource_name)
97
+ @permission = args[:permission] if args.key?(:permission)
98
+ @principal = args[:principal] if args.key?(:principal)
99
+ end
100
+ end
101
+
102
+ # Details about how a binding in a policy affects a member's ability to use a
103
+ # permission.
104
+ class GoogleCloudPolicysimulatorV1BindingExplanation
105
+ include Google::Apis::Core::Hashable
106
+
107
+ # Required. Indicates whether _this binding_ provides the specified permission
108
+ # to the specified member for the specified resource. This field does _not_
109
+ # indicate whether the member actually has the permission for the resource.
110
+ # There might be another binding that overrides this binding. To determine
111
+ # whether the member actually has the permission, use the `access` field in the
112
+ # TroubleshootIamPolicyResponse.
113
+ # Corresponds to the JSON property `access`
114
+ # @return [String]
115
+ attr_accessor :access
116
+
117
+ # Represents a textual expression in the Common Expression Language (CEL) syntax.
118
+ # CEL is a C-like expression language. The syntax and semantics of CEL are
119
+ # documented at https://github.com/google/cel-spec. Example (Comparison): title:
120
+ # "Summary size limit" description: "Determines if a summary is less than 100
121
+ # chars" expression: "document.summary.size() < 100" Example (Equality): title: "
122
+ # Requestor is owner" description: "Determines if requestor is the document
123
+ # owner" expression: "document.owner == request.auth.claims.email" Example (
124
+ # Logic): title: "Public documents" description: "Determine whether the document
125
+ # should be publicly visible" expression: "document.type != 'private' &&
126
+ # document.type != 'internal'" Example (Data Manipulation): title: "Notification
127
+ # string" description: "Create a notification string with a timestamp."
128
+ # expression: "'New message received at ' + string(document.create_time)" The
129
+ # exact variables and functions that may be referenced within an expression are
130
+ # determined by the service that evaluates it. See the service documentation for
131
+ # additional information.
132
+ # Corresponds to the JSON property `condition`
133
+ # @return [Google::Apis::PolicysimulatorV1::GoogleTypeExpr]
134
+ attr_accessor :condition
135
+
136
+ # Indicates whether each member in the binding includes the member specified in
137
+ # the request, either directly or indirectly. Each key identifies a member in
138
+ # the binding, and each value indicates whether the member in the binding
139
+ # includes the member in the request. For example, suppose that a binding
140
+ # includes the following members: * `user:alice@example.com` * `group:product-
141
+ # eng@example.com` The member in the replayed access tuple is `user:bob@example.
142
+ # com`. This user is a member of the group `group:product-eng@example.com`. For
143
+ # the first member in the binding, the key is `user:alice@example.com`, and the `
144
+ # membership` field in the value is set to `MEMBERSHIP_NOT_INCLUDED`. For the
145
+ # second member in the binding, the key is `group:product-eng@example.com`, and
146
+ # the `membership` field in the value is set to `MEMBERSHIP_INCLUDED`.
147
+ # Corresponds to the JSON property `memberships`
148
+ # @return [Hash<String,Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1BindingExplanationAnnotatedMembership>]
149
+ attr_accessor :memberships
150
+
151
+ # The relevance of this binding to the overall determination for the entire
152
+ # policy.
153
+ # Corresponds to the JSON property `relevance`
154
+ # @return [String]
155
+ attr_accessor :relevance
156
+
157
+ # The role that this binding grants. For example, `roles/compute.serviceAgent`.
158
+ # For a complete list of predefined IAM roles, as well as the permissions in
159
+ # each role, see https://cloud.google.com/iam/help/roles/reference.
160
+ # Corresponds to the JSON property `role`
161
+ # @return [String]
162
+ attr_accessor :role
163
+
164
+ # Indicates whether the role granted by this binding contains the specified
165
+ # permission.
166
+ # Corresponds to the JSON property `rolePermission`
167
+ # @return [String]
168
+ attr_accessor :role_permission
169
+
170
+ # The relevance of the permission's existence, or nonexistence, in the role to
171
+ # the overall determination for the entire policy.
172
+ # Corresponds to the JSON property `rolePermissionRelevance`
173
+ # @return [String]
174
+ attr_accessor :role_permission_relevance
175
+
176
+ def initialize(**args)
177
+ update!(**args)
178
+ end
179
+
180
+ # Update properties of this object
181
+ def update!(**args)
182
+ @access = args[:access] if args.key?(:access)
183
+ @condition = args[:condition] if args.key?(:condition)
184
+ @memberships = args[:memberships] if args.key?(:memberships)
185
+ @relevance = args[:relevance] if args.key?(:relevance)
186
+ @role = args[:role] if args.key?(:role)
187
+ @role_permission = args[:role_permission] if args.key?(:role_permission)
188
+ @role_permission_relevance = args[:role_permission_relevance] if args.key?(:role_permission_relevance)
189
+ end
190
+ end
191
+
192
+ # Details about whether the binding includes the member.
193
+ class GoogleCloudPolicysimulatorV1BindingExplanationAnnotatedMembership
194
+ include Google::Apis::Core::Hashable
195
+
196
+ # Indicates whether the binding includes the member.
197
+ # Corresponds to the JSON property `membership`
198
+ # @return [String]
199
+ attr_accessor :membership
200
+
201
+ # The relevance of the member's status to the overall determination for the
202
+ # binding.
203
+ # Corresponds to the JSON property `relevance`
204
+ # @return [String]
205
+ attr_accessor :relevance
206
+
207
+ def initialize(**args)
208
+ update!(**args)
209
+ end
210
+
211
+ # Update properties of this object
212
+ def update!(**args)
213
+ @membership = args[:membership] if args.key?(:membership)
214
+ @relevance = args[:relevance] if args.key?(:relevance)
215
+ end
216
+ end
217
+
218
+ # Details about how a set of policies, listed in ExplainedPolicy, resulted in a
219
+ # certain AccessState when replaying an access tuple.
220
+ class GoogleCloudPolicysimulatorV1ExplainedAccess
221
+ include Google::Apis::Core::Hashable
222
+
223
+ # Whether the member in the access tuple has permission to access the resource
224
+ # in the access tuple under the given policies.
225
+ # Corresponds to the JSON property `accessState`
226
+ # @return [String]
227
+ attr_accessor :access_state
228
+
229
+ # If the AccessState is `UNKNOWN`, this field contains a list of errors
230
+ # explaining why the result is `UNKNOWN`. If the `AccessState` is `GRANTED` or `
231
+ # NOT_GRANTED`, this field is omitted.
232
+ # Corresponds to the JSON property `errors`
233
+ # @return [Array<Google::Apis::PolicysimulatorV1::GoogleRpcStatus>]
234
+ attr_accessor :errors
235
+
236
+ # If the AccessState is `UNKNOWN`, this field contains the policies that led to
237
+ # that result. If the `AccessState` is `GRANTED` or `NOT_GRANTED`, this field is
238
+ # omitted.
239
+ # Corresponds to the JSON property `policies`
240
+ # @return [Array<Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1ExplainedPolicy>]
241
+ attr_accessor :policies
242
+
243
+ def initialize(**args)
244
+ update!(**args)
245
+ end
246
+
247
+ # Update properties of this object
248
+ def update!(**args)
249
+ @access_state = args[:access_state] if args.key?(:access_state)
250
+ @errors = args[:errors] if args.key?(:errors)
251
+ @policies = args[:policies] if args.key?(:policies)
252
+ end
253
+ end
254
+
255
+ # Details about how a specific IAM Policy contributed to the access check.
256
+ class GoogleCloudPolicysimulatorV1ExplainedPolicy
257
+ include Google::Apis::Core::Hashable
258
+
259
+ # Indicates whether _this policy_ provides the specified permission to the
260
+ # specified member for the specified resource. This field does _not_ indicate
261
+ # whether the member actually has the permission for the resource. There might
262
+ # be another policy that overrides this policy. To determine whether the member
263
+ # actually has the permission, use the `access` field in the
264
+ # TroubleshootIamPolicyResponse.
265
+ # Corresponds to the JSON property `access`
266
+ # @return [String]
267
+ attr_accessor :access
268
+
269
+ # Details about how each binding in the policy affects the member's ability, or
270
+ # inability, to use the permission for the resource. If the user who created the
271
+ # Replay does not have access to the policy, this field is omitted.
272
+ # Corresponds to the JSON property `bindingExplanations`
273
+ # @return [Array<Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1BindingExplanation>]
274
+ attr_accessor :binding_explanations
275
+
276
+ # The full resource name that identifies the resource. For example, `//compute.
277
+ # googleapis.com/projects/my-project/zones/us-central1-a/instances/my-instance`.
278
+ # If the user who created the Replay does not have access to the policy, this
279
+ # field is omitted. For examples of full resource names for Google Cloud
280
+ # services, see https://cloud.google.com/iam/help/troubleshooter/full-resource-
281
+ # names.
282
+ # Corresponds to the JSON property `fullResourceName`
283
+ # @return [String]
284
+ attr_accessor :full_resource_name
285
+
286
+ # An Identity and Access Management (IAM) policy, which specifies access
287
+ # controls for Google Cloud resources. A `Policy` is a collection of `bindings`.
288
+ # A `binding` binds one or more `members` to a single `role`. Members can be
289
+ # user accounts, service accounts, Google groups, and domains (such as G Suite).
290
+ # A `role` is a named list of permissions; each `role` can be an IAM predefined
291
+ # role or a user-created custom role. For some types of Google Cloud resources,
292
+ # a `binding` can also specify a `condition`, which is a logical expression that
293
+ # allows access to a resource only if the expression evaluates to `true`. A
294
+ # condition can add constraints based on attributes of the request, the resource,
295
+ # or both. To learn which resources support conditions in their IAM policies,
296
+ # see the [IAM documentation](https://cloud.google.com/iam/help/conditions/
297
+ # resource-policies). **JSON example:** ` "bindings": [ ` "role": "roles/
298
+ # resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "
299
+ # group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@
300
+ # appspot.gserviceaccount.com" ] `, ` "role": "roles/resourcemanager.
301
+ # organizationViewer", "members": [ "user:eve@example.com" ], "condition": ` "
302
+ # title": "expirable access", "description": "Does not grant access after Sep
303
+ # 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", `
304
+ # ` ], "etag": "BwWWja0YfJA=", "version": 3 ` **YAML example:** bindings: -
305
+ # members: - user:mike@example.com - group:admins@example.com - domain:google.
306
+ # com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/
307
+ # resourcemanager.organizationAdmin - members: - user:eve@example.com role:
308
+ # roles/resourcemanager.organizationViewer condition: title: expirable access
309
+ # description: Does not grant access after Sep 2020 expression: request.time <
310
+ # timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 3 For a
311
+ # description of IAM and its features, see the [IAM documentation](https://cloud.
312
+ # google.com/iam/docs/).
313
+ # Corresponds to the JSON property `policy`
314
+ # @return [Google::Apis::PolicysimulatorV1::GoogleIamV1Policy]
315
+ attr_accessor :policy
316
+
317
+ # The relevance of this policy to the overall determination in the
318
+ # TroubleshootIamPolicyResponse. If the user who created the Replay does not
319
+ # have access to the policy, this field is omitted.
320
+ # Corresponds to the JSON property `relevance`
321
+ # @return [String]
322
+ attr_accessor :relevance
323
+
324
+ def initialize(**args)
325
+ update!(**args)
326
+ end
327
+
328
+ # Update properties of this object
329
+ def update!(**args)
330
+ @access = args[:access] if args.key?(:access)
331
+ @binding_explanations = args[:binding_explanations] if args.key?(:binding_explanations)
332
+ @full_resource_name = args[:full_resource_name] if args.key?(:full_resource_name)
333
+ @policy = args[:policy] if args.key?(:policy)
334
+ @relevance = args[:relevance] if args.key?(:relevance)
335
+ end
336
+ end
337
+
338
+ # Response message for Simulator.ListReplayResults.
339
+ class GoogleCloudPolicysimulatorV1ListReplayResultsResponse
340
+ include Google::Apis::Core::Hashable
341
+
342
+ # A token that you can use to retrieve the next page of ReplayResult objects. If
343
+ # this field is omitted, there are no subsequent pages.
344
+ # Corresponds to the JSON property `nextPageToken`
345
+ # @return [String]
346
+ attr_accessor :next_page_token
347
+
348
+ # The results of running a Replay.
349
+ # Corresponds to the JSON property `replayResults`
350
+ # @return [Array<Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1ReplayResult>]
351
+ attr_accessor :replay_results
352
+
353
+ def initialize(**args)
354
+ update!(**args)
355
+ end
356
+
357
+ # Update properties of this object
358
+ def update!(**args)
359
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
360
+ @replay_results = args[:replay_results] if args.key?(:replay_results)
361
+ end
362
+ end
363
+
364
+ # A resource describing a `Replay`, or simulation.
365
+ class GoogleCloudPolicysimulatorV1Replay
366
+ include Google::Apis::Core::Hashable
367
+
368
+ # The configuration used for a Replay.
369
+ # Corresponds to the JSON property `config`
370
+ # @return [Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1ReplayConfig]
371
+ attr_accessor :config
372
+
373
+ # Output only. The resource name of the `Replay`, which has the following format:
374
+ # ``projects|folders|organizations`/`resource-id`/locations/global/replays/`
375
+ # replay-id``, where ``resource-id`` is the ID of the project, folder, or
376
+ # organization that owns the Replay. Example: `projects/my-example-project/
377
+ # locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`
378
+ # Corresponds to the JSON property `name`
379
+ # @return [String]
380
+ attr_accessor :name
381
+
382
+ # Summary statistics about the replayed log entries.
383
+ # Corresponds to the JSON property `resultsSummary`
384
+ # @return [Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1ReplayResultsSummary]
385
+ attr_accessor :results_summary
386
+
387
+ # Output only. The current state of the `Replay`.
388
+ # Corresponds to the JSON property `state`
389
+ # @return [String]
390
+ attr_accessor :state
391
+
392
+ def initialize(**args)
393
+ update!(**args)
394
+ end
395
+
396
+ # Update properties of this object
397
+ def update!(**args)
398
+ @config = args[:config] if args.key?(:config)
399
+ @name = args[:name] if args.key?(:name)
400
+ @results_summary = args[:results_summary] if args.key?(:results_summary)
401
+ @state = args[:state] if args.key?(:state)
402
+ end
403
+ end
404
+
405
+ # The configuration used for a Replay.
406
+ class GoogleCloudPolicysimulatorV1ReplayConfig
407
+ include Google::Apis::Core::Hashable
408
+
409
+ # The logs to use as input for the Replay.
410
+ # Corresponds to the JSON property `logSource`
411
+ # @return [String]
412
+ attr_accessor :log_source
413
+
414
+ # A mapping of the resources that you want to simulate policies for and the
415
+ # policies that you want to simulate. Keys are the full resource names for the
416
+ # resources. For example, `//cloudresourcemanager.googleapis.com/projects/my-
417
+ # project`. For examples of full resource names for Google Cloud services, see
418
+ # https://cloud.google.com/iam/help/troubleshooter/full-resource-names. Values
419
+ # are Policy objects representing the policies that you want to simulate.
420
+ # Replays automatically take into account any IAM policies inherited through the
421
+ # resource hierarchy, and any policies set on descendant resources. You do not
422
+ # need to include these policies in the policy overlay.
423
+ # Corresponds to the JSON property `policyOverlay`
424
+ # @return [Hash<String,Google::Apis::PolicysimulatorV1::GoogleIamV1Policy>]
425
+ attr_accessor :policy_overlay
426
+
427
+ def initialize(**args)
428
+ update!(**args)
429
+ end
430
+
431
+ # Update properties of this object
432
+ def update!(**args)
433
+ @log_source = args[:log_source] if args.key?(:log_source)
434
+ @policy_overlay = args[:policy_overlay] if args.key?(:policy_overlay)
435
+ end
436
+ end
437
+
438
+ # The difference between the results of evaluating an access tuple under the
439
+ # current (baseline) policies and under the proposed (simulated) policies. This
440
+ # difference explains how a member's access could change if the proposed
441
+ # policies were applied.
442
+ class GoogleCloudPolicysimulatorV1ReplayDiff
443
+ include Google::Apis::Core::Hashable
444
+
445
+ # A summary and comparison of the member's access under the current (baseline)
446
+ # policies and the proposed (simulated) policies for a single access tuple.
447
+ # Corresponds to the JSON property `accessDiff`
448
+ # @return [Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1AccessStateDiff]
449
+ attr_accessor :access_diff
450
+
451
+ def initialize(**args)
452
+ update!(**args)
453
+ end
454
+
455
+ # Update properties of this object
456
+ def update!(**args)
457
+ @access_diff = args[:access_diff] if args.key?(:access_diff)
458
+ end
459
+ end
460
+
461
+ # Metadata about a Replay operation.
462
+ class GoogleCloudPolicysimulatorV1ReplayOperationMetadata
463
+ include Google::Apis::Core::Hashable
464
+
465
+ # Time when the request was received.
466
+ # Corresponds to the JSON property `startTime`
467
+ # @return [String]
468
+ attr_accessor :start_time
469
+
470
+ def initialize(**args)
471
+ update!(**args)
472
+ end
473
+
474
+ # Update properties of this object
475
+ def update!(**args)
476
+ @start_time = args[:start_time] if args.key?(:start_time)
477
+ end
478
+ end
479
+
480
+ # The result of replaying a single access tuple against a simulated state.
481
+ class GoogleCloudPolicysimulatorV1ReplayResult
482
+ include Google::Apis::Core::Hashable
483
+
484
+ # Information about the member, resource, and permission to check.
485
+ # Corresponds to the JSON property `accessTuple`
486
+ # @return [Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1AccessTuple]
487
+ attr_accessor :access_tuple
488
+
489
+ # The difference between the results of evaluating an access tuple under the
490
+ # current (baseline) policies and under the proposed (simulated) policies. This
491
+ # difference explains how a member's access could change if the proposed
492
+ # policies were applied.
493
+ # Corresponds to the JSON property `diff`
494
+ # @return [Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1ReplayDiff]
495
+ attr_accessor :diff
496
+
497
+ # The `Status` type defines a logical error model that is suitable for different
498
+ # programming environments, including REST APIs and RPC APIs. It is used by [
499
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
500
+ # data: error code, error message, and error details. You can find out more
501
+ # about this error model and how to work with it in the [API Design Guide](https:
502
+ # //cloud.google.com/apis/design/errors).
503
+ # Corresponds to the JSON property `error`
504
+ # @return [Google::Apis::PolicysimulatorV1::GoogleRpcStatus]
505
+ attr_accessor :error
506
+
507
+ # Represents a whole or partial calendar date, such as a birthday. The time of
508
+ # day and time zone are either specified elsewhere or are insignificant. The
509
+ # date is relative to the Gregorian Calendar. This can represent one of the
510
+ # following: * A full date, with non-zero year, month, and day values * A month
511
+ # and day value, with a zero year, such as an anniversary * A year on its own,
512
+ # with zero month and day values * A year and month value, with a zero day, such
513
+ # as a credit card expiration date Related types are google.type.TimeOfDay and `
514
+ # google.protobuf.Timestamp`.
515
+ # Corresponds to the JSON property `lastSeenDate`
516
+ # @return [Google::Apis::PolicysimulatorV1::GoogleTypeDate]
517
+ attr_accessor :last_seen_date
518
+
519
+ # The resource name of the `ReplayResult`, in the following format: ``projects|
520
+ # folders|organizations`/`resource-id`/locations/global/replays/`replay-id`/
521
+ # results/`replay-result-id``, where ``resource-id`` is the ID of the project,
522
+ # folder, or organization that owns the Replay. Example: `projects/my-example-
523
+ # project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36/results/
524
+ # 1234`
525
+ # Corresponds to the JSON property `name`
526
+ # @return [String]
527
+ attr_accessor :name
528
+
529
+ # The Replay that the access tuple was included in.
530
+ # Corresponds to the JSON property `parent`
531
+ # @return [String]
532
+ attr_accessor :parent
533
+
534
+ def initialize(**args)
535
+ update!(**args)
536
+ end
537
+
538
+ # Update properties of this object
539
+ def update!(**args)
540
+ @access_tuple = args[:access_tuple] if args.key?(:access_tuple)
541
+ @diff = args[:diff] if args.key?(:diff)
542
+ @error = args[:error] if args.key?(:error)
543
+ @last_seen_date = args[:last_seen_date] if args.key?(:last_seen_date)
544
+ @name = args[:name] if args.key?(:name)
545
+ @parent = args[:parent] if args.key?(:parent)
546
+ end
547
+ end
548
+
549
+ # Summary statistics about the replayed log entries.
550
+ class GoogleCloudPolicysimulatorV1ReplayResultsSummary
551
+ include Google::Apis::Core::Hashable
552
+
553
+ # The number of replayed log entries with a difference between baseline and
554
+ # simulated policies.
555
+ # Corresponds to the JSON property `differenceCount`
556
+ # @return [Fixnum]
557
+ attr_accessor :difference_count
558
+
559
+ # The number of log entries that could not be replayed.
560
+ # Corresponds to the JSON property `errorCount`
561
+ # @return [Fixnum]
562
+ attr_accessor :error_count
563
+
564
+ # The total number of log entries replayed.
565
+ # Corresponds to the JSON property `logCount`
566
+ # @return [Fixnum]
567
+ attr_accessor :log_count
568
+
569
+ # Represents a whole or partial calendar date, such as a birthday. The time of
570
+ # day and time zone are either specified elsewhere or are insignificant. The
571
+ # date is relative to the Gregorian Calendar. This can represent one of the
572
+ # following: * A full date, with non-zero year, month, and day values * A month
573
+ # and day value, with a zero year, such as an anniversary * A year on its own,
574
+ # with zero month and day values * A year and month value, with a zero day, such
575
+ # as a credit card expiration date Related types are google.type.TimeOfDay and `
576
+ # google.protobuf.Timestamp`.
577
+ # Corresponds to the JSON property `newestDate`
578
+ # @return [Google::Apis::PolicysimulatorV1::GoogleTypeDate]
579
+ attr_accessor :newest_date
580
+
581
+ # Represents a whole or partial calendar date, such as a birthday. The time of
582
+ # day and time zone are either specified elsewhere or are insignificant. The
583
+ # date is relative to the Gregorian Calendar. This can represent one of the
584
+ # following: * A full date, with non-zero year, month, and day values * A month
585
+ # and day value, with a zero year, such as an anniversary * A year on its own,
586
+ # with zero month and day values * A year and month value, with a zero day, such
587
+ # as a credit card expiration date Related types are google.type.TimeOfDay and `
588
+ # google.protobuf.Timestamp`.
589
+ # Corresponds to the JSON property `oldestDate`
590
+ # @return [Google::Apis::PolicysimulatorV1::GoogleTypeDate]
591
+ attr_accessor :oldest_date
592
+
593
+ # The number of replayed log entries with no difference between baseline and
594
+ # simulated policies.
595
+ # Corresponds to the JSON property `unchangedCount`
596
+ # @return [Fixnum]
597
+ attr_accessor :unchanged_count
598
+
599
+ def initialize(**args)
600
+ update!(**args)
601
+ end
602
+
603
+ # Update properties of this object
604
+ def update!(**args)
605
+ @difference_count = args[:difference_count] if args.key?(:difference_count)
606
+ @error_count = args[:error_count] if args.key?(:error_count)
607
+ @log_count = args[:log_count] if args.key?(:log_count)
608
+ @newest_date = args[:newest_date] if args.key?(:newest_date)
609
+ @oldest_date = args[:oldest_date] if args.key?(:oldest_date)
610
+ @unchanged_count = args[:unchanged_count] if args.key?(:unchanged_count)
611
+ end
612
+ end
613
+
614
+ # A resource describing a `Replay`, or simulation.
615
+ class GoogleCloudPolicysimulatorV1beta1Replay
616
+ include Google::Apis::Core::Hashable
617
+
618
+ # The configuration used for a Replay.
619
+ # Corresponds to the JSON property `config`
620
+ # @return [Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1beta1ReplayConfig]
621
+ attr_accessor :config
622
+
623
+ # Output only. The resource name of the `Replay`, which has the following format:
624
+ # ``projects|folders|organizations`/`resource-id`/locations/global/replays/`
625
+ # replay-id``, where ``resource-id`` is the ID of the project, folder, or
626
+ # organization that owns the Replay. Example: `projects/my-example-project/
627
+ # locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`
628
+ # Corresponds to the JSON property `name`
629
+ # @return [String]
630
+ attr_accessor :name
631
+
632
+ # Summary statistics about the replayed log entries.
633
+ # Corresponds to the JSON property `resultsSummary`
634
+ # @return [Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1beta1ReplayResultsSummary]
635
+ attr_accessor :results_summary
636
+
637
+ # Output only. The current state of the `Replay`.
638
+ # Corresponds to the JSON property `state`
639
+ # @return [String]
640
+ attr_accessor :state
641
+
642
+ def initialize(**args)
643
+ update!(**args)
644
+ end
645
+
646
+ # Update properties of this object
647
+ def update!(**args)
648
+ @config = args[:config] if args.key?(:config)
649
+ @name = args[:name] if args.key?(:name)
650
+ @results_summary = args[:results_summary] if args.key?(:results_summary)
651
+ @state = args[:state] if args.key?(:state)
652
+ end
653
+ end
654
+
655
+ # The configuration used for a Replay.
656
+ class GoogleCloudPolicysimulatorV1beta1ReplayConfig
657
+ include Google::Apis::Core::Hashable
658
+
659
+ # The logs to use as input for the Replay.
660
+ # Corresponds to the JSON property `logSource`
661
+ # @return [String]
662
+ attr_accessor :log_source
663
+
664
+ # A mapping of the resources that you want to simulate policies for and the
665
+ # policies that you want to simulate. Keys are the full resource names for the
666
+ # resources. For example, `//cloudresourcemanager.googleapis.com/projects/my-
667
+ # project`. For examples of full resource names for Google Cloud services, see
668
+ # https://cloud.google.com/iam/help/troubleshooter/full-resource-names. Values
669
+ # are Policy objects representing the policies that you want to simulate.
670
+ # Replays automatically take into account any IAM policies inherited through the
671
+ # resource hierarchy, and any policies set on descendant resources. You do not
672
+ # need to include these policies in the policy overlay.
673
+ # Corresponds to the JSON property `policyOverlay`
674
+ # @return [Hash<String,Google::Apis::PolicysimulatorV1::GoogleIamV1Policy>]
675
+ attr_accessor :policy_overlay
676
+
677
+ def initialize(**args)
678
+ update!(**args)
679
+ end
680
+
681
+ # Update properties of this object
682
+ def update!(**args)
683
+ @log_source = args[:log_source] if args.key?(:log_source)
684
+ @policy_overlay = args[:policy_overlay] if args.key?(:policy_overlay)
685
+ end
686
+ end
687
+
688
+ # Metadata about a Replay operation.
689
+ class GoogleCloudPolicysimulatorV1beta1ReplayOperationMetadata
690
+ include Google::Apis::Core::Hashable
691
+
692
+ # Time when the request was received.
693
+ # Corresponds to the JSON property `startTime`
694
+ # @return [String]
695
+ attr_accessor :start_time
696
+
697
+ def initialize(**args)
698
+ update!(**args)
699
+ end
700
+
701
+ # Update properties of this object
702
+ def update!(**args)
703
+ @start_time = args[:start_time] if args.key?(:start_time)
704
+ end
705
+ end
706
+
707
+ # Summary statistics about the replayed log entries.
708
+ class GoogleCloudPolicysimulatorV1beta1ReplayResultsSummary
709
+ include Google::Apis::Core::Hashable
710
+
711
+ # The number of replayed log entries with a difference between baseline and
712
+ # simulated policies.
713
+ # Corresponds to the JSON property `differenceCount`
714
+ # @return [Fixnum]
715
+ attr_accessor :difference_count
716
+
717
+ # The number of log entries that could not be replayed.
718
+ # Corresponds to the JSON property `errorCount`
719
+ # @return [Fixnum]
720
+ attr_accessor :error_count
721
+
722
+ # The total number of log entries replayed.
723
+ # Corresponds to the JSON property `logCount`
724
+ # @return [Fixnum]
725
+ attr_accessor :log_count
726
+
727
+ # Represents a whole or partial calendar date, such as a birthday. The time of
728
+ # day and time zone are either specified elsewhere or are insignificant. The
729
+ # date is relative to the Gregorian Calendar. This can represent one of the
730
+ # following: * A full date, with non-zero year, month, and day values * A month
731
+ # and day value, with a zero year, such as an anniversary * A year on its own,
732
+ # with zero month and day values * A year and month value, with a zero day, such
733
+ # as a credit card expiration date Related types are google.type.TimeOfDay and `
734
+ # google.protobuf.Timestamp`.
735
+ # Corresponds to the JSON property `newestDate`
736
+ # @return [Google::Apis::PolicysimulatorV1::GoogleTypeDate]
737
+ attr_accessor :newest_date
738
+
739
+ # Represents a whole or partial calendar date, such as a birthday. The time of
740
+ # day and time zone are either specified elsewhere or are insignificant. The
741
+ # date is relative to the Gregorian Calendar. This can represent one of the
742
+ # following: * A full date, with non-zero year, month, and day values * A month
743
+ # and day value, with a zero year, such as an anniversary * A year on its own,
744
+ # with zero month and day values * A year and month value, with a zero day, such
745
+ # as a credit card expiration date Related types are google.type.TimeOfDay and `
746
+ # google.protobuf.Timestamp`.
747
+ # Corresponds to the JSON property `oldestDate`
748
+ # @return [Google::Apis::PolicysimulatorV1::GoogleTypeDate]
749
+ attr_accessor :oldest_date
750
+
751
+ # The number of replayed log entries with no difference between baseline and
752
+ # simulated policies.
753
+ # Corresponds to the JSON property `unchangedCount`
754
+ # @return [Fixnum]
755
+ attr_accessor :unchanged_count
756
+
757
+ def initialize(**args)
758
+ update!(**args)
759
+ end
760
+
761
+ # Update properties of this object
762
+ def update!(**args)
763
+ @difference_count = args[:difference_count] if args.key?(:difference_count)
764
+ @error_count = args[:error_count] if args.key?(:error_count)
765
+ @log_count = args[:log_count] if args.key?(:log_count)
766
+ @newest_date = args[:newest_date] if args.key?(:newest_date)
767
+ @oldest_date = args[:oldest_date] if args.key?(:oldest_date)
768
+ @unchanged_count = args[:unchanged_count] if args.key?(:unchanged_count)
769
+ end
770
+ end
771
+
772
+ # Specifies the audit configuration for a service. The configuration determines
773
+ # which permission types are logged, and what identities, if any, are exempted
774
+ # from logging. An AuditConfig must have one or more AuditLogConfigs. If there
775
+ # are AuditConfigs for both `allServices` and a specific service, the union of
776
+ # the two AuditConfigs is used for that service: the log_types specified in each
777
+ # AuditConfig are enabled, and the exempted_members in each AuditLogConfig are
778
+ # exempted. Example Policy with multiple AuditConfigs: ` "audit_configs": [ ` "
779
+ # service": "allServices", "audit_log_configs": [ ` "log_type": "DATA_READ", "
780
+ # exempted_members": [ "user:jose@example.com" ] `, ` "log_type": "DATA_WRITE" `,
781
+ # ` "log_type": "ADMIN_READ" ` ] `, ` "service": "sampleservice.googleapis.com",
782
+ # "audit_log_configs": [ ` "log_type": "DATA_READ" `, ` "log_type": "DATA_WRITE"
783
+ # , "exempted_members": [ "user:aliya@example.com" ] ` ] ` ] ` For sampleservice,
784
+ # this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also
785
+ # exempts jose@example.com from DATA_READ logging, and aliya@example.com from
786
+ # DATA_WRITE logging.
787
+ class GoogleIamV1AuditConfig
788
+ include Google::Apis::Core::Hashable
789
+
790
+ # The configuration for logging of each type of permission.
791
+ # Corresponds to the JSON property `auditLogConfigs`
792
+ # @return [Array<Google::Apis::PolicysimulatorV1::GoogleIamV1AuditLogConfig>]
793
+ attr_accessor :audit_log_configs
794
+
795
+ # Specifies a service that will be enabled for audit logging. For example, `
796
+ # storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special
797
+ # value that covers all services.
798
+ # Corresponds to the JSON property `service`
799
+ # @return [String]
800
+ attr_accessor :service
801
+
802
+ def initialize(**args)
803
+ update!(**args)
804
+ end
805
+
806
+ # Update properties of this object
807
+ def update!(**args)
808
+ @audit_log_configs = args[:audit_log_configs] if args.key?(:audit_log_configs)
809
+ @service = args[:service] if args.key?(:service)
810
+ end
811
+ end
812
+
813
+ # Provides the configuration for logging a type of permissions. Example: ` "
814
+ # audit_log_configs": [ ` "log_type": "DATA_READ", "exempted_members": [ "user:
815
+ # jose@example.com" ] `, ` "log_type": "DATA_WRITE" ` ] ` This enables '
816
+ # DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from
817
+ # DATA_READ logging.
818
+ class GoogleIamV1AuditLogConfig
819
+ include Google::Apis::Core::Hashable
820
+
821
+ # Specifies the identities that do not cause logging for this type of permission.
822
+ # Follows the same format of Binding.members.
823
+ # Corresponds to the JSON property `exemptedMembers`
824
+ # @return [Array<String>]
825
+ attr_accessor :exempted_members
826
+
827
+ # The log type that this config enables.
828
+ # Corresponds to the JSON property `logType`
829
+ # @return [String]
830
+ attr_accessor :log_type
831
+
832
+ def initialize(**args)
833
+ update!(**args)
834
+ end
835
+
836
+ # Update properties of this object
837
+ def update!(**args)
838
+ @exempted_members = args[:exempted_members] if args.key?(:exempted_members)
839
+ @log_type = args[:log_type] if args.key?(:log_type)
840
+ end
841
+ end
842
+
843
+ # Associates `members` with a `role`.
844
+ class GoogleIamV1Binding
845
+ include Google::Apis::Core::Hashable
846
+
847
+ # Represents a textual expression in the Common Expression Language (CEL) syntax.
848
+ # CEL is a C-like expression language. The syntax and semantics of CEL are
849
+ # documented at https://github.com/google/cel-spec. Example (Comparison): title:
850
+ # "Summary size limit" description: "Determines if a summary is less than 100
851
+ # chars" expression: "document.summary.size() < 100" Example (Equality): title: "
852
+ # Requestor is owner" description: "Determines if requestor is the document
853
+ # owner" expression: "document.owner == request.auth.claims.email" Example (
854
+ # Logic): title: "Public documents" description: "Determine whether the document
855
+ # should be publicly visible" expression: "document.type != 'private' &&
856
+ # document.type != 'internal'" Example (Data Manipulation): title: "Notification
857
+ # string" description: "Create a notification string with a timestamp."
858
+ # expression: "'New message received at ' + string(document.create_time)" The
859
+ # exact variables and functions that may be referenced within an expression are
860
+ # determined by the service that evaluates it. See the service documentation for
861
+ # additional information.
862
+ # Corresponds to the JSON property `condition`
863
+ # @return [Google::Apis::PolicysimulatorV1::GoogleTypeExpr]
864
+ attr_accessor :condition
865
+
866
+ # Specifies the identities requesting access for a Cloud Platform resource. `
867
+ # members` can have the following values: * `allUsers`: A special identifier
868
+ # that represents anyone who is on the internet; with or without a Google
869
+ # account. * `allAuthenticatedUsers`: A special identifier that represents
870
+ # anyone who is authenticated with a Google account or a service account. * `
871
+ # user:`emailid``: An email address that represents a specific Google account.
872
+ # For example, `alice@example.com` . * `serviceAccount:`emailid``: An email
873
+ # address that represents a service account. For example, `my-other-app@appspot.
874
+ # gserviceaccount.com`. * `group:`emailid``: An email address that represents a
875
+ # Google group. For example, `admins@example.com`. * `deleted:user:`emailid`?uid=
876
+ # `uniqueid``: An email address (plus unique identifier) representing a user
877
+ # that has been recently deleted. For example, `alice@example.com?uid=
878
+ # 123456789012345678901`. If the user is recovered, this value reverts to `user:`
879
+ # emailid`` and the recovered user retains the role in the binding. * `deleted:
880
+ # serviceAccount:`emailid`?uid=`uniqueid``: An email address (plus unique
881
+ # identifier) representing a service account that has been recently deleted. For
882
+ # example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
883
+ # If the service account is undeleted, this value reverts to `serviceAccount:`
884
+ # emailid`` and the undeleted service account retains the role in the binding. *
885
+ # `deleted:group:`emailid`?uid=`uniqueid``: An email address (plus unique
886
+ # identifier) representing a Google group that has been recently deleted. For
887
+ # example, `admins@example.com?uid=123456789012345678901`. If the group is
888
+ # recovered, this value reverts to `group:`emailid`` and the recovered group
889
+ # retains the role in the binding. * `domain:`domain``: The G Suite domain (
890
+ # primary) that represents all the users of that domain. For example, `google.
891
+ # com` or `example.com`.
892
+ # Corresponds to the JSON property `members`
893
+ # @return [Array<String>]
894
+ attr_accessor :members
895
+
896
+ # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`
897
+ # , or `roles/owner`.
898
+ # Corresponds to the JSON property `role`
899
+ # @return [String]
900
+ attr_accessor :role
901
+
902
+ def initialize(**args)
903
+ update!(**args)
904
+ end
905
+
906
+ # Update properties of this object
907
+ def update!(**args)
908
+ @condition = args[:condition] if args.key?(:condition)
909
+ @members = args[:members] if args.key?(:members)
910
+ @role = args[:role] if args.key?(:role)
911
+ end
912
+ end
913
+
914
+ # An Identity and Access Management (IAM) policy, which specifies access
915
+ # controls for Google Cloud resources. A `Policy` is a collection of `bindings`.
916
+ # A `binding` binds one or more `members` to a single `role`. Members can be
917
+ # user accounts, service accounts, Google groups, and domains (such as G Suite).
918
+ # A `role` is a named list of permissions; each `role` can be an IAM predefined
919
+ # role or a user-created custom role. For some types of Google Cloud resources,
920
+ # a `binding` can also specify a `condition`, which is a logical expression that
921
+ # allows access to a resource only if the expression evaluates to `true`. A
922
+ # condition can add constraints based on attributes of the request, the resource,
923
+ # or both. To learn which resources support conditions in their IAM policies,
924
+ # see the [IAM documentation](https://cloud.google.com/iam/help/conditions/
925
+ # resource-policies). **JSON example:** ` "bindings": [ ` "role": "roles/
926
+ # resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "
927
+ # group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@
928
+ # appspot.gserviceaccount.com" ] `, ` "role": "roles/resourcemanager.
929
+ # organizationViewer", "members": [ "user:eve@example.com" ], "condition": ` "
930
+ # title": "expirable access", "description": "Does not grant access after Sep
931
+ # 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", `
932
+ # ` ], "etag": "BwWWja0YfJA=", "version": 3 ` **YAML example:** bindings: -
933
+ # members: - user:mike@example.com - group:admins@example.com - domain:google.
934
+ # com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/
935
+ # resourcemanager.organizationAdmin - members: - user:eve@example.com role:
936
+ # roles/resourcemanager.organizationViewer condition: title: expirable access
937
+ # description: Does not grant access after Sep 2020 expression: request.time <
938
+ # timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 3 For a
939
+ # description of IAM and its features, see the [IAM documentation](https://cloud.
940
+ # google.com/iam/docs/).
941
+ class GoogleIamV1Policy
942
+ include Google::Apis::Core::Hashable
943
+
944
+ # Specifies cloud audit logging configuration for this policy.
945
+ # Corresponds to the JSON property `auditConfigs`
946
+ # @return [Array<Google::Apis::PolicysimulatorV1::GoogleIamV1AuditConfig>]
947
+ attr_accessor :audit_configs
948
+
949
+ # Associates a list of `members` to a `role`. Optionally, may specify a `
950
+ # condition` that determines how and when the `bindings` are applied. Each of
951
+ # the `bindings` must contain at least one member.
952
+ # Corresponds to the JSON property `bindings`
953
+ # @return [Array<Google::Apis::PolicysimulatorV1::GoogleIamV1Binding>]
954
+ attr_accessor :bindings
955
+
956
+ # `etag` is used for optimistic concurrency control as a way to help prevent
957
+ # simultaneous updates of a policy from overwriting each other. It is strongly
958
+ # suggested that systems make use of the `etag` in the read-modify-write cycle
959
+ # to perform policy updates in order to avoid race conditions: An `etag` is
960
+ # returned in the response to `getIamPolicy`, and systems are expected to put
961
+ # that etag in the request to `setIamPolicy` to ensure that their change will be
962
+ # applied to the same version of the policy. **Important:** If you use IAM
963
+ # Conditions, you must include the `etag` field whenever you call `setIamPolicy`.
964
+ # If you omit this field, then IAM allows you to overwrite a version `3` policy
965
+ # with a version `1` policy, and all of the conditions in the version `3` policy
966
+ # are lost.
967
+ # Corresponds to the JSON property `etag`
968
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
969
+ # @return [String]
970
+ attr_accessor :etag
971
+
972
+ # Specifies the format of the policy. Valid values are `0`, `1`, and `3`.
973
+ # Requests that specify an invalid value are rejected. Any operation that
974
+ # affects conditional role bindings must specify version `3`. This requirement
975
+ # applies to the following operations: * Getting a policy that includes a
976
+ # conditional role binding * Adding a conditional role binding to a policy *
977
+ # Changing a conditional role binding in a policy * Removing any role binding,
978
+ # with or without a condition, from a policy that includes conditions **
979
+ # Important:** If you use IAM Conditions, you must include the `etag` field
980
+ # whenever you call `setIamPolicy`. If you omit this field, then IAM allows you
981
+ # to overwrite a version `3` policy with a version `1` policy, and all of the
982
+ # conditions in the version `3` policy are lost. If a policy does not include
983
+ # any conditions, operations on that policy may specify any valid version or
984
+ # leave the field unset. To learn which resources support conditions in their
985
+ # IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/
986
+ # conditions/resource-policies).
987
+ # Corresponds to the JSON property `version`
988
+ # @return [Fixnum]
989
+ attr_accessor :version
990
+
991
+ def initialize(**args)
992
+ update!(**args)
993
+ end
994
+
995
+ # Update properties of this object
996
+ def update!(**args)
997
+ @audit_configs = args[:audit_configs] if args.key?(:audit_configs)
998
+ @bindings = args[:bindings] if args.key?(:bindings)
999
+ @etag = args[:etag] if args.key?(:etag)
1000
+ @version = args[:version] if args.key?(:version)
1001
+ end
1002
+ end
1003
+
1004
+ # The response message for Operations.ListOperations.
1005
+ class GoogleLongrunningListOperationsResponse
1006
+ include Google::Apis::Core::Hashable
1007
+
1008
+ # The standard List next-page token.
1009
+ # Corresponds to the JSON property `nextPageToken`
1010
+ # @return [String]
1011
+ attr_accessor :next_page_token
1012
+
1013
+ # A list of operations that matches the specified filter in the request.
1014
+ # Corresponds to the JSON property `operations`
1015
+ # @return [Array<Google::Apis::PolicysimulatorV1::GoogleLongrunningOperation>]
1016
+ attr_accessor :operations
1017
+
1018
+ def initialize(**args)
1019
+ update!(**args)
1020
+ end
1021
+
1022
+ # Update properties of this object
1023
+ def update!(**args)
1024
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1025
+ @operations = args[:operations] if args.key?(:operations)
1026
+ end
1027
+ end
1028
+
1029
+ # This resource represents a long-running operation that is the result of a
1030
+ # network API call.
1031
+ class GoogleLongrunningOperation
1032
+ include Google::Apis::Core::Hashable
1033
+
1034
+ # If the value is `false`, it means the operation is still in progress. If `true`
1035
+ # , the operation is completed, and either `error` or `response` is available.
1036
+ # Corresponds to the JSON property `done`
1037
+ # @return [Boolean]
1038
+ attr_accessor :done
1039
+ alias_method :done?, :done
1040
+
1041
+ # The `Status` type defines a logical error model that is suitable for different
1042
+ # programming environments, including REST APIs and RPC APIs. It is used by [
1043
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
1044
+ # data: error code, error message, and error details. You can find out more
1045
+ # about this error model and how to work with it in the [API Design Guide](https:
1046
+ # //cloud.google.com/apis/design/errors).
1047
+ # Corresponds to the JSON property `error`
1048
+ # @return [Google::Apis::PolicysimulatorV1::GoogleRpcStatus]
1049
+ attr_accessor :error
1050
+
1051
+ # Service-specific metadata associated with the operation. It typically contains
1052
+ # progress information and common metadata such as create time. Some services
1053
+ # might not provide such metadata. Any method that returns a long-running
1054
+ # operation should document the metadata type, if any.
1055
+ # Corresponds to the JSON property `metadata`
1056
+ # @return [Hash<String,Object>]
1057
+ attr_accessor :metadata
1058
+
1059
+ # The server-assigned name, which is only unique within the same service that
1060
+ # originally returns it. If you use the default HTTP mapping, the `name` should
1061
+ # be a resource name ending with `operations/`unique_id``.
1062
+ # Corresponds to the JSON property `name`
1063
+ # @return [String]
1064
+ attr_accessor :name
1065
+
1066
+ # The normal response of the operation in case of success. If the original
1067
+ # method returns no data on success, such as `Delete`, the response is `google.
1068
+ # protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`,
1069
+ # the response should be the resource. For other methods, the response should
1070
+ # have the type `XxxResponse`, where `Xxx` is the original method name. For
1071
+ # example, if the original method name is `TakeSnapshot()`, the inferred
1072
+ # response type is `TakeSnapshotResponse`.
1073
+ # Corresponds to the JSON property `response`
1074
+ # @return [Hash<String,Object>]
1075
+ attr_accessor :response
1076
+
1077
+ def initialize(**args)
1078
+ update!(**args)
1079
+ end
1080
+
1081
+ # Update properties of this object
1082
+ def update!(**args)
1083
+ @done = args[:done] if args.key?(:done)
1084
+ @error = args[:error] if args.key?(:error)
1085
+ @metadata = args[:metadata] if args.key?(:metadata)
1086
+ @name = args[:name] if args.key?(:name)
1087
+ @response = args[:response] if args.key?(:response)
1088
+ end
1089
+ end
1090
+
1091
+ # The `Status` type defines a logical error model that is suitable for different
1092
+ # programming environments, including REST APIs and RPC APIs. It is used by [
1093
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
1094
+ # data: error code, error message, and error details. You can find out more
1095
+ # about this error model and how to work with it in the [API Design Guide](https:
1096
+ # //cloud.google.com/apis/design/errors).
1097
+ class GoogleRpcStatus
1098
+ include Google::Apis::Core::Hashable
1099
+
1100
+ # The status code, which should be an enum value of google.rpc.Code.
1101
+ # Corresponds to the JSON property `code`
1102
+ # @return [Fixnum]
1103
+ attr_accessor :code
1104
+
1105
+ # A list of messages that carry the error details. There is a common set of
1106
+ # message types for APIs to use.
1107
+ # Corresponds to the JSON property `details`
1108
+ # @return [Array<Hash<String,Object>>]
1109
+ attr_accessor :details
1110
+
1111
+ # A developer-facing error message, which should be in English. Any user-facing
1112
+ # error message should be localized and sent in the google.rpc.Status.details
1113
+ # field, or localized by the client.
1114
+ # Corresponds to the JSON property `message`
1115
+ # @return [String]
1116
+ attr_accessor :message
1117
+
1118
+ def initialize(**args)
1119
+ update!(**args)
1120
+ end
1121
+
1122
+ # Update properties of this object
1123
+ def update!(**args)
1124
+ @code = args[:code] if args.key?(:code)
1125
+ @details = args[:details] if args.key?(:details)
1126
+ @message = args[:message] if args.key?(:message)
1127
+ end
1128
+ end
1129
+
1130
+ # Represents a whole or partial calendar date, such as a birthday. The time of
1131
+ # day and time zone are either specified elsewhere or are insignificant. The
1132
+ # date is relative to the Gregorian Calendar. This can represent one of the
1133
+ # following: * A full date, with non-zero year, month, and day values * A month
1134
+ # and day value, with a zero year, such as an anniversary * A year on its own,
1135
+ # with zero month and day values * A year and month value, with a zero day, such
1136
+ # as a credit card expiration date Related types are google.type.TimeOfDay and `
1137
+ # google.protobuf.Timestamp`.
1138
+ class GoogleTypeDate
1139
+ include Google::Apis::Core::Hashable
1140
+
1141
+ # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to
1142
+ # specify a year by itself or a year and month where the day isn't significant.
1143
+ # Corresponds to the JSON property `day`
1144
+ # @return [Fixnum]
1145
+ attr_accessor :day
1146
+
1147
+ # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month
1148
+ # and day.
1149
+ # Corresponds to the JSON property `month`
1150
+ # @return [Fixnum]
1151
+ attr_accessor :month
1152
+
1153
+ # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a
1154
+ # year.
1155
+ # Corresponds to the JSON property `year`
1156
+ # @return [Fixnum]
1157
+ attr_accessor :year
1158
+
1159
+ def initialize(**args)
1160
+ update!(**args)
1161
+ end
1162
+
1163
+ # Update properties of this object
1164
+ def update!(**args)
1165
+ @day = args[:day] if args.key?(:day)
1166
+ @month = args[:month] if args.key?(:month)
1167
+ @year = args[:year] if args.key?(:year)
1168
+ end
1169
+ end
1170
+
1171
+ # Represents a textual expression in the Common Expression Language (CEL) syntax.
1172
+ # CEL is a C-like expression language. The syntax and semantics of CEL are
1173
+ # documented at https://github.com/google/cel-spec. Example (Comparison): title:
1174
+ # "Summary size limit" description: "Determines if a summary is less than 100
1175
+ # chars" expression: "document.summary.size() < 100" Example (Equality): title: "
1176
+ # Requestor is owner" description: "Determines if requestor is the document
1177
+ # owner" expression: "document.owner == request.auth.claims.email" Example (
1178
+ # Logic): title: "Public documents" description: "Determine whether the document
1179
+ # should be publicly visible" expression: "document.type != 'private' &&
1180
+ # document.type != 'internal'" Example (Data Manipulation): title: "Notification
1181
+ # string" description: "Create a notification string with a timestamp."
1182
+ # expression: "'New message received at ' + string(document.create_time)" The
1183
+ # exact variables and functions that may be referenced within an expression are
1184
+ # determined by the service that evaluates it. See the service documentation for
1185
+ # additional information.
1186
+ class GoogleTypeExpr
1187
+ include Google::Apis::Core::Hashable
1188
+
1189
+ # Optional. Description of the expression. This is a longer text which describes
1190
+ # the expression, e.g. when hovered over it in a UI.
1191
+ # Corresponds to the JSON property `description`
1192
+ # @return [String]
1193
+ attr_accessor :description
1194
+
1195
+ # Textual representation of an expression in Common Expression Language syntax.
1196
+ # Corresponds to the JSON property `expression`
1197
+ # @return [String]
1198
+ attr_accessor :expression
1199
+
1200
+ # Optional. String indicating the location of the expression for error reporting,
1201
+ # e.g. a file name and a position in the file.
1202
+ # Corresponds to the JSON property `location`
1203
+ # @return [String]
1204
+ attr_accessor :location
1205
+
1206
+ # Optional. Title for the expression, i.e. a short string describing its purpose.
1207
+ # This can be used e.g. in UIs which allow to enter the expression.
1208
+ # Corresponds to the JSON property `title`
1209
+ # @return [String]
1210
+ attr_accessor :title
1211
+
1212
+ def initialize(**args)
1213
+ update!(**args)
1214
+ end
1215
+
1216
+ # Update properties of this object
1217
+ def update!(**args)
1218
+ @description = args[:description] if args.key?(:description)
1219
+ @expression = args[:expression] if args.key?(:expression)
1220
+ @location = args[:location] if args.key?(:location)
1221
+ @title = args[:title] if args.key?(:title)
1222
+ end
1223
+ end
1224
+ end
1225
+ end
1226
+ end