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