google-api-client 0.9.25 → 0.9.26

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +3 -0
  3. data/api_names.yaml +279 -0
  4. data/generated/google/apis/adexchangebuyer2_v2beta1.rb +1 -1
  5. data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +110 -110
  6. data/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +25 -25
  7. data/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +145 -145
  8. data/generated/google/apis/adsense_v1_4.rb +1 -1
  9. data/generated/google/apis/adsensehost_v4_1.rb +1 -1
  10. data/generated/google/apis/calendar_v3.rb +1 -1
  11. data/generated/google/apis/cloudbuild_v1.rb +1 -1
  12. data/generated/google/apis/cloudbuild_v1/classes.rb +419 -419
  13. data/generated/google/apis/cloudbuild_v1/representations.rb +73 -73
  14. data/generated/google/apis/cloudbuild_v1/service.rb +86 -86
  15. data/generated/google/apis/cloudkms_v1beta1.rb +34 -0
  16. data/generated/google/apis/cloudkms_v1beta1/classes.rb +999 -0
  17. data/generated/google/apis/cloudkms_v1beta1/representations.rb +448 -0
  18. data/generated/google/apis/cloudkms_v1beta1/service.rb +932 -0
  19. data/generated/google/apis/cloudresourcemanager_v1.rb +4 -4
  20. data/generated/google/apis/cloudresourcemanager_v1/classes.rb +478 -478
  21. data/generated/google/apis/cloudresourcemanager_v1/representations.rb +96 -96
  22. data/generated/google/apis/cloudresourcemanager_v1/service.rb +271 -271
  23. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +4 -4
  24. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +353 -353
  25. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +81 -81
  26. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +299 -299
  27. data/generated/google/apis/container_v1.rb +1 -1
  28. data/generated/google/apis/container_v1/classes.rb +287 -16
  29. data/generated/google/apis/container_v1/representations.rb +113 -2
  30. data/generated/google/apis/container_v1/service.rb +130 -0
  31. data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
  32. data/generated/google/apis/drive_v2.rb +1 -1
  33. data/generated/google/apis/drive_v3.rb +1 -1
  34. data/generated/google/apis/genomics_v1.rb +8 -8
  35. data/generated/google/apis/genomics_v1/classes.rb +2259 -2257
  36. data/generated/google/apis/genomics_v1/representations.rb +461 -526
  37. data/generated/google/apis/genomics_v1/service.rb +1203 -1105
  38. data/generated/google/apis/gmail_v1.rb +1 -1
  39. data/generated/google/apis/logging_v2beta1.rb +1 -1
  40. data/generated/google/apis/logging_v2beta1/classes.rb +852 -852
  41. data/generated/google/apis/logging_v2beta1/representations.rb +168 -168
  42. data/generated/google/apis/logging_v2beta1/service.rb +230 -230
  43. data/generated/google/apis/manufacturers_v1.rb +34 -0
  44. data/generated/google/apis/manufacturers_v1/classes.rb +258 -0
  45. data/generated/google/apis/manufacturers_v1/representations.rb +103 -0
  46. data/generated/google/apis/manufacturers_v1/service.rb +138 -0
  47. data/generated/google/apis/monitoring_v3.rb +7 -7
  48. data/generated/google/apis/monitoring_v3/classes.rb +744 -744
  49. data/generated/google/apis/monitoring_v3/representations.rb +164 -164
  50. data/generated/google/apis/monitoring_v3/service.rb +335 -335
  51. data/generated/google/apis/plus_domains_v1.rb +1 -1
  52. data/generated/google/apis/plus_v1.rb +1 -1
  53. data/generated/google/apis/pubsub_v1.rb +3 -3
  54. data/generated/google/apis/pubsub_v1/classes.rb +325 -325
  55. data/generated/google/apis/pubsub_v1/representations.rb +80 -80
  56. data/generated/google/apis/pubsub_v1/service.rb +256 -256
  57. data/generated/google/apis/sheets_v4.rb +3 -3
  58. data/generated/google/apis/sheets_v4/classes.rb +4283 -4283
  59. data/generated/google/apis/sheets_v4/representations.rb +833 -833
  60. data/generated/google/apis/sheets_v4/service.rb +184 -184
  61. data/generated/google/apis/speech_v1beta1.rb +1 -1
  62. data/generated/google/apis/speech_v1beta1/classes.rb +213 -211
  63. data/generated/google/apis/speech_v1beta1/representations.rb +49 -49
  64. data/generated/google/apis/speech_v1beta1/service.rb +71 -71
  65. data/generated/google/apis/sqladmin_v1beta4.rb +1 -1
  66. data/generated/google/apis/sqladmin_v1beta4/classes.rb +20 -0
  67. data/generated/google/apis/sqladmin_v1beta4/representations.rb +2 -0
  68. data/generated/google/apis/vision_v1.rb +1 -1
  69. data/generated/google/apis/vision_v1/classes.rb +861 -859
  70. data/generated/google/apis/vision_v1/representations.rb +140 -140
  71. data/generated/google/apis/vision_v1/service.rb +4 -4
  72. data/generated/google/apis/youtube_analytics_v1.rb +1 -1
  73. data/generated/google/apis/youtube_partner_v1.rb +1 -1
  74. data/generated/google/apis/youtubereporting_v1.rb +1 -1
  75. data/generated/google/apis/youtubereporting_v1/classes.rb +139 -139
  76. data/generated/google/apis/youtubereporting_v1/representations.rb +36 -36
  77. data/generated/google/apis/youtubereporting_v1/service.rb +152 -152
  78. data/lib/google/apis/version.rb +1 -1
  79. metadata +9 -1
@@ -0,0 +1,448 @@
1
+ # Copyright 2015 Google Inc.
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 CloudkmsV1beta1
24
+
25
+ class CloudAuditOptions
26
+ class Representation < Google::Apis::Core::JsonRepresentation; end
27
+
28
+ include Google::Apis::Core::JsonObjectSupport
29
+ end
30
+
31
+ class Binding
32
+ class Representation < Google::Apis::Core::JsonRepresentation; end
33
+
34
+ include Google::Apis::Core::JsonObjectSupport
35
+ end
36
+
37
+ class EncryptRequest
38
+ class Representation < Google::Apis::Core::JsonRepresentation; end
39
+
40
+ include Google::Apis::Core::JsonObjectSupport
41
+ end
42
+
43
+ class ListCryptoKeyVersionsResponse
44
+ class Representation < Google::Apis::Core::JsonRepresentation; end
45
+
46
+ include Google::Apis::Core::JsonObjectSupport
47
+ end
48
+
49
+ class TestIamPermissionsResponse
50
+ class Representation < Google::Apis::Core::JsonRepresentation; end
51
+
52
+ include Google::Apis::Core::JsonObjectSupport
53
+ end
54
+
55
+ class DestroyCryptoKeyVersionRequest
56
+ class Representation < Google::Apis::Core::JsonRepresentation; end
57
+
58
+ include Google::Apis::Core::JsonObjectSupport
59
+ end
60
+
61
+ class CryptoKey
62
+ class Representation < Google::Apis::Core::JsonRepresentation; end
63
+
64
+ include Google::Apis::Core::JsonObjectSupport
65
+ end
66
+
67
+ class Rule
68
+ class Representation < Google::Apis::Core::JsonRepresentation; end
69
+
70
+ include Google::Apis::Core::JsonObjectSupport
71
+ end
72
+
73
+ class LogConfig
74
+ class Representation < Google::Apis::Core::JsonRepresentation; end
75
+
76
+ include Google::Apis::Core::JsonObjectSupport
77
+ end
78
+
79
+ class SetIamPolicyRequest
80
+ class Representation < Google::Apis::Core::JsonRepresentation; end
81
+
82
+ include Google::Apis::Core::JsonObjectSupport
83
+ end
84
+
85
+ class DecryptRequest
86
+ class Representation < Google::Apis::Core::JsonRepresentation; end
87
+
88
+ include Google::Apis::Core::JsonObjectSupport
89
+ end
90
+
91
+ class Location
92
+ class Representation < Google::Apis::Core::JsonRepresentation; end
93
+
94
+ include Google::Apis::Core::JsonObjectSupport
95
+ end
96
+
97
+ class ListCryptoKeysResponse
98
+ class Representation < Google::Apis::Core::JsonRepresentation; end
99
+
100
+ include Google::Apis::Core::JsonObjectSupport
101
+ end
102
+
103
+ class Condition
104
+ class Representation < Google::Apis::Core::JsonRepresentation; end
105
+
106
+ include Google::Apis::Core::JsonObjectSupport
107
+ end
108
+
109
+ class CounterOptions
110
+ class Representation < Google::Apis::Core::JsonRepresentation; end
111
+
112
+ include Google::Apis::Core::JsonObjectSupport
113
+ end
114
+
115
+ class AuditLogConfig
116
+ class Representation < Google::Apis::Core::JsonRepresentation; end
117
+
118
+ include Google::Apis::Core::JsonObjectSupport
119
+ end
120
+
121
+ class DecryptResponse
122
+ class Representation < Google::Apis::Core::JsonRepresentation; end
123
+
124
+ include Google::Apis::Core::JsonObjectSupport
125
+ end
126
+
127
+ class TestIamPermissionsRequest
128
+ class Representation < Google::Apis::Core::JsonRepresentation; end
129
+
130
+ include Google::Apis::Core::JsonObjectSupport
131
+ end
132
+
133
+ class Policy
134
+ class Representation < Google::Apis::Core::JsonRepresentation; end
135
+
136
+ include Google::Apis::Core::JsonObjectSupport
137
+ end
138
+
139
+ class EncryptResponse
140
+ class Representation < Google::Apis::Core::JsonRepresentation; end
141
+
142
+ include Google::Apis::Core::JsonObjectSupport
143
+ end
144
+
145
+ class KeyRing
146
+ class Representation < Google::Apis::Core::JsonRepresentation; end
147
+
148
+ include Google::Apis::Core::JsonObjectSupport
149
+ end
150
+
151
+ class ListLocationsResponse
152
+ class Representation < Google::Apis::Core::JsonRepresentation; end
153
+
154
+ include Google::Apis::Core::JsonObjectSupport
155
+ end
156
+
157
+ class UpdateCryptoKeyPrimaryVersionRequest
158
+ class Representation < Google::Apis::Core::JsonRepresentation; end
159
+
160
+ include Google::Apis::Core::JsonObjectSupport
161
+ end
162
+
163
+ class RestoreCryptoKeyVersionRequest
164
+ class Representation < Google::Apis::Core::JsonRepresentation; end
165
+
166
+ include Google::Apis::Core::JsonObjectSupport
167
+ end
168
+
169
+ class DataAccessOptions
170
+ class Representation < Google::Apis::Core::JsonRepresentation; end
171
+
172
+ include Google::Apis::Core::JsonObjectSupport
173
+ end
174
+
175
+ class ListKeyRingsResponse
176
+ class Representation < Google::Apis::Core::JsonRepresentation; end
177
+
178
+ include Google::Apis::Core::JsonObjectSupport
179
+ end
180
+
181
+ class AuditConfig
182
+ class Representation < Google::Apis::Core::JsonRepresentation; end
183
+
184
+ include Google::Apis::Core::JsonObjectSupport
185
+ end
186
+
187
+ class CryptoKeyVersion
188
+ class Representation < Google::Apis::Core::JsonRepresentation; end
189
+
190
+ include Google::Apis::Core::JsonObjectSupport
191
+ end
192
+
193
+ class CloudAuditOptions
194
+ # @private
195
+ class Representation < Google::Apis::Core::JsonRepresentation
196
+ end
197
+ end
198
+
199
+ class Binding
200
+ # @private
201
+ class Representation < Google::Apis::Core::JsonRepresentation
202
+ collection :members, as: 'members'
203
+ property :role, as: 'role'
204
+ end
205
+ end
206
+
207
+ class EncryptRequest
208
+ # @private
209
+ class Representation < Google::Apis::Core::JsonRepresentation
210
+ property :plaintext, :base64 => true, as: 'plaintext'
211
+ property :additional_authenticated_data, :base64 => true, as: 'additionalAuthenticatedData'
212
+ end
213
+ end
214
+
215
+ class ListCryptoKeyVersionsResponse
216
+ # @private
217
+ class Representation < Google::Apis::Core::JsonRepresentation
218
+ collection :crypto_key_versions, as: 'cryptoKeyVersions', class: Google::Apis::CloudkmsV1beta1::CryptoKeyVersion, decorator: Google::Apis::CloudkmsV1beta1::CryptoKeyVersion::Representation
219
+
220
+ property :next_page_token, as: 'nextPageToken'
221
+ property :total_size, as: 'totalSize'
222
+ end
223
+ end
224
+
225
+ class TestIamPermissionsResponse
226
+ # @private
227
+ class Representation < Google::Apis::Core::JsonRepresentation
228
+ collection :permissions, as: 'permissions'
229
+ end
230
+ end
231
+
232
+ class DestroyCryptoKeyVersionRequest
233
+ # @private
234
+ class Representation < Google::Apis::Core::JsonRepresentation
235
+ end
236
+ end
237
+
238
+ class CryptoKey
239
+ # @private
240
+ class Representation < Google::Apis::Core::JsonRepresentation
241
+ property :name, as: 'name'
242
+ property :purpose, as: 'purpose'
243
+ property :next_rotation_time, as: 'nextRotationTime'
244
+ property :create_time, as: 'createTime'
245
+ property :rotation_period, as: 'rotationPeriod'
246
+ property :primary, as: 'primary', class: Google::Apis::CloudkmsV1beta1::CryptoKeyVersion, decorator: Google::Apis::CloudkmsV1beta1::CryptoKeyVersion::Representation
247
+
248
+ end
249
+ end
250
+
251
+ class Rule
252
+ # @private
253
+ class Representation < Google::Apis::Core::JsonRepresentation
254
+ collection :log_config, as: 'logConfig', class: Google::Apis::CloudkmsV1beta1::LogConfig, decorator: Google::Apis::CloudkmsV1beta1::LogConfig::Representation
255
+
256
+ collection :in, as: 'in'
257
+ collection :permissions, as: 'permissions'
258
+ property :action, as: 'action'
259
+ collection :not_in, as: 'notIn'
260
+ property :description, as: 'description'
261
+ collection :conditions, as: 'conditions', class: Google::Apis::CloudkmsV1beta1::Condition, decorator: Google::Apis::CloudkmsV1beta1::Condition::Representation
262
+
263
+ end
264
+ end
265
+
266
+ class LogConfig
267
+ # @private
268
+ class Representation < Google::Apis::Core::JsonRepresentation
269
+ property :data_access, as: 'dataAccess', class: Google::Apis::CloudkmsV1beta1::DataAccessOptions, decorator: Google::Apis::CloudkmsV1beta1::DataAccessOptions::Representation
270
+
271
+ property :cloud_audit, as: 'cloudAudit', class: Google::Apis::CloudkmsV1beta1::CloudAuditOptions, decorator: Google::Apis::CloudkmsV1beta1::CloudAuditOptions::Representation
272
+
273
+ property :counter, as: 'counter', class: Google::Apis::CloudkmsV1beta1::CounterOptions, decorator: Google::Apis::CloudkmsV1beta1::CounterOptions::Representation
274
+
275
+ end
276
+ end
277
+
278
+ class SetIamPolicyRequest
279
+ # @private
280
+ class Representation < Google::Apis::Core::JsonRepresentation
281
+ property :update_mask, as: 'updateMask'
282
+ property :policy, as: 'policy', class: Google::Apis::CloudkmsV1beta1::Policy, decorator: Google::Apis::CloudkmsV1beta1::Policy::Representation
283
+
284
+ end
285
+ end
286
+
287
+ class DecryptRequest
288
+ # @private
289
+ class Representation < Google::Apis::Core::JsonRepresentation
290
+ property :ciphertext, :base64 => true, as: 'ciphertext'
291
+ property :additional_authenticated_data, :base64 => true, as: 'additionalAuthenticatedData'
292
+ end
293
+ end
294
+
295
+ class Location
296
+ # @private
297
+ class Representation < Google::Apis::Core::JsonRepresentation
298
+ hash :labels, as: 'labels'
299
+ property :name, as: 'name'
300
+ property :location_id, as: 'locationId'
301
+ hash :metadata, as: 'metadata'
302
+ end
303
+ end
304
+
305
+ class ListCryptoKeysResponse
306
+ # @private
307
+ class Representation < Google::Apis::Core::JsonRepresentation
308
+ property :next_page_token, as: 'nextPageToken'
309
+ collection :crypto_keys, as: 'cryptoKeys', class: Google::Apis::CloudkmsV1beta1::CryptoKey, decorator: Google::Apis::CloudkmsV1beta1::CryptoKey::Representation
310
+
311
+ property :total_size, as: 'totalSize'
312
+ end
313
+ end
314
+
315
+ class Condition
316
+ # @private
317
+ class Representation < Google::Apis::Core::JsonRepresentation
318
+ property :svc, as: 'svc'
319
+ property :sys, as: 'sys'
320
+ property :value, as: 'value'
321
+ collection :values, as: 'values'
322
+ property :iam, as: 'iam'
323
+ property :op, as: 'op'
324
+ end
325
+ end
326
+
327
+ class CounterOptions
328
+ # @private
329
+ class Representation < Google::Apis::Core::JsonRepresentation
330
+ property :metric, as: 'metric'
331
+ property :field, as: 'field'
332
+ end
333
+ end
334
+
335
+ class AuditLogConfig
336
+ # @private
337
+ class Representation < Google::Apis::Core::JsonRepresentation
338
+ collection :exempted_members, as: 'exemptedMembers'
339
+ property :log_type, as: 'logType'
340
+ end
341
+ end
342
+
343
+ class DecryptResponse
344
+ # @private
345
+ class Representation < Google::Apis::Core::JsonRepresentation
346
+ property :plaintext, :base64 => true, as: 'plaintext'
347
+ end
348
+ end
349
+
350
+ class TestIamPermissionsRequest
351
+ # @private
352
+ class Representation < Google::Apis::Core::JsonRepresentation
353
+ collection :permissions, as: 'permissions'
354
+ end
355
+ end
356
+
357
+ class Policy
358
+ # @private
359
+ class Representation < Google::Apis::Core::JsonRepresentation
360
+ property :iam_owned, as: 'iamOwned'
361
+ collection :rules, as: 'rules', class: Google::Apis::CloudkmsV1beta1::Rule, decorator: Google::Apis::CloudkmsV1beta1::Rule::Representation
362
+
363
+ property :version, as: 'version'
364
+ collection :audit_configs, as: 'auditConfigs', class: Google::Apis::CloudkmsV1beta1::AuditConfig, decorator: Google::Apis::CloudkmsV1beta1::AuditConfig::Representation
365
+
366
+ collection :bindings, as: 'bindings', class: Google::Apis::CloudkmsV1beta1::Binding, decorator: Google::Apis::CloudkmsV1beta1::Binding::Representation
367
+
368
+ property :etag, :base64 => true, as: 'etag'
369
+ end
370
+ end
371
+
372
+ class EncryptResponse
373
+ # @private
374
+ class Representation < Google::Apis::Core::JsonRepresentation
375
+ property :ciphertext, :base64 => true, as: 'ciphertext'
376
+ property :name, as: 'name'
377
+ end
378
+ end
379
+
380
+ class KeyRing
381
+ # @private
382
+ class Representation < Google::Apis::Core::JsonRepresentation
383
+ property :create_time, as: 'createTime'
384
+ property :name, as: 'name'
385
+ end
386
+ end
387
+
388
+ class ListLocationsResponse
389
+ # @private
390
+ class Representation < Google::Apis::Core::JsonRepresentation
391
+ property :next_page_token, as: 'nextPageToken'
392
+ collection :locations, as: 'locations', class: Google::Apis::CloudkmsV1beta1::Location, decorator: Google::Apis::CloudkmsV1beta1::Location::Representation
393
+
394
+ end
395
+ end
396
+
397
+ class UpdateCryptoKeyPrimaryVersionRequest
398
+ # @private
399
+ class Representation < Google::Apis::Core::JsonRepresentation
400
+ property :crypto_key_version_id, as: 'cryptoKeyVersionId'
401
+ end
402
+ end
403
+
404
+ class RestoreCryptoKeyVersionRequest
405
+ # @private
406
+ class Representation < Google::Apis::Core::JsonRepresentation
407
+ end
408
+ end
409
+
410
+ class DataAccessOptions
411
+ # @private
412
+ class Representation < Google::Apis::Core::JsonRepresentation
413
+ end
414
+ end
415
+
416
+ class ListKeyRingsResponse
417
+ # @private
418
+ class Representation < Google::Apis::Core::JsonRepresentation
419
+ property :next_page_token, as: 'nextPageToken'
420
+ property :total_size, as: 'totalSize'
421
+ collection :key_rings, as: 'keyRings', class: Google::Apis::CloudkmsV1beta1::KeyRing, decorator: Google::Apis::CloudkmsV1beta1::KeyRing::Representation
422
+
423
+ end
424
+ end
425
+
426
+ class AuditConfig
427
+ # @private
428
+ class Representation < Google::Apis::Core::JsonRepresentation
429
+ collection :audit_log_configs, as: 'auditLogConfigs', class: Google::Apis::CloudkmsV1beta1::AuditLogConfig, decorator: Google::Apis::CloudkmsV1beta1::AuditLogConfig::Representation
430
+
431
+ collection :exempted_members, as: 'exemptedMembers'
432
+ property :service, as: 'service'
433
+ end
434
+ end
435
+
436
+ class CryptoKeyVersion
437
+ # @private
438
+ class Representation < Google::Apis::Core::JsonRepresentation
439
+ property :create_time, as: 'createTime'
440
+ property :state, as: 'state'
441
+ property :name, as: 'name'
442
+ property :destroy_event_time, as: 'destroyEventTime'
443
+ property :destroy_time, as: 'destroyTime'
444
+ end
445
+ end
446
+ end
447
+ end
448
+ end
@@ -0,0 +1,932 @@
1
+ # Copyright 2015 Google Inc.
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/core/base_service'
16
+ require 'google/apis/core/json_representation'
17
+ require 'google/apis/core/hashable'
18
+ require 'google/apis/errors'
19
+
20
+ module Google
21
+ module Apis
22
+ module CloudkmsV1beta1
23
+ # Google Cloud KMS API
24
+ #
25
+ #
26
+ #
27
+ # @example
28
+ # require 'google/apis/cloudkms_v1beta1'
29
+ #
30
+ # Cloudkms = Google::Apis::CloudkmsV1beta1 # Alias the module
31
+ # service = Cloudkms::CloudKMSService.new
32
+ #
33
+ # @see https://cloud.google.com/kms/
34
+ class CloudKMSService < Google::Apis::Core::BaseService
35
+ # @return [String]
36
+ # API key. Your API key identifies your project and provides you with API access,
37
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
38
+ attr_accessor :key
39
+
40
+ # @return [String]
41
+ # Available to use for quota purposes for server-side applications. Can be any
42
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
43
+ attr_accessor :quota_user
44
+
45
+ def initialize
46
+ super('https://cloudkms.googleapis.com/', '')
47
+ end
48
+
49
+ # Lists information about the supported locations for this service.
50
+ # @param [String] name
51
+ # The resource that owns the locations collection, if applicable.
52
+ # @param [String] filter
53
+ # The standard list filter.
54
+ # @param [String] page_token
55
+ # The standard list page token.
56
+ # @param [Fixnum] page_size
57
+ # The standard list page size.
58
+ # @param [String] fields
59
+ # Selector specifying which fields to include in a partial response.
60
+ # @param [String] quota_user
61
+ # Available to use for quota purposes for server-side applications. Can be any
62
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
63
+ # @param [Google::Apis::RequestOptions] options
64
+ # Request-specific options
65
+ #
66
+ # @yield [result, err] Result & error if block supplied
67
+ # @yieldparam result [Google::Apis::CloudkmsV1beta1::ListLocationsResponse] parsed result object
68
+ # @yieldparam err [StandardError] error object if request failed
69
+ #
70
+ # @return [Google::Apis::CloudkmsV1beta1::ListLocationsResponse]
71
+ #
72
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
73
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
74
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
75
+ def list_project_locations(name, filter: nil, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
76
+ command = make_simple_command(:get, 'v1beta1/{+name}/locations', options)
77
+ command.response_representation = Google::Apis::CloudkmsV1beta1::ListLocationsResponse::Representation
78
+ command.response_class = Google::Apis::CloudkmsV1beta1::ListLocationsResponse
79
+ command.params['name'] = name unless name.nil?
80
+ command.query['filter'] = filter unless filter.nil?
81
+ command.query['pageToken'] = page_token unless page_token.nil?
82
+ command.query['pageSize'] = page_size unless page_size.nil?
83
+ command.query['fields'] = fields unless fields.nil?
84
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
85
+ execute_or_queue_command(command, &block)
86
+ end
87
+
88
+ # Get information about a location.
89
+ # @param [String] name
90
+ # Resource name for the location.
91
+ # @param [String] fields
92
+ # Selector specifying which fields to include in a partial response.
93
+ # @param [String] quota_user
94
+ # Available to use for quota purposes for server-side applications. Can be any
95
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
96
+ # @param [Google::Apis::RequestOptions] options
97
+ # Request-specific options
98
+ #
99
+ # @yield [result, err] Result & error if block supplied
100
+ # @yieldparam result [Google::Apis::CloudkmsV1beta1::Location] parsed result object
101
+ # @yieldparam err [StandardError] error object if request failed
102
+ #
103
+ # @return [Google::Apis::CloudkmsV1beta1::Location]
104
+ #
105
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
106
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
107
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
108
+ def get_project_location(name, fields: nil, quota_user: nil, options: nil, &block)
109
+ command = make_simple_command(:get, 'v1beta1/{+name}', options)
110
+ command.response_representation = Google::Apis::CloudkmsV1beta1::Location::Representation
111
+ command.response_class = Google::Apis::CloudkmsV1beta1::Location
112
+ command.params['name'] = name unless name.nil?
113
+ command.query['fields'] = fields unless fields.nil?
114
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
115
+ execute_or_queue_command(command, &block)
116
+ end
117
+
118
+ # Lists KeyRings.
119
+ # @param [String] parent
120
+ # Required. The resource name of the location associated with the
121
+ # KeyRings, in the format `projects/*/locations/*`.
122
+ # @param [String] page_token
123
+ # Optional pagination token, returned earlier via
124
+ # ListKeyRingsResponse.next_page_token.
125
+ # @param [Fixnum] page_size
126
+ # Optional limit on the number of KeyRings to include in the
127
+ # response. Further KeyRings can subsequently be obtained by
128
+ # including the ListKeyRingsResponse.next_page_token in a subsequent
129
+ # request. If unspecified, the server will pick an appropriate default.
130
+ # @param [String] fields
131
+ # Selector specifying which fields to include in a partial response.
132
+ # @param [String] quota_user
133
+ # Available to use for quota purposes for server-side applications. Can be any
134
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
135
+ # @param [Google::Apis::RequestOptions] options
136
+ # Request-specific options
137
+ #
138
+ # @yield [result, err] Result & error if block supplied
139
+ # @yieldparam result [Google::Apis::CloudkmsV1beta1::ListKeyRingsResponse] parsed result object
140
+ # @yieldparam err [StandardError] error object if request failed
141
+ #
142
+ # @return [Google::Apis::CloudkmsV1beta1::ListKeyRingsResponse]
143
+ #
144
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
145
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
146
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
147
+ def list_project_location_key_rings(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
148
+ command = make_simple_command(:get, 'v1beta1/{+parent}/keyRings', options)
149
+ command.response_representation = Google::Apis::CloudkmsV1beta1::ListKeyRingsResponse::Representation
150
+ command.response_class = Google::Apis::CloudkmsV1beta1::ListKeyRingsResponse
151
+ command.params['parent'] = parent unless parent.nil?
152
+ command.query['pageToken'] = page_token unless page_token.nil?
153
+ command.query['pageSize'] = page_size unless page_size.nil?
154
+ command.query['fields'] = fields unless fields.nil?
155
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
156
+ execute_or_queue_command(command, &block)
157
+ end
158
+
159
+ # Sets the access control policy on the specified resource. Replaces any
160
+ # existing policy.
161
+ # @param [String] resource
162
+ # REQUIRED: The resource for which the policy is being specified.
163
+ # `resource` is usually specified as a path. For example, a Project
164
+ # resource is specified as `projects/`project``.
165
+ # @param [Google::Apis::CloudkmsV1beta1::SetIamPolicyRequest] set_iam_policy_request_object
166
+ # @param [String] fields
167
+ # Selector specifying which fields to include in a partial response.
168
+ # @param [String] quota_user
169
+ # Available to use for quota purposes for server-side applications. Can be any
170
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
171
+ # @param [Google::Apis::RequestOptions] options
172
+ # Request-specific options
173
+ #
174
+ # @yield [result, err] Result & error if block supplied
175
+ # @yieldparam result [Google::Apis::CloudkmsV1beta1::Policy] parsed result object
176
+ # @yieldparam err [StandardError] error object if request failed
177
+ #
178
+ # @return [Google::Apis::CloudkmsV1beta1::Policy]
179
+ #
180
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
181
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
182
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
183
+ def set_key_ring_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
184
+ command = make_simple_command(:post, 'v1beta1/{+resource}:setIamPolicy', options)
185
+ command.request_representation = Google::Apis::CloudkmsV1beta1::SetIamPolicyRequest::Representation
186
+ command.request_object = set_iam_policy_request_object
187
+ command.response_representation = Google::Apis::CloudkmsV1beta1::Policy::Representation
188
+ command.response_class = Google::Apis::CloudkmsV1beta1::Policy
189
+ command.params['resource'] = resource unless resource.nil?
190
+ command.query['fields'] = fields unless fields.nil?
191
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
192
+ execute_or_queue_command(command, &block)
193
+ end
194
+
195
+ # Create a new KeyRing in a given Project and Location.
196
+ # @param [String] parent
197
+ # Required. The resource name of the location associated with the
198
+ # KeyRings, in the format `projects/*/locations/*`.
199
+ # @param [Google::Apis::CloudkmsV1beta1::KeyRing] key_ring_object
200
+ # @param [String] key_ring_id
201
+ # Required. It must be unique within a location and match the regular
202
+ # expression `[a-zA-Z0-9_-]`1,63``
203
+ # @param [String] fields
204
+ # Selector specifying which fields to include in a partial response.
205
+ # @param [String] quota_user
206
+ # Available to use for quota purposes for server-side applications. Can be any
207
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
208
+ # @param [Google::Apis::RequestOptions] options
209
+ # Request-specific options
210
+ #
211
+ # @yield [result, err] Result & error if block supplied
212
+ # @yieldparam result [Google::Apis::CloudkmsV1beta1::KeyRing] parsed result object
213
+ # @yieldparam err [StandardError] error object if request failed
214
+ #
215
+ # @return [Google::Apis::CloudkmsV1beta1::KeyRing]
216
+ #
217
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
218
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
219
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
220
+ def create_project_location_key_ring(parent, key_ring_object = nil, key_ring_id: nil, fields: nil, quota_user: nil, options: nil, &block)
221
+ command = make_simple_command(:post, 'v1beta1/{+parent}/keyRings', options)
222
+ command.request_representation = Google::Apis::CloudkmsV1beta1::KeyRing::Representation
223
+ command.request_object = key_ring_object
224
+ command.response_representation = Google::Apis::CloudkmsV1beta1::KeyRing::Representation
225
+ command.response_class = Google::Apis::CloudkmsV1beta1::KeyRing
226
+ command.params['parent'] = parent unless parent.nil?
227
+ command.query['keyRingId'] = key_ring_id unless key_ring_id.nil?
228
+ command.query['fields'] = fields unless fields.nil?
229
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
230
+ execute_or_queue_command(command, &block)
231
+ end
232
+
233
+ # Gets the access control policy for a resource.
234
+ # Returns an empty policy if the resource exists and does not have a policy
235
+ # set.
236
+ # @param [String] resource
237
+ # REQUIRED: The resource for which the policy is being requested.
238
+ # `resource` is usually specified as a path. For example, a Project
239
+ # resource is specified as `projects/`project``.
240
+ # @param [String] fields
241
+ # Selector specifying which fields to include in a partial response.
242
+ # @param [String] quota_user
243
+ # Available to use for quota purposes for server-side applications. Can be any
244
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
245
+ # @param [Google::Apis::RequestOptions] options
246
+ # Request-specific options
247
+ #
248
+ # @yield [result, err] Result & error if block supplied
249
+ # @yieldparam result [Google::Apis::CloudkmsV1beta1::Policy] parsed result object
250
+ # @yieldparam err [StandardError] error object if request failed
251
+ #
252
+ # @return [Google::Apis::CloudkmsV1beta1::Policy]
253
+ #
254
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
255
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
256
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
257
+ def get_project_location_key_ring_iam_policy(resource, fields: nil, quota_user: nil, options: nil, &block)
258
+ command = make_simple_command(:get, 'v1beta1/{+resource}:getIamPolicy', options)
259
+ command.response_representation = Google::Apis::CloudkmsV1beta1::Policy::Representation
260
+ command.response_class = Google::Apis::CloudkmsV1beta1::Policy
261
+ command.params['resource'] = resource unless resource.nil?
262
+ command.query['fields'] = fields unless fields.nil?
263
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
264
+ execute_or_queue_command(command, &block)
265
+ end
266
+
267
+ # Returns metadata for a given KeyRing.
268
+ # @param [String] name
269
+ # The name of the KeyRing to get.
270
+ # @param [String] fields
271
+ # Selector specifying which fields to include in a partial response.
272
+ # @param [String] quota_user
273
+ # Available to use for quota purposes for server-side applications. Can be any
274
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
275
+ # @param [Google::Apis::RequestOptions] options
276
+ # Request-specific options
277
+ #
278
+ # @yield [result, err] Result & error if block supplied
279
+ # @yieldparam result [Google::Apis::CloudkmsV1beta1::KeyRing] parsed result object
280
+ # @yieldparam err [StandardError] error object if request failed
281
+ #
282
+ # @return [Google::Apis::CloudkmsV1beta1::KeyRing]
283
+ #
284
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
285
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
286
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
287
+ def get_project_location_key_ring(name, fields: nil, quota_user: nil, options: nil, &block)
288
+ command = make_simple_command(:get, 'v1beta1/{+name}', options)
289
+ command.response_representation = Google::Apis::CloudkmsV1beta1::KeyRing::Representation
290
+ command.response_class = Google::Apis::CloudkmsV1beta1::KeyRing
291
+ command.params['name'] = name unless name.nil?
292
+ command.query['fields'] = fields unless fields.nil?
293
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
294
+ execute_or_queue_command(command, &block)
295
+ end
296
+
297
+ # Returns permissions that a caller has on the specified resource.
298
+ # If the resource does not exist, this will return an empty set of
299
+ # permissions, not a NOT_FOUND error.
300
+ # @param [String] resource
301
+ # REQUIRED: The resource for which the policy detail is being requested.
302
+ # `resource` is usually specified as a path. For example, a Project
303
+ # resource is specified as `projects/`project``.
304
+ # @param [Google::Apis::CloudkmsV1beta1::TestIamPermissionsRequest] test_iam_permissions_request_object
305
+ # @param [String] fields
306
+ # Selector specifying which fields to include in a partial response.
307
+ # @param [String] quota_user
308
+ # Available to use for quota purposes for server-side applications. Can be any
309
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
310
+ # @param [Google::Apis::RequestOptions] options
311
+ # Request-specific options
312
+ #
313
+ # @yield [result, err] Result & error if block supplied
314
+ # @yieldparam result [Google::Apis::CloudkmsV1beta1::TestIamPermissionsResponse] parsed result object
315
+ # @yieldparam err [StandardError] error object if request failed
316
+ #
317
+ # @return [Google::Apis::CloudkmsV1beta1::TestIamPermissionsResponse]
318
+ #
319
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
320
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
321
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
322
+ def test_key_ring_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
323
+ command = make_simple_command(:post, 'v1beta1/{+resource}:testIamPermissions', options)
324
+ command.request_representation = Google::Apis::CloudkmsV1beta1::TestIamPermissionsRequest::Representation
325
+ command.request_object = test_iam_permissions_request_object
326
+ command.response_representation = Google::Apis::CloudkmsV1beta1::TestIamPermissionsResponse::Representation
327
+ command.response_class = Google::Apis::CloudkmsV1beta1::TestIamPermissionsResponse
328
+ command.params['resource'] = resource unless resource.nil?
329
+ command.query['fields'] = fields unless fields.nil?
330
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
331
+ execute_or_queue_command(command, &block)
332
+ end
333
+
334
+ # Gets the access control policy for a resource.
335
+ # Returns an empty policy if the resource exists and does not have a policy
336
+ # set.
337
+ # @param [String] resource
338
+ # REQUIRED: The resource for which the policy is being requested.
339
+ # `resource` is usually specified as a path. For example, a Project
340
+ # resource is specified as `projects/`project``.
341
+ # @param [String] fields
342
+ # Selector specifying which fields to include in a partial response.
343
+ # @param [String] quota_user
344
+ # Available to use for quota purposes for server-side applications. Can be any
345
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
346
+ # @param [Google::Apis::RequestOptions] options
347
+ # Request-specific options
348
+ #
349
+ # @yield [result, err] Result & error if block supplied
350
+ # @yieldparam result [Google::Apis::CloudkmsV1beta1::Policy] parsed result object
351
+ # @yieldparam err [StandardError] error object if request failed
352
+ #
353
+ # @return [Google::Apis::CloudkmsV1beta1::Policy]
354
+ #
355
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
356
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
357
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
358
+ def get_project_location_key_ring_crypto_key_iam_policy(resource, fields: nil, quota_user: nil, options: nil, &block)
359
+ command = make_simple_command(:get, 'v1beta1/{+resource}:getIamPolicy', options)
360
+ command.response_representation = Google::Apis::CloudkmsV1beta1::Policy::Representation
361
+ command.response_class = Google::Apis::CloudkmsV1beta1::Policy
362
+ command.params['resource'] = resource unless resource.nil?
363
+ command.query['fields'] = fields unless fields.nil?
364
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
365
+ execute_or_queue_command(command, &block)
366
+ end
367
+
368
+ # Returns metadata for a given CryptoKey, as well as its
369
+ # primary CryptoKeyVersion.
370
+ # @param [String] name
371
+ # The name of the CryptoKey to get.
372
+ # @param [String] fields
373
+ # Selector specifying which fields to include in a partial response.
374
+ # @param [String] quota_user
375
+ # Available to use for quota purposes for server-side applications. Can be any
376
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
377
+ # @param [Google::Apis::RequestOptions] options
378
+ # Request-specific options
379
+ #
380
+ # @yield [result, err] Result & error if block supplied
381
+ # @yieldparam result [Google::Apis::CloudkmsV1beta1::CryptoKey] parsed result object
382
+ # @yieldparam err [StandardError] error object if request failed
383
+ #
384
+ # @return [Google::Apis::CloudkmsV1beta1::CryptoKey]
385
+ #
386
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
387
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
388
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
389
+ def get_project_location_key_ring_crypto_key(name, fields: nil, quota_user: nil, options: nil, &block)
390
+ command = make_simple_command(:get, 'v1beta1/{+name}', options)
391
+ command.response_representation = Google::Apis::CloudkmsV1beta1::CryptoKey::Representation
392
+ command.response_class = Google::Apis::CloudkmsV1beta1::CryptoKey
393
+ command.params['name'] = name unless name.nil?
394
+ command.query['fields'] = fields unless fields.nil?
395
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
396
+ execute_or_queue_command(command, &block)
397
+ end
398
+
399
+ # Update a CryptoKey.
400
+ # @param [String] name
401
+ # Output only. The resource name for this CryptoKey in the format
402
+ # `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
403
+ # @param [Google::Apis::CloudkmsV1beta1::CryptoKey] crypto_key_object
404
+ # @param [String] update_mask
405
+ # Required list of fields to be updated in this request.
406
+ # @param [String] fields
407
+ # Selector specifying which fields to include in a partial response.
408
+ # @param [String] quota_user
409
+ # Available to use for quota purposes for server-side applications. Can be any
410
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
411
+ # @param [Google::Apis::RequestOptions] options
412
+ # Request-specific options
413
+ #
414
+ # @yield [result, err] Result & error if block supplied
415
+ # @yieldparam result [Google::Apis::CloudkmsV1beta1::CryptoKey] parsed result object
416
+ # @yieldparam err [StandardError] error object if request failed
417
+ #
418
+ # @return [Google::Apis::CloudkmsV1beta1::CryptoKey]
419
+ #
420
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
421
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
422
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
423
+ def patch_project_location_key_ring_crypto_key(name, crypto_key_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
424
+ command = make_simple_command(:patch, 'v1beta1/{+name}', options)
425
+ command.request_representation = Google::Apis::CloudkmsV1beta1::CryptoKey::Representation
426
+ command.request_object = crypto_key_object
427
+ command.response_representation = Google::Apis::CloudkmsV1beta1::CryptoKey::Representation
428
+ command.response_class = Google::Apis::CloudkmsV1beta1::CryptoKey
429
+ command.params['name'] = name unless name.nil?
430
+ command.query['updateMask'] = update_mask unless update_mask.nil?
431
+ command.query['fields'] = fields unless fields.nil?
432
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
433
+ execute_or_queue_command(command, &block)
434
+ end
435
+
436
+ # Returns permissions that a caller has on the specified resource.
437
+ # If the resource does not exist, this will return an empty set of
438
+ # permissions, not a NOT_FOUND error.
439
+ # @param [String] resource
440
+ # REQUIRED: The resource for which the policy detail is being requested.
441
+ # `resource` is usually specified as a path. For example, a Project
442
+ # resource is specified as `projects/`project``.
443
+ # @param [Google::Apis::CloudkmsV1beta1::TestIamPermissionsRequest] test_iam_permissions_request_object
444
+ # @param [String] fields
445
+ # Selector specifying which fields to include in a partial response.
446
+ # @param [String] quota_user
447
+ # Available to use for quota purposes for server-side applications. Can be any
448
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
449
+ # @param [Google::Apis::RequestOptions] options
450
+ # Request-specific options
451
+ #
452
+ # @yield [result, err] Result & error if block supplied
453
+ # @yieldparam result [Google::Apis::CloudkmsV1beta1::TestIamPermissionsResponse] parsed result object
454
+ # @yieldparam err [StandardError] error object if request failed
455
+ #
456
+ # @return [Google::Apis::CloudkmsV1beta1::TestIamPermissionsResponse]
457
+ #
458
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
459
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
460
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
461
+ def test_crypto_key_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
462
+ command = make_simple_command(:post, 'v1beta1/{+resource}:testIamPermissions', options)
463
+ command.request_representation = Google::Apis::CloudkmsV1beta1::TestIamPermissionsRequest::Representation
464
+ command.request_object = test_iam_permissions_request_object
465
+ command.response_representation = Google::Apis::CloudkmsV1beta1::TestIamPermissionsResponse::Representation
466
+ command.response_class = Google::Apis::CloudkmsV1beta1::TestIamPermissionsResponse
467
+ command.params['resource'] = resource unless resource.nil?
468
+ command.query['fields'] = fields unless fields.nil?
469
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
470
+ execute_or_queue_command(command, &block)
471
+ end
472
+
473
+ # Decrypt data that was protected by Encrypt.
474
+ # @param [String] name
475
+ # Required. The resource name of the CryptoKey to use for decryption.
476
+ # The server will choose the appropriate version.
477
+ # @param [Google::Apis::CloudkmsV1beta1::DecryptRequest] decrypt_request_object
478
+ # @param [String] fields
479
+ # Selector specifying which fields to include in a partial response.
480
+ # @param [String] quota_user
481
+ # Available to use for quota purposes for server-side applications. Can be any
482
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
483
+ # @param [Google::Apis::RequestOptions] options
484
+ # Request-specific options
485
+ #
486
+ # @yield [result, err] Result & error if block supplied
487
+ # @yieldparam result [Google::Apis::CloudkmsV1beta1::DecryptResponse] parsed result object
488
+ # @yieldparam err [StandardError] error object if request failed
489
+ #
490
+ # @return [Google::Apis::CloudkmsV1beta1::DecryptResponse]
491
+ #
492
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
493
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
494
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
495
+ def decrypt_crypto_key(name, decrypt_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
496
+ command = make_simple_command(:post, 'v1beta1/{+name}:decrypt', options)
497
+ command.request_representation = Google::Apis::CloudkmsV1beta1::DecryptRequest::Representation
498
+ command.request_object = decrypt_request_object
499
+ command.response_representation = Google::Apis::CloudkmsV1beta1::DecryptResponse::Representation
500
+ command.response_class = Google::Apis::CloudkmsV1beta1::DecryptResponse
501
+ command.params['name'] = name unless name.nil?
502
+ command.query['fields'] = fields unless fields.nil?
503
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
504
+ execute_or_queue_command(command, &block)
505
+ end
506
+
507
+ # Lists CryptoKeys.
508
+ # @param [String] parent
509
+ # Required. The resource name of the KeyRing to list, in the format
510
+ # `projects/*/locations/*/keyRings/*`.
511
+ # @param [String] page_token
512
+ # Optional pagination token, returned earlier via
513
+ # ListCryptoKeysResponse.next_page_token.
514
+ # @param [Fixnum] page_size
515
+ # Optional limit on the number of CryptoKeys to include in the
516
+ # response. Further CryptoKeys can subsequently be obtained by
517
+ # including the ListCryptoKeysResponse.next_page_token in a subsequent
518
+ # request. If unspecified, the server will pick an appropriate default.
519
+ # @param [String] fields
520
+ # Selector specifying which fields to include in a partial response.
521
+ # @param [String] quota_user
522
+ # Available to use for quota purposes for server-side applications. Can be any
523
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
524
+ # @param [Google::Apis::RequestOptions] options
525
+ # Request-specific options
526
+ #
527
+ # @yield [result, err] Result & error if block supplied
528
+ # @yieldparam result [Google::Apis::CloudkmsV1beta1::ListCryptoKeysResponse] parsed result object
529
+ # @yieldparam err [StandardError] error object if request failed
530
+ #
531
+ # @return [Google::Apis::CloudkmsV1beta1::ListCryptoKeysResponse]
532
+ #
533
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
534
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
535
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
536
+ def list_project_location_key_ring_crypto_keys(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
537
+ command = make_simple_command(:get, 'v1beta1/{+parent}/cryptoKeys', options)
538
+ command.response_representation = Google::Apis::CloudkmsV1beta1::ListCryptoKeysResponse::Representation
539
+ command.response_class = Google::Apis::CloudkmsV1beta1::ListCryptoKeysResponse
540
+ command.params['parent'] = parent unless parent.nil?
541
+ command.query['pageToken'] = page_token unless page_token.nil?
542
+ command.query['pageSize'] = page_size unless page_size.nil?
543
+ command.query['fields'] = fields unless fields.nil?
544
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
545
+ execute_or_queue_command(command, &block)
546
+ end
547
+
548
+ # Encrypt data, so that it can only be recovered by a call to Decrypt.
549
+ # @param [String] name
550
+ # Required. The resource name of the CryptoKey or CryptoKeyVersion
551
+ # to use for encryption.
552
+ # If a CryptoKey is specified, the server will use its
553
+ # primary version.
554
+ # @param [Google::Apis::CloudkmsV1beta1::EncryptRequest] encrypt_request_object
555
+ # @param [String] fields
556
+ # Selector specifying which fields to include in a partial response.
557
+ # @param [String] quota_user
558
+ # Available to use for quota purposes for server-side applications. Can be any
559
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
560
+ # @param [Google::Apis::RequestOptions] options
561
+ # Request-specific options
562
+ #
563
+ # @yield [result, err] Result & error if block supplied
564
+ # @yieldparam result [Google::Apis::CloudkmsV1beta1::EncryptResponse] parsed result object
565
+ # @yieldparam err [StandardError] error object if request failed
566
+ #
567
+ # @return [Google::Apis::CloudkmsV1beta1::EncryptResponse]
568
+ #
569
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
570
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
571
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
572
+ def encrypt_crypto_key(name, encrypt_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
573
+ command = make_simple_command(:post, 'v1beta1/{+name}:encrypt', options)
574
+ command.request_representation = Google::Apis::CloudkmsV1beta1::EncryptRequest::Representation
575
+ command.request_object = encrypt_request_object
576
+ command.response_representation = Google::Apis::CloudkmsV1beta1::EncryptResponse::Representation
577
+ command.response_class = Google::Apis::CloudkmsV1beta1::EncryptResponse
578
+ command.params['name'] = name unless name.nil?
579
+ command.query['fields'] = fields unless fields.nil?
580
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
581
+ execute_or_queue_command(command, &block)
582
+ end
583
+
584
+ # Create a new CryptoKey within a KeyRing.
585
+ # CryptoKey.purpose is required.
586
+ # @param [String] parent
587
+ # Required. The name of the KeyRing associated with the
588
+ # CryptoKeys.
589
+ # @param [Google::Apis::CloudkmsV1beta1::CryptoKey] crypto_key_object
590
+ # @param [String] crypto_key_id
591
+ # Required. It must be unique within a KeyRing and match the regular
592
+ # expression `[a-zA-Z0-9_-]`1,63``
593
+ # @param [String] fields
594
+ # Selector specifying which fields to include in a partial response.
595
+ # @param [String] quota_user
596
+ # Available to use for quota purposes for server-side applications. Can be any
597
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
598
+ # @param [Google::Apis::RequestOptions] options
599
+ # Request-specific options
600
+ #
601
+ # @yield [result, err] Result & error if block supplied
602
+ # @yieldparam result [Google::Apis::CloudkmsV1beta1::CryptoKey] parsed result object
603
+ # @yieldparam err [StandardError] error object if request failed
604
+ #
605
+ # @return [Google::Apis::CloudkmsV1beta1::CryptoKey]
606
+ #
607
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
608
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
609
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
610
+ def create_project_location_key_ring_crypto_key(parent, crypto_key_object = nil, crypto_key_id: nil, fields: nil, quota_user: nil, options: nil, &block)
611
+ command = make_simple_command(:post, 'v1beta1/{+parent}/cryptoKeys', options)
612
+ command.request_representation = Google::Apis::CloudkmsV1beta1::CryptoKey::Representation
613
+ command.request_object = crypto_key_object
614
+ command.response_representation = Google::Apis::CloudkmsV1beta1::CryptoKey::Representation
615
+ command.response_class = Google::Apis::CloudkmsV1beta1::CryptoKey
616
+ command.params['parent'] = parent unless parent.nil?
617
+ command.query['cryptoKeyId'] = crypto_key_id unless crypto_key_id.nil?
618
+ command.query['fields'] = fields unless fields.nil?
619
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
620
+ execute_or_queue_command(command, &block)
621
+ end
622
+
623
+ # Sets the access control policy on the specified resource. Replaces any
624
+ # existing policy.
625
+ # @param [String] resource
626
+ # REQUIRED: The resource for which the policy is being specified.
627
+ # `resource` is usually specified as a path. For example, a Project
628
+ # resource is specified as `projects/`project``.
629
+ # @param [Google::Apis::CloudkmsV1beta1::SetIamPolicyRequest] set_iam_policy_request_object
630
+ # @param [String] fields
631
+ # Selector specifying which fields to include in a partial response.
632
+ # @param [String] quota_user
633
+ # Available to use for quota purposes for server-side applications. Can be any
634
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
635
+ # @param [Google::Apis::RequestOptions] options
636
+ # Request-specific options
637
+ #
638
+ # @yield [result, err] Result & error if block supplied
639
+ # @yieldparam result [Google::Apis::CloudkmsV1beta1::Policy] parsed result object
640
+ # @yieldparam err [StandardError] error object if request failed
641
+ #
642
+ # @return [Google::Apis::CloudkmsV1beta1::Policy]
643
+ #
644
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
645
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
646
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
647
+ def set_crypto_key_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
648
+ command = make_simple_command(:post, 'v1beta1/{+resource}:setIamPolicy', options)
649
+ command.request_representation = Google::Apis::CloudkmsV1beta1::SetIamPolicyRequest::Representation
650
+ command.request_object = set_iam_policy_request_object
651
+ command.response_representation = Google::Apis::CloudkmsV1beta1::Policy::Representation
652
+ command.response_class = Google::Apis::CloudkmsV1beta1::Policy
653
+ command.params['resource'] = resource unless resource.nil?
654
+ command.query['fields'] = fields unless fields.nil?
655
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
656
+ execute_or_queue_command(command, &block)
657
+ end
658
+
659
+ # Update the version of a CryptoKey that will be used in Encrypt
660
+ # @param [String] name
661
+ # The resource name of the CryptoKey to update.
662
+ # @param [Google::Apis::CloudkmsV1beta1::UpdateCryptoKeyPrimaryVersionRequest] update_crypto_key_primary_version_request_object
663
+ # @param [String] fields
664
+ # Selector specifying which fields to include in a partial response.
665
+ # @param [String] quota_user
666
+ # Available to use for quota purposes for server-side applications. Can be any
667
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
668
+ # @param [Google::Apis::RequestOptions] options
669
+ # Request-specific options
670
+ #
671
+ # @yield [result, err] Result & error if block supplied
672
+ # @yieldparam result [Google::Apis::CloudkmsV1beta1::CryptoKey] parsed result object
673
+ # @yieldparam err [StandardError] error object if request failed
674
+ #
675
+ # @return [Google::Apis::CloudkmsV1beta1::CryptoKey]
676
+ #
677
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
678
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
679
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
680
+ def update_project_location_key_ring_crypto_key_primary_version(name, update_crypto_key_primary_version_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
681
+ command = make_simple_command(:post, 'v1beta1/{+name}:updatePrimaryVersion', options)
682
+ command.request_representation = Google::Apis::CloudkmsV1beta1::UpdateCryptoKeyPrimaryVersionRequest::Representation
683
+ command.request_object = update_crypto_key_primary_version_request_object
684
+ command.response_representation = Google::Apis::CloudkmsV1beta1::CryptoKey::Representation
685
+ command.response_class = Google::Apis::CloudkmsV1beta1::CryptoKey
686
+ command.params['name'] = name unless name.nil?
687
+ command.query['fields'] = fields unless fields.nil?
688
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
689
+ execute_or_queue_command(command, &block)
690
+ end
691
+
692
+ # Lists CryptoKeyVersions.
693
+ # @param [String] parent
694
+ # Required. The resource name of the CryptoKey to list, in the format
695
+ # `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
696
+ # @param [String] page_token
697
+ # Optional pagination token, returned earlier via
698
+ # ListCryptoKeyVersionsResponse.next_page_token.
699
+ # @param [Fixnum] page_size
700
+ # Optional limit on the number of CryptoKeyVersions to
701
+ # include in the response. Further CryptoKeyVersions can
702
+ # subsequently be obtained by including the
703
+ # ListCryptoKeyVersionsResponse.next_page_token in a subsequent request.
704
+ # If unspecified, the server will pick an appropriate default.
705
+ # @param [String] fields
706
+ # Selector specifying which fields to include in a partial response.
707
+ # @param [String] quota_user
708
+ # Available to use for quota purposes for server-side applications. Can be any
709
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
710
+ # @param [Google::Apis::RequestOptions] options
711
+ # Request-specific options
712
+ #
713
+ # @yield [result, err] Result & error if block supplied
714
+ # @yieldparam result [Google::Apis::CloudkmsV1beta1::ListCryptoKeyVersionsResponse] parsed result object
715
+ # @yieldparam err [StandardError] error object if request failed
716
+ #
717
+ # @return [Google::Apis::CloudkmsV1beta1::ListCryptoKeyVersionsResponse]
718
+ #
719
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
720
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
721
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
722
+ def list_project_location_key_ring_crypto_key_crypto_key_versions(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
723
+ command = make_simple_command(:get, 'v1beta1/{+parent}/cryptoKeyVersions', options)
724
+ command.response_representation = Google::Apis::CloudkmsV1beta1::ListCryptoKeyVersionsResponse::Representation
725
+ command.response_class = Google::Apis::CloudkmsV1beta1::ListCryptoKeyVersionsResponse
726
+ command.params['parent'] = parent unless parent.nil?
727
+ command.query['pageToken'] = page_token unless page_token.nil?
728
+ command.query['pageSize'] = page_size unless page_size.nil?
729
+ command.query['fields'] = fields unless fields.nil?
730
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
731
+ execute_or_queue_command(command, &block)
732
+ end
733
+
734
+ # Create a new CryptoKeyVersion in a CryptoKey.
735
+ # The server will assign the next sequential id. If unset,
736
+ # state will be set to
737
+ # ENABLED.
738
+ # @param [String] parent
739
+ # Required. The name of the CryptoKey associated with
740
+ # the CryptoKeyVersions.
741
+ # @param [Google::Apis::CloudkmsV1beta1::CryptoKeyVersion] crypto_key_version_object
742
+ # @param [String] fields
743
+ # Selector specifying which fields to include in a partial response.
744
+ # @param [String] quota_user
745
+ # Available to use for quota purposes for server-side applications. Can be any
746
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
747
+ # @param [Google::Apis::RequestOptions] options
748
+ # Request-specific options
749
+ #
750
+ # @yield [result, err] Result & error if block supplied
751
+ # @yieldparam result [Google::Apis::CloudkmsV1beta1::CryptoKeyVersion] parsed result object
752
+ # @yieldparam err [StandardError] error object if request failed
753
+ #
754
+ # @return [Google::Apis::CloudkmsV1beta1::CryptoKeyVersion]
755
+ #
756
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
757
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
758
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
759
+ def create_project_location_key_ring_crypto_key_crypto_key_version(parent, crypto_key_version_object = nil, fields: nil, quota_user: nil, options: nil, &block)
760
+ command = make_simple_command(:post, 'v1beta1/{+parent}/cryptoKeyVersions', options)
761
+ command.request_representation = Google::Apis::CloudkmsV1beta1::CryptoKeyVersion::Representation
762
+ command.request_object = crypto_key_version_object
763
+ command.response_representation = Google::Apis::CloudkmsV1beta1::CryptoKeyVersion::Representation
764
+ command.response_class = Google::Apis::CloudkmsV1beta1::CryptoKeyVersion
765
+ command.params['parent'] = parent unless parent.nil?
766
+ command.query['fields'] = fields unless fields.nil?
767
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
768
+ execute_or_queue_command(command, &block)
769
+ end
770
+
771
+ # Schedule a CryptoKeyVersion for destruction.
772
+ # Upon calling this method, CryptoKeyVersion.state will be set to
773
+ # DESTROY_SCHEDULED
774
+ # and destroy_time will be set to a time 24
775
+ # hours in the future, at which point the state
776
+ # will be changed to
777
+ # DESTROYED, and the key
778
+ # material will be irrevocably destroyed.
779
+ # Before the destroy_time is reached,
780
+ # RestoreCryptoKeyVersion may be called to reverse the process.
781
+ # @param [String] name
782
+ # The resource name of the CryptoKeyVersion to destroy.
783
+ # @param [Google::Apis::CloudkmsV1beta1::DestroyCryptoKeyVersionRequest] destroy_crypto_key_version_request_object
784
+ # @param [String] fields
785
+ # Selector specifying which fields to include in a partial response.
786
+ # @param [String] quota_user
787
+ # Available to use for quota purposes for server-side applications. Can be any
788
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
789
+ # @param [Google::Apis::RequestOptions] options
790
+ # Request-specific options
791
+ #
792
+ # @yield [result, err] Result & error if block supplied
793
+ # @yieldparam result [Google::Apis::CloudkmsV1beta1::CryptoKeyVersion] parsed result object
794
+ # @yieldparam err [StandardError] error object if request failed
795
+ #
796
+ # @return [Google::Apis::CloudkmsV1beta1::CryptoKeyVersion]
797
+ #
798
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
799
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
800
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
801
+ def destroy_crypto_key_version(name, destroy_crypto_key_version_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
802
+ command = make_simple_command(:post, 'v1beta1/{+name}:destroy', options)
803
+ command.request_representation = Google::Apis::CloudkmsV1beta1::DestroyCryptoKeyVersionRequest::Representation
804
+ command.request_object = destroy_crypto_key_version_request_object
805
+ command.response_representation = Google::Apis::CloudkmsV1beta1::CryptoKeyVersion::Representation
806
+ command.response_class = Google::Apis::CloudkmsV1beta1::CryptoKeyVersion
807
+ command.params['name'] = name unless name.nil?
808
+ command.query['fields'] = fields unless fields.nil?
809
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
810
+ execute_or_queue_command(command, &block)
811
+ end
812
+
813
+ # Restore a CryptoKeyVersion in the
814
+ # DESTROY_SCHEDULED,
815
+ # state.
816
+ # Upon restoration of the CryptoKeyVersion, state
817
+ # will be set to DISABLED,
818
+ # and destroy_time will be cleared.
819
+ # @param [String] name
820
+ # The resource name of the CryptoKeyVersion to restore.
821
+ # @param [Google::Apis::CloudkmsV1beta1::RestoreCryptoKeyVersionRequest] restore_crypto_key_version_request_object
822
+ # @param [String] fields
823
+ # Selector specifying which fields to include in a partial response.
824
+ # @param [String] quota_user
825
+ # Available to use for quota purposes for server-side applications. Can be any
826
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
827
+ # @param [Google::Apis::RequestOptions] options
828
+ # Request-specific options
829
+ #
830
+ # @yield [result, err] Result & error if block supplied
831
+ # @yieldparam result [Google::Apis::CloudkmsV1beta1::CryptoKeyVersion] parsed result object
832
+ # @yieldparam err [StandardError] error object if request failed
833
+ #
834
+ # @return [Google::Apis::CloudkmsV1beta1::CryptoKeyVersion]
835
+ #
836
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
837
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
838
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
839
+ def restore_crypto_key_version(name, restore_crypto_key_version_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
840
+ command = make_simple_command(:post, 'v1beta1/{+name}:restore', options)
841
+ command.request_representation = Google::Apis::CloudkmsV1beta1::RestoreCryptoKeyVersionRequest::Representation
842
+ command.request_object = restore_crypto_key_version_request_object
843
+ command.response_representation = Google::Apis::CloudkmsV1beta1::CryptoKeyVersion::Representation
844
+ command.response_class = Google::Apis::CloudkmsV1beta1::CryptoKeyVersion
845
+ command.params['name'] = name unless name.nil?
846
+ command.query['fields'] = fields unless fields.nil?
847
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
848
+ execute_or_queue_command(command, &block)
849
+ end
850
+
851
+ # Update a CryptoKeyVersion's metadata.
852
+ # state may be changed between
853
+ # ENABLED and
854
+ # DISABLED using this
855
+ # method. See DestroyCryptoKeyVersion and RestoreCryptoKeyVersion to
856
+ # move between other states.
857
+ # @param [String] name
858
+ # Output only. The resource name for this CryptoKeyVersion in the format
859
+ # `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`.
860
+ # @param [Google::Apis::CloudkmsV1beta1::CryptoKeyVersion] crypto_key_version_object
861
+ # @param [String] update_mask
862
+ # Required list of fields to be updated in this request.
863
+ # @param [String] fields
864
+ # Selector specifying which fields to include in a partial response.
865
+ # @param [String] quota_user
866
+ # Available to use for quota purposes for server-side applications. Can be any
867
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
868
+ # @param [Google::Apis::RequestOptions] options
869
+ # Request-specific options
870
+ #
871
+ # @yield [result, err] Result & error if block supplied
872
+ # @yieldparam result [Google::Apis::CloudkmsV1beta1::CryptoKeyVersion] parsed result object
873
+ # @yieldparam err [StandardError] error object if request failed
874
+ #
875
+ # @return [Google::Apis::CloudkmsV1beta1::CryptoKeyVersion]
876
+ #
877
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
878
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
879
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
880
+ def patch_project_location_key_ring_crypto_key_crypto_key_version(name, crypto_key_version_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
881
+ command = make_simple_command(:patch, 'v1beta1/{+name}', options)
882
+ command.request_representation = Google::Apis::CloudkmsV1beta1::CryptoKeyVersion::Representation
883
+ command.request_object = crypto_key_version_object
884
+ command.response_representation = Google::Apis::CloudkmsV1beta1::CryptoKeyVersion::Representation
885
+ command.response_class = Google::Apis::CloudkmsV1beta1::CryptoKeyVersion
886
+ command.params['name'] = name unless name.nil?
887
+ command.query['updateMask'] = update_mask unless update_mask.nil?
888
+ command.query['fields'] = fields unless fields.nil?
889
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
890
+ execute_or_queue_command(command, &block)
891
+ end
892
+
893
+ # Returns metadata for a given CryptoKeyVersion.
894
+ # @param [String] name
895
+ # The name of the CryptoKeyVersion to get.
896
+ # @param [String] fields
897
+ # Selector specifying which fields to include in a partial response.
898
+ # @param [String] quota_user
899
+ # Available to use for quota purposes for server-side applications. Can be any
900
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
901
+ # @param [Google::Apis::RequestOptions] options
902
+ # Request-specific options
903
+ #
904
+ # @yield [result, err] Result & error if block supplied
905
+ # @yieldparam result [Google::Apis::CloudkmsV1beta1::CryptoKeyVersion] parsed result object
906
+ # @yieldparam err [StandardError] error object if request failed
907
+ #
908
+ # @return [Google::Apis::CloudkmsV1beta1::CryptoKeyVersion]
909
+ #
910
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
911
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
912
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
913
+ def get_project_location_key_ring_crypto_key_crypto_key_version(name, fields: nil, quota_user: nil, options: nil, &block)
914
+ command = make_simple_command(:get, 'v1beta1/{+name}', options)
915
+ command.response_representation = Google::Apis::CloudkmsV1beta1::CryptoKeyVersion::Representation
916
+ command.response_class = Google::Apis::CloudkmsV1beta1::CryptoKeyVersion
917
+ command.params['name'] = name unless name.nil?
918
+ command.query['fields'] = fields unless fields.nil?
919
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
920
+ execute_or_queue_command(command, &block)
921
+ end
922
+
923
+ protected
924
+
925
+ def apply_command_defaults(command)
926
+ command.query['key'] = key unless key.nil?
927
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
928
+ end
929
+ end
930
+ end
931
+ end
932
+ end