google-api-client 0.37.0 → 0.37.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (133) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +76 -0
  3. data/generated/google/apis/accesscontextmanager_v1.rb +1 -1
  4. data/generated/google/apis/accesscontextmanager_v1/classes.rb +236 -22
  5. data/generated/google/apis/accesscontextmanager_v1/representations.rb +104 -0
  6. data/generated/google/apis/accesscontextmanager_v1/service.rb +135 -0
  7. data/generated/google/apis/accesscontextmanager_v1beta.rb +1 -1
  8. data/generated/google/apis/accesscontextmanager_v1beta/classes.rb +24 -22
  9. data/generated/google/apis/adexchangebuyer2_v2beta1.rb +1 -1
  10. data/generated/google/apis/alertcenter_v1beta1.rb +1 -1
  11. data/generated/google/apis/alertcenter_v1beta1/classes.rb +64 -0
  12. data/generated/google/apis/alertcenter_v1beta1/representations.rb +31 -0
  13. data/generated/google/apis/billingbudgets_v1beta1.rb +1 -1
  14. data/generated/google/apis/chat_v1.rb +1 -1
  15. data/generated/google/apis/chat_v1/classes.rb +10 -1
  16. data/generated/google/apis/chat_v1/representations.rb +1 -0
  17. data/generated/google/apis/classroom_v1.rb +1 -1
  18. data/generated/google/apis/cloudasset_v1.rb +1 -1
  19. data/generated/google/apis/cloudasset_v1/classes.rb +98 -34
  20. data/generated/google/apis/cloudasset_v1/representations.rb +19 -0
  21. data/generated/google/apis/cloudasset_v1beta1.rb +1 -1
  22. data/generated/google/apis/cloudbuild_v1.rb +1 -1
  23. data/generated/google/apis/cloudbuild_v1alpha1.rb +1 -1
  24. data/generated/google/apis/cloudbuild_v1alpha2.rb +1 -1
  25. data/generated/google/apis/cloudidentity_v1.rb +1 -1
  26. data/generated/google/apis/cloudidentity_v1/classes.rb +152 -151
  27. data/generated/google/apis/cloudidentity_v1/representations.rb +72 -72
  28. data/generated/google/apis/cloudidentity_v1beta1.rb +1 -1
  29. data/generated/google/apis/cloudidentity_v1beta1/classes.rb +0 -560
  30. data/generated/google/apis/cloudidentity_v1beta1/representations.rb +0 -226
  31. data/generated/google/apis/cloudtasks_v2.rb +1 -1
  32. data/generated/google/apis/cloudtasks_v2beta3.rb +1 -1
  33. data/generated/google/apis/cloudtrace_v2beta1.rb +44 -0
  34. data/generated/google/apis/cloudtrace_v2beta1/classes.rb +144 -0
  35. data/generated/google/apis/cloudtrace_v2beta1/representations.rb +82 -0
  36. data/generated/google/apis/cloudtrace_v2beta1/service.rb +258 -0
  37. data/generated/google/apis/compute_alpha.rb +1 -1
  38. data/generated/google/apis/compute_alpha/classes.rb +190 -46
  39. data/generated/google/apis/compute_alpha/representations.rb +35 -14
  40. data/generated/google/apis/compute_alpha/service.rb +40 -56
  41. data/generated/google/apis/compute_beta.rb +1 -1
  42. data/generated/google/apis/compute_beta/classes.rb +98 -24
  43. data/generated/google/apis/compute_beta/representations.rb +2 -0
  44. data/generated/google/apis/compute_beta/service.rb +1 -2
  45. data/generated/google/apis/compute_v1.rb +1 -1
  46. data/generated/google/apis/compute_v1/classes.rb +123 -19
  47. data/generated/google/apis/compute_v1/representations.rb +19 -0
  48. data/generated/google/apis/container_v1.rb +1 -1
  49. data/generated/google/apis/container_v1/classes.rb +2 -2
  50. data/generated/google/apis/container_v1beta1.rb +1 -1
  51. data/generated/google/apis/container_v1beta1/classes.rb +2 -2
  52. data/generated/google/apis/datacatalog_v1beta1.rb +1 -1
  53. data/generated/google/apis/datacatalog_v1beta1/classes.rb +4 -3
  54. data/generated/google/apis/datacatalog_v1beta1/service.rb +190 -17
  55. data/generated/google/apis/dataflow_v1b3.rb +1 -1
  56. data/generated/google/apis/dataflow_v1b3/classes.rb +40 -0
  57. data/generated/google/apis/dataflow_v1b3/representations.rb +16 -0
  58. data/generated/google/apis/dataproc_v1.rb +1 -1
  59. data/generated/google/apis/dataproc_v1/classes.rb +67 -0
  60. data/generated/google/apis/dataproc_v1/representations.rb +23 -0
  61. data/generated/google/apis/dataproc_v1beta2.rb +1 -1
  62. data/generated/google/apis/dlp_v2.rb +1 -1
  63. data/generated/google/apis/dlp_v2/classes.rb +2 -1
  64. data/generated/google/apis/docs_v1.rb +1 -1
  65. data/generated/google/apis/domainsrdap_v1.rb +1 -1
  66. data/generated/google/apis/driveactivity_v2.rb +1 -1
  67. data/generated/google/apis/file_v1.rb +1 -1
  68. data/generated/google/apis/file_v1/classes.rb +6 -19
  69. data/generated/google/apis/file_v1/service.rb +1 -1
  70. data/generated/google/apis/file_v1beta1.rb +1 -1
  71. data/generated/google/apis/file_v1beta1/classes.rb +4 -17
  72. data/generated/google/apis/firebase_v1beta1.rb +1 -1
  73. data/generated/google/apis/firebasedynamiclinks_v1.rb +1 -1
  74. data/generated/google/apis/fitness_v1.rb +1 -1
  75. data/generated/google/apis/fitness_v1/classes.rb +10 -5
  76. data/generated/google/apis/fitness_v1/service.rb +1 -1
  77. data/generated/google/apis/healthcare_v1beta1.rb +1 -1
  78. data/generated/google/apis/healthcare_v1beta1/classes.rb +3 -3
  79. data/generated/google/apis/homegraph_v1.rb +1 -1
  80. data/generated/google/apis/indexing_v3.rb +1 -1
  81. data/generated/google/apis/jobs_v2.rb +1 -1
  82. data/generated/google/apis/jobs_v3.rb +1 -1
  83. data/generated/google/apis/jobs_v3p1beta1.rb +1 -1
  84. data/generated/google/apis/logging_v2.rb +1 -1
  85. data/generated/google/apis/logging_v2/classes.rb +84 -0
  86. data/generated/google/apis/logging_v2/representations.rb +33 -0
  87. data/generated/google/apis/logging_v2/service.rb +680 -0
  88. data/generated/google/apis/monitoring_v3.rb +1 -1
  89. data/generated/google/apis/monitoring_v3/classes.rb +21 -18
  90. data/generated/google/apis/monitoring_v3/service.rb +27 -18
  91. data/generated/google/apis/oslogin_v1.rb +1 -1
  92. data/generated/google/apis/oslogin_v1alpha.rb +1 -1
  93. data/generated/google/apis/oslogin_v1beta.rb +1 -1
  94. data/generated/google/apis/people_v1.rb +1 -1
  95. data/generated/google/apis/prod_tt_sasportal_v1alpha1.rb +1 -1
  96. data/generated/google/apis/pubsub_v1.rb +1 -1
  97. data/generated/google/apis/pubsub_v1beta1a.rb +1 -1
  98. data/generated/google/apis/pubsub_v1beta2.rb +1 -1
  99. data/generated/google/apis/remotebuildexecution_v1.rb +1 -1
  100. data/generated/google/apis/remotebuildexecution_v1alpha.rb +1 -1
  101. data/generated/google/apis/remotebuildexecution_v2.rb +1 -1
  102. data/generated/google/apis/sasportal_v1alpha1.rb +1 -1
  103. data/generated/google/apis/script_v1.rb +1 -1
  104. data/generated/google/apis/secretmanager_v1.rb +35 -0
  105. data/generated/google/apis/secretmanager_v1/classes.rb +970 -0
  106. data/generated/google/apis/secretmanager_v1/representations.rb +388 -0
  107. data/generated/google/apis/secretmanager_v1/service.rb +675 -0
  108. data/generated/google/apis/serviceconsumermanagement_v1.rb +1 -1
  109. data/generated/google/apis/servicemanagement_v1.rb +1 -1
  110. data/generated/google/apis/servicemanagement_v1/classes.rb +36 -0
  111. data/generated/google/apis/servicemanagement_v1/representations.rb +1 -0
  112. data/generated/google/apis/servicenetworking_v1.rb +1 -1
  113. data/generated/google/apis/servicenetworking_v1/classes.rb +19 -0
  114. data/generated/google/apis/servicenetworking_v1/representations.rb +2 -0
  115. data/generated/google/apis/servicenetworking_v1beta.rb +1 -1
  116. data/generated/google/apis/serviceusage_v1.rb +1 -1
  117. data/generated/google/apis/serviceusage_v1beta1.rb +1 -1
  118. data/generated/google/apis/sheets_v4.rb +1 -1
  119. data/generated/google/apis/slides_v1.rb +1 -1
  120. data/generated/google/apis/spanner_v1.rb +1 -1
  121. data/generated/google/apis/speech_v1p1beta1.rb +1 -1
  122. data/generated/google/apis/storagetransfer_v1.rb +1 -1
  123. data/generated/google/apis/storagetransfer_v1/classes.rb +94 -85
  124. data/generated/google/apis/storagetransfer_v1/service.rb +17 -11
  125. data/generated/google/apis/tagmanager_v1.rb +1 -1
  126. data/generated/google/apis/tagmanager_v2.rb +1 -1
  127. data/generated/google/apis/testing_v1.rb +1 -1
  128. data/generated/google/apis/testing_v1/classes.rb +29 -0
  129. data/generated/google/apis/testing_v1/representations.rb +15 -0
  130. data/generated/google/apis/toolresults_v1.rb +1 -1
  131. data/generated/google/apis/youtube_partner_v1.rb +1 -1
  132. data/lib/google/apis/version.rb +1 -1
  133. metadata +11 -3
@@ -0,0 +1,388 @@
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 SecretmanagerV1
24
+
25
+ class AccessSecretVersionResponse
26
+ class Representation < Google::Apis::Core::JsonRepresentation; end
27
+
28
+ include Google::Apis::Core::JsonObjectSupport
29
+ end
30
+
31
+ class AddSecretVersionRequest
32
+ class Representation < Google::Apis::Core::JsonRepresentation; end
33
+
34
+ include Google::Apis::Core::JsonObjectSupport
35
+ end
36
+
37
+ class AuditConfig
38
+ class Representation < Google::Apis::Core::JsonRepresentation; end
39
+
40
+ include Google::Apis::Core::JsonObjectSupport
41
+ end
42
+
43
+ class AuditLogConfig
44
+ class Representation < Google::Apis::Core::JsonRepresentation; end
45
+
46
+ include Google::Apis::Core::JsonObjectSupport
47
+ end
48
+
49
+ class Automatic
50
+ class Representation < Google::Apis::Core::JsonRepresentation; end
51
+
52
+ include Google::Apis::Core::JsonObjectSupport
53
+ end
54
+
55
+ class Binding
56
+ class Representation < Google::Apis::Core::JsonRepresentation; end
57
+
58
+ include Google::Apis::Core::JsonObjectSupport
59
+ end
60
+
61
+ class DestroySecretVersionRequest
62
+ class Representation < Google::Apis::Core::JsonRepresentation; end
63
+
64
+ include Google::Apis::Core::JsonObjectSupport
65
+ end
66
+
67
+ class DisableSecretVersionRequest
68
+ class Representation < Google::Apis::Core::JsonRepresentation; end
69
+
70
+ include Google::Apis::Core::JsonObjectSupport
71
+ end
72
+
73
+ class Empty
74
+ class Representation < Google::Apis::Core::JsonRepresentation; end
75
+
76
+ include Google::Apis::Core::JsonObjectSupport
77
+ end
78
+
79
+ class EnableSecretVersionRequest
80
+ class Representation < Google::Apis::Core::JsonRepresentation; end
81
+
82
+ include Google::Apis::Core::JsonObjectSupport
83
+ end
84
+
85
+ class Expr
86
+ class Representation < Google::Apis::Core::JsonRepresentation; end
87
+
88
+ include Google::Apis::Core::JsonObjectSupport
89
+ end
90
+
91
+ class ListLocationsResponse
92
+ class Representation < Google::Apis::Core::JsonRepresentation; end
93
+
94
+ include Google::Apis::Core::JsonObjectSupport
95
+ end
96
+
97
+ class ListSecretVersionsResponse
98
+ class Representation < Google::Apis::Core::JsonRepresentation; end
99
+
100
+ include Google::Apis::Core::JsonObjectSupport
101
+ end
102
+
103
+ class ListSecretsResponse
104
+ class Representation < Google::Apis::Core::JsonRepresentation; end
105
+
106
+ include Google::Apis::Core::JsonObjectSupport
107
+ end
108
+
109
+ class Location
110
+ class Representation < Google::Apis::Core::JsonRepresentation; end
111
+
112
+ include Google::Apis::Core::JsonObjectSupport
113
+ end
114
+
115
+ class Policy
116
+ class Representation < Google::Apis::Core::JsonRepresentation; end
117
+
118
+ include Google::Apis::Core::JsonObjectSupport
119
+ end
120
+
121
+ class Replica
122
+ class Representation < Google::Apis::Core::JsonRepresentation; end
123
+
124
+ include Google::Apis::Core::JsonObjectSupport
125
+ end
126
+
127
+ class Replication
128
+ class Representation < Google::Apis::Core::JsonRepresentation; end
129
+
130
+ include Google::Apis::Core::JsonObjectSupport
131
+ end
132
+
133
+ class Secret
134
+ class Representation < Google::Apis::Core::JsonRepresentation; end
135
+
136
+ include Google::Apis::Core::JsonObjectSupport
137
+ end
138
+
139
+ class SecretPayload
140
+ class Representation < Google::Apis::Core::JsonRepresentation; end
141
+
142
+ include Google::Apis::Core::JsonObjectSupport
143
+ end
144
+
145
+ class SecretVersion
146
+ class Representation < Google::Apis::Core::JsonRepresentation; end
147
+
148
+ include Google::Apis::Core::JsonObjectSupport
149
+ end
150
+
151
+ class SetIamPolicyRequest
152
+ class Representation < Google::Apis::Core::JsonRepresentation; end
153
+
154
+ include Google::Apis::Core::JsonObjectSupport
155
+ end
156
+
157
+ class TestIamPermissionsRequest
158
+ class Representation < Google::Apis::Core::JsonRepresentation; end
159
+
160
+ include Google::Apis::Core::JsonObjectSupport
161
+ end
162
+
163
+ class TestIamPermissionsResponse
164
+ class Representation < Google::Apis::Core::JsonRepresentation; end
165
+
166
+ include Google::Apis::Core::JsonObjectSupport
167
+ end
168
+
169
+ class UserManaged
170
+ class Representation < Google::Apis::Core::JsonRepresentation; end
171
+
172
+ include Google::Apis::Core::JsonObjectSupport
173
+ end
174
+
175
+ class AccessSecretVersionResponse
176
+ # @private
177
+ class Representation < Google::Apis::Core::JsonRepresentation
178
+ property :name, as: 'name'
179
+ property :payload, as: 'payload', class: Google::Apis::SecretmanagerV1::SecretPayload, decorator: Google::Apis::SecretmanagerV1::SecretPayload::Representation
180
+
181
+ end
182
+ end
183
+
184
+ class AddSecretVersionRequest
185
+ # @private
186
+ class Representation < Google::Apis::Core::JsonRepresentation
187
+ property :payload, as: 'payload', class: Google::Apis::SecretmanagerV1::SecretPayload, decorator: Google::Apis::SecretmanagerV1::SecretPayload::Representation
188
+
189
+ end
190
+ end
191
+
192
+ class AuditConfig
193
+ # @private
194
+ class Representation < Google::Apis::Core::JsonRepresentation
195
+ collection :audit_log_configs, as: 'auditLogConfigs', class: Google::Apis::SecretmanagerV1::AuditLogConfig, decorator: Google::Apis::SecretmanagerV1::AuditLogConfig::Representation
196
+
197
+ property :service, as: 'service'
198
+ end
199
+ end
200
+
201
+ class AuditLogConfig
202
+ # @private
203
+ class Representation < Google::Apis::Core::JsonRepresentation
204
+ collection :exempted_members, as: 'exemptedMembers'
205
+ property :log_type, as: 'logType'
206
+ end
207
+ end
208
+
209
+ class Automatic
210
+ # @private
211
+ class Representation < Google::Apis::Core::JsonRepresentation
212
+ end
213
+ end
214
+
215
+ class Binding
216
+ # @private
217
+ class Representation < Google::Apis::Core::JsonRepresentation
218
+ property :condition, as: 'condition', class: Google::Apis::SecretmanagerV1::Expr, decorator: Google::Apis::SecretmanagerV1::Expr::Representation
219
+
220
+ collection :members, as: 'members'
221
+ property :role, as: 'role'
222
+ end
223
+ end
224
+
225
+ class DestroySecretVersionRequest
226
+ # @private
227
+ class Representation < Google::Apis::Core::JsonRepresentation
228
+ end
229
+ end
230
+
231
+ class DisableSecretVersionRequest
232
+ # @private
233
+ class Representation < Google::Apis::Core::JsonRepresentation
234
+ end
235
+ end
236
+
237
+ class Empty
238
+ # @private
239
+ class Representation < Google::Apis::Core::JsonRepresentation
240
+ end
241
+ end
242
+
243
+ class EnableSecretVersionRequest
244
+ # @private
245
+ class Representation < Google::Apis::Core::JsonRepresentation
246
+ end
247
+ end
248
+
249
+ class Expr
250
+ # @private
251
+ class Representation < Google::Apis::Core::JsonRepresentation
252
+ property :description, as: 'description'
253
+ property :expression, as: 'expression'
254
+ property :location, as: 'location'
255
+ property :title, as: 'title'
256
+ end
257
+ end
258
+
259
+ class ListLocationsResponse
260
+ # @private
261
+ class Representation < Google::Apis::Core::JsonRepresentation
262
+ collection :locations, as: 'locations', class: Google::Apis::SecretmanagerV1::Location, decorator: Google::Apis::SecretmanagerV1::Location::Representation
263
+
264
+ property :next_page_token, as: 'nextPageToken'
265
+ end
266
+ end
267
+
268
+ class ListSecretVersionsResponse
269
+ # @private
270
+ class Representation < Google::Apis::Core::JsonRepresentation
271
+ property :next_page_token, as: 'nextPageToken'
272
+ property :total_size, as: 'totalSize'
273
+ collection :versions, as: 'versions', class: Google::Apis::SecretmanagerV1::SecretVersion, decorator: Google::Apis::SecretmanagerV1::SecretVersion::Representation
274
+
275
+ end
276
+ end
277
+
278
+ class ListSecretsResponse
279
+ # @private
280
+ class Representation < Google::Apis::Core::JsonRepresentation
281
+ property :next_page_token, as: 'nextPageToken'
282
+ collection :secrets, as: 'secrets', class: Google::Apis::SecretmanagerV1::Secret, decorator: Google::Apis::SecretmanagerV1::Secret::Representation
283
+
284
+ property :total_size, as: 'totalSize'
285
+ end
286
+ end
287
+
288
+ class Location
289
+ # @private
290
+ class Representation < Google::Apis::Core::JsonRepresentation
291
+ property :display_name, as: 'displayName'
292
+ hash :labels, as: 'labels'
293
+ property :location_id, as: 'locationId'
294
+ hash :metadata, as: 'metadata'
295
+ property :name, as: 'name'
296
+ end
297
+ end
298
+
299
+ class Policy
300
+ # @private
301
+ class Representation < Google::Apis::Core::JsonRepresentation
302
+ collection :audit_configs, as: 'auditConfigs', class: Google::Apis::SecretmanagerV1::AuditConfig, decorator: Google::Apis::SecretmanagerV1::AuditConfig::Representation
303
+
304
+ collection :bindings, as: 'bindings', class: Google::Apis::SecretmanagerV1::Binding, decorator: Google::Apis::SecretmanagerV1::Binding::Representation
305
+
306
+ property :etag, :base64 => true, as: 'etag'
307
+ property :version, as: 'version'
308
+ end
309
+ end
310
+
311
+ class Replica
312
+ # @private
313
+ class Representation < Google::Apis::Core::JsonRepresentation
314
+ property :location, as: 'location'
315
+ end
316
+ end
317
+
318
+ class Replication
319
+ # @private
320
+ class Representation < Google::Apis::Core::JsonRepresentation
321
+ property :automatic, as: 'automatic', class: Google::Apis::SecretmanagerV1::Automatic, decorator: Google::Apis::SecretmanagerV1::Automatic::Representation
322
+
323
+ property :user_managed, as: 'userManaged', class: Google::Apis::SecretmanagerV1::UserManaged, decorator: Google::Apis::SecretmanagerV1::UserManaged::Representation
324
+
325
+ end
326
+ end
327
+
328
+ class Secret
329
+ # @private
330
+ class Representation < Google::Apis::Core::JsonRepresentation
331
+ property :create_time, as: 'createTime'
332
+ hash :labels, as: 'labels'
333
+ property :name, as: 'name'
334
+ property :replication, as: 'replication', class: Google::Apis::SecretmanagerV1::Replication, decorator: Google::Apis::SecretmanagerV1::Replication::Representation
335
+
336
+ end
337
+ end
338
+
339
+ class SecretPayload
340
+ # @private
341
+ class Representation < Google::Apis::Core::JsonRepresentation
342
+ property :data, :base64 => true, as: 'data'
343
+ end
344
+ end
345
+
346
+ class SecretVersion
347
+ # @private
348
+ class Representation < Google::Apis::Core::JsonRepresentation
349
+ property :create_time, as: 'createTime'
350
+ property :destroy_time, as: 'destroyTime'
351
+ property :name, as: 'name'
352
+ property :state, as: 'state'
353
+ end
354
+ end
355
+
356
+ class SetIamPolicyRequest
357
+ # @private
358
+ class Representation < Google::Apis::Core::JsonRepresentation
359
+ property :policy, as: 'policy', class: Google::Apis::SecretmanagerV1::Policy, decorator: Google::Apis::SecretmanagerV1::Policy::Representation
360
+
361
+ property :update_mask, as: 'updateMask'
362
+ end
363
+ end
364
+
365
+ class TestIamPermissionsRequest
366
+ # @private
367
+ class Representation < Google::Apis::Core::JsonRepresentation
368
+ collection :permissions, as: 'permissions'
369
+ end
370
+ end
371
+
372
+ class TestIamPermissionsResponse
373
+ # @private
374
+ class Representation < Google::Apis::Core::JsonRepresentation
375
+ collection :permissions, as: 'permissions'
376
+ end
377
+ end
378
+
379
+ class UserManaged
380
+ # @private
381
+ class Representation < Google::Apis::Core::JsonRepresentation
382
+ collection :replicas, as: 'replicas', class: Google::Apis::SecretmanagerV1::Replica, decorator: Google::Apis::SecretmanagerV1::Replica::Representation
383
+
384
+ end
385
+ end
386
+ end
387
+ end
388
+ end
@@ -0,0 +1,675 @@
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 SecretmanagerV1
23
+ # Secret Manager API
24
+ #
25
+ # Stores and manages access to application secrets. Provides convenience while
26
+ # improving security.
27
+ #
28
+ # @example
29
+ # require 'google/apis/secretmanager_v1'
30
+ #
31
+ # Secretmanager = Google::Apis::SecretmanagerV1 # Alias the module
32
+ # service = Secretmanager::SecretManagerService.new
33
+ #
34
+ # @see https://cloud.google.com/secret-manager/
35
+ class SecretManagerService < Google::Apis::Core::BaseService
36
+ # @return [String]
37
+ # API key. Your API key identifies your project and provides you with API access,
38
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
39
+ attr_accessor :key
40
+
41
+ # @return [String]
42
+ # Available to use for quota purposes for server-side applications. Can be any
43
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
44
+ attr_accessor :quota_user
45
+
46
+ def initialize
47
+ super('https://secretmanager.googleapis.com/', '')
48
+ @batch_path = 'batch'
49
+ end
50
+
51
+ # Gets information about a location.
52
+ # @param [String] name
53
+ # Resource name for the location.
54
+ # @param [String] fields
55
+ # Selector specifying which fields to include in a partial response.
56
+ # @param [String] quota_user
57
+ # Available to use for quota purposes for server-side applications. Can be any
58
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
59
+ # @param [Google::Apis::RequestOptions] options
60
+ # Request-specific options
61
+ #
62
+ # @yield [result, err] Result & error if block supplied
63
+ # @yieldparam result [Google::Apis::SecretmanagerV1::Location] parsed result object
64
+ # @yieldparam err [StandardError] error object if request failed
65
+ #
66
+ # @return [Google::Apis::SecretmanagerV1::Location]
67
+ #
68
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
69
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
70
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
71
+ def get_project_location(name, fields: nil, quota_user: nil, options: nil, &block)
72
+ command = make_simple_command(:get, 'v1/{+name}', options)
73
+ command.response_representation = Google::Apis::SecretmanagerV1::Location::Representation
74
+ command.response_class = Google::Apis::SecretmanagerV1::Location
75
+ command.params['name'] = name unless name.nil?
76
+ command.query['fields'] = fields unless fields.nil?
77
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
78
+ execute_or_queue_command(command, &block)
79
+ end
80
+
81
+ # Lists information about the supported locations for this service.
82
+ # @param [String] name
83
+ # The resource that owns the locations collection, if applicable.
84
+ # @param [String] filter
85
+ # The standard list filter.
86
+ # @param [Fixnum] page_size
87
+ # The standard list page size.
88
+ # @param [String] page_token
89
+ # The standard list page token.
90
+ # @param [String] fields
91
+ # Selector specifying which fields to include in a partial response.
92
+ # @param [String] quota_user
93
+ # Available to use for quota purposes for server-side applications. Can be any
94
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
95
+ # @param [Google::Apis::RequestOptions] options
96
+ # Request-specific options
97
+ #
98
+ # @yield [result, err] Result & error if block supplied
99
+ # @yieldparam result [Google::Apis::SecretmanagerV1::ListLocationsResponse] parsed result object
100
+ # @yieldparam err [StandardError] error object if request failed
101
+ #
102
+ # @return [Google::Apis::SecretmanagerV1::ListLocationsResponse]
103
+ #
104
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
105
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
106
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
107
+ def list_project_locations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
108
+ command = make_simple_command(:get, 'v1/{+name}/locations', options)
109
+ command.response_representation = Google::Apis::SecretmanagerV1::ListLocationsResponse::Representation
110
+ command.response_class = Google::Apis::SecretmanagerV1::ListLocationsResponse
111
+ command.params['name'] = name unless name.nil?
112
+ command.query['filter'] = filter unless filter.nil?
113
+ command.query['pageSize'] = page_size unless page_size.nil?
114
+ command.query['pageToken'] = page_token unless page_token.nil?
115
+ command.query['fields'] = fields unless fields.nil?
116
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
117
+ execute_or_queue_command(command, &block)
118
+ end
119
+
120
+ # Creates a new SecretVersion containing secret data and attaches
121
+ # it to an existing Secret.
122
+ # @param [String] parent
123
+ # Required. The resource name of the Secret to associate with the
124
+ # SecretVersion in the format `projects/*/secrets/*`.
125
+ # @param [Google::Apis::SecretmanagerV1::AddSecretVersionRequest] add_secret_version_request_object
126
+ # @param [String] fields
127
+ # Selector specifying which fields to include in a partial response.
128
+ # @param [String] quota_user
129
+ # Available to use for quota purposes for server-side applications. Can be any
130
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
131
+ # @param [Google::Apis::RequestOptions] options
132
+ # Request-specific options
133
+ #
134
+ # @yield [result, err] Result & error if block supplied
135
+ # @yieldparam result [Google::Apis::SecretmanagerV1::SecretVersion] parsed result object
136
+ # @yieldparam err [StandardError] error object if request failed
137
+ #
138
+ # @return [Google::Apis::SecretmanagerV1::SecretVersion]
139
+ #
140
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
141
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
142
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
143
+ def add_project_secret_version(parent, add_secret_version_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
144
+ command = make_simple_command(:post, 'v1/{+parent}:addVersion', options)
145
+ command.request_representation = Google::Apis::SecretmanagerV1::AddSecretVersionRequest::Representation
146
+ command.request_object = add_secret_version_request_object
147
+ command.response_representation = Google::Apis::SecretmanagerV1::SecretVersion::Representation
148
+ command.response_class = Google::Apis::SecretmanagerV1::SecretVersion
149
+ command.params['parent'] = parent unless parent.nil?
150
+ command.query['fields'] = fields unless fields.nil?
151
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
152
+ execute_or_queue_command(command, &block)
153
+ end
154
+
155
+ # Creates a new Secret containing no SecretVersions.
156
+ # @param [String] parent
157
+ # Required. The resource name of the project to associate with the
158
+ # Secret, in the format `projects/*`.
159
+ # @param [Google::Apis::SecretmanagerV1::Secret] secret_object
160
+ # @param [String] secret_id
161
+ # Required. This must be unique within the project.
162
+ # @param [String] fields
163
+ # Selector specifying which fields to include in a partial response.
164
+ # @param [String] quota_user
165
+ # Available to use for quota purposes for server-side applications. Can be any
166
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
167
+ # @param [Google::Apis::RequestOptions] options
168
+ # Request-specific options
169
+ #
170
+ # @yield [result, err] Result & error if block supplied
171
+ # @yieldparam result [Google::Apis::SecretmanagerV1::Secret] parsed result object
172
+ # @yieldparam err [StandardError] error object if request failed
173
+ #
174
+ # @return [Google::Apis::SecretmanagerV1::Secret]
175
+ #
176
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
177
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
178
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
179
+ def create_project_secret(parent, secret_object = nil, secret_id: nil, fields: nil, quota_user: nil, options: nil, &block)
180
+ command = make_simple_command(:post, 'v1/{+parent}/secrets', options)
181
+ command.request_representation = Google::Apis::SecretmanagerV1::Secret::Representation
182
+ command.request_object = secret_object
183
+ command.response_representation = Google::Apis::SecretmanagerV1::Secret::Representation
184
+ command.response_class = Google::Apis::SecretmanagerV1::Secret
185
+ command.params['parent'] = parent unless parent.nil?
186
+ command.query['secretId'] = secret_id unless secret_id.nil?
187
+ command.query['fields'] = fields unless fields.nil?
188
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
189
+ execute_or_queue_command(command, &block)
190
+ end
191
+
192
+ # Deletes a Secret.
193
+ # @param [String] name
194
+ # Required. The resource name of the Secret to delete in the format
195
+ # `projects/*/secrets/*`.
196
+ # @param [String] fields
197
+ # Selector specifying which fields to include in a partial response.
198
+ # @param [String] quota_user
199
+ # Available to use for quota purposes for server-side applications. Can be any
200
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
201
+ # @param [Google::Apis::RequestOptions] options
202
+ # Request-specific options
203
+ #
204
+ # @yield [result, err] Result & error if block supplied
205
+ # @yieldparam result [Google::Apis::SecretmanagerV1::Empty] parsed result object
206
+ # @yieldparam err [StandardError] error object if request failed
207
+ #
208
+ # @return [Google::Apis::SecretmanagerV1::Empty]
209
+ #
210
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
211
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
212
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
213
+ def delete_project_secret(name, fields: nil, quota_user: nil, options: nil, &block)
214
+ command = make_simple_command(:delete, 'v1/{+name}', options)
215
+ command.response_representation = Google::Apis::SecretmanagerV1::Empty::Representation
216
+ command.response_class = Google::Apis::SecretmanagerV1::Empty
217
+ command.params['name'] = name unless name.nil?
218
+ command.query['fields'] = fields unless fields.nil?
219
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
220
+ execute_or_queue_command(command, &block)
221
+ end
222
+
223
+ # Gets metadata for a given Secret.
224
+ # @param [String] name
225
+ # Required. The resource name of the Secret, in the format `projects/*/secrets/*`
226
+ # .
227
+ # @param [String] fields
228
+ # Selector specifying which fields to include in a partial response.
229
+ # @param [String] quota_user
230
+ # Available to use for quota purposes for server-side applications. Can be any
231
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
232
+ # @param [Google::Apis::RequestOptions] options
233
+ # Request-specific options
234
+ #
235
+ # @yield [result, err] Result & error if block supplied
236
+ # @yieldparam result [Google::Apis::SecretmanagerV1::Secret] parsed result object
237
+ # @yieldparam err [StandardError] error object if request failed
238
+ #
239
+ # @return [Google::Apis::SecretmanagerV1::Secret]
240
+ #
241
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
242
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
243
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
244
+ def get_project_secret(name, fields: nil, quota_user: nil, options: nil, &block)
245
+ command = make_simple_command(:get, 'v1/{+name}', options)
246
+ command.response_representation = Google::Apis::SecretmanagerV1::Secret::Representation
247
+ command.response_class = Google::Apis::SecretmanagerV1::Secret
248
+ command.params['name'] = name unless name.nil?
249
+ command.query['fields'] = fields unless fields.nil?
250
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
251
+ execute_or_queue_command(command, &block)
252
+ end
253
+
254
+ # Gets the access control policy for a secret.
255
+ # Returns empty policy if the secret exists and does not have a policy set.
256
+ # @param [String] resource
257
+ # REQUIRED: The resource for which the policy is being requested.
258
+ # See the operation documentation for the appropriate value for this field.
259
+ # @param [Fixnum] options_requested_policy_version
260
+ # Optional. The policy format version to be returned.
261
+ # Valid values are 0, 1, and 3. Requests specifying an invalid value will be
262
+ # rejected.
263
+ # Requests for policies with any conditional bindings must specify version 3.
264
+ # Policies without any conditional bindings may specify any valid value or
265
+ # leave the field unset.
266
+ # @param [String] fields
267
+ # Selector specifying which fields to include in a partial response.
268
+ # @param [String] quota_user
269
+ # Available to use for quota purposes for server-side applications. Can be any
270
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
271
+ # @param [Google::Apis::RequestOptions] options
272
+ # Request-specific options
273
+ #
274
+ # @yield [result, err] Result & error if block supplied
275
+ # @yieldparam result [Google::Apis::SecretmanagerV1::Policy] parsed result object
276
+ # @yieldparam err [StandardError] error object if request failed
277
+ #
278
+ # @return [Google::Apis::SecretmanagerV1::Policy]
279
+ #
280
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
281
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
282
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
283
+ def get_project_secret_iam_policy(resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, options: nil, &block)
284
+ command = make_simple_command(:get, 'v1/{+resource}:getIamPolicy', options)
285
+ command.response_representation = Google::Apis::SecretmanagerV1::Policy::Representation
286
+ command.response_class = Google::Apis::SecretmanagerV1::Policy
287
+ command.params['resource'] = resource unless resource.nil?
288
+ command.query['options.requestedPolicyVersion'] = options_requested_policy_version unless options_requested_policy_version.nil?
289
+ command.query['fields'] = fields unless fields.nil?
290
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
291
+ execute_or_queue_command(command, &block)
292
+ end
293
+
294
+ # Lists Secrets.
295
+ # @param [String] parent
296
+ # Required. The resource name of the project associated with the
297
+ # Secrets, in the format `projects/*`.
298
+ # @param [Fixnum] page_size
299
+ # Optional. The maximum number of results to be returned in a single page. If
300
+ # set to 0, the server decides the number of results to return. If the
301
+ # number is greater than 25000, it is capped at 25000.
302
+ # @param [String] page_token
303
+ # Optional. Pagination token, returned earlier via
304
+ # ListSecretsResponse.next_page_token.
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::SecretmanagerV1::ListSecretsResponse] parsed result object
315
+ # @yieldparam err [StandardError] error object if request failed
316
+ #
317
+ # @return [Google::Apis::SecretmanagerV1::ListSecretsResponse]
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 list_project_secrets(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
323
+ command = make_simple_command(:get, 'v1/{+parent}/secrets', options)
324
+ command.response_representation = Google::Apis::SecretmanagerV1::ListSecretsResponse::Representation
325
+ command.response_class = Google::Apis::SecretmanagerV1::ListSecretsResponse
326
+ command.params['parent'] = parent unless parent.nil?
327
+ command.query['pageSize'] = page_size unless page_size.nil?
328
+ command.query['pageToken'] = page_token unless page_token.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
+ # Updates metadata of an existing Secret.
335
+ # @param [String] name
336
+ # Output only. The resource name of the Secret in the format `projects/*/secrets/
337
+ # *`.
338
+ # @param [Google::Apis::SecretmanagerV1::Secret] secret_object
339
+ # @param [String] update_mask
340
+ # Required. Specifies the fields to be updated.
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::SecretmanagerV1::Secret] parsed result object
351
+ # @yieldparam err [StandardError] error object if request failed
352
+ #
353
+ # @return [Google::Apis::SecretmanagerV1::Secret]
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 patch_project_secret(name, secret_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
359
+ command = make_simple_command(:patch, 'v1/{+name}', options)
360
+ command.request_representation = Google::Apis::SecretmanagerV1::Secret::Representation
361
+ command.request_object = secret_object
362
+ command.response_representation = Google::Apis::SecretmanagerV1::Secret::Representation
363
+ command.response_class = Google::Apis::SecretmanagerV1::Secret
364
+ command.params['name'] = name unless name.nil?
365
+ command.query['updateMask'] = update_mask unless update_mask.nil?
366
+ command.query['fields'] = fields unless fields.nil?
367
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
368
+ execute_or_queue_command(command, &block)
369
+ end
370
+
371
+ # Sets the access control policy on the specified secret. Replaces any
372
+ # existing policy.
373
+ # Permissions on SecretVersions are enforced according
374
+ # to the policy set on the associated Secret.
375
+ # @param [String] resource
376
+ # REQUIRED: The resource for which the policy is being specified.
377
+ # See the operation documentation for the appropriate value for this field.
378
+ # @param [Google::Apis::SecretmanagerV1::SetIamPolicyRequest] set_iam_policy_request_object
379
+ # @param [String] fields
380
+ # Selector specifying which fields to include in a partial response.
381
+ # @param [String] quota_user
382
+ # Available to use for quota purposes for server-side applications. Can be any
383
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
384
+ # @param [Google::Apis::RequestOptions] options
385
+ # Request-specific options
386
+ #
387
+ # @yield [result, err] Result & error if block supplied
388
+ # @yieldparam result [Google::Apis::SecretmanagerV1::Policy] parsed result object
389
+ # @yieldparam err [StandardError] error object if request failed
390
+ #
391
+ # @return [Google::Apis::SecretmanagerV1::Policy]
392
+ #
393
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
394
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
395
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
396
+ def set_secret_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
397
+ command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options)
398
+ command.request_representation = Google::Apis::SecretmanagerV1::SetIamPolicyRequest::Representation
399
+ command.request_object = set_iam_policy_request_object
400
+ command.response_representation = Google::Apis::SecretmanagerV1::Policy::Representation
401
+ command.response_class = Google::Apis::SecretmanagerV1::Policy
402
+ command.params['resource'] = resource unless resource.nil?
403
+ command.query['fields'] = fields unless fields.nil?
404
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
405
+ execute_or_queue_command(command, &block)
406
+ end
407
+
408
+ # Returns permissions that a caller has for the specified secret.
409
+ # If the secret does not exist, this call returns an empty set of
410
+ # permissions, not a NOT_FOUND error.
411
+ # Note: This operation is designed to be used for building permission-aware
412
+ # UIs and command-line tools, not for authorization checking. This operation
413
+ # may "fail open" without warning.
414
+ # @param [String] resource
415
+ # REQUIRED: The resource for which the policy detail is being requested.
416
+ # See the operation documentation for the appropriate value for this field.
417
+ # @param [Google::Apis::SecretmanagerV1::TestIamPermissionsRequest] test_iam_permissions_request_object
418
+ # @param [String] fields
419
+ # Selector specifying which fields to include in a partial response.
420
+ # @param [String] quota_user
421
+ # Available to use for quota purposes for server-side applications. Can be any
422
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
423
+ # @param [Google::Apis::RequestOptions] options
424
+ # Request-specific options
425
+ #
426
+ # @yield [result, err] Result & error if block supplied
427
+ # @yieldparam result [Google::Apis::SecretmanagerV1::TestIamPermissionsResponse] parsed result object
428
+ # @yieldparam err [StandardError] error object if request failed
429
+ #
430
+ # @return [Google::Apis::SecretmanagerV1::TestIamPermissionsResponse]
431
+ #
432
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
433
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
434
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
435
+ def test_secret_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
436
+ command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options)
437
+ command.request_representation = Google::Apis::SecretmanagerV1::TestIamPermissionsRequest::Representation
438
+ command.request_object = test_iam_permissions_request_object
439
+ command.response_representation = Google::Apis::SecretmanagerV1::TestIamPermissionsResponse::Representation
440
+ command.response_class = Google::Apis::SecretmanagerV1::TestIamPermissionsResponse
441
+ command.params['resource'] = resource unless resource.nil?
442
+ command.query['fields'] = fields unless fields.nil?
443
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
444
+ execute_or_queue_command(command, &block)
445
+ end
446
+
447
+ # Accesses a SecretVersion. This call returns the secret data.
448
+ # `projects/*/secrets/*/versions/latest` is an alias to the `latest`
449
+ # SecretVersion.
450
+ # @param [String] name
451
+ # Required. The resource name of the SecretVersion in the format
452
+ # `projects/*/secrets/*/versions/*`.
453
+ # @param [String] fields
454
+ # Selector specifying which fields to include in a partial response.
455
+ # @param [String] quota_user
456
+ # Available to use for quota purposes for server-side applications. Can be any
457
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
458
+ # @param [Google::Apis::RequestOptions] options
459
+ # Request-specific options
460
+ #
461
+ # @yield [result, err] Result & error if block supplied
462
+ # @yieldparam result [Google::Apis::SecretmanagerV1::AccessSecretVersionResponse] parsed result object
463
+ # @yieldparam err [StandardError] error object if request failed
464
+ #
465
+ # @return [Google::Apis::SecretmanagerV1::AccessSecretVersionResponse]
466
+ #
467
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
468
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
469
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
470
+ def access_project_secret_version(name, fields: nil, quota_user: nil, options: nil, &block)
471
+ command = make_simple_command(:get, 'v1/{+name}:access', options)
472
+ command.response_representation = Google::Apis::SecretmanagerV1::AccessSecretVersionResponse::Representation
473
+ command.response_class = Google::Apis::SecretmanagerV1::AccessSecretVersionResponse
474
+ command.params['name'] = name unless name.nil?
475
+ command.query['fields'] = fields unless fields.nil?
476
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
477
+ execute_or_queue_command(command, &block)
478
+ end
479
+
480
+ # Destroys a SecretVersion.
481
+ # Sets the state of the SecretVersion to
482
+ # DESTROYED and irrevocably destroys the
483
+ # secret data.
484
+ # @param [String] name
485
+ # Required. The resource name of the SecretVersion to destroy in the format
486
+ # `projects/*/secrets/*/versions/*`.
487
+ # @param [Google::Apis::SecretmanagerV1::DestroySecretVersionRequest] destroy_secret_version_request_object
488
+ # @param [String] fields
489
+ # Selector specifying which fields to include in a partial response.
490
+ # @param [String] quota_user
491
+ # Available to use for quota purposes for server-side applications. Can be any
492
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
493
+ # @param [Google::Apis::RequestOptions] options
494
+ # Request-specific options
495
+ #
496
+ # @yield [result, err] Result & error if block supplied
497
+ # @yieldparam result [Google::Apis::SecretmanagerV1::SecretVersion] parsed result object
498
+ # @yieldparam err [StandardError] error object if request failed
499
+ #
500
+ # @return [Google::Apis::SecretmanagerV1::SecretVersion]
501
+ #
502
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
503
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
504
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
505
+ def destroy_secret_version(name, destroy_secret_version_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
506
+ command = make_simple_command(:post, 'v1/{+name}:destroy', options)
507
+ command.request_representation = Google::Apis::SecretmanagerV1::DestroySecretVersionRequest::Representation
508
+ command.request_object = destroy_secret_version_request_object
509
+ command.response_representation = Google::Apis::SecretmanagerV1::SecretVersion::Representation
510
+ command.response_class = Google::Apis::SecretmanagerV1::SecretVersion
511
+ command.params['name'] = name unless name.nil?
512
+ command.query['fields'] = fields unless fields.nil?
513
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
514
+ execute_or_queue_command(command, &block)
515
+ end
516
+
517
+ # Disables a SecretVersion.
518
+ # Sets the state of the SecretVersion to
519
+ # DISABLED.
520
+ # @param [String] name
521
+ # Required. The resource name of the SecretVersion to disable in the format
522
+ # `projects/*/secrets/*/versions/*`.
523
+ # @param [Google::Apis::SecretmanagerV1::DisableSecretVersionRequest] disable_secret_version_request_object
524
+ # @param [String] fields
525
+ # Selector specifying which fields to include in a partial response.
526
+ # @param [String] quota_user
527
+ # Available to use for quota purposes for server-side applications. Can be any
528
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
529
+ # @param [Google::Apis::RequestOptions] options
530
+ # Request-specific options
531
+ #
532
+ # @yield [result, err] Result & error if block supplied
533
+ # @yieldparam result [Google::Apis::SecretmanagerV1::SecretVersion] parsed result object
534
+ # @yieldparam err [StandardError] error object if request failed
535
+ #
536
+ # @return [Google::Apis::SecretmanagerV1::SecretVersion]
537
+ #
538
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
539
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
540
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
541
+ def disable_secret_version(name, disable_secret_version_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
542
+ command = make_simple_command(:post, 'v1/{+name}:disable', options)
543
+ command.request_representation = Google::Apis::SecretmanagerV1::DisableSecretVersionRequest::Representation
544
+ command.request_object = disable_secret_version_request_object
545
+ command.response_representation = Google::Apis::SecretmanagerV1::SecretVersion::Representation
546
+ command.response_class = Google::Apis::SecretmanagerV1::SecretVersion
547
+ command.params['name'] = name unless name.nil?
548
+ command.query['fields'] = fields unless fields.nil?
549
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
550
+ execute_or_queue_command(command, &block)
551
+ end
552
+
553
+ # Enables a SecretVersion.
554
+ # Sets the state of the SecretVersion to
555
+ # ENABLED.
556
+ # @param [String] name
557
+ # Required. The resource name of the SecretVersion to enable in the format
558
+ # `projects/*/secrets/*/versions/*`.
559
+ # @param [Google::Apis::SecretmanagerV1::EnableSecretVersionRequest] enable_secret_version_request_object
560
+ # @param [String] fields
561
+ # Selector specifying which fields to include in a partial response.
562
+ # @param [String] quota_user
563
+ # Available to use for quota purposes for server-side applications. Can be any
564
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
565
+ # @param [Google::Apis::RequestOptions] options
566
+ # Request-specific options
567
+ #
568
+ # @yield [result, err] Result & error if block supplied
569
+ # @yieldparam result [Google::Apis::SecretmanagerV1::SecretVersion] parsed result object
570
+ # @yieldparam err [StandardError] error object if request failed
571
+ #
572
+ # @return [Google::Apis::SecretmanagerV1::SecretVersion]
573
+ #
574
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
575
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
576
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
577
+ def enable_secret_version(name, enable_secret_version_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
578
+ command = make_simple_command(:post, 'v1/{+name}:enable', options)
579
+ command.request_representation = Google::Apis::SecretmanagerV1::EnableSecretVersionRequest::Representation
580
+ command.request_object = enable_secret_version_request_object
581
+ command.response_representation = Google::Apis::SecretmanagerV1::SecretVersion::Representation
582
+ command.response_class = Google::Apis::SecretmanagerV1::SecretVersion
583
+ command.params['name'] = name unless name.nil?
584
+ command.query['fields'] = fields unless fields.nil?
585
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
586
+ execute_or_queue_command(command, &block)
587
+ end
588
+
589
+ # Gets metadata for a SecretVersion.
590
+ # `projects/*/secrets/*/versions/latest` is an alias to the `latest`
591
+ # SecretVersion.
592
+ # @param [String] name
593
+ # Required. The resource name of the SecretVersion in the format
594
+ # `projects/*/secrets/*/versions/*`.
595
+ # `projects/*/secrets/*/versions/latest` is an alias to the `latest`
596
+ # SecretVersion.
597
+ # @param [String] fields
598
+ # Selector specifying which fields to include in a partial response.
599
+ # @param [String] quota_user
600
+ # Available to use for quota purposes for server-side applications. Can be any
601
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
602
+ # @param [Google::Apis::RequestOptions] options
603
+ # Request-specific options
604
+ #
605
+ # @yield [result, err] Result & error if block supplied
606
+ # @yieldparam result [Google::Apis::SecretmanagerV1::SecretVersion] parsed result object
607
+ # @yieldparam err [StandardError] error object if request failed
608
+ #
609
+ # @return [Google::Apis::SecretmanagerV1::SecretVersion]
610
+ #
611
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
612
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
613
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
614
+ def get_project_secret_version(name, fields: nil, quota_user: nil, options: nil, &block)
615
+ command = make_simple_command(:get, 'v1/{+name}', options)
616
+ command.response_representation = Google::Apis::SecretmanagerV1::SecretVersion::Representation
617
+ command.response_class = Google::Apis::SecretmanagerV1::SecretVersion
618
+ command.params['name'] = name unless name.nil?
619
+ command.query['fields'] = fields unless fields.nil?
620
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
621
+ execute_or_queue_command(command, &block)
622
+ end
623
+
624
+ # Lists SecretVersions. This call does not return secret
625
+ # data.
626
+ # @param [String] parent
627
+ # Required. The resource name of the Secret associated with the
628
+ # SecretVersions to list, in the format
629
+ # `projects/*/secrets/*`.
630
+ # @param [Fixnum] page_size
631
+ # Optional. The maximum number of results to be returned in a single page. If
632
+ # set to 0, the server decides the number of results to return. If the
633
+ # number is greater than 25000, it is capped at 25000.
634
+ # @param [String] page_token
635
+ # Optional. Pagination token, returned earlier via
636
+ # ListSecretVersionsResponse.next_page_token][].
637
+ # @param [String] fields
638
+ # Selector specifying which fields to include in a partial response.
639
+ # @param [String] quota_user
640
+ # Available to use for quota purposes for server-side applications. Can be any
641
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
642
+ # @param [Google::Apis::RequestOptions] options
643
+ # Request-specific options
644
+ #
645
+ # @yield [result, err] Result & error if block supplied
646
+ # @yieldparam result [Google::Apis::SecretmanagerV1::ListSecretVersionsResponse] parsed result object
647
+ # @yieldparam err [StandardError] error object if request failed
648
+ #
649
+ # @return [Google::Apis::SecretmanagerV1::ListSecretVersionsResponse]
650
+ #
651
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
652
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
653
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
654
+ def list_project_secret_versions(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
655
+ command = make_simple_command(:get, 'v1/{+parent}/versions', options)
656
+ command.response_representation = Google::Apis::SecretmanagerV1::ListSecretVersionsResponse::Representation
657
+ command.response_class = Google::Apis::SecretmanagerV1::ListSecretVersionsResponse
658
+ command.params['parent'] = parent unless parent.nil?
659
+ command.query['pageSize'] = page_size unless page_size.nil?
660
+ command.query['pageToken'] = page_token unless page_token.nil?
661
+ command.query['fields'] = fields unless fields.nil?
662
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
663
+ execute_or_queue_command(command, &block)
664
+ end
665
+
666
+ protected
667
+
668
+ def apply_command_defaults(command)
669
+ command.query['key'] = key unless key.nil?
670
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
671
+ end
672
+ end
673
+ end
674
+ end
675
+ end