google-apis-cloudkms_v1 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: 88f3e90590107a3b4af302dc8d3e1fe6b3eac48ab9a0130494932edb1fada024
4
+ data.tar.gz: e72831537864183e39de92fa1cd3a4909673887bb7472d4bb94aa6f33de36e0c
5
+ SHA512:
6
+ metadata.gz: 9cb404b251da849fbba5c94ae2f1edd28b3bcef3a9faabef0cd917c1adc149b26f2b943edad9f2ecddbbdaf6df8d362c369176771283e9209f4634856c796d77
7
+ data.tar.gz: f87ab062898e19fdcf40d4abcb1940c836d7831cff09ef23e14fce3c11706065e13209537deba1a2f956a111847a40ba1a53729cacc1d22194762599765d0414
@@ -0,0 +1,13 @@
1
+ --hide-void-return
2
+ --no-private
3
+ --verbose
4
+ --title=google-apis-cloudkms_v1
5
+ --markup-provider=redcarpet
6
+ --markup=markdown
7
+ --main OVERVIEW.md
8
+ lib/google/apis/cloudkms_v1/*.rb
9
+ lib/google/apis/cloudkms_v1.rb
10
+ -
11
+ OVERVIEW.md
12
+ CHANGELOG.md
13
+ LICENSE.md
@@ -0,0 +1,7 @@
1
+ # Release history for google-apis-cloudkms_v1
2
+
3
+ ### v0.1.0 (2021-01-07)
4
+
5
+ * Regenerated using generator version 0.1.1
6
+ * Regenerated from discovery document revision 20201201
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 V1 of the Cloud Key Management Service (KMS) API
2
+
3
+ This is a simple client library for version V1 of the Cloud Key Management Service (KMS) 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/cloudkms.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-cloudkms_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-cloudkms_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/cloudkms_v1"
49
+
50
+ # Create a client object
51
+ client = Google::Apis::CloudkmsV1::CloudKMSService.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 Cloudkms service in particular.)
67
+
68
+ For reference information on specific calls in the Cloud Key Management Service (KMS) API, see the {Google::Apis::CloudkmsV1::CloudKMSService 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-cloudkms_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/kms/) 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/cloudkms_v1"
@@ -0,0 +1,40 @@
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/cloudkms_v1/service.rb'
16
+ require 'google/apis/cloudkms_v1/classes.rb'
17
+ require 'google/apis/cloudkms_v1/representations.rb'
18
+ require 'google/apis/cloudkms_v1/gem_version.rb'
19
+
20
+ module Google
21
+ module Apis
22
+ # Cloud Key Management Service (KMS) API
23
+ #
24
+ # Manages keys and performs cryptographic operations in a central cloud service,
25
+ # for direct use by other cloud resources and applications.
26
+ #
27
+ # @see https://cloud.google.com/kms/
28
+ module CloudkmsV1
29
+ # Version of the Cloud Key Management Service (KMS) API this client connects to.
30
+ # This is NOT the gem version.
31
+ VERSION = 'V1'
32
+
33
+ # View and manage your data across Google Cloud Platform services
34
+ AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
35
+
36
+ # View and manage your keys and secrets stored in Cloud Key Management Service
37
+ AUTH_CLOUDKMS = 'https://www.googleapis.com/auth/cloudkms'
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,1677 @@
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 CloudkmsV1
24
+
25
+ # Request message for KeyManagementService.AsymmetricDecrypt.
26
+ class AsymmetricDecryptRequest
27
+ include Google::Apis::Core::Hashable
28
+
29
+ # Required. The data encrypted with the named CryptoKeyVersion's public key
30
+ # using OAEP.
31
+ # Corresponds to the JSON property `ciphertext`
32
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
33
+ # @return [String]
34
+ attr_accessor :ciphertext
35
+
36
+ # Optional. An optional CRC32C checksum of the AsymmetricDecryptRequest.
37
+ # ciphertext. If specified, KeyManagementService will verify the integrity of
38
+ # the received AsymmetricDecryptRequest.ciphertext using this checksum.
39
+ # KeyManagementService will report an error if the checksum verification fails.
40
+ # If you receive a checksum error, your client should verify that CRC32C(
41
+ # AsymmetricDecryptRequest.ciphertext) is equal to AsymmetricDecryptRequest.
42
+ # ciphertext_crc32c, and if so, perform a limited number of retries. A
43
+ # persistent mismatch may indicate an issue in your computation of the CRC32C
44
+ # checksum. Note: This field is defined as int64 for reasons of compatibility
45
+ # across different languages. However, it is a non-negative integer, which will
46
+ # never exceed 2^32-1, and can be safely downconverted to uint32 in languages
47
+ # that support this type. NOTE: This field is in Beta.
48
+ # Corresponds to the JSON property `ciphertextCrc32c`
49
+ # @return [Fixnum]
50
+ attr_accessor :ciphertext_crc32c
51
+
52
+ def initialize(**args)
53
+ update!(**args)
54
+ end
55
+
56
+ # Update properties of this object
57
+ def update!(**args)
58
+ @ciphertext = args[:ciphertext] if args.key?(:ciphertext)
59
+ @ciphertext_crc32c = args[:ciphertext_crc32c] if args.key?(:ciphertext_crc32c)
60
+ end
61
+ end
62
+
63
+ # Response message for KeyManagementService.AsymmetricDecrypt.
64
+ class AsymmetricDecryptResponse
65
+ include Google::Apis::Core::Hashable
66
+
67
+ # The decrypted data originally encrypted with the matching public key.
68
+ # Corresponds to the JSON property `plaintext`
69
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
70
+ # @return [String]
71
+ attr_accessor :plaintext
72
+
73
+ # Integrity verification field. A CRC32C checksum of the returned
74
+ # AsymmetricDecryptResponse.plaintext. An integrity check of
75
+ # AsymmetricDecryptResponse.plaintext can be performed by computing the CRC32C
76
+ # checksum of AsymmetricDecryptResponse.plaintext and comparing your results to
77
+ # this field. Discard the response in case of non-matching checksum values, and
78
+ # perform a limited number of retries. A persistent mismatch may indicate an
79
+ # issue in your computation of the CRC32C checksum. Note: This field is defined
80
+ # as int64 for reasons of compatibility across different languages. However, it
81
+ # is a non-negative integer, which will never exceed 2^32-1, and can be safely
82
+ # downconverted to uint32 in languages that support this type. NOTE: This field
83
+ # is in Beta.
84
+ # Corresponds to the JSON property `plaintextCrc32c`
85
+ # @return [Fixnum]
86
+ attr_accessor :plaintext_crc32c
87
+
88
+ # Integrity verification field. A flag indicating whether
89
+ # AsymmetricDecryptRequest.ciphertext_crc32c was received by
90
+ # KeyManagementService and used for the integrity verification of the ciphertext.
91
+ # A false value of this field indicates either that AsymmetricDecryptRequest.
92
+ # ciphertext_crc32c was left unset or that it was not delivered to
93
+ # KeyManagementService. If you've set AsymmetricDecryptRequest.ciphertext_crc32c
94
+ # but this field is still false, discard the response and perform a limited
95
+ # number of retries. NOTE: This field is in Beta.
96
+ # Corresponds to the JSON property `verifiedCiphertextCrc32c`
97
+ # @return [Boolean]
98
+ attr_accessor :verified_ciphertext_crc32c
99
+ alias_method :verified_ciphertext_crc32c?, :verified_ciphertext_crc32c
100
+
101
+ def initialize(**args)
102
+ update!(**args)
103
+ end
104
+
105
+ # Update properties of this object
106
+ def update!(**args)
107
+ @plaintext = args[:plaintext] if args.key?(:plaintext)
108
+ @plaintext_crc32c = args[:plaintext_crc32c] if args.key?(:plaintext_crc32c)
109
+ @verified_ciphertext_crc32c = args[:verified_ciphertext_crc32c] if args.key?(:verified_ciphertext_crc32c)
110
+ end
111
+ end
112
+
113
+ # Request message for KeyManagementService.AsymmetricSign.
114
+ class AsymmetricSignRequest
115
+ include Google::Apis::Core::Hashable
116
+
117
+ # A Digest holds a cryptographic message digest.
118
+ # Corresponds to the JSON property `digest`
119
+ # @return [Google::Apis::CloudkmsV1::Digest]
120
+ attr_accessor :digest
121
+
122
+ # Optional. An optional CRC32C checksum of the AsymmetricSignRequest.digest. If
123
+ # specified, KeyManagementService will verify the integrity of the received
124
+ # AsymmetricSignRequest.digest using this checksum. KeyManagementService will
125
+ # report an error if the checksum verification fails. If you receive a checksum
126
+ # error, your client should verify that CRC32C(AsymmetricSignRequest.digest) is
127
+ # equal to AsymmetricSignRequest.digest_crc32c, and if so, perform a limited
128
+ # number of retries. A persistent mismatch may indicate an issue in your
129
+ # computation of the CRC32C checksum. Note: This field is defined as int64 for
130
+ # reasons of compatibility across different languages. However, it is a non-
131
+ # negative integer, which will never exceed 2^32-1, and can be safely
132
+ # downconverted to uint32 in languages that support this type. NOTE: This field
133
+ # is in Beta.
134
+ # Corresponds to the JSON property `digestCrc32c`
135
+ # @return [Fixnum]
136
+ attr_accessor :digest_crc32c
137
+
138
+ def initialize(**args)
139
+ update!(**args)
140
+ end
141
+
142
+ # Update properties of this object
143
+ def update!(**args)
144
+ @digest = args[:digest] if args.key?(:digest)
145
+ @digest_crc32c = args[:digest_crc32c] if args.key?(:digest_crc32c)
146
+ end
147
+ end
148
+
149
+ # Response message for KeyManagementService.AsymmetricSign.
150
+ class AsymmetricSignResponse
151
+ include Google::Apis::Core::Hashable
152
+
153
+ # The resource name of the CryptoKeyVersion used for signing. Check this field
154
+ # to verify that the intended resource was used for signing. NOTE: This field is
155
+ # in Beta.
156
+ # Corresponds to the JSON property `name`
157
+ # @return [String]
158
+ attr_accessor :name
159
+
160
+ # The created signature.
161
+ # Corresponds to the JSON property `signature`
162
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
163
+ # @return [String]
164
+ attr_accessor :signature
165
+
166
+ # Integrity verification field. A CRC32C checksum of the returned
167
+ # AsymmetricSignResponse.signature. An integrity check of AsymmetricSignResponse.
168
+ # signature can be performed by computing the CRC32C checksum of
169
+ # AsymmetricSignResponse.signature and comparing your results to this field.
170
+ # Discard the response in case of non-matching checksum values, and perform a
171
+ # limited number of retries. A persistent mismatch may indicate an issue in your
172
+ # computation of the CRC32C checksum. Note: This field is defined as int64 for
173
+ # reasons of compatibility across different languages. However, it is a non-
174
+ # negative integer, which will never exceed 2^32-1, and can be safely
175
+ # downconverted to uint32 in languages that support this type. NOTE: This field
176
+ # is in Beta.
177
+ # Corresponds to the JSON property `signatureCrc32c`
178
+ # @return [Fixnum]
179
+ attr_accessor :signature_crc32c
180
+
181
+ # Integrity verification field. A flag indicating whether AsymmetricSignRequest.
182
+ # digest_crc32c was received by KeyManagementService and used for the integrity
183
+ # verification of the digest. A false value of this field indicates either that
184
+ # AsymmetricSignRequest.digest_crc32c was left unset or that it was not
185
+ # delivered to KeyManagementService. If you've set AsymmetricSignRequest.
186
+ # digest_crc32c but this field is still false, discard the response and perform
187
+ # a limited number of retries. NOTE: This field is in Beta.
188
+ # Corresponds to the JSON property `verifiedDigestCrc32c`
189
+ # @return [Boolean]
190
+ attr_accessor :verified_digest_crc32c
191
+ alias_method :verified_digest_crc32c?, :verified_digest_crc32c
192
+
193
+ def initialize(**args)
194
+ update!(**args)
195
+ end
196
+
197
+ # Update properties of this object
198
+ def update!(**args)
199
+ @name = args[:name] if args.key?(:name)
200
+ @signature = args[:signature] if args.key?(:signature)
201
+ @signature_crc32c = args[:signature_crc32c] if args.key?(:signature_crc32c)
202
+ @verified_digest_crc32c = args[:verified_digest_crc32c] if args.key?(:verified_digest_crc32c)
203
+ end
204
+ end
205
+
206
+ # Specifies the audit configuration for a service. The configuration determines
207
+ # which permission types are logged, and what identities, if any, are exempted
208
+ # from logging. An AuditConfig must have one or more AuditLogConfigs. If there
209
+ # are AuditConfigs for both `allServices` and a specific service, the union of
210
+ # the two AuditConfigs is used for that service: the log_types specified in each
211
+ # AuditConfig are enabled, and the exempted_members in each AuditLogConfig are
212
+ # exempted. Example Policy with multiple AuditConfigs: ` "audit_configs": [ ` "
213
+ # service": "allServices", "audit_log_configs": [ ` "log_type": "DATA_READ", "
214
+ # exempted_members": [ "user:jose@example.com" ] `, ` "log_type": "DATA_WRITE" `,
215
+ # ` "log_type": "ADMIN_READ" ` ] `, ` "service": "sampleservice.googleapis.com",
216
+ # "audit_log_configs": [ ` "log_type": "DATA_READ" `, ` "log_type": "DATA_WRITE"
217
+ # , "exempted_members": [ "user:aliya@example.com" ] ` ] ` ] ` For sampleservice,
218
+ # this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also
219
+ # exempts jose@example.com from DATA_READ logging, and aliya@example.com from
220
+ # DATA_WRITE logging.
221
+ class AuditConfig
222
+ include Google::Apis::Core::Hashable
223
+
224
+ # The configuration for logging of each type of permission.
225
+ # Corresponds to the JSON property `auditLogConfigs`
226
+ # @return [Array<Google::Apis::CloudkmsV1::AuditLogConfig>]
227
+ attr_accessor :audit_log_configs
228
+
229
+ # Specifies a service that will be enabled for audit logging. For example, `
230
+ # storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special
231
+ # value that covers all services.
232
+ # Corresponds to the JSON property `service`
233
+ # @return [String]
234
+ attr_accessor :service
235
+
236
+ def initialize(**args)
237
+ update!(**args)
238
+ end
239
+
240
+ # Update properties of this object
241
+ def update!(**args)
242
+ @audit_log_configs = args[:audit_log_configs] if args.key?(:audit_log_configs)
243
+ @service = args[:service] if args.key?(:service)
244
+ end
245
+ end
246
+
247
+ # Provides the configuration for logging a type of permissions. Example: ` "
248
+ # audit_log_configs": [ ` "log_type": "DATA_READ", "exempted_members": [ "user:
249
+ # jose@example.com" ] `, ` "log_type": "DATA_WRITE" ` ] ` This enables '
250
+ # DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from
251
+ # DATA_READ logging.
252
+ class AuditLogConfig
253
+ include Google::Apis::Core::Hashable
254
+
255
+ # Specifies the identities that do not cause logging for this type of permission.
256
+ # Follows the same format of Binding.members.
257
+ # Corresponds to the JSON property `exemptedMembers`
258
+ # @return [Array<String>]
259
+ attr_accessor :exempted_members
260
+
261
+ # The log type that this config enables.
262
+ # Corresponds to the JSON property `logType`
263
+ # @return [String]
264
+ attr_accessor :log_type
265
+
266
+ def initialize(**args)
267
+ update!(**args)
268
+ end
269
+
270
+ # Update properties of this object
271
+ def update!(**args)
272
+ @exempted_members = args[:exempted_members] if args.key?(:exempted_members)
273
+ @log_type = args[:log_type] if args.key?(:log_type)
274
+ end
275
+ end
276
+
277
+ # Associates `members` with a `role`.
278
+ class Binding
279
+ include Google::Apis::Core::Hashable
280
+
281
+ # Represents a textual expression in the Common Expression Language (CEL) syntax.
282
+ # CEL is a C-like expression language. The syntax and semantics of CEL are
283
+ # documented at https://github.com/google/cel-spec. Example (Comparison): title:
284
+ # "Summary size limit" description: "Determines if a summary is less than 100
285
+ # chars" expression: "document.summary.size() < 100" Example (Equality): title: "
286
+ # Requestor is owner" description: "Determines if requestor is the document
287
+ # owner" expression: "document.owner == request.auth.claims.email" Example (
288
+ # Logic): title: "Public documents" description: "Determine whether the document
289
+ # should be publicly visible" expression: "document.type != 'private' &&
290
+ # document.type != 'internal'" Example (Data Manipulation): title: "Notification
291
+ # string" description: "Create a notification string with a timestamp."
292
+ # expression: "'New message received at ' + string(document.create_time)" The
293
+ # exact variables and functions that may be referenced within an expression are
294
+ # determined by the service that evaluates it. See the service documentation for
295
+ # additional information.
296
+ # Corresponds to the JSON property `condition`
297
+ # @return [Google::Apis::CloudkmsV1::Expr]
298
+ attr_accessor :condition
299
+
300
+ # Specifies the identities requesting access for a Cloud Platform resource. `
301
+ # members` can have the following values: * `allUsers`: A special identifier
302
+ # that represents anyone who is on the internet; with or without a Google
303
+ # account. * `allAuthenticatedUsers`: A special identifier that represents
304
+ # anyone who is authenticated with a Google account or a service account. * `
305
+ # user:`emailid``: An email address that represents a specific Google account.
306
+ # For example, `alice@example.com` . * `serviceAccount:`emailid``: An email
307
+ # address that represents a service account. For example, `my-other-app@appspot.
308
+ # gserviceaccount.com`. * `group:`emailid``: An email address that represents a
309
+ # Google group. For example, `admins@example.com`. * `deleted:user:`emailid`?uid=
310
+ # `uniqueid``: An email address (plus unique identifier) representing a user
311
+ # that has been recently deleted. For example, `alice@example.com?uid=
312
+ # 123456789012345678901`. If the user is recovered, this value reverts to `user:`
313
+ # emailid`` and the recovered user retains the role in the binding. * `deleted:
314
+ # serviceAccount:`emailid`?uid=`uniqueid``: An email address (plus unique
315
+ # identifier) representing a service account that has been recently deleted. For
316
+ # example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
317
+ # If the service account is undeleted, this value reverts to `serviceAccount:`
318
+ # emailid`` and the undeleted service account retains the role in the binding. *
319
+ # `deleted:group:`emailid`?uid=`uniqueid``: An email address (plus unique
320
+ # identifier) representing a Google group that has been recently deleted. For
321
+ # example, `admins@example.com?uid=123456789012345678901`. If the group is
322
+ # recovered, this value reverts to `group:`emailid`` and the recovered group
323
+ # retains the role in the binding. * `domain:`domain``: The G Suite domain (
324
+ # primary) that represents all the users of that domain. For example, `google.
325
+ # com` or `example.com`.
326
+ # Corresponds to the JSON property `members`
327
+ # @return [Array<String>]
328
+ attr_accessor :members
329
+
330
+ # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`
331
+ # , or `roles/owner`.
332
+ # Corresponds to the JSON property `role`
333
+ # @return [String]
334
+ attr_accessor :role
335
+
336
+ def initialize(**args)
337
+ update!(**args)
338
+ end
339
+
340
+ # Update properties of this object
341
+ def update!(**args)
342
+ @condition = args[:condition] if args.key?(:condition)
343
+ @members = args[:members] if args.key?(:members)
344
+ @role = args[:role] if args.key?(:role)
345
+ end
346
+ end
347
+
348
+ # Certificate chains needed to verify the attestation. Certificates in chains
349
+ # are PEM-encoded and are ordered based on https://tools.ietf.org/html/rfc5246#
350
+ # section-7.4.2.
351
+ class CertificateChains
352
+ include Google::Apis::Core::Hashable
353
+
354
+ # Cavium certificate chain corresponding to the attestation.
355
+ # Corresponds to the JSON property `caviumCerts`
356
+ # @return [Array<String>]
357
+ attr_accessor :cavium_certs
358
+
359
+ # Google card certificate chain corresponding to the attestation.
360
+ # Corresponds to the JSON property `googleCardCerts`
361
+ # @return [Array<String>]
362
+ attr_accessor :google_card_certs
363
+
364
+ # Google partition certificate chain corresponding to the attestation.
365
+ # Corresponds to the JSON property `googlePartitionCerts`
366
+ # @return [Array<String>]
367
+ attr_accessor :google_partition_certs
368
+
369
+ def initialize(**args)
370
+ update!(**args)
371
+ end
372
+
373
+ # Update properties of this object
374
+ def update!(**args)
375
+ @cavium_certs = args[:cavium_certs] if args.key?(:cavium_certs)
376
+ @google_card_certs = args[:google_card_certs] if args.key?(:google_card_certs)
377
+ @google_partition_certs = args[:google_partition_certs] if args.key?(:google_partition_certs)
378
+ end
379
+ end
380
+
381
+ # A CryptoKey represents a logical key that can be used for cryptographic
382
+ # operations. A CryptoKey is made up of zero or more versions, which represent
383
+ # the actual key material used in cryptographic operations.
384
+ class CryptoKey
385
+ include Google::Apis::Core::Hashable
386
+
387
+ # Output only. The time at which this CryptoKey was created.
388
+ # Corresponds to the JSON property `createTime`
389
+ # @return [String]
390
+ attr_accessor :create_time
391
+
392
+ # Labels with user-defined metadata. For more information, see [Labeling Keys](
393
+ # https://cloud.google.com/kms/docs/labeling-keys).
394
+ # Corresponds to the JSON property `labels`
395
+ # @return [Hash<String,String>]
396
+ attr_accessor :labels
397
+
398
+ # Output only. The resource name for this CryptoKey in the format `projects/*/
399
+ # locations/*/keyRings/*/cryptoKeys/*`.
400
+ # Corresponds to the JSON property `name`
401
+ # @return [String]
402
+ attr_accessor :name
403
+
404
+ # At next_rotation_time, the Key Management Service will automatically: 1.
405
+ # Create a new version of this CryptoKey. 2. Mark the new version as primary.
406
+ # Key rotations performed manually via CreateCryptoKeyVersion and
407
+ # UpdateCryptoKeyPrimaryVersion do not affect next_rotation_time. Keys with
408
+ # purpose ENCRYPT_DECRYPT support automatic rotation. For other keys, this field
409
+ # must be omitted.
410
+ # Corresponds to the JSON property `nextRotationTime`
411
+ # @return [String]
412
+ attr_accessor :next_rotation_time
413
+
414
+ # A CryptoKeyVersion represents an individual cryptographic key, and the
415
+ # associated key material. An ENABLED version can be used for cryptographic
416
+ # operations. For security reasons, the raw cryptographic key material
417
+ # represented by a CryptoKeyVersion can never be viewed or exported. It can only
418
+ # be used to encrypt, decrypt, or sign data when an authorized user or
419
+ # application invokes Cloud KMS.
420
+ # Corresponds to the JSON property `primary`
421
+ # @return [Google::Apis::CloudkmsV1::CryptoKeyVersion]
422
+ attr_accessor :primary
423
+
424
+ # Immutable. The immutable purpose of this CryptoKey.
425
+ # Corresponds to the JSON property `purpose`
426
+ # @return [String]
427
+ attr_accessor :purpose
428
+
429
+ # next_rotation_time will be advanced by this period when the service
430
+ # automatically rotates a key. Must be at least 24 hours and at most 876,000
431
+ # hours. If rotation_period is set, next_rotation_time must also be set. Keys
432
+ # with purpose ENCRYPT_DECRYPT support automatic rotation. For other keys, this
433
+ # field must be omitted.
434
+ # Corresponds to the JSON property `rotationPeriod`
435
+ # @return [String]
436
+ attr_accessor :rotation_period
437
+
438
+ # A CryptoKeyVersionTemplate specifies the properties to use when creating a new
439
+ # CryptoKeyVersion, either manually with CreateCryptoKeyVersion or automatically
440
+ # as a result of auto-rotation.
441
+ # Corresponds to the JSON property `versionTemplate`
442
+ # @return [Google::Apis::CloudkmsV1::CryptoKeyVersionTemplate]
443
+ attr_accessor :version_template
444
+
445
+ def initialize(**args)
446
+ update!(**args)
447
+ end
448
+
449
+ # Update properties of this object
450
+ def update!(**args)
451
+ @create_time = args[:create_time] if args.key?(:create_time)
452
+ @labels = args[:labels] if args.key?(:labels)
453
+ @name = args[:name] if args.key?(:name)
454
+ @next_rotation_time = args[:next_rotation_time] if args.key?(:next_rotation_time)
455
+ @primary = args[:primary] if args.key?(:primary)
456
+ @purpose = args[:purpose] if args.key?(:purpose)
457
+ @rotation_period = args[:rotation_period] if args.key?(:rotation_period)
458
+ @version_template = args[:version_template] if args.key?(:version_template)
459
+ end
460
+ end
461
+
462
+ # A CryptoKeyVersion represents an individual cryptographic key, and the
463
+ # associated key material. An ENABLED version can be used for cryptographic
464
+ # operations. For security reasons, the raw cryptographic key material
465
+ # represented by a CryptoKeyVersion can never be viewed or exported. It can only
466
+ # be used to encrypt, decrypt, or sign data when an authorized user or
467
+ # application invokes Cloud KMS.
468
+ class CryptoKeyVersion
469
+ include Google::Apis::Core::Hashable
470
+
471
+ # Output only. The CryptoKeyVersionAlgorithm that this CryptoKeyVersion supports.
472
+ # Corresponds to the JSON property `algorithm`
473
+ # @return [String]
474
+ attr_accessor :algorithm
475
+
476
+ # Contains an HSM-generated attestation about a key operation. For more
477
+ # information, see [Verifying attestations] (https://cloud.google.com/kms/docs/
478
+ # attest-key).
479
+ # Corresponds to the JSON property `attestation`
480
+ # @return [Google::Apis::CloudkmsV1::KeyOperationAttestation]
481
+ attr_accessor :attestation
482
+
483
+ # Output only. The time at which this CryptoKeyVersion was created.
484
+ # Corresponds to the JSON property `createTime`
485
+ # @return [String]
486
+ attr_accessor :create_time
487
+
488
+ # Output only. The time this CryptoKeyVersion's key material was destroyed. Only
489
+ # present if state is DESTROYED.
490
+ # Corresponds to the JSON property `destroyEventTime`
491
+ # @return [String]
492
+ attr_accessor :destroy_event_time
493
+
494
+ # Output only. The time this CryptoKeyVersion's key material is scheduled for
495
+ # destruction. Only present if state is DESTROY_SCHEDULED.
496
+ # Corresponds to the JSON property `destroyTime`
497
+ # @return [String]
498
+ attr_accessor :destroy_time
499
+
500
+ # ExternalProtectionLevelOptions stores a group of additional fields for
501
+ # configuring a CryptoKeyVersion that are specific to the EXTERNAL protection
502
+ # level.
503
+ # Corresponds to the JSON property `externalProtectionLevelOptions`
504
+ # @return [Google::Apis::CloudkmsV1::ExternalProtectionLevelOptions]
505
+ attr_accessor :external_protection_level_options
506
+
507
+ # Output only. The time this CryptoKeyVersion's key material was generated.
508
+ # Corresponds to the JSON property `generateTime`
509
+ # @return [String]
510
+ attr_accessor :generate_time
511
+
512
+ # Output only. The root cause of an import failure. Only present if state is
513
+ # IMPORT_FAILED.
514
+ # Corresponds to the JSON property `importFailureReason`
515
+ # @return [String]
516
+ attr_accessor :import_failure_reason
517
+
518
+ # Output only. The name of the ImportJob used to import this CryptoKeyVersion.
519
+ # Only present if the underlying key material was imported.
520
+ # Corresponds to the JSON property `importJob`
521
+ # @return [String]
522
+ attr_accessor :import_job
523
+
524
+ # Output only. The time at which this CryptoKeyVersion's key material was
525
+ # imported.
526
+ # Corresponds to the JSON property `importTime`
527
+ # @return [String]
528
+ attr_accessor :import_time
529
+
530
+ # Output only. The resource name for this CryptoKeyVersion in the format `
531
+ # projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`.
532
+ # Corresponds to the JSON property `name`
533
+ # @return [String]
534
+ attr_accessor :name
535
+
536
+ # Output only. The ProtectionLevel describing how crypto operations are
537
+ # performed with this CryptoKeyVersion.
538
+ # Corresponds to the JSON property `protectionLevel`
539
+ # @return [String]
540
+ attr_accessor :protection_level
541
+
542
+ # The current state of the CryptoKeyVersion.
543
+ # Corresponds to the JSON property `state`
544
+ # @return [String]
545
+ attr_accessor :state
546
+
547
+ def initialize(**args)
548
+ update!(**args)
549
+ end
550
+
551
+ # Update properties of this object
552
+ def update!(**args)
553
+ @algorithm = args[:algorithm] if args.key?(:algorithm)
554
+ @attestation = args[:attestation] if args.key?(:attestation)
555
+ @create_time = args[:create_time] if args.key?(:create_time)
556
+ @destroy_event_time = args[:destroy_event_time] if args.key?(:destroy_event_time)
557
+ @destroy_time = args[:destroy_time] if args.key?(:destroy_time)
558
+ @external_protection_level_options = args[:external_protection_level_options] if args.key?(:external_protection_level_options)
559
+ @generate_time = args[:generate_time] if args.key?(:generate_time)
560
+ @import_failure_reason = args[:import_failure_reason] if args.key?(:import_failure_reason)
561
+ @import_job = args[:import_job] if args.key?(:import_job)
562
+ @import_time = args[:import_time] if args.key?(:import_time)
563
+ @name = args[:name] if args.key?(:name)
564
+ @protection_level = args[:protection_level] if args.key?(:protection_level)
565
+ @state = args[:state] if args.key?(:state)
566
+ end
567
+ end
568
+
569
+ # A CryptoKeyVersionTemplate specifies the properties to use when creating a new
570
+ # CryptoKeyVersion, either manually with CreateCryptoKeyVersion or automatically
571
+ # as a result of auto-rotation.
572
+ class CryptoKeyVersionTemplate
573
+ include Google::Apis::Core::Hashable
574
+
575
+ # Required. Algorithm to use when creating a CryptoKeyVersion based on this
576
+ # template. For backwards compatibility, GOOGLE_SYMMETRIC_ENCRYPTION is implied
577
+ # if both this field is omitted and CryptoKey.purpose is ENCRYPT_DECRYPT.
578
+ # Corresponds to the JSON property `algorithm`
579
+ # @return [String]
580
+ attr_accessor :algorithm
581
+
582
+ # ProtectionLevel to use when creating a CryptoKeyVersion based on this template.
583
+ # Immutable. Defaults to SOFTWARE.
584
+ # Corresponds to the JSON property `protectionLevel`
585
+ # @return [String]
586
+ attr_accessor :protection_level
587
+
588
+ def initialize(**args)
589
+ update!(**args)
590
+ end
591
+
592
+ # Update properties of this object
593
+ def update!(**args)
594
+ @algorithm = args[:algorithm] if args.key?(:algorithm)
595
+ @protection_level = args[:protection_level] if args.key?(:protection_level)
596
+ end
597
+ end
598
+
599
+ # Request message for KeyManagementService.Decrypt.
600
+ class DecryptRequest
601
+ include Google::Apis::Core::Hashable
602
+
603
+ # Optional. Optional data that must match the data originally supplied in
604
+ # EncryptRequest.additional_authenticated_data.
605
+ # Corresponds to the JSON property `additionalAuthenticatedData`
606
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
607
+ # @return [String]
608
+ attr_accessor :additional_authenticated_data
609
+
610
+ # Optional. An optional CRC32C checksum of the DecryptRequest.
611
+ # additional_authenticated_data. If specified, KeyManagementService will verify
612
+ # the integrity of the received DecryptRequest.additional_authenticated_data
613
+ # using this checksum. KeyManagementService will report an error if the checksum
614
+ # verification fails. If you receive a checksum error, your client should verify
615
+ # that CRC32C(DecryptRequest.additional_authenticated_data) is equal to
616
+ # DecryptRequest.additional_authenticated_data_crc32c, and if so, perform a
617
+ # limited number of retries. A persistent mismatch may indicate an issue in your
618
+ # computation of the CRC32C checksum. Note: This field is defined as int64 for
619
+ # reasons of compatibility across different languages. However, it is a non-
620
+ # negative integer, which will never exceed 2^32-1, and can be safely
621
+ # downconverted to uint32 in languages that support this type. NOTE: This field
622
+ # is in Beta.
623
+ # Corresponds to the JSON property `additionalAuthenticatedDataCrc32c`
624
+ # @return [Fixnum]
625
+ attr_accessor :additional_authenticated_data_crc32c
626
+
627
+ # Required. The encrypted data originally returned in EncryptResponse.ciphertext.
628
+ # Corresponds to the JSON property `ciphertext`
629
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
630
+ # @return [String]
631
+ attr_accessor :ciphertext
632
+
633
+ # Optional. An optional CRC32C checksum of the DecryptRequest.ciphertext. If
634
+ # specified, KeyManagementService will verify the integrity of the received
635
+ # DecryptRequest.ciphertext using this checksum. KeyManagementService will
636
+ # report an error if the checksum verification fails. If you receive a checksum
637
+ # error, your client should verify that CRC32C(DecryptRequest.ciphertext) is
638
+ # equal to DecryptRequest.ciphertext_crc32c, and if so, perform a limited number
639
+ # of retries. A persistent mismatch may indicate an issue in your computation of
640
+ # the CRC32C checksum. Note: This field is defined as int64 for reasons of
641
+ # compatibility across different languages. However, it is a non-negative
642
+ # integer, which will never exceed 2^32-1, and can be safely downconverted to
643
+ # uint32 in languages that support this type. NOTE: This field is in Beta.
644
+ # Corresponds to the JSON property `ciphertextCrc32c`
645
+ # @return [Fixnum]
646
+ attr_accessor :ciphertext_crc32c
647
+
648
+ def initialize(**args)
649
+ update!(**args)
650
+ end
651
+
652
+ # Update properties of this object
653
+ def update!(**args)
654
+ @additional_authenticated_data = args[:additional_authenticated_data] if args.key?(:additional_authenticated_data)
655
+ @additional_authenticated_data_crc32c = args[:additional_authenticated_data_crc32c] if args.key?(:additional_authenticated_data_crc32c)
656
+ @ciphertext = args[:ciphertext] if args.key?(:ciphertext)
657
+ @ciphertext_crc32c = args[:ciphertext_crc32c] if args.key?(:ciphertext_crc32c)
658
+ end
659
+ end
660
+
661
+ # Response message for KeyManagementService.Decrypt.
662
+ class DecryptResponse
663
+ include Google::Apis::Core::Hashable
664
+
665
+ # The decrypted data originally supplied in EncryptRequest.plaintext.
666
+ # Corresponds to the JSON property `plaintext`
667
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
668
+ # @return [String]
669
+ attr_accessor :plaintext
670
+
671
+ # Integrity verification field. A CRC32C checksum of the returned
672
+ # DecryptResponse.plaintext. An integrity check of DecryptResponse.plaintext can
673
+ # be performed by computing the CRC32C checksum of DecryptResponse.plaintext and
674
+ # comparing your results to this field. Discard the response in case of non-
675
+ # matching checksum values, and perform a limited number of retries. A
676
+ # persistent mismatch may indicate an issue in your computation of the CRC32C
677
+ # checksum. Note: receiving this response message indicates that
678
+ # KeyManagementService is able to successfully decrypt the ciphertext. Note:
679
+ # This field is defined as int64 for reasons of compatibility across different
680
+ # languages. However, it is a non-negative integer, which will never exceed 2^32-
681
+ # 1, and can be safely downconverted to uint32 in languages that support this
682
+ # type. NOTE: This field is in Beta.
683
+ # Corresponds to the JSON property `plaintextCrc32c`
684
+ # @return [Fixnum]
685
+ attr_accessor :plaintext_crc32c
686
+
687
+ def initialize(**args)
688
+ update!(**args)
689
+ end
690
+
691
+ # Update properties of this object
692
+ def update!(**args)
693
+ @plaintext = args[:plaintext] if args.key?(:plaintext)
694
+ @plaintext_crc32c = args[:plaintext_crc32c] if args.key?(:plaintext_crc32c)
695
+ end
696
+ end
697
+
698
+ # Request message for KeyManagementService.DestroyCryptoKeyVersion.
699
+ class DestroyCryptoKeyVersionRequest
700
+ include Google::Apis::Core::Hashable
701
+
702
+ def initialize(**args)
703
+ update!(**args)
704
+ end
705
+
706
+ # Update properties of this object
707
+ def update!(**args)
708
+ end
709
+ end
710
+
711
+ # A Digest holds a cryptographic message digest.
712
+ class Digest
713
+ include Google::Apis::Core::Hashable
714
+
715
+ # A message digest produced with the SHA-256 algorithm.
716
+ # Corresponds to the JSON property `sha256`
717
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
718
+ # @return [String]
719
+ attr_accessor :sha256
720
+
721
+ # A message digest produced with the SHA-384 algorithm.
722
+ # Corresponds to the JSON property `sha384`
723
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
724
+ # @return [String]
725
+ attr_accessor :sha384
726
+
727
+ # A message digest produced with the SHA-512 algorithm.
728
+ # Corresponds to the JSON property `sha512`
729
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
730
+ # @return [String]
731
+ attr_accessor :sha512
732
+
733
+ def initialize(**args)
734
+ update!(**args)
735
+ end
736
+
737
+ # Update properties of this object
738
+ def update!(**args)
739
+ @sha256 = args[:sha256] if args.key?(:sha256)
740
+ @sha384 = args[:sha384] if args.key?(:sha384)
741
+ @sha512 = args[:sha512] if args.key?(:sha512)
742
+ end
743
+ end
744
+
745
+ # Request message for KeyManagementService.Encrypt.
746
+ class EncryptRequest
747
+ include Google::Apis::Core::Hashable
748
+
749
+ # Optional. Optional data that, if specified, must also be provided during
750
+ # decryption through DecryptRequest.additional_authenticated_data. The maximum
751
+ # size depends on the key version's protection_level. For SOFTWARE keys, the AAD
752
+ # must be no larger than 64KiB. For HSM keys, the combined length of the
753
+ # plaintext and additional_authenticated_data fields must be no larger than 8KiB.
754
+ # Corresponds to the JSON property `additionalAuthenticatedData`
755
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
756
+ # @return [String]
757
+ attr_accessor :additional_authenticated_data
758
+
759
+ # Optional. An optional CRC32C checksum of the EncryptRequest.
760
+ # additional_authenticated_data. If specified, KeyManagementService will verify
761
+ # the integrity of the received EncryptRequest.additional_authenticated_data
762
+ # using this checksum. KeyManagementService will report an error if the checksum
763
+ # verification fails. If you receive a checksum error, your client should verify
764
+ # that CRC32C(EncryptRequest.additional_authenticated_data) is equal to
765
+ # EncryptRequest.additional_authenticated_data_crc32c, and if so, perform a
766
+ # limited number of retries. A persistent mismatch may indicate an issue in your
767
+ # computation of the CRC32C checksum. Note: This field is defined as int64 for
768
+ # reasons of compatibility across different languages. However, it is a non-
769
+ # negative integer, which will never exceed 2^32-1, and can be safely
770
+ # downconverted to uint32 in languages that support this type. NOTE: This field
771
+ # is in Beta.
772
+ # Corresponds to the JSON property `additionalAuthenticatedDataCrc32c`
773
+ # @return [Fixnum]
774
+ attr_accessor :additional_authenticated_data_crc32c
775
+
776
+ # Required. The data to encrypt. Must be no larger than 64KiB. The maximum size
777
+ # depends on the key version's protection_level. For SOFTWARE keys, the
778
+ # plaintext must be no larger than 64KiB. For HSM keys, the combined length of
779
+ # the plaintext and additional_authenticated_data fields must be no larger than
780
+ # 8KiB.
781
+ # Corresponds to the JSON property `plaintext`
782
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
783
+ # @return [String]
784
+ attr_accessor :plaintext
785
+
786
+ # Optional. An optional CRC32C checksum of the EncryptRequest.plaintext. If
787
+ # specified, KeyManagementService will verify the integrity of the received
788
+ # EncryptRequest.plaintext using this checksum. KeyManagementService will report
789
+ # an error if the checksum verification fails. If you receive a checksum error,
790
+ # your client should verify that CRC32C(EncryptRequest.plaintext) is equal to
791
+ # EncryptRequest.plaintext_crc32c, and if so, perform a limited number of
792
+ # retries. A persistent mismatch may indicate an issue in your computation of
793
+ # the CRC32C checksum. Note: This field is defined as int64 for reasons of
794
+ # compatibility across different languages. However, it is a non-negative
795
+ # integer, which will never exceed 2^32-1, and can be safely downconverted to
796
+ # uint32 in languages that support this type. NOTE: This field is in Beta.
797
+ # Corresponds to the JSON property `plaintextCrc32c`
798
+ # @return [Fixnum]
799
+ attr_accessor :plaintext_crc32c
800
+
801
+ def initialize(**args)
802
+ update!(**args)
803
+ end
804
+
805
+ # Update properties of this object
806
+ def update!(**args)
807
+ @additional_authenticated_data = args[:additional_authenticated_data] if args.key?(:additional_authenticated_data)
808
+ @additional_authenticated_data_crc32c = args[:additional_authenticated_data_crc32c] if args.key?(:additional_authenticated_data_crc32c)
809
+ @plaintext = args[:plaintext] if args.key?(:plaintext)
810
+ @plaintext_crc32c = args[:plaintext_crc32c] if args.key?(:plaintext_crc32c)
811
+ end
812
+ end
813
+
814
+ # Response message for KeyManagementService.Encrypt.
815
+ class EncryptResponse
816
+ include Google::Apis::Core::Hashable
817
+
818
+ # The encrypted data.
819
+ # Corresponds to the JSON property `ciphertext`
820
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
821
+ # @return [String]
822
+ attr_accessor :ciphertext
823
+
824
+ # Integrity verification field. A CRC32C checksum of the returned
825
+ # EncryptResponse.ciphertext. An integrity check of EncryptResponse.ciphertext
826
+ # can be performed by computing the CRC32C checksum of EncryptResponse.
827
+ # ciphertext and comparing your results to this field. Discard the response in
828
+ # case of non-matching checksum values, and perform a limited number of retries.
829
+ # A persistent mismatch may indicate an issue in your computation of the CRC32C
830
+ # checksum. Note: This field is defined as int64 for reasons of compatibility
831
+ # across different languages. However, it is a non-negative integer, which will
832
+ # never exceed 2^32-1, and can be safely downconverted to uint32 in languages
833
+ # that support this type. NOTE: This field is in Beta.
834
+ # Corresponds to the JSON property `ciphertextCrc32c`
835
+ # @return [Fixnum]
836
+ attr_accessor :ciphertext_crc32c
837
+
838
+ # The resource name of the CryptoKeyVersion used in encryption. Check this field
839
+ # to verify that the intended resource was used for encryption.
840
+ # Corresponds to the JSON property `name`
841
+ # @return [String]
842
+ attr_accessor :name
843
+
844
+ # Integrity verification field. A flag indicating whether EncryptRequest.
845
+ # additional_authenticated_data_crc32c was received by KeyManagementService and
846
+ # used for the integrity verification of the AAD. A false value of this field
847
+ # indicates either that EncryptRequest.additional_authenticated_data_crc32c was
848
+ # left unset or that it was not delivered to KeyManagementService. If you've set
849
+ # EncryptRequest.additional_authenticated_data_crc32c but this field is still
850
+ # false, discard the response and perform a limited number of retries. NOTE:
851
+ # This field is in Beta.
852
+ # Corresponds to the JSON property `verifiedAdditionalAuthenticatedDataCrc32c`
853
+ # @return [Boolean]
854
+ attr_accessor :verified_additional_authenticated_data_crc32c
855
+ alias_method :verified_additional_authenticated_data_crc32c?, :verified_additional_authenticated_data_crc32c
856
+
857
+ # Integrity verification field. A flag indicating whether EncryptRequest.
858
+ # plaintext_crc32c was received by KeyManagementService and used for the
859
+ # integrity verification of the plaintext. A false value of this field indicates
860
+ # either that EncryptRequest.plaintext_crc32c was left unset or that it was not
861
+ # delivered to KeyManagementService. If you've set EncryptRequest.
862
+ # plaintext_crc32c but this field is still false, discard the response and
863
+ # perform a limited number of retries. NOTE: This field is in Beta.
864
+ # Corresponds to the JSON property `verifiedPlaintextCrc32c`
865
+ # @return [Boolean]
866
+ attr_accessor :verified_plaintext_crc32c
867
+ alias_method :verified_plaintext_crc32c?, :verified_plaintext_crc32c
868
+
869
+ def initialize(**args)
870
+ update!(**args)
871
+ end
872
+
873
+ # Update properties of this object
874
+ def update!(**args)
875
+ @ciphertext = args[:ciphertext] if args.key?(:ciphertext)
876
+ @ciphertext_crc32c = args[:ciphertext_crc32c] if args.key?(:ciphertext_crc32c)
877
+ @name = args[:name] if args.key?(:name)
878
+ @verified_additional_authenticated_data_crc32c = args[:verified_additional_authenticated_data_crc32c] if args.key?(:verified_additional_authenticated_data_crc32c)
879
+ @verified_plaintext_crc32c = args[:verified_plaintext_crc32c] if args.key?(:verified_plaintext_crc32c)
880
+ end
881
+ end
882
+
883
+ # Represents a textual expression in the Common Expression Language (CEL) syntax.
884
+ # CEL is a C-like expression language. The syntax and semantics of CEL are
885
+ # documented at https://github.com/google/cel-spec. Example (Comparison): title:
886
+ # "Summary size limit" description: "Determines if a summary is less than 100
887
+ # chars" expression: "document.summary.size() < 100" Example (Equality): title: "
888
+ # Requestor is owner" description: "Determines if requestor is the document
889
+ # owner" expression: "document.owner == request.auth.claims.email" Example (
890
+ # Logic): title: "Public documents" description: "Determine whether the document
891
+ # should be publicly visible" expression: "document.type != 'private' &&
892
+ # document.type != 'internal'" Example (Data Manipulation): title: "Notification
893
+ # string" description: "Create a notification string with a timestamp."
894
+ # expression: "'New message received at ' + string(document.create_time)" The
895
+ # exact variables and functions that may be referenced within an expression are
896
+ # determined by the service that evaluates it. See the service documentation for
897
+ # additional information.
898
+ class Expr
899
+ include Google::Apis::Core::Hashable
900
+
901
+ # Optional. Description of the expression. This is a longer text which describes
902
+ # the expression, e.g. when hovered over it in a UI.
903
+ # Corresponds to the JSON property `description`
904
+ # @return [String]
905
+ attr_accessor :description
906
+
907
+ # Textual representation of an expression in Common Expression Language syntax.
908
+ # Corresponds to the JSON property `expression`
909
+ # @return [String]
910
+ attr_accessor :expression
911
+
912
+ # Optional. String indicating the location of the expression for error reporting,
913
+ # e.g. a file name and a position in the file.
914
+ # Corresponds to the JSON property `location`
915
+ # @return [String]
916
+ attr_accessor :location
917
+
918
+ # Optional. Title for the expression, i.e. a short string describing its purpose.
919
+ # This can be used e.g. in UIs which allow to enter the expression.
920
+ # Corresponds to the JSON property `title`
921
+ # @return [String]
922
+ attr_accessor :title
923
+
924
+ def initialize(**args)
925
+ update!(**args)
926
+ end
927
+
928
+ # Update properties of this object
929
+ def update!(**args)
930
+ @description = args[:description] if args.key?(:description)
931
+ @expression = args[:expression] if args.key?(:expression)
932
+ @location = args[:location] if args.key?(:location)
933
+ @title = args[:title] if args.key?(:title)
934
+ end
935
+ end
936
+
937
+ # ExternalProtectionLevelOptions stores a group of additional fields for
938
+ # configuring a CryptoKeyVersion that are specific to the EXTERNAL protection
939
+ # level.
940
+ class ExternalProtectionLevelOptions
941
+ include Google::Apis::Core::Hashable
942
+
943
+ # The URI for an external resource that this CryptoKeyVersion represents.
944
+ # Corresponds to the JSON property `externalKeyUri`
945
+ # @return [String]
946
+ attr_accessor :external_key_uri
947
+
948
+ def initialize(**args)
949
+ update!(**args)
950
+ end
951
+
952
+ # Update properties of this object
953
+ def update!(**args)
954
+ @external_key_uri = args[:external_key_uri] if args.key?(:external_key_uri)
955
+ end
956
+ end
957
+
958
+ # Request message for KeyManagementService.ImportCryptoKeyVersion.
959
+ class ImportCryptoKeyVersionRequest
960
+ include Google::Apis::Core::Hashable
961
+
962
+ # Required. The algorithm of the key being imported. This does not need to match
963
+ # the version_template of the CryptoKey this version imports into.
964
+ # Corresponds to the JSON property `algorithm`
965
+ # @return [String]
966
+ attr_accessor :algorithm
967
+
968
+ # Required. The name of the ImportJob that was used to wrap this key material.
969
+ # Corresponds to the JSON property `importJob`
970
+ # @return [String]
971
+ attr_accessor :import_job
972
+
973
+ # Wrapped key material produced with RSA_OAEP_3072_SHA1_AES_256 or
974
+ # RSA_OAEP_4096_SHA1_AES_256. This field contains the concatenation of two
975
+ # wrapped keys: 1. An ephemeral AES-256 wrapping key wrapped with the public_key
976
+ # using RSAES-OAEP with SHA-1, MGF1 with SHA-1, and an empty label. 2. The key
977
+ # to be imported, wrapped with the ephemeral AES-256 key using AES-KWP (RFC 5649)
978
+ # . If importing symmetric key material, it is expected that the unwrapped key
979
+ # contains plain bytes. If importing asymmetric key material, it is expected
980
+ # that the unwrapped key is in PKCS#8-encoded DER format (the PrivateKeyInfo
981
+ # structure from RFC 5208). This format is the same as the format produced by
982
+ # PKCS#11 mechanism CKM_RSA_AES_KEY_WRAP.
983
+ # Corresponds to the JSON property `rsaAesWrappedKey`
984
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
985
+ # @return [String]
986
+ attr_accessor :rsa_aes_wrapped_key
987
+
988
+ def initialize(**args)
989
+ update!(**args)
990
+ end
991
+
992
+ # Update properties of this object
993
+ def update!(**args)
994
+ @algorithm = args[:algorithm] if args.key?(:algorithm)
995
+ @import_job = args[:import_job] if args.key?(:import_job)
996
+ @rsa_aes_wrapped_key = args[:rsa_aes_wrapped_key] if args.key?(:rsa_aes_wrapped_key)
997
+ end
998
+ end
999
+
1000
+ # An ImportJob can be used to create CryptoKeys and CryptoKeyVersions using pre-
1001
+ # existing key material, generated outside of Cloud KMS. When an ImportJob is
1002
+ # created, Cloud KMS will generate a "wrapping key", which is a public/private
1003
+ # key pair. You use the wrapping key to encrypt (also known as wrap) the pre-
1004
+ # existing key material to protect it during the import process. The nature of
1005
+ # the wrapping key depends on the choice of import_method. When the wrapping key
1006
+ # generation is complete, the state will be set to ACTIVE and the public_key can
1007
+ # be fetched. The fetched public key can then be used to wrap your pre-existing
1008
+ # key material. Once the key material is wrapped, it can be imported into a new
1009
+ # CryptoKeyVersion in an existing CryptoKey by calling ImportCryptoKeyVersion.
1010
+ # Multiple CryptoKeyVersions can be imported with a single ImportJob. Cloud KMS
1011
+ # uses the private key portion of the wrapping key to unwrap the key material.
1012
+ # Only Cloud KMS has access to the private key. An ImportJob expires 3 days
1013
+ # after it is created. Once expired, Cloud KMS will no longer be able to import
1014
+ # or unwrap any key material that was wrapped with the ImportJob's public key.
1015
+ # For more information, see [Importing a key](https://cloud.google.com/kms/docs/
1016
+ # importing-a-key).
1017
+ class ImportJob
1018
+ include Google::Apis::Core::Hashable
1019
+
1020
+ # Contains an HSM-generated attestation about a key operation. For more
1021
+ # information, see [Verifying attestations] (https://cloud.google.com/kms/docs/
1022
+ # attest-key).
1023
+ # Corresponds to the JSON property `attestation`
1024
+ # @return [Google::Apis::CloudkmsV1::KeyOperationAttestation]
1025
+ attr_accessor :attestation
1026
+
1027
+ # Output only. The time at which this ImportJob was created.
1028
+ # Corresponds to the JSON property `createTime`
1029
+ # @return [String]
1030
+ attr_accessor :create_time
1031
+
1032
+ # Output only. The time this ImportJob expired. Only present if state is EXPIRED.
1033
+ # Corresponds to the JSON property `expireEventTime`
1034
+ # @return [String]
1035
+ attr_accessor :expire_event_time
1036
+
1037
+ # Output only. The time at which this ImportJob is scheduled for expiration and
1038
+ # can no longer be used to import key material.
1039
+ # Corresponds to the JSON property `expireTime`
1040
+ # @return [String]
1041
+ attr_accessor :expire_time
1042
+
1043
+ # Output only. The time this ImportJob's key material was generated.
1044
+ # Corresponds to the JSON property `generateTime`
1045
+ # @return [String]
1046
+ attr_accessor :generate_time
1047
+
1048
+ # Required. Immutable. The wrapping method to be used for incoming key material.
1049
+ # Corresponds to the JSON property `importMethod`
1050
+ # @return [String]
1051
+ attr_accessor :import_method
1052
+
1053
+ # Output only. The resource name for this ImportJob in the format `projects/*/
1054
+ # locations/*/keyRings/*/importJobs/*`.
1055
+ # Corresponds to the JSON property `name`
1056
+ # @return [String]
1057
+ attr_accessor :name
1058
+
1059
+ # Required. Immutable. The protection level of the ImportJob. This must match
1060
+ # the protection_level of the version_template on the CryptoKey you attempt to
1061
+ # import into.
1062
+ # Corresponds to the JSON property `protectionLevel`
1063
+ # @return [String]
1064
+ attr_accessor :protection_level
1065
+
1066
+ # The public key component of the wrapping key. For details of the type of key
1067
+ # this public key corresponds to, see the ImportMethod.
1068
+ # Corresponds to the JSON property `publicKey`
1069
+ # @return [Google::Apis::CloudkmsV1::WrappingPublicKey]
1070
+ attr_accessor :public_key
1071
+
1072
+ # Output only. The current state of the ImportJob, indicating if it can be used.
1073
+ # Corresponds to the JSON property `state`
1074
+ # @return [String]
1075
+ attr_accessor :state
1076
+
1077
+ def initialize(**args)
1078
+ update!(**args)
1079
+ end
1080
+
1081
+ # Update properties of this object
1082
+ def update!(**args)
1083
+ @attestation = args[:attestation] if args.key?(:attestation)
1084
+ @create_time = args[:create_time] if args.key?(:create_time)
1085
+ @expire_event_time = args[:expire_event_time] if args.key?(:expire_event_time)
1086
+ @expire_time = args[:expire_time] if args.key?(:expire_time)
1087
+ @generate_time = args[:generate_time] if args.key?(:generate_time)
1088
+ @import_method = args[:import_method] if args.key?(:import_method)
1089
+ @name = args[:name] if args.key?(:name)
1090
+ @protection_level = args[:protection_level] if args.key?(:protection_level)
1091
+ @public_key = args[:public_key] if args.key?(:public_key)
1092
+ @state = args[:state] if args.key?(:state)
1093
+ end
1094
+ end
1095
+
1096
+ # Contains an HSM-generated attestation about a key operation. For more
1097
+ # information, see [Verifying attestations] (https://cloud.google.com/kms/docs/
1098
+ # attest-key).
1099
+ class KeyOperationAttestation
1100
+ include Google::Apis::Core::Hashable
1101
+
1102
+ # Certificate chains needed to verify the attestation. Certificates in chains
1103
+ # are PEM-encoded and are ordered based on https://tools.ietf.org/html/rfc5246#
1104
+ # section-7.4.2.
1105
+ # Corresponds to the JSON property `certChains`
1106
+ # @return [Google::Apis::CloudkmsV1::CertificateChains]
1107
+ attr_accessor :cert_chains
1108
+
1109
+ # Output only. The attestation data provided by the HSM when the key operation
1110
+ # was performed.
1111
+ # Corresponds to the JSON property `content`
1112
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
1113
+ # @return [String]
1114
+ attr_accessor :content
1115
+
1116
+ # Output only. The format of the attestation data.
1117
+ # Corresponds to the JSON property `format`
1118
+ # @return [String]
1119
+ attr_accessor :format
1120
+
1121
+ def initialize(**args)
1122
+ update!(**args)
1123
+ end
1124
+
1125
+ # Update properties of this object
1126
+ def update!(**args)
1127
+ @cert_chains = args[:cert_chains] if args.key?(:cert_chains)
1128
+ @content = args[:content] if args.key?(:content)
1129
+ @format = args[:format] if args.key?(:format)
1130
+ end
1131
+ end
1132
+
1133
+ # A KeyRing is a toplevel logical grouping of CryptoKeys.
1134
+ class KeyRing
1135
+ include Google::Apis::Core::Hashable
1136
+
1137
+ # Output only. The time at which this KeyRing was created.
1138
+ # Corresponds to the JSON property `createTime`
1139
+ # @return [String]
1140
+ attr_accessor :create_time
1141
+
1142
+ # Output only. The resource name for the KeyRing in the format `projects/*/
1143
+ # locations/*/keyRings/*`.
1144
+ # Corresponds to the JSON property `name`
1145
+ # @return [String]
1146
+ attr_accessor :name
1147
+
1148
+ def initialize(**args)
1149
+ update!(**args)
1150
+ end
1151
+
1152
+ # Update properties of this object
1153
+ def update!(**args)
1154
+ @create_time = args[:create_time] if args.key?(:create_time)
1155
+ @name = args[:name] if args.key?(:name)
1156
+ end
1157
+ end
1158
+
1159
+ # Response message for KeyManagementService.ListCryptoKeyVersions.
1160
+ class ListCryptoKeyVersionsResponse
1161
+ include Google::Apis::Core::Hashable
1162
+
1163
+ # The list of CryptoKeyVersions.
1164
+ # Corresponds to the JSON property `cryptoKeyVersions`
1165
+ # @return [Array<Google::Apis::CloudkmsV1::CryptoKeyVersion>]
1166
+ attr_accessor :crypto_key_versions
1167
+
1168
+ # A token to retrieve next page of results. Pass this value in
1169
+ # ListCryptoKeyVersionsRequest.page_token to retrieve the next page of results.
1170
+ # Corresponds to the JSON property `nextPageToken`
1171
+ # @return [String]
1172
+ attr_accessor :next_page_token
1173
+
1174
+ # The total number of CryptoKeyVersions that matched the query.
1175
+ # Corresponds to the JSON property `totalSize`
1176
+ # @return [Fixnum]
1177
+ attr_accessor :total_size
1178
+
1179
+ def initialize(**args)
1180
+ update!(**args)
1181
+ end
1182
+
1183
+ # Update properties of this object
1184
+ def update!(**args)
1185
+ @crypto_key_versions = args[:crypto_key_versions] if args.key?(:crypto_key_versions)
1186
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1187
+ @total_size = args[:total_size] if args.key?(:total_size)
1188
+ end
1189
+ end
1190
+
1191
+ # Response message for KeyManagementService.ListCryptoKeys.
1192
+ class ListCryptoKeysResponse
1193
+ include Google::Apis::Core::Hashable
1194
+
1195
+ # The list of CryptoKeys.
1196
+ # Corresponds to the JSON property `cryptoKeys`
1197
+ # @return [Array<Google::Apis::CloudkmsV1::CryptoKey>]
1198
+ attr_accessor :crypto_keys
1199
+
1200
+ # A token to retrieve next page of results. Pass this value in
1201
+ # ListCryptoKeysRequest.page_token to retrieve the next page of results.
1202
+ # Corresponds to the JSON property `nextPageToken`
1203
+ # @return [String]
1204
+ attr_accessor :next_page_token
1205
+
1206
+ # The total number of CryptoKeys that matched the query.
1207
+ # Corresponds to the JSON property `totalSize`
1208
+ # @return [Fixnum]
1209
+ attr_accessor :total_size
1210
+
1211
+ def initialize(**args)
1212
+ update!(**args)
1213
+ end
1214
+
1215
+ # Update properties of this object
1216
+ def update!(**args)
1217
+ @crypto_keys = args[:crypto_keys] if args.key?(:crypto_keys)
1218
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1219
+ @total_size = args[:total_size] if args.key?(:total_size)
1220
+ end
1221
+ end
1222
+
1223
+ # Response message for KeyManagementService.ListImportJobs.
1224
+ class ListImportJobsResponse
1225
+ include Google::Apis::Core::Hashable
1226
+
1227
+ # The list of ImportJobs.
1228
+ # Corresponds to the JSON property `importJobs`
1229
+ # @return [Array<Google::Apis::CloudkmsV1::ImportJob>]
1230
+ attr_accessor :import_jobs
1231
+
1232
+ # A token to retrieve next page of results. Pass this value in
1233
+ # ListImportJobsRequest.page_token to retrieve the next page of results.
1234
+ # Corresponds to the JSON property `nextPageToken`
1235
+ # @return [String]
1236
+ attr_accessor :next_page_token
1237
+
1238
+ # The total number of ImportJobs that matched the query.
1239
+ # Corresponds to the JSON property `totalSize`
1240
+ # @return [Fixnum]
1241
+ attr_accessor :total_size
1242
+
1243
+ def initialize(**args)
1244
+ update!(**args)
1245
+ end
1246
+
1247
+ # Update properties of this object
1248
+ def update!(**args)
1249
+ @import_jobs = args[:import_jobs] if args.key?(:import_jobs)
1250
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1251
+ @total_size = args[:total_size] if args.key?(:total_size)
1252
+ end
1253
+ end
1254
+
1255
+ # Response message for KeyManagementService.ListKeyRings.
1256
+ class ListKeyRingsResponse
1257
+ include Google::Apis::Core::Hashable
1258
+
1259
+ # The list of KeyRings.
1260
+ # Corresponds to the JSON property `keyRings`
1261
+ # @return [Array<Google::Apis::CloudkmsV1::KeyRing>]
1262
+ attr_accessor :key_rings
1263
+
1264
+ # A token to retrieve next page of results. Pass this value in
1265
+ # ListKeyRingsRequest.page_token to retrieve the next page of results.
1266
+ # Corresponds to the JSON property `nextPageToken`
1267
+ # @return [String]
1268
+ attr_accessor :next_page_token
1269
+
1270
+ # The total number of KeyRings that matched the query.
1271
+ # Corresponds to the JSON property `totalSize`
1272
+ # @return [Fixnum]
1273
+ attr_accessor :total_size
1274
+
1275
+ def initialize(**args)
1276
+ update!(**args)
1277
+ end
1278
+
1279
+ # Update properties of this object
1280
+ def update!(**args)
1281
+ @key_rings = args[:key_rings] if args.key?(:key_rings)
1282
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1283
+ @total_size = args[:total_size] if args.key?(:total_size)
1284
+ end
1285
+ end
1286
+
1287
+ # The response message for Locations.ListLocations.
1288
+ class ListLocationsResponse
1289
+ include Google::Apis::Core::Hashable
1290
+
1291
+ # A list of locations that matches the specified filter in the request.
1292
+ # Corresponds to the JSON property `locations`
1293
+ # @return [Array<Google::Apis::CloudkmsV1::Location>]
1294
+ attr_accessor :locations
1295
+
1296
+ # The standard List next-page token.
1297
+ # Corresponds to the JSON property `nextPageToken`
1298
+ # @return [String]
1299
+ attr_accessor :next_page_token
1300
+
1301
+ def initialize(**args)
1302
+ update!(**args)
1303
+ end
1304
+
1305
+ # Update properties of this object
1306
+ def update!(**args)
1307
+ @locations = args[:locations] if args.key?(:locations)
1308
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1309
+ end
1310
+ end
1311
+
1312
+ # A resource that represents Google Cloud Platform location.
1313
+ class Location
1314
+ include Google::Apis::Core::Hashable
1315
+
1316
+ # The friendly name for this location, typically a nearby city name. For example,
1317
+ # "Tokyo".
1318
+ # Corresponds to the JSON property `displayName`
1319
+ # @return [String]
1320
+ attr_accessor :display_name
1321
+
1322
+ # Cross-service attributes for the location. For example `"cloud.googleapis.com/
1323
+ # region": "us-east1"`
1324
+ # Corresponds to the JSON property `labels`
1325
+ # @return [Hash<String,String>]
1326
+ attr_accessor :labels
1327
+
1328
+ # The canonical id for this location. For example: `"us-east1"`.
1329
+ # Corresponds to the JSON property `locationId`
1330
+ # @return [String]
1331
+ attr_accessor :location_id
1332
+
1333
+ # Service-specific metadata. For example the available capacity at the given
1334
+ # location.
1335
+ # Corresponds to the JSON property `metadata`
1336
+ # @return [Hash<String,Object>]
1337
+ attr_accessor :metadata
1338
+
1339
+ # Resource name for the location, which may vary between implementations. For
1340
+ # example: `"projects/example-project/locations/us-east1"`
1341
+ # Corresponds to the JSON property `name`
1342
+ # @return [String]
1343
+ attr_accessor :name
1344
+
1345
+ def initialize(**args)
1346
+ update!(**args)
1347
+ end
1348
+
1349
+ # Update properties of this object
1350
+ def update!(**args)
1351
+ @display_name = args[:display_name] if args.key?(:display_name)
1352
+ @labels = args[:labels] if args.key?(:labels)
1353
+ @location_id = args[:location_id] if args.key?(:location_id)
1354
+ @metadata = args[:metadata] if args.key?(:metadata)
1355
+ @name = args[:name] if args.key?(:name)
1356
+ end
1357
+ end
1358
+
1359
+ # Cloud KMS metadata for the given google.cloud.location.Location.
1360
+ class LocationMetadata
1361
+ include Google::Apis::Core::Hashable
1362
+
1363
+ # Indicates whether CryptoKeys with protection_level EXTERNAL can be created in
1364
+ # this location.
1365
+ # Corresponds to the JSON property `ekmAvailable`
1366
+ # @return [Boolean]
1367
+ attr_accessor :ekm_available
1368
+ alias_method :ekm_available?, :ekm_available
1369
+
1370
+ # Indicates whether CryptoKeys with protection_level HSM can be created in this
1371
+ # location.
1372
+ # Corresponds to the JSON property `hsmAvailable`
1373
+ # @return [Boolean]
1374
+ attr_accessor :hsm_available
1375
+ alias_method :hsm_available?, :hsm_available
1376
+
1377
+ def initialize(**args)
1378
+ update!(**args)
1379
+ end
1380
+
1381
+ # Update properties of this object
1382
+ def update!(**args)
1383
+ @ekm_available = args[:ekm_available] if args.key?(:ekm_available)
1384
+ @hsm_available = args[:hsm_available] if args.key?(:hsm_available)
1385
+ end
1386
+ end
1387
+
1388
+ # An Identity and Access Management (IAM) policy, which specifies access
1389
+ # controls for Google Cloud resources. A `Policy` is a collection of `bindings`.
1390
+ # A `binding` binds one or more `members` to a single `role`. Members can be
1391
+ # user accounts, service accounts, Google groups, and domains (such as G Suite).
1392
+ # A `role` is a named list of permissions; each `role` can be an IAM predefined
1393
+ # role or a user-created custom role. For some types of Google Cloud resources,
1394
+ # a `binding` can also specify a `condition`, which is a logical expression that
1395
+ # allows access to a resource only if the expression evaluates to `true`. A
1396
+ # condition can add constraints based on attributes of the request, the resource,
1397
+ # or both. To learn which resources support conditions in their IAM policies,
1398
+ # see the [IAM documentation](https://cloud.google.com/iam/help/conditions/
1399
+ # resource-policies). **JSON example:** ` "bindings": [ ` "role": "roles/
1400
+ # resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "
1401
+ # group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@
1402
+ # appspot.gserviceaccount.com" ] `, ` "role": "roles/resourcemanager.
1403
+ # organizationViewer", "members": [ "user:eve@example.com" ], "condition": ` "
1404
+ # title": "expirable access", "description": "Does not grant access after Sep
1405
+ # 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", `
1406
+ # ` ], "etag": "BwWWja0YfJA=", "version": 3 ` **YAML example:** bindings: -
1407
+ # members: - user:mike@example.com - group:admins@example.com - domain:google.
1408
+ # com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/
1409
+ # resourcemanager.organizationAdmin - members: - user:eve@example.com role:
1410
+ # roles/resourcemanager.organizationViewer condition: title: expirable access
1411
+ # description: Does not grant access after Sep 2020 expression: request.time <
1412
+ # timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 3 For a
1413
+ # description of IAM and its features, see the [IAM documentation](https://cloud.
1414
+ # google.com/iam/docs/).
1415
+ class Policy
1416
+ include Google::Apis::Core::Hashable
1417
+
1418
+ # Specifies cloud audit logging configuration for this policy.
1419
+ # Corresponds to the JSON property `auditConfigs`
1420
+ # @return [Array<Google::Apis::CloudkmsV1::AuditConfig>]
1421
+ attr_accessor :audit_configs
1422
+
1423
+ # Associates a list of `members` to a `role`. Optionally, may specify a `
1424
+ # condition` that determines how and when the `bindings` are applied. Each of
1425
+ # the `bindings` must contain at least one member.
1426
+ # Corresponds to the JSON property `bindings`
1427
+ # @return [Array<Google::Apis::CloudkmsV1::Binding>]
1428
+ attr_accessor :bindings
1429
+
1430
+ # `etag` is used for optimistic concurrency control as a way to help prevent
1431
+ # simultaneous updates of a policy from overwriting each other. It is strongly
1432
+ # suggested that systems make use of the `etag` in the read-modify-write cycle
1433
+ # to perform policy updates in order to avoid race conditions: An `etag` is
1434
+ # returned in the response to `getIamPolicy`, and systems are expected to put
1435
+ # that etag in the request to `setIamPolicy` to ensure that their change will be
1436
+ # applied to the same version of the policy. **Important:** If you use IAM
1437
+ # Conditions, you must include the `etag` field whenever you call `setIamPolicy`.
1438
+ # If you omit this field, then IAM allows you to overwrite a version `3` policy
1439
+ # with a version `1` policy, and all of the conditions in the version `3` policy
1440
+ # are lost.
1441
+ # Corresponds to the JSON property `etag`
1442
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
1443
+ # @return [String]
1444
+ attr_accessor :etag
1445
+
1446
+ # Specifies the format of the policy. Valid values are `0`, `1`, and `3`.
1447
+ # Requests that specify an invalid value are rejected. Any operation that
1448
+ # affects conditional role bindings must specify version `3`. This requirement
1449
+ # applies to the following operations: * Getting a policy that includes a
1450
+ # conditional role binding * Adding a conditional role binding to a policy *
1451
+ # Changing a conditional role binding in a policy * Removing any role binding,
1452
+ # with or without a condition, from a policy that includes conditions **
1453
+ # Important:** If you use IAM Conditions, you must include the `etag` field
1454
+ # whenever you call `setIamPolicy`. If you omit this field, then IAM allows you
1455
+ # to overwrite a version `3` policy with a version `1` policy, and all of the
1456
+ # conditions in the version `3` policy are lost. If a policy does not include
1457
+ # any conditions, operations on that policy may specify any valid version or
1458
+ # leave the field unset. To learn which resources support conditions in their
1459
+ # IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/
1460
+ # conditions/resource-policies).
1461
+ # Corresponds to the JSON property `version`
1462
+ # @return [Fixnum]
1463
+ attr_accessor :version
1464
+
1465
+ def initialize(**args)
1466
+ update!(**args)
1467
+ end
1468
+
1469
+ # Update properties of this object
1470
+ def update!(**args)
1471
+ @audit_configs = args[:audit_configs] if args.key?(:audit_configs)
1472
+ @bindings = args[:bindings] if args.key?(:bindings)
1473
+ @etag = args[:etag] if args.key?(:etag)
1474
+ @version = args[:version] if args.key?(:version)
1475
+ end
1476
+ end
1477
+
1478
+ # The public key for a given CryptoKeyVersion. Obtained via GetPublicKey.
1479
+ class PublicKey
1480
+ include Google::Apis::Core::Hashable
1481
+
1482
+ # The Algorithm associated with this key.
1483
+ # Corresponds to the JSON property `algorithm`
1484
+ # @return [String]
1485
+ attr_accessor :algorithm
1486
+
1487
+ # The name of the CryptoKeyVersion public key. Provided here for verification.
1488
+ # NOTE: This field is in Beta.
1489
+ # Corresponds to the JSON property `name`
1490
+ # @return [String]
1491
+ attr_accessor :name
1492
+
1493
+ # The public key, encoded in PEM format. For more information, see the [RFC 7468]
1494
+ # (https://tools.ietf.org/html/rfc7468) sections for [General Considerations](
1495
+ # https://tools.ietf.org/html/rfc7468#section-2) and [Textual Encoding of
1496
+ # Subject Public Key Info] (https://tools.ietf.org/html/rfc7468#section-13).
1497
+ # Corresponds to the JSON property `pem`
1498
+ # @return [String]
1499
+ attr_accessor :pem
1500
+
1501
+ # Integrity verification field. A CRC32C checksum of the returned PublicKey.pem.
1502
+ # An integrity check of PublicKey.pem can be performed by computing the CRC32C
1503
+ # checksum of PublicKey.pem and comparing your results to this field. Discard
1504
+ # the response in case of non-matching checksum values, and perform a limited
1505
+ # number of retries. A persistent mismatch may indicate an issue in your
1506
+ # computation of the CRC32C checksum. Note: This field is defined as int64 for
1507
+ # reasons of compatibility across different languages. However, it is a non-
1508
+ # negative integer, which will never exceed 2^32-1, and can be safely
1509
+ # downconverted to uint32 in languages that support this type. NOTE: This field
1510
+ # is in Beta.
1511
+ # Corresponds to the JSON property `pemCrc32c`
1512
+ # @return [Fixnum]
1513
+ attr_accessor :pem_crc32c
1514
+
1515
+ def initialize(**args)
1516
+ update!(**args)
1517
+ end
1518
+
1519
+ # Update properties of this object
1520
+ def update!(**args)
1521
+ @algorithm = args[:algorithm] if args.key?(:algorithm)
1522
+ @name = args[:name] if args.key?(:name)
1523
+ @pem = args[:pem] if args.key?(:pem)
1524
+ @pem_crc32c = args[:pem_crc32c] if args.key?(:pem_crc32c)
1525
+ end
1526
+ end
1527
+
1528
+ # Request message for KeyManagementService.RestoreCryptoKeyVersion.
1529
+ class RestoreCryptoKeyVersionRequest
1530
+ include Google::Apis::Core::Hashable
1531
+
1532
+ def initialize(**args)
1533
+ update!(**args)
1534
+ end
1535
+
1536
+ # Update properties of this object
1537
+ def update!(**args)
1538
+ end
1539
+ end
1540
+
1541
+ # Request message for `SetIamPolicy` method.
1542
+ class SetIamPolicyRequest
1543
+ include Google::Apis::Core::Hashable
1544
+
1545
+ # An Identity and Access Management (IAM) policy, which specifies access
1546
+ # controls for Google Cloud resources. A `Policy` is a collection of `bindings`.
1547
+ # A `binding` binds one or more `members` to a single `role`. Members can be
1548
+ # user accounts, service accounts, Google groups, and domains (such as G Suite).
1549
+ # A `role` is a named list of permissions; each `role` can be an IAM predefined
1550
+ # role or a user-created custom role. For some types of Google Cloud resources,
1551
+ # a `binding` can also specify a `condition`, which is a logical expression that
1552
+ # allows access to a resource only if the expression evaluates to `true`. A
1553
+ # condition can add constraints based on attributes of the request, the resource,
1554
+ # or both. To learn which resources support conditions in their IAM policies,
1555
+ # see the [IAM documentation](https://cloud.google.com/iam/help/conditions/
1556
+ # resource-policies). **JSON example:** ` "bindings": [ ` "role": "roles/
1557
+ # resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "
1558
+ # group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@
1559
+ # appspot.gserviceaccount.com" ] `, ` "role": "roles/resourcemanager.
1560
+ # organizationViewer", "members": [ "user:eve@example.com" ], "condition": ` "
1561
+ # title": "expirable access", "description": "Does not grant access after Sep
1562
+ # 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", `
1563
+ # ` ], "etag": "BwWWja0YfJA=", "version": 3 ` **YAML example:** bindings: -
1564
+ # members: - user:mike@example.com - group:admins@example.com - domain:google.
1565
+ # com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/
1566
+ # resourcemanager.organizationAdmin - members: - user:eve@example.com role:
1567
+ # roles/resourcemanager.organizationViewer condition: title: expirable access
1568
+ # description: Does not grant access after Sep 2020 expression: request.time <
1569
+ # timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 3 For a
1570
+ # description of IAM and its features, see the [IAM documentation](https://cloud.
1571
+ # google.com/iam/docs/).
1572
+ # Corresponds to the JSON property `policy`
1573
+ # @return [Google::Apis::CloudkmsV1::Policy]
1574
+ attr_accessor :policy
1575
+
1576
+ # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
1577
+ # the fields in the mask will be modified. If no mask is provided, the following
1578
+ # default mask is used: `paths: "bindings, etag"`
1579
+ # Corresponds to the JSON property `updateMask`
1580
+ # @return [String]
1581
+ attr_accessor :update_mask
1582
+
1583
+ def initialize(**args)
1584
+ update!(**args)
1585
+ end
1586
+
1587
+ # Update properties of this object
1588
+ def update!(**args)
1589
+ @policy = args[:policy] if args.key?(:policy)
1590
+ @update_mask = args[:update_mask] if args.key?(:update_mask)
1591
+ end
1592
+ end
1593
+
1594
+ # Request message for `TestIamPermissions` method.
1595
+ class TestIamPermissionsRequest
1596
+ include Google::Apis::Core::Hashable
1597
+
1598
+ # The set of permissions to check for the `resource`. Permissions with wildcards
1599
+ # (such as '*' or 'storage.*') are not allowed. For more information see [IAM
1600
+ # Overview](https://cloud.google.com/iam/docs/overview#permissions).
1601
+ # Corresponds to the JSON property `permissions`
1602
+ # @return [Array<String>]
1603
+ attr_accessor :permissions
1604
+
1605
+ def initialize(**args)
1606
+ update!(**args)
1607
+ end
1608
+
1609
+ # Update properties of this object
1610
+ def update!(**args)
1611
+ @permissions = args[:permissions] if args.key?(:permissions)
1612
+ end
1613
+ end
1614
+
1615
+ # Response message for `TestIamPermissions` method.
1616
+ class TestIamPermissionsResponse
1617
+ include Google::Apis::Core::Hashable
1618
+
1619
+ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
1620
+ # Corresponds to the JSON property `permissions`
1621
+ # @return [Array<String>]
1622
+ attr_accessor :permissions
1623
+
1624
+ def initialize(**args)
1625
+ update!(**args)
1626
+ end
1627
+
1628
+ # Update properties of this object
1629
+ def update!(**args)
1630
+ @permissions = args[:permissions] if args.key?(:permissions)
1631
+ end
1632
+ end
1633
+
1634
+ # Request message for KeyManagementService.UpdateCryptoKeyPrimaryVersion.
1635
+ class UpdateCryptoKeyPrimaryVersionRequest
1636
+ include Google::Apis::Core::Hashable
1637
+
1638
+ # Required. The id of the child CryptoKeyVersion to use as primary.
1639
+ # Corresponds to the JSON property `cryptoKeyVersionId`
1640
+ # @return [String]
1641
+ attr_accessor :crypto_key_version_id
1642
+
1643
+ def initialize(**args)
1644
+ update!(**args)
1645
+ end
1646
+
1647
+ # Update properties of this object
1648
+ def update!(**args)
1649
+ @crypto_key_version_id = args[:crypto_key_version_id] if args.key?(:crypto_key_version_id)
1650
+ end
1651
+ end
1652
+
1653
+ # The public key component of the wrapping key. For details of the type of key
1654
+ # this public key corresponds to, see the ImportMethod.
1655
+ class WrappingPublicKey
1656
+ include Google::Apis::Core::Hashable
1657
+
1658
+ # The public key, encoded in PEM format. For more information, see the [RFC 7468]
1659
+ # (https://tools.ietf.org/html/rfc7468) sections for [General Considerations](
1660
+ # https://tools.ietf.org/html/rfc7468#section-2) and [Textual Encoding of
1661
+ # Subject Public Key Info] (https://tools.ietf.org/html/rfc7468#section-13).
1662
+ # Corresponds to the JSON property `pem`
1663
+ # @return [String]
1664
+ attr_accessor :pem
1665
+
1666
+ def initialize(**args)
1667
+ update!(**args)
1668
+ end
1669
+
1670
+ # Update properties of this object
1671
+ def update!(**args)
1672
+ @pem = args[:pem] if args.key?(:pem)
1673
+ end
1674
+ end
1675
+ end
1676
+ end
1677
+ end