google-api-client 0.24.2 → 0.24.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (185) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +68 -0
  3. data/README.md +9 -0
  4. data/generated/google/apis/adexchangebuyer2_v2beta1.rb +5 -4
  5. data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +90 -87
  6. data/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +17 -15
  7. data/generated/google/apis/admin_directory_v1.rb +1 -1
  8. data/generated/google/apis/admin_directory_v1/classes.rb +155 -0
  9. data/generated/google/apis/admin_directory_v1/representations.rb +82 -0
  10. data/generated/google/apis/alertcenter_v1beta1.rb +31 -0
  11. data/generated/google/apis/alertcenter_v1beta1/classes.rb +835 -0
  12. data/generated/google/apis/alertcenter_v1beta1/representations.rb +394 -0
  13. data/generated/google/apis/alertcenter_v1beta1/service.rb +302 -0
  14. data/generated/google/apis/androiddeviceprovisioning_v1.rb +1 -1
  15. data/generated/google/apis/androiddeviceprovisioning_v1/classes.rb +37 -0
  16. data/generated/google/apis/androiddeviceprovisioning_v1/representations.rb +6 -0
  17. data/generated/google/apis/androiddeviceprovisioning_v1/service.rb +8 -1
  18. data/generated/google/apis/androidenterprise_v1.rb +1 -1
  19. data/generated/google/apis/androidenterprise_v1/classes.rb +8 -4
  20. data/generated/google/apis/androidenterprise_v1/representations.rb +1 -0
  21. data/generated/google/apis/androidpublisher_v2.rb +1 -1
  22. data/generated/google/apis/androidpublisher_v2/service.rb +5 -1
  23. data/generated/google/apis/androidpublisher_v3.rb +1 -1
  24. data/generated/google/apis/androidpublisher_v3/service.rb +5 -1
  25. data/generated/google/apis/appengine_v1.rb +1 -1
  26. data/generated/google/apis/appengine_v1/classes.rb +8 -1
  27. data/generated/google/apis/appengine_v1/representations.rb +1 -0
  28. data/generated/google/apis/appengine_v1beta.rb +1 -1
  29. data/generated/google/apis/appengine_v1beta/classes.rb +1 -1
  30. data/generated/google/apis/bigquerydatatransfer_v1.rb +1 -1
  31. data/generated/google/apis/bigquerydatatransfer_v1/classes.rb +6 -5
  32. data/generated/google/apis/bigquerydatatransfer_v1/service.rb +12 -10
  33. data/generated/google/apis/calendar_v3.rb +1 -1
  34. data/generated/google/apis/calendar_v3/service.rb +52 -18
  35. data/generated/google/apis/cloudasset_v1beta1.rb +34 -0
  36. data/generated/google/apis/cloudasset_v1beta1/classes.rb +798 -0
  37. data/generated/google/apis/cloudasset_v1beta1/representations.rb +263 -0
  38. data/generated/google/apis/cloudasset_v1beta1/service.rb +313 -0
  39. data/generated/google/apis/cloudbuild_v1.rb +1 -1
  40. data/generated/google/apis/cloudbuild_v1/classes.rb +42 -5
  41. data/generated/google/apis/cloudbuild_v1/representations.rb +6 -0
  42. data/generated/google/apis/cloudiot_v1.rb +1 -1
  43. data/generated/google/apis/cloudiot_v1/classes.rb +59 -0
  44. data/generated/google/apis/cloudiot_v1/representations.rb +28 -0
  45. data/generated/google/apis/cloudiot_v1/service.rb +94 -0
  46. data/generated/google/apis/composer_v1.rb +1 -1
  47. data/generated/google/apis/composer_v1/classes.rb +1 -0
  48. data/generated/google/apis/composer_v1beta1.rb +1 -1
  49. data/generated/google/apis/composer_v1beta1/classes.rb +34 -5
  50. data/generated/google/apis/composer_v1beta1/representations.rb +1 -0
  51. data/generated/google/apis/compute_alpha.rb +1 -1
  52. data/generated/google/apis/compute_alpha/classes.rb +227 -48
  53. data/generated/google/apis/compute_alpha/representations.rb +84 -1
  54. data/generated/google/apis/compute_alpha/service.rb +50 -10
  55. data/generated/google/apis/compute_beta.rb +1 -1
  56. data/generated/google/apis/compute_beta/classes.rb +593 -77
  57. data/generated/google/apis/compute_beta/representations.rb +224 -18
  58. data/generated/google/apis/compute_beta/service.rb +174 -3
  59. data/generated/google/apis/compute_v1.rb +1 -1
  60. data/generated/google/apis/compute_v1/classes.rb +41 -18
  61. data/generated/google/apis/compute_v1/representations.rb +3 -0
  62. data/generated/google/apis/content_v2.rb +1 -1
  63. data/generated/google/apis/content_v2/classes.rb +372 -119
  64. data/generated/google/apis/content_v2/representations.rb +157 -39
  65. data/generated/google/apis/content_v2/service.rb +101 -11
  66. data/generated/google/apis/content_v2sandbox.rb +1 -1
  67. data/generated/google/apis/content_v2sandbox/classes.rb +372 -119
  68. data/generated/google/apis/content_v2sandbox/representations.rb +157 -39
  69. data/generated/google/apis/content_v2sandbox/service.rb +90 -0
  70. data/generated/google/apis/customsearch_v1.rb +1 -1
  71. data/generated/google/apis/dataflow_v1b3.rb +1 -1
  72. data/generated/google/apis/dataflow_v1b3/classes.rb +7 -0
  73. data/generated/google/apis/dataflow_v1b3/representations.rb +1 -0
  74. data/generated/google/apis/dataproc_v1.rb +1 -1
  75. data/generated/google/apis/dataproc_v1/classes.rb +12 -0
  76. data/generated/google/apis/dataproc_v1/representations.rb +2 -0
  77. data/generated/google/apis/dataproc_v1beta2.rb +1 -1
  78. data/generated/google/apis/dataproc_v1beta2/classes.rb +21 -6
  79. data/generated/google/apis/dataproc_v1beta2/representations.rb +2 -0
  80. data/generated/google/apis/datastore_v1.rb +1 -1
  81. data/generated/google/apis/datastore_v1/classes.rb +2 -2
  82. data/generated/google/apis/datastore_v1beta3.rb +1 -1
  83. data/generated/google/apis/datastore_v1beta3/classes.rb +2 -2
  84. data/generated/google/apis/dlp_v2.rb +1 -1
  85. data/generated/google/apis/dlp_v2/classes.rb +110 -5
  86. data/generated/google/apis/dlp_v2/representations.rb +17 -0
  87. data/generated/google/apis/dlp_v2/service.rb +41 -3
  88. data/generated/google/apis/file_v1beta1.rb +1 -1
  89. data/generated/google/apis/file_v1beta1/classes.rb +0 -234
  90. data/generated/google/apis/file_v1beta1/representations.rb +0 -79
  91. data/generated/google/apis/firebasedynamiclinks_v1.rb +1 -1
  92. data/generated/google/apis/firebasedynamiclinks_v1/classes.rb +19 -1
  93. data/generated/google/apis/firebasedynamiclinks_v1/representations.rb +3 -0
  94. data/generated/google/apis/firebasedynamiclinks_v1/service.rb +4 -1
  95. data/generated/google/apis/firebasehosting_v1beta1.rb +43 -0
  96. data/generated/google/apis/firebasehosting_v1beta1/classes.rb +767 -0
  97. data/generated/google/apis/firebasehosting_v1beta1/representations.rb +337 -0
  98. data/generated/google/apis/firebasehosting_v1beta1/service.rb +502 -0
  99. data/generated/google/apis/firebaserules_v1.rb +1 -1
  100. data/generated/google/apis/firebaserules_v1/classes.rb +8 -0
  101. data/generated/google/apis/firebaserules_v1/representations.rb +1 -0
  102. data/generated/google/apis/firebaserules_v1/service.rb +1 -1
  103. data/generated/google/apis/firestore_v1beta2.rb +1 -1
  104. data/generated/google/apis/firestore_v1beta2/service.rb +80 -80
  105. data/generated/google/apis/games_v1.rb +1 -1
  106. data/generated/google/apis/games_v1/service.rb +4 -1
  107. data/generated/google/apis/iam_v1.rb +1 -1
  108. data/generated/google/apis/iam_v1/classes.rb +3 -1
  109. data/generated/google/apis/iamcredentials_v1.rb +1 -1
  110. data/generated/google/apis/iamcredentials_v1/service.rb +0 -10
  111. data/generated/google/apis/iap_v1beta1.rb +1 -1
  112. data/generated/google/apis/iap_v1beta1/service.rb +339 -0
  113. data/generated/google/apis/jobs_v2.rb +1 -1
  114. data/generated/google/apis/jobs_v2/classes.rb +45 -37
  115. data/generated/google/apis/jobs_v3.rb +1 -1
  116. data/generated/google/apis/jobs_v3/classes.rb +21 -18
  117. data/generated/google/apis/jobs_v3p1beta1.rb +1 -1
  118. data/generated/google/apis/jobs_v3p1beta1/classes.rb +45 -20
  119. data/generated/google/apis/jobs_v3p1beta1/representations.rb +2 -0
  120. data/generated/google/apis/language_v1.rb +1 -1
  121. data/generated/google/apis/language_v1beta1.rb +1 -1
  122. data/generated/google/apis/language_v1beta2.rb +1 -1
  123. data/generated/google/apis/logging_v2.rb +1 -1
  124. data/generated/google/apis/logging_v2/classes.rb +12 -0
  125. data/generated/google/apis/logging_v2/representations.rb +1 -0
  126. data/generated/google/apis/logging_v2beta1.rb +1 -1
  127. data/generated/google/apis/logging_v2beta1/classes.rb +12 -0
  128. data/generated/google/apis/logging_v2beta1/representations.rb +1 -0
  129. data/generated/google/apis/ml_v1.rb +1 -1
  130. data/generated/google/apis/ml_v1/classes.rb +2 -2
  131. data/generated/google/apis/monitoring_v3.rb +1 -1
  132. data/generated/google/apis/monitoring_v3/classes.rb +19 -17
  133. data/generated/google/apis/monitoring_v3/representations.rb +1 -2
  134. data/generated/google/apis/partners_v2.rb +1 -1
  135. data/generated/google/apis/partners_v2/classes.rb +18 -15
  136. data/generated/google/apis/proximitybeacon_v1beta1.rb +1 -1
  137. data/generated/google/apis/proximitybeacon_v1beta1/classes.rb +18 -15
  138. data/generated/google/apis/redis_v1.rb +1 -1
  139. data/generated/google/apis/redis_v1/classes.rb +1 -1
  140. data/generated/google/apis/serviceconsumermanagement_v1.rb +1 -1
  141. data/generated/google/apis/serviceconsumermanagement_v1/classes.rb +1 -1
  142. data/generated/google/apis/servicemanagement_v1.rb +1 -1
  143. data/generated/google/apis/servicemanagement_v1/classes.rb +2 -150
  144. data/generated/google/apis/servicemanagement_v1/representations.rb +0 -42
  145. data/generated/google/apis/servicenetworking_v1beta.rb +38 -0
  146. data/generated/google/apis/servicenetworking_v1beta/classes.rb +3440 -0
  147. data/generated/google/apis/servicenetworking_v1beta/representations.rb +992 -0
  148. data/generated/google/apis/servicenetworking_v1beta/service.rb +227 -0
  149. data/generated/google/apis/serviceusage_v1.rb +1 -1
  150. data/generated/google/apis/serviceusage_v1/classes.rb +1 -1
  151. data/generated/google/apis/serviceusage_v1beta1.rb +1 -1
  152. data/generated/google/apis/serviceusage_v1beta1/classes.rb +1 -1
  153. data/generated/google/apis/serviceuser_v1.rb +1 -1
  154. data/generated/google/apis/serviceuser_v1/classes.rb +2 -150
  155. data/generated/google/apis/serviceuser_v1/representations.rb +0 -42
  156. data/generated/google/apis/spanner_v1.rb +1 -1
  157. data/generated/google/apis/spanner_v1/classes.rb +308 -30
  158. data/generated/google/apis/spanner_v1/representations.rb +17 -0
  159. data/generated/google/apis/streetviewpublish_v1.rb +1 -1
  160. data/generated/google/apis/streetviewpublish_v1/classes.rb +12 -0
  161. data/generated/google/apis/streetviewpublish_v1/representations.rb +1 -0
  162. data/generated/google/apis/testing_v1.rb +1 -1
  163. data/generated/google/apis/testing_v1/classes.rb +47 -0
  164. data/generated/google/apis/testing_v1/representations.rb +18 -0
  165. data/generated/google/apis/videointelligence_v1.rb +1 -1
  166. data/generated/google/apis/videointelligence_v1/classes.rb +676 -0
  167. data/generated/google/apis/videointelligence_v1/representations.rb +306 -0
  168. data/generated/google/apis/videointelligence_v1beta2.rb +1 -1
  169. data/generated/google/apis/videointelligence_v1beta2/classes.rb +676 -0
  170. data/generated/google/apis/videointelligence_v1beta2/representations.rb +306 -0
  171. data/generated/google/apis/{videointelligence_v1beta1.rb → videointelligence_v1p1beta1.rb} +6 -6
  172. data/generated/google/apis/{videointelligence_v1beta1 → videointelligence_v1p1beta1}/classes.rb +885 -489
  173. data/generated/google/apis/{videointelligence_v1beta1 → videointelligence_v1p1beta1}/representations.rb +357 -194
  174. data/generated/google/apis/{videointelligence_v1beta1 → videointelligence_v1p1beta1}/service.rb +12 -12
  175. data/generated/google/apis/vision_v1.rb +1 -1
  176. data/generated/google/apis/vision_v1/classes.rb +1 -1
  177. data/generated/google/apis/vision_v1p1beta1.rb +1 -1
  178. data/generated/google/apis/vision_v1p1beta1/classes.rb +1 -1
  179. data/generated/google/apis/vision_v1p2beta1.rb +1 -1
  180. data/generated/google/apis/vision_v1p2beta1/classes.rb +1 -1
  181. data/generated/google/apis/youtube_partner_v1.rb +2 -2
  182. data/generated/google/apis/youtube_partner_v1/classes.rb +2 -1
  183. data/generated/google/apis/youtube_partner_v1/service.rb +1 -1
  184. data/lib/google/apis/version.rb +1 -1
  185. metadata +22 -6
@@ -0,0 +1,263 @@
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 CloudassetV1beta1
24
+
25
+ class Asset
26
+ class Representation < Google::Apis::Core::JsonRepresentation; end
27
+
28
+ include Google::Apis::Core::JsonObjectSupport
29
+ end
30
+
31
+ class AuditConfig
32
+ class Representation < Google::Apis::Core::JsonRepresentation; end
33
+
34
+ include Google::Apis::Core::JsonObjectSupport
35
+ end
36
+
37
+ class AuditLogConfig
38
+ class Representation < Google::Apis::Core::JsonRepresentation; end
39
+
40
+ include Google::Apis::Core::JsonObjectSupport
41
+ end
42
+
43
+ class BatchGetAssetsHistoryResponse
44
+ class Representation < Google::Apis::Core::JsonRepresentation; end
45
+
46
+ include Google::Apis::Core::JsonObjectSupport
47
+ end
48
+
49
+ class Binding
50
+ class Representation < Google::Apis::Core::JsonRepresentation; end
51
+
52
+ include Google::Apis::Core::JsonObjectSupport
53
+ end
54
+
55
+ class ExportAssetsRequest
56
+ class Representation < Google::Apis::Core::JsonRepresentation; end
57
+
58
+ include Google::Apis::Core::JsonObjectSupport
59
+ end
60
+
61
+ class Expr
62
+ class Representation < Google::Apis::Core::JsonRepresentation; end
63
+
64
+ include Google::Apis::Core::JsonObjectSupport
65
+ end
66
+
67
+ class GcsDestination
68
+ class Representation < Google::Apis::Core::JsonRepresentation; end
69
+
70
+ include Google::Apis::Core::JsonObjectSupport
71
+ end
72
+
73
+ class Operation
74
+ class Representation < Google::Apis::Core::JsonRepresentation; end
75
+
76
+ include Google::Apis::Core::JsonObjectSupport
77
+ end
78
+
79
+ class OutputConfig
80
+ class Representation < Google::Apis::Core::JsonRepresentation; end
81
+
82
+ include Google::Apis::Core::JsonObjectSupport
83
+ end
84
+
85
+ class Policy
86
+ class Representation < Google::Apis::Core::JsonRepresentation; end
87
+
88
+ include Google::Apis::Core::JsonObjectSupport
89
+ end
90
+
91
+ class Resource
92
+ class Representation < Google::Apis::Core::JsonRepresentation; end
93
+
94
+ include Google::Apis::Core::JsonObjectSupport
95
+ end
96
+
97
+ class Status
98
+ class Representation < Google::Apis::Core::JsonRepresentation; end
99
+
100
+ include Google::Apis::Core::JsonObjectSupport
101
+ end
102
+
103
+ class TemporalAsset
104
+ class Representation < Google::Apis::Core::JsonRepresentation; end
105
+
106
+ include Google::Apis::Core::JsonObjectSupport
107
+ end
108
+
109
+ class TimeWindow
110
+ class Representation < Google::Apis::Core::JsonRepresentation; end
111
+
112
+ include Google::Apis::Core::JsonObjectSupport
113
+ end
114
+
115
+ class Asset
116
+ # @private
117
+ class Representation < Google::Apis::Core::JsonRepresentation
118
+ property :asset_type, as: 'assetType'
119
+ property :iam_policy, as: 'iamPolicy', class: Google::Apis::CloudassetV1beta1::Policy, decorator: Google::Apis::CloudassetV1beta1::Policy::Representation
120
+
121
+ property :name, as: 'name'
122
+ property :resource, as: 'resource', class: Google::Apis::CloudassetV1beta1::Resource, decorator: Google::Apis::CloudassetV1beta1::Resource::Representation
123
+
124
+ end
125
+ end
126
+
127
+ class AuditConfig
128
+ # @private
129
+ class Representation < Google::Apis::Core::JsonRepresentation
130
+ collection :audit_log_configs, as: 'auditLogConfigs', class: Google::Apis::CloudassetV1beta1::AuditLogConfig, decorator: Google::Apis::CloudassetV1beta1::AuditLogConfig::Representation
131
+
132
+ property :service, as: 'service'
133
+ end
134
+ end
135
+
136
+ class AuditLogConfig
137
+ # @private
138
+ class Representation < Google::Apis::Core::JsonRepresentation
139
+ collection :exempted_members, as: 'exemptedMembers'
140
+ property :log_type, as: 'logType'
141
+ end
142
+ end
143
+
144
+ class BatchGetAssetsHistoryResponse
145
+ # @private
146
+ class Representation < Google::Apis::Core::JsonRepresentation
147
+ collection :assets, as: 'assets', class: Google::Apis::CloudassetV1beta1::TemporalAsset, decorator: Google::Apis::CloudassetV1beta1::TemporalAsset::Representation
148
+
149
+ end
150
+ end
151
+
152
+ class Binding
153
+ # @private
154
+ class Representation < Google::Apis::Core::JsonRepresentation
155
+ property :condition, as: 'condition', class: Google::Apis::CloudassetV1beta1::Expr, decorator: Google::Apis::CloudassetV1beta1::Expr::Representation
156
+
157
+ collection :members, as: 'members'
158
+ property :role, as: 'role'
159
+ end
160
+ end
161
+
162
+ class ExportAssetsRequest
163
+ # @private
164
+ class Representation < Google::Apis::Core::JsonRepresentation
165
+ collection :asset_types, as: 'assetTypes'
166
+ property :content_type, as: 'contentType'
167
+ property :output_config, as: 'outputConfig', class: Google::Apis::CloudassetV1beta1::OutputConfig, decorator: Google::Apis::CloudassetV1beta1::OutputConfig::Representation
168
+
169
+ property :read_time, as: 'readTime'
170
+ end
171
+ end
172
+
173
+ class Expr
174
+ # @private
175
+ class Representation < Google::Apis::Core::JsonRepresentation
176
+ property :description, as: 'description'
177
+ property :expression, as: 'expression'
178
+ property :location, as: 'location'
179
+ property :title, as: 'title'
180
+ end
181
+ end
182
+
183
+ class GcsDestination
184
+ # @private
185
+ class Representation < Google::Apis::Core::JsonRepresentation
186
+ property :uri, as: 'uri'
187
+ end
188
+ end
189
+
190
+ class Operation
191
+ # @private
192
+ class Representation < Google::Apis::Core::JsonRepresentation
193
+ property :done, as: 'done'
194
+ property :error, as: 'error', class: Google::Apis::CloudassetV1beta1::Status, decorator: Google::Apis::CloudassetV1beta1::Status::Representation
195
+
196
+ hash :metadata, as: 'metadata'
197
+ property :name, as: 'name'
198
+ hash :response, as: 'response'
199
+ end
200
+ end
201
+
202
+ class OutputConfig
203
+ # @private
204
+ class Representation < Google::Apis::Core::JsonRepresentation
205
+ property :gcs_destination, as: 'gcsDestination', class: Google::Apis::CloudassetV1beta1::GcsDestination, decorator: Google::Apis::CloudassetV1beta1::GcsDestination::Representation
206
+
207
+ end
208
+ end
209
+
210
+ class Policy
211
+ # @private
212
+ class Representation < Google::Apis::Core::JsonRepresentation
213
+ collection :audit_configs, as: 'auditConfigs', class: Google::Apis::CloudassetV1beta1::AuditConfig, decorator: Google::Apis::CloudassetV1beta1::AuditConfig::Representation
214
+
215
+ collection :bindings, as: 'bindings', class: Google::Apis::CloudassetV1beta1::Binding, decorator: Google::Apis::CloudassetV1beta1::Binding::Representation
216
+
217
+ property :etag, :base64 => true, as: 'etag'
218
+ property :version, as: 'version'
219
+ end
220
+ end
221
+
222
+ class Resource
223
+ # @private
224
+ class Representation < Google::Apis::Core::JsonRepresentation
225
+ hash :data, as: 'data'
226
+ property :discovery_document_uri, as: 'discoveryDocumentUri'
227
+ property :discovery_name, as: 'discoveryName'
228
+ property :parent, as: 'parent'
229
+ property :resource_url, as: 'resourceUrl'
230
+ property :version, as: 'version'
231
+ end
232
+ end
233
+
234
+ class Status
235
+ # @private
236
+ class Representation < Google::Apis::Core::JsonRepresentation
237
+ property :code, as: 'code'
238
+ collection :details, as: 'details'
239
+ property :message, as: 'message'
240
+ end
241
+ end
242
+
243
+ class TemporalAsset
244
+ # @private
245
+ class Representation < Google::Apis::Core::JsonRepresentation
246
+ property :asset, as: 'asset', class: Google::Apis::CloudassetV1beta1::Asset, decorator: Google::Apis::CloudassetV1beta1::Asset::Representation
247
+
248
+ property :deleted, as: 'deleted'
249
+ property :window, as: 'window', class: Google::Apis::CloudassetV1beta1::TimeWindow, decorator: Google::Apis::CloudassetV1beta1::TimeWindow::Representation
250
+
251
+ end
252
+ end
253
+
254
+ class TimeWindow
255
+ # @private
256
+ class Representation < Google::Apis::Core::JsonRepresentation
257
+ property :end_time, as: 'endTime'
258
+ property :start_time, as: 'startTime'
259
+ end
260
+ end
261
+ end
262
+ end
263
+ end
@@ -0,0 +1,313 @@
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 CloudassetV1beta1
23
+ # Cloud Asset API
24
+ #
25
+ # The cloud asset API manages the history and inventory of cloud resources.
26
+ #
27
+ # @example
28
+ # require 'google/apis/cloudasset_v1beta1'
29
+ #
30
+ # Cloudasset = Google::Apis::CloudassetV1beta1 # Alias the module
31
+ # service = Cloudasset::CloudAssetService.new
32
+ #
33
+ # @see https://console.cloud.google.com/apis/api/cloudasset.googleapis.com/overview
34
+ class CloudAssetService < 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://cloudasset.googleapis.com/', '')
47
+ @batch_path = 'batch'
48
+ end
49
+
50
+ # Batch gets the update history of assets that overlap a time window.
51
+ # For RESOURCE content, this API outputs history with asset in both
52
+ # non-delete or deleted status.
53
+ # For IAM_POLICY content, this API outputs history when the asset and its
54
+ # attached IAM POLICY both exist. This can create gaps in the output history.
55
+ # @param [String] parent
56
+ # Required. The relative name of the root asset. It can only be an
57
+ # organization number (such as "organizations/123"), a project ID (such as
58
+ # "projects/my-project-id")", or a project number (such as "projects/12345").
59
+ # @param [Array<String>, String] asset_names
60
+ # A list of the full names of the assets. For example:
61
+ # `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/
62
+ # instance1`.
63
+ # See [Resource Names](https://cloud.google.com/apis/design/resource_names#
64
+ # full_resource_name)
65
+ # for more info.
66
+ # The request becomes a no-op if the asset name list is empty, and the max
67
+ # size of the asset name list is 100 in one request.
68
+ # @param [String] content_type
69
+ # Required. The content type.
70
+ # @param [String] read_time_window_end_time
71
+ # End time of the time window (exclusive).
72
+ # Current timestamp if not specified.
73
+ # @param [String] read_time_window_start_time
74
+ # Start time of the time window (inclusive).
75
+ # @param [String] fields
76
+ # Selector specifying which fields to include in a partial response.
77
+ # @param [String] quota_user
78
+ # Available to use for quota purposes for server-side applications. Can be any
79
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
80
+ # @param [Google::Apis::RequestOptions] options
81
+ # Request-specific options
82
+ #
83
+ # @yield [result, err] Result & error if block supplied
84
+ # @yieldparam result [Google::Apis::CloudassetV1beta1::BatchGetAssetsHistoryResponse] parsed result object
85
+ # @yieldparam err [StandardError] error object if request failed
86
+ #
87
+ # @return [Google::Apis::CloudassetV1beta1::BatchGetAssetsHistoryResponse]
88
+ #
89
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
90
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
91
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
92
+ def batch_organization_get_assets_history(parent, asset_names: nil, content_type: nil, read_time_window_end_time: nil, read_time_window_start_time: nil, fields: nil, quota_user: nil, options: nil, &block)
93
+ command = make_simple_command(:get, 'v1beta1/{+parent}:batchGetAssetsHistory', options)
94
+ command.response_representation = Google::Apis::CloudassetV1beta1::BatchGetAssetsHistoryResponse::Representation
95
+ command.response_class = Google::Apis::CloudassetV1beta1::BatchGetAssetsHistoryResponse
96
+ command.params['parent'] = parent unless parent.nil?
97
+ command.query['assetNames'] = asset_names unless asset_names.nil?
98
+ command.query['contentType'] = content_type unless content_type.nil?
99
+ command.query['readTimeWindow.endTime'] = read_time_window_end_time unless read_time_window_end_time.nil?
100
+ command.query['readTimeWindow.startTime'] = read_time_window_start_time unless read_time_window_start_time.nil?
101
+ command.query['fields'] = fields unless fields.nil?
102
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
103
+ execute_or_queue_command(command, &block)
104
+ end
105
+
106
+ # Exports assets with time and resource types to a given Cloud Storage
107
+ # location. The output format is newline-delimited JSON.
108
+ # This API implements the google.longrunning.Operation API allowing you
109
+ # to keep track of the export.
110
+ # @param [String] parent
111
+ # Required. The relative name of the root asset. This can only be an
112
+ # organization
113
+ # number (such as "organizations/123"), a project ID (such as
114
+ # "projects/my-project-id"), or a project number (such as "projects/12345").
115
+ # @param [Google::Apis::CloudassetV1beta1::ExportAssetsRequest] export_assets_request_object
116
+ # @param [String] fields
117
+ # Selector specifying which fields to include in a partial response.
118
+ # @param [String] quota_user
119
+ # Available to use for quota purposes for server-side applications. Can be any
120
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
121
+ # @param [Google::Apis::RequestOptions] options
122
+ # Request-specific options
123
+ #
124
+ # @yield [result, err] Result & error if block supplied
125
+ # @yieldparam result [Google::Apis::CloudassetV1beta1::Operation] parsed result object
126
+ # @yieldparam err [StandardError] error object if request failed
127
+ #
128
+ # @return [Google::Apis::CloudassetV1beta1::Operation]
129
+ #
130
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
131
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
132
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
133
+ def export_organization_assets(parent, export_assets_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
134
+ command = make_simple_command(:post, 'v1beta1/{+parent}:exportAssets', options)
135
+ command.request_representation = Google::Apis::CloudassetV1beta1::ExportAssetsRequest::Representation
136
+ command.request_object = export_assets_request_object
137
+ command.response_representation = Google::Apis::CloudassetV1beta1::Operation::Representation
138
+ command.response_class = Google::Apis::CloudassetV1beta1::Operation
139
+ command.params['parent'] = parent unless parent.nil?
140
+ command.query['fields'] = fields unless fields.nil?
141
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
142
+ execute_or_queue_command(command, &block)
143
+ end
144
+
145
+ # Gets the latest state of a long-running operation. Clients can use this
146
+ # method to poll the operation result at intervals as recommended by the API
147
+ # service.
148
+ # @param [String] name
149
+ # The name of the operation resource.
150
+ # @param [String] fields
151
+ # Selector specifying which fields to include in a partial response.
152
+ # @param [String] quota_user
153
+ # Available to use for quota purposes for server-side applications. Can be any
154
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
155
+ # @param [Google::Apis::RequestOptions] options
156
+ # Request-specific options
157
+ #
158
+ # @yield [result, err] Result & error if block supplied
159
+ # @yieldparam result [Google::Apis::CloudassetV1beta1::Operation] parsed result object
160
+ # @yieldparam err [StandardError] error object if request failed
161
+ #
162
+ # @return [Google::Apis::CloudassetV1beta1::Operation]
163
+ #
164
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
165
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
166
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
167
+ def get_organization_operation(name, fields: nil, quota_user: nil, options: nil, &block)
168
+ command = make_simple_command(:get, 'v1beta1/{+name}', options)
169
+ command.response_representation = Google::Apis::CloudassetV1beta1::Operation::Representation
170
+ command.response_class = Google::Apis::CloudassetV1beta1::Operation
171
+ command.params['name'] = name unless name.nil?
172
+ command.query['fields'] = fields unless fields.nil?
173
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
174
+ execute_or_queue_command(command, &block)
175
+ end
176
+
177
+ # Batch gets the update history of assets that overlap a time window.
178
+ # For RESOURCE content, this API outputs history with asset in both
179
+ # non-delete or deleted status.
180
+ # For IAM_POLICY content, this API outputs history when the asset and its
181
+ # attached IAM POLICY both exist. This can create gaps in the output history.
182
+ # @param [String] parent
183
+ # Required. The relative name of the root asset. It can only be an
184
+ # organization number (such as "organizations/123"), a project ID (such as
185
+ # "projects/my-project-id")", or a project number (such as "projects/12345").
186
+ # @param [Array<String>, String] asset_names
187
+ # A list of the full names of the assets. For example:
188
+ # `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/
189
+ # instance1`.
190
+ # See [Resource Names](https://cloud.google.com/apis/design/resource_names#
191
+ # full_resource_name)
192
+ # for more info.
193
+ # The request becomes a no-op if the asset name list is empty, and the max
194
+ # size of the asset name list is 100 in one request.
195
+ # @param [String] content_type
196
+ # Required. The content type.
197
+ # @param [String] read_time_window_end_time
198
+ # End time of the time window (exclusive).
199
+ # Current timestamp if not specified.
200
+ # @param [String] read_time_window_start_time
201
+ # Start time of the time window (inclusive).
202
+ # @param [String] fields
203
+ # Selector specifying which fields to include in a partial response.
204
+ # @param [String] quota_user
205
+ # Available to use for quota purposes for server-side applications. Can be any
206
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
207
+ # @param [Google::Apis::RequestOptions] options
208
+ # Request-specific options
209
+ #
210
+ # @yield [result, err] Result & error if block supplied
211
+ # @yieldparam result [Google::Apis::CloudassetV1beta1::BatchGetAssetsHistoryResponse] parsed result object
212
+ # @yieldparam err [StandardError] error object if request failed
213
+ #
214
+ # @return [Google::Apis::CloudassetV1beta1::BatchGetAssetsHistoryResponse]
215
+ #
216
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
217
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
218
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
219
+ def batch_project_get_assets_history(parent, asset_names: nil, content_type: nil, read_time_window_end_time: nil, read_time_window_start_time: nil, fields: nil, quota_user: nil, options: nil, &block)
220
+ command = make_simple_command(:get, 'v1beta1/{+parent}:batchGetAssetsHistory', options)
221
+ command.response_representation = Google::Apis::CloudassetV1beta1::BatchGetAssetsHistoryResponse::Representation
222
+ command.response_class = Google::Apis::CloudassetV1beta1::BatchGetAssetsHistoryResponse
223
+ command.params['parent'] = parent unless parent.nil?
224
+ command.query['assetNames'] = asset_names unless asset_names.nil?
225
+ command.query['contentType'] = content_type unless content_type.nil?
226
+ command.query['readTimeWindow.endTime'] = read_time_window_end_time unless read_time_window_end_time.nil?
227
+ command.query['readTimeWindow.startTime'] = read_time_window_start_time unless read_time_window_start_time.nil?
228
+ command.query['fields'] = fields unless fields.nil?
229
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
230
+ execute_or_queue_command(command, &block)
231
+ end
232
+
233
+ # Exports assets with time and resource types to a given Cloud Storage
234
+ # location. The output format is newline-delimited JSON.
235
+ # This API implements the google.longrunning.Operation API allowing you
236
+ # to keep track of the export.
237
+ # @param [String] parent
238
+ # Required. The relative name of the root asset. This can only be an
239
+ # organization
240
+ # number (such as "organizations/123"), a project ID (such as
241
+ # "projects/my-project-id"), or a project number (such as "projects/12345").
242
+ # @param [Google::Apis::CloudassetV1beta1::ExportAssetsRequest] export_assets_request_object
243
+ # @param [String] fields
244
+ # Selector specifying which fields to include in a partial response.
245
+ # @param [String] quota_user
246
+ # Available to use for quota purposes for server-side applications. Can be any
247
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
248
+ # @param [Google::Apis::RequestOptions] options
249
+ # Request-specific options
250
+ #
251
+ # @yield [result, err] Result & error if block supplied
252
+ # @yieldparam result [Google::Apis::CloudassetV1beta1::Operation] parsed result object
253
+ # @yieldparam err [StandardError] error object if request failed
254
+ #
255
+ # @return [Google::Apis::CloudassetV1beta1::Operation]
256
+ #
257
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
258
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
259
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
260
+ def export_project_assets(parent, export_assets_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
261
+ command = make_simple_command(:post, 'v1beta1/{+parent}:exportAssets', options)
262
+ command.request_representation = Google::Apis::CloudassetV1beta1::ExportAssetsRequest::Representation
263
+ command.request_object = export_assets_request_object
264
+ command.response_representation = Google::Apis::CloudassetV1beta1::Operation::Representation
265
+ command.response_class = Google::Apis::CloudassetV1beta1::Operation
266
+ command.params['parent'] = parent unless parent.nil?
267
+ command.query['fields'] = fields unless fields.nil?
268
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
269
+ execute_or_queue_command(command, &block)
270
+ end
271
+
272
+ # Gets the latest state of a long-running operation. Clients can use this
273
+ # method to poll the operation result at intervals as recommended by the API
274
+ # service.
275
+ # @param [String] name
276
+ # The name of the operation resource.
277
+ # @param [String] fields
278
+ # Selector specifying which fields to include in a partial response.
279
+ # @param [String] quota_user
280
+ # Available to use for quota purposes for server-side applications. Can be any
281
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
282
+ # @param [Google::Apis::RequestOptions] options
283
+ # Request-specific options
284
+ #
285
+ # @yield [result, err] Result & error if block supplied
286
+ # @yieldparam result [Google::Apis::CloudassetV1beta1::Operation] parsed result object
287
+ # @yieldparam err [StandardError] error object if request failed
288
+ #
289
+ # @return [Google::Apis::CloudassetV1beta1::Operation]
290
+ #
291
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
292
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
293
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
294
+ def get_project_operation(name, fields: nil, quota_user: nil, options: nil, &block)
295
+ command = make_simple_command(:get, 'v1beta1/{+name}', options)
296
+ command.response_representation = Google::Apis::CloudassetV1beta1::Operation::Representation
297
+ command.response_class = Google::Apis::CloudassetV1beta1::Operation
298
+ command.params['name'] = name unless name.nil?
299
+ command.query['fields'] = fields unless fields.nil?
300
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
301
+ execute_or_queue_command(command, &block)
302
+ end
303
+
304
+ protected
305
+
306
+ def apply_command_defaults(command)
307
+ command.query['key'] = key unless key.nil?
308
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
309
+ end
310
+ end
311
+ end
312
+ end
313
+ end