google-apis-storage_v1 0.19.0 → 0.40.0

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.
@@ -32,6 +32,8 @@ module Google
32
32
  #
33
33
  # @see https://developers.google.com/storage/docs/json_api/
34
34
  class StorageService < Google::Apis::Core::BaseService
35
+ DEFAULT_ENDPOINT_TEMPLATE = "https://storage.$UNIVERSE_DOMAIN$/"
36
+
35
37
  # @return [String]
36
38
  # API key. Your API key identifies your project and provides you with API access,
37
39
  # quota, and reports. Required unless you provide an OAuth 2.0 token.
@@ -47,12 +49,271 @@ module Google
47
49
  attr_accessor :user_ip
48
50
 
49
51
  def initialize
50
- super('https://storage.googleapis.com/', 'storage/v1/',
52
+ super(DEFAULT_ENDPOINT_TEMPLATE, 'storage/v1/',
51
53
  client_name: 'google-apis-storage_v1',
52
54
  client_version: Google::Apis::StorageV1::GEM_VERSION)
53
55
  @batch_path = 'batch/storage/v1'
54
56
  end
55
57
 
58
+ # Disables an Anywhere Cache instance.
59
+ # @param [String] bucket
60
+ # Name of the parent bucket.
61
+ # @param [String] anywhere_cache_id
62
+ # The ID of requested Anywhere Cache instance.
63
+ # @param [String] fields
64
+ # Selector specifying which fields to include in a partial response.
65
+ # @param [String] quota_user
66
+ # An opaque string that represents a user for quota purposes. Must not exceed 40
67
+ # characters.
68
+ # @param [String] user_ip
69
+ # Deprecated. Please use quotaUser instead.
70
+ # @param [Google::Apis::RequestOptions] options
71
+ # Request-specific options
72
+ #
73
+ # @yield [result, err] Result & error if block supplied
74
+ # @yieldparam result [Google::Apis::StorageV1::AnywhereCache] parsed result object
75
+ # @yieldparam err [StandardError] error object if request failed
76
+ #
77
+ # @return [Google::Apis::StorageV1::AnywhereCache]
78
+ #
79
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
80
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
81
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
82
+ def disable_anywhere_cach(bucket, anywhere_cache_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
83
+ command = make_simple_command(:post, 'b/{bucket}/anywhereCaches/{anywhereCacheId}/disable', options)
84
+ command.response_representation = Google::Apis::StorageV1::AnywhereCache::Representation
85
+ command.response_class = Google::Apis::StorageV1::AnywhereCache
86
+ command.params['bucket'] = bucket unless bucket.nil?
87
+ command.params['anywhereCacheId'] = anywhere_cache_id unless anywhere_cache_id.nil?
88
+ command.query['fields'] = fields unless fields.nil?
89
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
90
+ command.query['userIp'] = user_ip unless user_ip.nil?
91
+ execute_or_queue_command(command, &block)
92
+ end
93
+
94
+ # Returns the metadata of an Anywhere Cache instance.
95
+ # @param [String] bucket
96
+ # Name of the parent bucket.
97
+ # @param [String] anywhere_cache_id
98
+ # The ID of requested Anywhere Cache instance.
99
+ # @param [String] fields
100
+ # Selector specifying which fields to include in a partial response.
101
+ # @param [String] quota_user
102
+ # An opaque string that represents a user for quota purposes. Must not exceed 40
103
+ # characters.
104
+ # @param [String] user_ip
105
+ # Deprecated. Please use quotaUser instead.
106
+ # @param [Google::Apis::RequestOptions] options
107
+ # Request-specific options
108
+ #
109
+ # @yield [result, err] Result & error if block supplied
110
+ # @yieldparam result [Google::Apis::StorageV1::AnywhereCache] parsed result object
111
+ # @yieldparam err [StandardError] error object if request failed
112
+ #
113
+ # @return [Google::Apis::StorageV1::AnywhereCache]
114
+ #
115
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
116
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
117
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
118
+ def get_anywhere_cach(bucket, anywhere_cache_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
119
+ command = make_simple_command(:get, 'b/{bucket}/anywhereCaches/{anywhereCacheId}', options)
120
+ command.response_representation = Google::Apis::StorageV1::AnywhereCache::Representation
121
+ command.response_class = Google::Apis::StorageV1::AnywhereCache
122
+ command.params['bucket'] = bucket unless bucket.nil?
123
+ command.params['anywhereCacheId'] = anywhere_cache_id unless anywhere_cache_id.nil?
124
+ command.query['fields'] = fields unless fields.nil?
125
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
126
+ command.query['userIp'] = user_ip unless user_ip.nil?
127
+ execute_or_queue_command(command, &block)
128
+ end
129
+
130
+ # Creates an Anywhere Cache instance.
131
+ # @param [String] bucket
132
+ # Name of the parent bucket.
133
+ # @param [Google::Apis::StorageV1::AnywhereCache] anywhere_cache_object
134
+ # @param [String] fields
135
+ # Selector specifying which fields to include in a partial response.
136
+ # @param [String] quota_user
137
+ # An opaque string that represents a user for quota purposes. Must not exceed 40
138
+ # characters.
139
+ # @param [String] user_ip
140
+ # Deprecated. Please use quotaUser instead.
141
+ # @param [Google::Apis::RequestOptions] options
142
+ # Request-specific options
143
+ #
144
+ # @yield [result, err] Result & error if block supplied
145
+ # @yieldparam result [Google::Apis::StorageV1::GoogleLongrunningOperation] parsed result object
146
+ # @yieldparam err [StandardError] error object if request failed
147
+ #
148
+ # @return [Google::Apis::StorageV1::GoogleLongrunningOperation]
149
+ #
150
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
151
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
152
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
153
+ def insert_anywhere_cach(bucket, anywhere_cache_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
154
+ command = make_simple_command(:post, 'b/{bucket}/anywhereCaches', options)
155
+ command.request_representation = Google::Apis::StorageV1::AnywhereCache::Representation
156
+ command.request_object = anywhere_cache_object
157
+ command.response_representation = Google::Apis::StorageV1::GoogleLongrunningOperation::Representation
158
+ command.response_class = Google::Apis::StorageV1::GoogleLongrunningOperation
159
+ command.params['bucket'] = bucket unless bucket.nil?
160
+ command.query['fields'] = fields unless fields.nil?
161
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
162
+ command.query['userIp'] = user_ip unless user_ip.nil?
163
+ execute_or_queue_command(command, &block)
164
+ end
165
+
166
+ # Returns a list of Anywhere Cache instances of the bucket matching the criteria.
167
+ # @param [String] bucket
168
+ # Name of the parent bucket.
169
+ # @param [Fixnum] page_size
170
+ # Maximum number of items to return in a single page of responses. Maximum 1000.
171
+ # @param [String] page_token
172
+ # A previously-returned page token representing part of the larger set of
173
+ # results to view.
174
+ # @param [String] fields
175
+ # Selector specifying which fields to include in a partial response.
176
+ # @param [String] quota_user
177
+ # An opaque string that represents a user for quota purposes. Must not exceed 40
178
+ # characters.
179
+ # @param [String] user_ip
180
+ # Deprecated. Please use quotaUser instead.
181
+ # @param [Google::Apis::RequestOptions] options
182
+ # Request-specific options
183
+ #
184
+ # @yield [result, err] Result & error if block supplied
185
+ # @yieldparam result [Google::Apis::StorageV1::AnywhereCaches] parsed result object
186
+ # @yieldparam err [StandardError] error object if request failed
187
+ #
188
+ # @return [Google::Apis::StorageV1::AnywhereCaches]
189
+ #
190
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
191
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
192
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
193
+ def list_anywhere_caches(bucket, page_size: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
194
+ command = make_simple_command(:get, 'b/{bucket}/anywhereCaches', options)
195
+ command.response_representation = Google::Apis::StorageV1::AnywhereCaches::Representation
196
+ command.response_class = Google::Apis::StorageV1::AnywhereCaches
197
+ command.params['bucket'] = bucket unless bucket.nil?
198
+ command.query['pageSize'] = page_size unless page_size.nil?
199
+ command.query['pageToken'] = page_token unless page_token.nil?
200
+ command.query['fields'] = fields unless fields.nil?
201
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
202
+ command.query['userIp'] = user_ip unless user_ip.nil?
203
+ execute_or_queue_command(command, &block)
204
+ end
205
+
206
+ # Pauses an Anywhere Cache instance.
207
+ # @param [String] bucket
208
+ # Name of the parent bucket.
209
+ # @param [String] anywhere_cache_id
210
+ # The ID of requested Anywhere Cache instance.
211
+ # @param [String] fields
212
+ # Selector specifying which fields to include in a partial response.
213
+ # @param [String] quota_user
214
+ # An opaque string that represents a user for quota purposes. Must not exceed 40
215
+ # characters.
216
+ # @param [String] user_ip
217
+ # Deprecated. Please use quotaUser instead.
218
+ # @param [Google::Apis::RequestOptions] options
219
+ # Request-specific options
220
+ #
221
+ # @yield [result, err] Result & error if block supplied
222
+ # @yieldparam result [Google::Apis::StorageV1::AnywhereCache] parsed result object
223
+ # @yieldparam err [StandardError] error object if request failed
224
+ #
225
+ # @return [Google::Apis::StorageV1::AnywhereCache]
226
+ #
227
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
228
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
229
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
230
+ def pause_anywhere_cach(bucket, anywhere_cache_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
231
+ command = make_simple_command(:post, 'b/{bucket}/anywhereCaches/{anywhereCacheId}/pause', options)
232
+ command.response_representation = Google::Apis::StorageV1::AnywhereCache::Representation
233
+ command.response_class = Google::Apis::StorageV1::AnywhereCache
234
+ command.params['bucket'] = bucket unless bucket.nil?
235
+ command.params['anywhereCacheId'] = anywhere_cache_id unless anywhere_cache_id.nil?
236
+ command.query['fields'] = fields unless fields.nil?
237
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
238
+ command.query['userIp'] = user_ip unless user_ip.nil?
239
+ execute_or_queue_command(command, &block)
240
+ end
241
+
242
+ # Resumes a paused or disabled Anywhere Cache instance.
243
+ # @param [String] bucket
244
+ # Name of the parent bucket.
245
+ # @param [String] anywhere_cache_id
246
+ # The ID of requested Anywhere Cache instance.
247
+ # @param [String] fields
248
+ # Selector specifying which fields to include in a partial response.
249
+ # @param [String] quota_user
250
+ # An opaque string that represents a user for quota purposes. Must not exceed 40
251
+ # characters.
252
+ # @param [String] user_ip
253
+ # Deprecated. Please use quotaUser instead.
254
+ # @param [Google::Apis::RequestOptions] options
255
+ # Request-specific options
256
+ #
257
+ # @yield [result, err] Result & error if block supplied
258
+ # @yieldparam result [Google::Apis::StorageV1::AnywhereCache] parsed result object
259
+ # @yieldparam err [StandardError] error object if request failed
260
+ #
261
+ # @return [Google::Apis::StorageV1::AnywhereCache]
262
+ #
263
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
264
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
265
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
266
+ def resume_anywhere_cach(bucket, anywhere_cache_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
267
+ command = make_simple_command(:post, 'b/{bucket}/anywhereCaches/{anywhereCacheId}/resume', options)
268
+ command.response_representation = Google::Apis::StorageV1::AnywhereCache::Representation
269
+ command.response_class = Google::Apis::StorageV1::AnywhereCache
270
+ command.params['bucket'] = bucket unless bucket.nil?
271
+ command.params['anywhereCacheId'] = anywhere_cache_id unless anywhere_cache_id.nil?
272
+ command.query['fields'] = fields unless fields.nil?
273
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
274
+ command.query['userIp'] = user_ip unless user_ip.nil?
275
+ execute_or_queue_command(command, &block)
276
+ end
277
+
278
+ # Updates the config(ttl and admissionPolicy) of an Anywhere Cache instance.
279
+ # @param [String] bucket
280
+ # Name of the parent bucket.
281
+ # @param [String] anywhere_cache_id
282
+ # The ID of requested Anywhere Cache instance.
283
+ # @param [Google::Apis::StorageV1::AnywhereCache] anywhere_cache_object
284
+ # @param [String] fields
285
+ # Selector specifying which fields to include in a partial response.
286
+ # @param [String] quota_user
287
+ # An opaque string that represents a user for quota purposes. Must not exceed 40
288
+ # characters.
289
+ # @param [String] user_ip
290
+ # Deprecated. Please use quotaUser instead.
291
+ # @param [Google::Apis::RequestOptions] options
292
+ # Request-specific options
293
+ #
294
+ # @yield [result, err] Result & error if block supplied
295
+ # @yieldparam result [Google::Apis::StorageV1::GoogleLongrunningOperation] parsed result object
296
+ # @yieldparam err [StandardError] error object if request failed
297
+ #
298
+ # @return [Google::Apis::StorageV1::GoogleLongrunningOperation]
299
+ #
300
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
301
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
302
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
303
+ def update_anywhere_cach(bucket, anywhere_cache_id, anywhere_cache_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
304
+ command = make_simple_command(:patch, 'b/{bucket}/anywhereCaches/{anywhereCacheId}', options)
305
+ command.request_representation = Google::Apis::StorageV1::AnywhereCache::Representation
306
+ command.request_object = anywhere_cache_object
307
+ command.response_representation = Google::Apis::StorageV1::GoogleLongrunningOperation::Representation
308
+ command.response_class = Google::Apis::StorageV1::GoogleLongrunningOperation
309
+ command.params['bucket'] = bucket unless bucket.nil?
310
+ command.params['anywhereCacheId'] = anywhere_cache_id unless anywhere_cache_id.nil?
311
+ command.query['fields'] = fields unless fields.nil?
312
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
313
+ command.query['userIp'] = user_ip unless user_ip.nil?
314
+ execute_or_queue_command(command, &block)
315
+ end
316
+
56
317
  # Permanently deletes the ACL entry for the specified entity on the specified
57
318
  # bucket.
58
319
  # @param [String] bucket
@@ -422,10 +683,50 @@ module Google
422
683
  execute_or_queue_command(command, &block)
423
684
  end
424
685
 
686
+ # Returns the storage layout configuration for the specified bucket. Note that
687
+ # this operation requires storage.objects.list permission.
688
+ # @param [String] bucket
689
+ # Name of a bucket.
690
+ # @param [String] prefix
691
+ # An optional prefix used for permission check. It is useful when the caller
692
+ # only has storage.objects.list permission under a specific prefix.
693
+ # @param [String] fields
694
+ # Selector specifying which fields to include in a partial response.
695
+ # @param [String] quota_user
696
+ # An opaque string that represents a user for quota purposes. Must not exceed 40
697
+ # characters.
698
+ # @param [String] user_ip
699
+ # Deprecated. Please use quotaUser instead.
700
+ # @param [Google::Apis::RequestOptions] options
701
+ # Request-specific options
702
+ #
703
+ # @yield [result, err] Result & error if block supplied
704
+ # @yieldparam result [Google::Apis::StorageV1::BucketStorageLayout] parsed result object
705
+ # @yieldparam err [StandardError] error object if request failed
706
+ #
707
+ # @return [Google::Apis::StorageV1::BucketStorageLayout]
708
+ #
709
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
710
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
711
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
712
+ def get_bucket_storage_layout(bucket, prefix: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
713
+ command = make_simple_command(:get, 'b/{bucket}/storageLayout', options)
714
+ command.response_representation = Google::Apis::StorageV1::BucketStorageLayout::Representation
715
+ command.response_class = Google::Apis::StorageV1::BucketStorageLayout
716
+ command.params['bucket'] = bucket unless bucket.nil?
717
+ command.query['prefix'] = prefix unless prefix.nil?
718
+ command.query['fields'] = fields unless fields.nil?
719
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
720
+ command.query['userIp'] = user_ip unless user_ip.nil?
721
+ execute_or_queue_command(command, &block)
722
+ end
723
+
425
724
  # Creates a new bucket.
426
725
  # @param [String] project
427
726
  # A valid API project identifier.
428
727
  # @param [Google::Apis::StorageV1::Bucket] bucket_object
728
+ # @param [Boolean] enable_object_retention
729
+ # When set to true, object retention is enabled for this bucket.
429
730
  # @param [String] predefined_acl
430
731
  # Apply a predefined set of access controls to this bucket.
431
732
  # @param [String] predefined_default_object_acl
@@ -454,12 +755,13 @@ module Google
454
755
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
455
756
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
456
757
  # @raise [Google::Apis::AuthorizationError] Authorization is required
457
- def insert_bucket(project, bucket_object = nil, predefined_acl: nil, predefined_default_object_acl: nil, projection: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
758
+ def insert_bucket(project, bucket_object = nil, enable_object_retention: nil, predefined_acl: nil, predefined_default_object_acl: nil, projection: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
458
759
  command = make_simple_command(:post, 'b', options)
459
760
  command.request_representation = Google::Apis::StorageV1::Bucket::Representation
460
761
  command.request_object = bucket_object
461
762
  command.response_representation = Google::Apis::StorageV1::Bucket::Representation
462
763
  command.response_class = Google::Apis::StorageV1::Bucket
764
+ command.query['enableObjectRetention'] = enable_object_retention unless enable_object_retention.nil?
463
765
  command.query['predefinedAcl'] = predefined_acl unless predefined_acl.nil?
464
766
  command.query['predefinedDefaultObjectAcl'] = predefined_default_object_acl unless predefined_default_object_acl.nil?
465
767
  command.query['project'] = project unless project.nil?
@@ -882,39 +1184,574 @@ module Google
882
1184
  # Request-specific options
883
1185
  #
884
1186
  # @yield [result, err] Result & error if block supplied
885
- # @yieldparam result [Google::Apis::StorageV1::ObjectAccessControl] parsed result object
1187
+ # @yieldparam result [Google::Apis::StorageV1::ObjectAccessControl] parsed result object
1188
+ # @yieldparam err [StandardError] error object if request failed
1189
+ #
1190
+ # @return [Google::Apis::StorageV1::ObjectAccessControl]
1191
+ #
1192
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1193
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1194
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1195
+ def insert_default_object_access_control(bucket, object_access_control_object = nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1196
+ command = make_simple_command(:post, 'b/{bucket}/defaultObjectAcl', options)
1197
+ command.request_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
1198
+ command.request_object = object_access_control_object
1199
+ command.response_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
1200
+ command.response_class = Google::Apis::StorageV1::ObjectAccessControl
1201
+ command.params['bucket'] = bucket unless bucket.nil?
1202
+ command.query['userProject'] = user_project unless user_project.nil?
1203
+ command.query['fields'] = fields unless fields.nil?
1204
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1205
+ command.query['userIp'] = user_ip unless user_ip.nil?
1206
+ execute_or_queue_command(command, &block)
1207
+ end
1208
+
1209
+ # Retrieves default object ACL entries on the specified bucket.
1210
+ # @param [String] bucket
1211
+ # Name of a bucket.
1212
+ # @param [Fixnum] if_metageneration_match
1213
+ # If present, only return default ACL listing if the bucket's current
1214
+ # metageneration matches this value.
1215
+ # @param [Fixnum] if_metageneration_not_match
1216
+ # If present, only return default ACL listing if the bucket's current
1217
+ # metageneration does not match the given value.
1218
+ # @param [String] user_project
1219
+ # The project to be billed for this request. Required for Requester Pays buckets.
1220
+ # @param [String] fields
1221
+ # Selector specifying which fields to include in a partial response.
1222
+ # @param [String] quota_user
1223
+ # An opaque string that represents a user for quota purposes. Must not exceed 40
1224
+ # characters.
1225
+ # @param [String] user_ip
1226
+ # Deprecated. Please use quotaUser instead.
1227
+ # @param [Google::Apis::RequestOptions] options
1228
+ # Request-specific options
1229
+ #
1230
+ # @yield [result, err] Result & error if block supplied
1231
+ # @yieldparam result [Google::Apis::StorageV1::ObjectAccessControls] parsed result object
1232
+ # @yieldparam err [StandardError] error object if request failed
1233
+ #
1234
+ # @return [Google::Apis::StorageV1::ObjectAccessControls]
1235
+ #
1236
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1237
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1238
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1239
+ def list_default_object_access_controls(bucket, if_metageneration_match: nil, if_metageneration_not_match: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1240
+ command = make_simple_command(:get, 'b/{bucket}/defaultObjectAcl', options)
1241
+ command.response_representation = Google::Apis::StorageV1::ObjectAccessControls::Representation
1242
+ command.response_class = Google::Apis::StorageV1::ObjectAccessControls
1243
+ command.params['bucket'] = bucket unless bucket.nil?
1244
+ command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
1245
+ command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
1246
+ command.query['userProject'] = user_project unless user_project.nil?
1247
+ command.query['fields'] = fields unless fields.nil?
1248
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1249
+ command.query['userIp'] = user_ip unless user_ip.nil?
1250
+ execute_or_queue_command(command, &block)
1251
+ end
1252
+
1253
+ # Patches a default object ACL entry on the specified bucket.
1254
+ # @param [String] bucket
1255
+ # Name of a bucket.
1256
+ # @param [String] entity
1257
+ # The entity holding the permission. Can be user-userId, user-emailAddress,
1258
+ # group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
1259
+ # @param [Google::Apis::StorageV1::ObjectAccessControl] object_access_control_object
1260
+ # @param [String] user_project
1261
+ # The project to be billed for this request. Required for Requester Pays buckets.
1262
+ # @param [String] fields
1263
+ # Selector specifying which fields to include in a partial response.
1264
+ # @param [String] quota_user
1265
+ # An opaque string that represents a user for quota purposes. Must not exceed 40
1266
+ # characters.
1267
+ # @param [String] user_ip
1268
+ # Deprecated. Please use quotaUser instead.
1269
+ # @param [Google::Apis::RequestOptions] options
1270
+ # Request-specific options
1271
+ #
1272
+ # @yield [result, err] Result & error if block supplied
1273
+ # @yieldparam result [Google::Apis::StorageV1::ObjectAccessControl] parsed result object
1274
+ # @yieldparam err [StandardError] error object if request failed
1275
+ #
1276
+ # @return [Google::Apis::StorageV1::ObjectAccessControl]
1277
+ #
1278
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1279
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1280
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1281
+ def patch_default_object_access_control(bucket, entity, object_access_control_object = nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1282
+ command = make_simple_command(:patch, 'b/{bucket}/defaultObjectAcl/{entity}', options)
1283
+ command.request_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
1284
+ command.request_object = object_access_control_object
1285
+ command.response_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
1286
+ command.response_class = Google::Apis::StorageV1::ObjectAccessControl
1287
+ command.params['bucket'] = bucket unless bucket.nil?
1288
+ command.params['entity'] = entity unless entity.nil?
1289
+ command.query['userProject'] = user_project unless user_project.nil?
1290
+ command.query['fields'] = fields unless fields.nil?
1291
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1292
+ command.query['userIp'] = user_ip unless user_ip.nil?
1293
+ execute_or_queue_command(command, &block)
1294
+ end
1295
+
1296
+ # Updates a default object ACL entry on the specified bucket.
1297
+ # @param [String] bucket
1298
+ # Name of a bucket.
1299
+ # @param [String] entity
1300
+ # The entity holding the permission. Can be user-userId, user-emailAddress,
1301
+ # group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
1302
+ # @param [Google::Apis::StorageV1::ObjectAccessControl] object_access_control_object
1303
+ # @param [String] user_project
1304
+ # The project to be billed for this request. Required for Requester Pays buckets.
1305
+ # @param [String] fields
1306
+ # Selector specifying which fields to include in a partial response.
1307
+ # @param [String] quota_user
1308
+ # An opaque string that represents a user for quota purposes. Must not exceed 40
1309
+ # characters.
1310
+ # @param [String] user_ip
1311
+ # Deprecated. Please use quotaUser instead.
1312
+ # @param [Google::Apis::RequestOptions] options
1313
+ # Request-specific options
1314
+ #
1315
+ # @yield [result, err] Result & error if block supplied
1316
+ # @yieldparam result [Google::Apis::StorageV1::ObjectAccessControl] parsed result object
1317
+ # @yieldparam err [StandardError] error object if request failed
1318
+ #
1319
+ # @return [Google::Apis::StorageV1::ObjectAccessControl]
1320
+ #
1321
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1322
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1323
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1324
+ def update_default_object_access_control(bucket, entity, object_access_control_object = nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1325
+ command = make_simple_command(:put, 'b/{bucket}/defaultObjectAcl/{entity}', options)
1326
+ command.request_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
1327
+ command.request_object = object_access_control_object
1328
+ command.response_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
1329
+ command.response_class = Google::Apis::StorageV1::ObjectAccessControl
1330
+ command.params['bucket'] = bucket unless bucket.nil?
1331
+ command.params['entity'] = entity unless entity.nil?
1332
+ command.query['userProject'] = user_project unless user_project.nil?
1333
+ command.query['fields'] = fields unless fields.nil?
1334
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1335
+ command.query['userIp'] = user_ip unless user_ip.nil?
1336
+ execute_or_queue_command(command, &block)
1337
+ end
1338
+
1339
+ # Permanently deletes a folder. Only applicable to buckets with hierarchical
1340
+ # namespace enabled.
1341
+ # @param [String] bucket
1342
+ # Name of the bucket in which the folder resides.
1343
+ # @param [String] folder
1344
+ # Name of a folder.
1345
+ # @param [Fixnum] if_metageneration_match
1346
+ # If set, only deletes the folder if its metageneration matches this value.
1347
+ # @param [Fixnum] if_metageneration_not_match
1348
+ # If set, only deletes the folder if its metageneration does not match this
1349
+ # value.
1350
+ # @param [String] fields
1351
+ # Selector specifying which fields to include in a partial response.
1352
+ # @param [String] quota_user
1353
+ # An opaque string that represents a user for quota purposes. Must not exceed 40
1354
+ # characters.
1355
+ # @param [String] user_ip
1356
+ # Deprecated. Please use quotaUser instead.
1357
+ # @param [Google::Apis::RequestOptions] options
1358
+ # Request-specific options
1359
+ #
1360
+ # @yield [result, err] Result & error if block supplied
1361
+ # @yieldparam result [NilClass] No result returned for this method
1362
+ # @yieldparam err [StandardError] error object if request failed
1363
+ #
1364
+ # @return [void]
1365
+ #
1366
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1367
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1368
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1369
+ def delete_folder(bucket, folder, if_metageneration_match: nil, if_metageneration_not_match: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1370
+ command = make_simple_command(:delete, 'b/{bucket}/folders/{folder}', options)
1371
+ command.params['bucket'] = bucket unless bucket.nil?
1372
+ command.params['folder'] = folder unless folder.nil?
1373
+ command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
1374
+ command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
1375
+ command.query['fields'] = fields unless fields.nil?
1376
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1377
+ command.query['userIp'] = user_ip unless user_ip.nil?
1378
+ execute_or_queue_command(command, &block)
1379
+ end
1380
+
1381
+ # Returns metadata for the specified folder. Only applicable to buckets with
1382
+ # hierarchical namespace enabled.
1383
+ # @param [String] bucket
1384
+ # Name of the bucket in which the folder resides.
1385
+ # @param [String] folder
1386
+ # Name of a folder.
1387
+ # @param [Fixnum] if_metageneration_match
1388
+ # Makes the return of the folder metadata conditional on whether the folder's
1389
+ # current metageneration matches the given value.
1390
+ # @param [Fixnum] if_metageneration_not_match
1391
+ # Makes the return of the folder metadata conditional on whether the folder's
1392
+ # current metageneration does not match the given value.
1393
+ # @param [String] fields
1394
+ # Selector specifying which fields to include in a partial response.
1395
+ # @param [String] quota_user
1396
+ # An opaque string that represents a user for quota purposes. Must not exceed 40
1397
+ # characters.
1398
+ # @param [String] user_ip
1399
+ # Deprecated. Please use quotaUser instead.
1400
+ # @param [Google::Apis::RequestOptions] options
1401
+ # Request-specific options
1402
+ #
1403
+ # @yield [result, err] Result & error if block supplied
1404
+ # @yieldparam result [Google::Apis::StorageV1::Folder] parsed result object
1405
+ # @yieldparam err [StandardError] error object if request failed
1406
+ #
1407
+ # @return [Google::Apis::StorageV1::Folder]
1408
+ #
1409
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1410
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1411
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1412
+ def get_folder(bucket, folder, if_metageneration_match: nil, if_metageneration_not_match: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1413
+ command = make_simple_command(:get, 'b/{bucket}/folders/{folder}', options)
1414
+ command.response_representation = Google::Apis::StorageV1::Folder::Representation
1415
+ command.response_class = Google::Apis::StorageV1::Folder
1416
+ command.params['bucket'] = bucket unless bucket.nil?
1417
+ command.params['folder'] = folder unless folder.nil?
1418
+ command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
1419
+ command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
1420
+ command.query['fields'] = fields unless fields.nil?
1421
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1422
+ command.query['userIp'] = user_ip unless user_ip.nil?
1423
+ execute_or_queue_command(command, &block)
1424
+ end
1425
+
1426
+ # Creates a new folder. Only applicable to buckets with hierarchical namespace
1427
+ # enabled.
1428
+ # @param [String] bucket
1429
+ # Name of the bucket in which the folder resides.
1430
+ # @param [Google::Apis::StorageV1::Folder] folder_object
1431
+ # @param [Boolean] recursive
1432
+ # If true, any parent folder which doesn’t exist will be created automatically.
1433
+ # @param [String] fields
1434
+ # Selector specifying which fields to include in a partial response.
1435
+ # @param [String] quota_user
1436
+ # An opaque string that represents a user for quota purposes. Must not exceed 40
1437
+ # characters.
1438
+ # @param [String] user_ip
1439
+ # Deprecated. Please use quotaUser instead.
1440
+ # @param [Google::Apis::RequestOptions] options
1441
+ # Request-specific options
1442
+ #
1443
+ # @yield [result, err] Result & error if block supplied
1444
+ # @yieldparam result [Google::Apis::StorageV1::Folder] parsed result object
1445
+ # @yieldparam err [StandardError] error object if request failed
1446
+ #
1447
+ # @return [Google::Apis::StorageV1::Folder]
1448
+ #
1449
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1450
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1451
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1452
+ def insert_folder(bucket, folder_object = nil, recursive: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1453
+ command = make_simple_command(:post, 'b/{bucket}/folders', options)
1454
+ command.request_representation = Google::Apis::StorageV1::Folder::Representation
1455
+ command.request_object = folder_object
1456
+ command.response_representation = Google::Apis::StorageV1::Folder::Representation
1457
+ command.response_class = Google::Apis::StorageV1::Folder
1458
+ command.params['bucket'] = bucket unless bucket.nil?
1459
+ command.query['recursive'] = recursive unless recursive.nil?
1460
+ command.query['fields'] = fields unless fields.nil?
1461
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1462
+ command.query['userIp'] = user_ip unless user_ip.nil?
1463
+ execute_or_queue_command(command, &block)
1464
+ end
1465
+
1466
+ # Retrieves a list of folders matching the criteria. Only applicable to buckets
1467
+ # with hierarchical namespace enabled.
1468
+ # @param [String] bucket
1469
+ # Name of the bucket in which to look for folders.
1470
+ # @param [String] delimiter
1471
+ # Returns results in a directory-like mode. The only supported value is '/'. If
1472
+ # set, items will only contain folders that either exactly match the prefix, or
1473
+ # are one level below the prefix.
1474
+ # @param [String] end_offset
1475
+ # Filter results to folders whose names are lexicographically before endOffset.
1476
+ # If startOffset is also set, the folders listed will have names between
1477
+ # startOffset (inclusive) and endOffset (exclusive).
1478
+ # @param [Fixnum] page_size
1479
+ # Maximum number of items to return in a single page of responses.
1480
+ # @param [String] page_token
1481
+ # A previously-returned page token representing part of the larger set of
1482
+ # results to view.
1483
+ # @param [String] prefix
1484
+ # Filter results to folders whose paths begin with this prefix. If set, the
1485
+ # value must either be an empty string or end with a '/'.
1486
+ # @param [String] start_offset
1487
+ # Filter results to folders whose names are lexicographically equal to or after
1488
+ # startOffset. If endOffset is also set, the folders listed will have names
1489
+ # between startOffset (inclusive) and endOffset (exclusive).
1490
+ # @param [String] fields
1491
+ # Selector specifying which fields to include in a partial response.
1492
+ # @param [String] quota_user
1493
+ # An opaque string that represents a user for quota purposes. Must not exceed 40
1494
+ # characters.
1495
+ # @param [String] user_ip
1496
+ # Deprecated. Please use quotaUser instead.
1497
+ # @param [Google::Apis::RequestOptions] options
1498
+ # Request-specific options
1499
+ #
1500
+ # @yield [result, err] Result & error if block supplied
1501
+ # @yieldparam result [Google::Apis::StorageV1::Folders] parsed result object
1502
+ # @yieldparam err [StandardError] error object if request failed
1503
+ #
1504
+ # @return [Google::Apis::StorageV1::Folders]
1505
+ #
1506
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1507
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1508
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1509
+ def list_folders(bucket, delimiter: nil, end_offset: nil, page_size: nil, page_token: nil, prefix: nil, start_offset: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1510
+ command = make_simple_command(:get, 'b/{bucket}/folders', options)
1511
+ command.response_representation = Google::Apis::StorageV1::Folders::Representation
1512
+ command.response_class = Google::Apis::StorageV1::Folders
1513
+ command.params['bucket'] = bucket unless bucket.nil?
1514
+ command.query['delimiter'] = delimiter unless delimiter.nil?
1515
+ command.query['endOffset'] = end_offset unless end_offset.nil?
1516
+ command.query['pageSize'] = page_size unless page_size.nil?
1517
+ command.query['pageToken'] = page_token unless page_token.nil?
1518
+ command.query['prefix'] = prefix unless prefix.nil?
1519
+ command.query['startOffset'] = start_offset unless start_offset.nil?
1520
+ command.query['fields'] = fields unless fields.nil?
1521
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1522
+ command.query['userIp'] = user_ip unless user_ip.nil?
1523
+ execute_or_queue_command(command, &block)
1524
+ end
1525
+
1526
+ # Renames a source folder to a destination folder. Only applicable to buckets
1527
+ # with hierarchical namespace enabled.
1528
+ # @param [String] bucket
1529
+ # Name of the bucket in which the folders are in.
1530
+ # @param [String] source_folder
1531
+ # Name of the source folder.
1532
+ # @param [String] destination_folder
1533
+ # Name of the destination folder.
1534
+ # @param [Fixnum] if_source_metageneration_match
1535
+ # Makes the operation conditional on whether the source object's current
1536
+ # metageneration matches the given value.
1537
+ # @param [Fixnum] if_source_metageneration_not_match
1538
+ # Makes the operation conditional on whether the source object's current
1539
+ # metageneration does not match the given value.
1540
+ # @param [String] fields
1541
+ # Selector specifying which fields to include in a partial response.
1542
+ # @param [String] quota_user
1543
+ # An opaque string that represents a user for quota purposes. Must not exceed 40
1544
+ # characters.
1545
+ # @param [String] user_ip
1546
+ # Deprecated. Please use quotaUser instead.
1547
+ # @param [Google::Apis::RequestOptions] options
1548
+ # Request-specific options
1549
+ #
1550
+ # @yield [result, err] Result & error if block supplied
1551
+ # @yieldparam result [Google::Apis::StorageV1::GoogleLongrunningOperation] parsed result object
1552
+ # @yieldparam err [StandardError] error object if request failed
1553
+ #
1554
+ # @return [Google::Apis::StorageV1::GoogleLongrunningOperation]
1555
+ #
1556
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1557
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1558
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1559
+ def rename_folder(bucket, source_folder, destination_folder, if_source_metageneration_match: nil, if_source_metageneration_not_match: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1560
+ command = make_simple_command(:post, 'b/{bucket}/folders/{sourceFolder}/renameTo/folders/{destinationFolder}', options)
1561
+ command.response_representation = Google::Apis::StorageV1::GoogleLongrunningOperation::Representation
1562
+ command.response_class = Google::Apis::StorageV1::GoogleLongrunningOperation
1563
+ command.params['bucket'] = bucket unless bucket.nil?
1564
+ command.params['sourceFolder'] = source_folder unless source_folder.nil?
1565
+ command.params['destinationFolder'] = destination_folder unless destination_folder.nil?
1566
+ command.query['ifSourceMetagenerationMatch'] = if_source_metageneration_match unless if_source_metageneration_match.nil?
1567
+ command.query['ifSourceMetagenerationNotMatch'] = if_source_metageneration_not_match unless if_source_metageneration_not_match.nil?
1568
+ command.query['fields'] = fields unless fields.nil?
1569
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1570
+ command.query['userIp'] = user_ip unless user_ip.nil?
1571
+ execute_or_queue_command(command, &block)
1572
+ end
1573
+
1574
+ # Permanently deletes a managed folder.
1575
+ # @param [String] bucket
1576
+ # Name of the bucket containing the managed folder.
1577
+ # @param [String] managed_folder
1578
+ # The managed folder name/path.
1579
+ # @param [Boolean] allow_non_empty
1580
+ # Allows the deletion of a managed folder even if it is not empty. A managed
1581
+ # folder is empty if there are no objects or managed folders that it applies to.
1582
+ # Callers must have storage.managedFolders.setIamPolicy permission.
1583
+ # @param [Fixnum] if_metageneration_match
1584
+ # If set, only deletes the managed folder if its metageneration matches this
1585
+ # value.
1586
+ # @param [Fixnum] if_metageneration_not_match
1587
+ # If set, only deletes the managed folder if its metageneration does not match
1588
+ # this value.
1589
+ # @param [String] fields
1590
+ # Selector specifying which fields to include in a partial response.
1591
+ # @param [String] quota_user
1592
+ # An opaque string that represents a user for quota purposes. Must not exceed 40
1593
+ # characters.
1594
+ # @param [String] user_ip
1595
+ # Deprecated. Please use quotaUser instead.
1596
+ # @param [Google::Apis::RequestOptions] options
1597
+ # Request-specific options
1598
+ #
1599
+ # @yield [result, err] Result & error if block supplied
1600
+ # @yieldparam result [NilClass] No result returned for this method
1601
+ # @yieldparam err [StandardError] error object if request failed
1602
+ #
1603
+ # @return [void]
1604
+ #
1605
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1606
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1607
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1608
+ def delete_managed_folder(bucket, managed_folder, allow_non_empty: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1609
+ command = make_simple_command(:delete, 'b/{bucket}/managedFolders/{managedFolder}', options)
1610
+ command.params['bucket'] = bucket unless bucket.nil?
1611
+ command.params['managedFolder'] = managed_folder unless managed_folder.nil?
1612
+ command.query['allowNonEmpty'] = allow_non_empty unless allow_non_empty.nil?
1613
+ command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
1614
+ command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
1615
+ command.query['fields'] = fields unless fields.nil?
1616
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1617
+ command.query['userIp'] = user_ip unless user_ip.nil?
1618
+ execute_or_queue_command(command, &block)
1619
+ end
1620
+
1621
+ # Returns metadata of the specified managed folder.
1622
+ # @param [String] bucket
1623
+ # Name of the bucket containing the managed folder.
1624
+ # @param [String] managed_folder
1625
+ # The managed folder name/path.
1626
+ # @param [Fixnum] if_metageneration_match
1627
+ # Makes the return of the managed folder metadata conditional on whether the
1628
+ # managed folder's current metageneration matches the given value.
1629
+ # @param [Fixnum] if_metageneration_not_match
1630
+ # Makes the return of the managed folder metadata conditional on whether the
1631
+ # managed folder's current metageneration does not match the given value.
1632
+ # @param [String] fields
1633
+ # Selector specifying which fields to include in a partial response.
1634
+ # @param [String] quota_user
1635
+ # An opaque string that represents a user for quota purposes. Must not exceed 40
1636
+ # characters.
1637
+ # @param [String] user_ip
1638
+ # Deprecated. Please use quotaUser instead.
1639
+ # @param [Google::Apis::RequestOptions] options
1640
+ # Request-specific options
1641
+ #
1642
+ # @yield [result, err] Result & error if block supplied
1643
+ # @yieldparam result [Google::Apis::StorageV1::ManagedFolder] parsed result object
1644
+ # @yieldparam err [StandardError] error object if request failed
1645
+ #
1646
+ # @return [Google::Apis::StorageV1::ManagedFolder]
1647
+ #
1648
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1649
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1650
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1651
+ def get_managed_folder(bucket, managed_folder, if_metageneration_match: nil, if_metageneration_not_match: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1652
+ command = make_simple_command(:get, 'b/{bucket}/managedFolders/{managedFolder}', options)
1653
+ command.response_representation = Google::Apis::StorageV1::ManagedFolder::Representation
1654
+ command.response_class = Google::Apis::StorageV1::ManagedFolder
1655
+ command.params['bucket'] = bucket unless bucket.nil?
1656
+ command.params['managedFolder'] = managed_folder unless managed_folder.nil?
1657
+ command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
1658
+ command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
1659
+ command.query['fields'] = fields unless fields.nil?
1660
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1661
+ command.query['userIp'] = user_ip unless user_ip.nil?
1662
+ execute_or_queue_command(command, &block)
1663
+ end
1664
+
1665
+ # Returns an IAM policy for the specified managed folder.
1666
+ # @param [String] bucket
1667
+ # Name of the bucket containing the managed folder.
1668
+ # @param [String] managed_folder
1669
+ # The managed folder name/path.
1670
+ # @param [Fixnum] options_requested_policy_version
1671
+ # The IAM policy format version to be returned. If the
1672
+ # optionsRequestedPolicyVersion is for an older version that doesn't support
1673
+ # part of the requested IAM policy, the request fails.
1674
+ # @param [String] user_project
1675
+ # The project to be billed for this request. Required for Requester Pays buckets.
1676
+ # @param [String] fields
1677
+ # Selector specifying which fields to include in a partial response.
1678
+ # @param [String] quota_user
1679
+ # An opaque string that represents a user for quota purposes. Must not exceed 40
1680
+ # characters.
1681
+ # @param [String] user_ip
1682
+ # Deprecated. Please use quotaUser instead.
1683
+ # @param [Google::Apis::RequestOptions] options
1684
+ # Request-specific options
1685
+ #
1686
+ # @yield [result, err] Result & error if block supplied
1687
+ # @yieldparam result [Google::Apis::StorageV1::Policy] parsed result object
1688
+ # @yieldparam err [StandardError] error object if request failed
1689
+ #
1690
+ # @return [Google::Apis::StorageV1::Policy]
1691
+ #
1692
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1693
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1694
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1695
+ def get_managed_folder_iam_policy(bucket, managed_folder, options_requested_policy_version: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1696
+ command = make_simple_command(:get, 'b/{bucket}/managedFolders/{managedFolder}/iam', options)
1697
+ command.response_representation = Google::Apis::StorageV1::Policy::Representation
1698
+ command.response_class = Google::Apis::StorageV1::Policy
1699
+ command.params['bucket'] = bucket unless bucket.nil?
1700
+ command.params['managedFolder'] = managed_folder unless managed_folder.nil?
1701
+ command.query['optionsRequestedPolicyVersion'] = options_requested_policy_version unless options_requested_policy_version.nil?
1702
+ command.query['userProject'] = user_project unless user_project.nil?
1703
+ command.query['fields'] = fields unless fields.nil?
1704
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1705
+ command.query['userIp'] = user_ip unless user_ip.nil?
1706
+ execute_or_queue_command(command, &block)
1707
+ end
1708
+
1709
+ # Creates a new managed folder.
1710
+ # @param [String] bucket
1711
+ # Name of the bucket containing the managed folder.
1712
+ # @param [Google::Apis::StorageV1::ManagedFolder] managed_folder_object
1713
+ # @param [String] fields
1714
+ # Selector specifying which fields to include in a partial response.
1715
+ # @param [String] quota_user
1716
+ # An opaque string that represents a user for quota purposes. Must not exceed 40
1717
+ # characters.
1718
+ # @param [String] user_ip
1719
+ # Deprecated. Please use quotaUser instead.
1720
+ # @param [Google::Apis::RequestOptions] options
1721
+ # Request-specific options
1722
+ #
1723
+ # @yield [result, err] Result & error if block supplied
1724
+ # @yieldparam result [Google::Apis::StorageV1::ManagedFolder] parsed result object
886
1725
  # @yieldparam err [StandardError] error object if request failed
887
1726
  #
888
- # @return [Google::Apis::StorageV1::ObjectAccessControl]
1727
+ # @return [Google::Apis::StorageV1::ManagedFolder]
889
1728
  #
890
1729
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
891
1730
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
892
1731
  # @raise [Google::Apis::AuthorizationError] Authorization is required
893
- def insert_default_object_access_control(bucket, object_access_control_object = nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
894
- command = make_simple_command(:post, 'b/{bucket}/defaultObjectAcl', options)
895
- command.request_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
896
- command.request_object = object_access_control_object
897
- command.response_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
898
- command.response_class = Google::Apis::StorageV1::ObjectAccessControl
1732
+ def insert_managed_folder(bucket, managed_folder_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1733
+ command = make_simple_command(:post, 'b/{bucket}/managedFolders', options)
1734
+ command.request_representation = Google::Apis::StorageV1::ManagedFolder::Representation
1735
+ command.request_object = managed_folder_object
1736
+ command.response_representation = Google::Apis::StorageV1::ManagedFolder::Representation
1737
+ command.response_class = Google::Apis::StorageV1::ManagedFolder
899
1738
  command.params['bucket'] = bucket unless bucket.nil?
900
- command.query['userProject'] = user_project unless user_project.nil?
901
1739
  command.query['fields'] = fields unless fields.nil?
902
1740
  command.query['quotaUser'] = quota_user unless quota_user.nil?
903
1741
  command.query['userIp'] = user_ip unless user_ip.nil?
904
1742
  execute_or_queue_command(command, &block)
905
1743
  end
906
1744
 
907
- # Retrieves default object ACL entries on the specified bucket.
1745
+ # Lists managed folders in the given bucket.
908
1746
  # @param [String] bucket
909
- # Name of a bucket.
910
- # @param [Fixnum] if_metageneration_match
911
- # If present, only return default ACL listing if the bucket's current
912
- # metageneration matches this value.
913
- # @param [Fixnum] if_metageneration_not_match
914
- # If present, only return default ACL listing if the bucket's current
915
- # metageneration does not match the given value.
916
- # @param [String] user_project
917
- # The project to be billed for this request. Required for Requester Pays buckets.
1747
+ # Name of the bucket containing the managed folder.
1748
+ # @param [Fixnum] page_size
1749
+ # Maximum number of items to return in a single page of responses.
1750
+ # @param [String] page_token
1751
+ # A previously-returned page token representing part of the larger set of
1752
+ # results to view.
1753
+ # @param [String] prefix
1754
+ # The managed folder name/path prefix to filter the output list of results.
918
1755
  # @param [String] fields
919
1756
  # Selector specifying which fields to include in a partial response.
920
1757
  # @param [String] quota_user
@@ -926,35 +1763,34 @@ module Google
926
1763
  # Request-specific options
927
1764
  #
928
1765
  # @yield [result, err] Result & error if block supplied
929
- # @yieldparam result [Google::Apis::StorageV1::ObjectAccessControls] parsed result object
1766
+ # @yieldparam result [Google::Apis::StorageV1::ManagedFolders] parsed result object
930
1767
  # @yieldparam err [StandardError] error object if request failed
931
1768
  #
932
- # @return [Google::Apis::StorageV1::ObjectAccessControls]
1769
+ # @return [Google::Apis::StorageV1::ManagedFolders]
933
1770
  #
934
1771
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
935
1772
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
936
1773
  # @raise [Google::Apis::AuthorizationError] Authorization is required
937
- def list_default_object_access_controls(bucket, if_metageneration_match: nil, if_metageneration_not_match: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
938
- command = make_simple_command(:get, 'b/{bucket}/defaultObjectAcl', options)
939
- command.response_representation = Google::Apis::StorageV1::ObjectAccessControls::Representation
940
- command.response_class = Google::Apis::StorageV1::ObjectAccessControls
1774
+ def list_managed_folders(bucket, page_size: nil, page_token: nil, prefix: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1775
+ command = make_simple_command(:get, 'b/{bucket}/managedFolders', options)
1776
+ command.response_representation = Google::Apis::StorageV1::ManagedFolders::Representation
1777
+ command.response_class = Google::Apis::StorageV1::ManagedFolders
941
1778
  command.params['bucket'] = bucket unless bucket.nil?
942
- command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
943
- command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
944
- command.query['userProject'] = user_project unless user_project.nil?
1779
+ command.query['pageSize'] = page_size unless page_size.nil?
1780
+ command.query['pageToken'] = page_token unless page_token.nil?
1781
+ command.query['prefix'] = prefix unless prefix.nil?
945
1782
  command.query['fields'] = fields unless fields.nil?
946
1783
  command.query['quotaUser'] = quota_user unless quota_user.nil?
947
1784
  command.query['userIp'] = user_ip unless user_ip.nil?
948
1785
  execute_or_queue_command(command, &block)
949
1786
  end
950
1787
 
951
- # Patches a default object ACL entry on the specified bucket.
1788
+ # Updates an IAM policy for the specified managed folder.
952
1789
  # @param [String] bucket
953
- # Name of a bucket.
954
- # @param [String] entity
955
- # The entity holding the permission. Can be user-userId, user-emailAddress,
956
- # group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
957
- # @param [Google::Apis::StorageV1::ObjectAccessControl] object_access_control_object
1790
+ # Name of the bucket containing the managed folder.
1791
+ # @param [String] managed_folder
1792
+ # The managed folder name/path.
1793
+ # @param [Google::Apis::StorageV1::Policy] policy_object
958
1794
  # @param [String] user_project
959
1795
  # The project to be billed for this request. Required for Requester Pays buckets.
960
1796
  # @param [String] fields
@@ -968,22 +1804,22 @@ module Google
968
1804
  # Request-specific options
969
1805
  #
970
1806
  # @yield [result, err] Result & error if block supplied
971
- # @yieldparam result [Google::Apis::StorageV1::ObjectAccessControl] parsed result object
1807
+ # @yieldparam result [Google::Apis::StorageV1::Policy] parsed result object
972
1808
  # @yieldparam err [StandardError] error object if request failed
973
1809
  #
974
- # @return [Google::Apis::StorageV1::ObjectAccessControl]
1810
+ # @return [Google::Apis::StorageV1::Policy]
975
1811
  #
976
1812
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
977
1813
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
978
1814
  # @raise [Google::Apis::AuthorizationError] Authorization is required
979
- def patch_default_object_access_control(bucket, entity, object_access_control_object = nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
980
- command = make_simple_command(:patch, 'b/{bucket}/defaultObjectAcl/{entity}', options)
981
- command.request_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
982
- command.request_object = object_access_control_object
983
- command.response_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
984
- command.response_class = Google::Apis::StorageV1::ObjectAccessControl
1815
+ def set_managed_folder_iam_policy(bucket, managed_folder, policy_object = nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1816
+ command = make_simple_command(:put, 'b/{bucket}/managedFolders/{managedFolder}/iam', options)
1817
+ command.request_representation = Google::Apis::StorageV1::Policy::Representation
1818
+ command.request_object = policy_object
1819
+ command.response_representation = Google::Apis::StorageV1::Policy::Representation
1820
+ command.response_class = Google::Apis::StorageV1::Policy
985
1821
  command.params['bucket'] = bucket unless bucket.nil?
986
- command.params['entity'] = entity unless entity.nil?
1822
+ command.params['managedFolder'] = managed_folder unless managed_folder.nil?
987
1823
  command.query['userProject'] = user_project unless user_project.nil?
988
1824
  command.query['fields'] = fields unless fields.nil?
989
1825
  command.query['quotaUser'] = quota_user unless quota_user.nil?
@@ -991,13 +1827,14 @@ module Google
991
1827
  execute_or_queue_command(command, &block)
992
1828
  end
993
1829
 
994
- # Updates a default object ACL entry on the specified bucket.
1830
+ # Tests a set of permissions on the given managed folder to see which, if any,
1831
+ # are held by the caller.
995
1832
  # @param [String] bucket
996
- # Name of a bucket.
997
- # @param [String] entity
998
- # The entity holding the permission. Can be user-userId, user-emailAddress,
999
- # group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
1000
- # @param [Google::Apis::StorageV1::ObjectAccessControl] object_access_control_object
1833
+ # Name of the bucket containing the managed folder.
1834
+ # @param [String] managed_folder
1835
+ # The managed folder name/path.
1836
+ # @param [Array<String>, String] permissions
1837
+ # Permissions to test.
1001
1838
  # @param [String] user_project
1002
1839
  # The project to be billed for this request. Required for Requester Pays buckets.
1003
1840
  # @param [String] fields
@@ -1011,22 +1848,21 @@ module Google
1011
1848
  # Request-specific options
1012
1849
  #
1013
1850
  # @yield [result, err] Result & error if block supplied
1014
- # @yieldparam result [Google::Apis::StorageV1::ObjectAccessControl] parsed result object
1851
+ # @yieldparam result [Google::Apis::StorageV1::TestIamPermissionsResponse] parsed result object
1015
1852
  # @yieldparam err [StandardError] error object if request failed
1016
1853
  #
1017
- # @return [Google::Apis::StorageV1::ObjectAccessControl]
1854
+ # @return [Google::Apis::StorageV1::TestIamPermissionsResponse]
1018
1855
  #
1019
1856
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1020
1857
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1021
1858
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1022
- def update_default_object_access_control(bucket, entity, object_access_control_object = nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1023
- command = make_simple_command(:put, 'b/{bucket}/defaultObjectAcl/{entity}', options)
1024
- command.request_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
1025
- command.request_object = object_access_control_object
1026
- command.response_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
1027
- command.response_class = Google::Apis::StorageV1::ObjectAccessControl
1859
+ def test_managed_folder_iam_permissions(bucket, managed_folder, permissions, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1860
+ command = make_simple_command(:get, 'b/{bucket}/managedFolders/{managedFolder}/iam/testPermissions', options)
1861
+ command.response_representation = Google::Apis::StorageV1::TestIamPermissionsResponse::Representation
1862
+ command.response_class = Google::Apis::StorageV1::TestIamPermissionsResponse
1028
1863
  command.params['bucket'] = bucket unless bucket.nil?
1029
- command.params['entity'] = entity unless entity.nil?
1864
+ command.params['managedFolder'] = managed_folder unless managed_folder.nil?
1865
+ command.query['permissions'] = permissions unless permissions.nil?
1030
1866
  command.query['userProject'] = user_project unless user_project.nil?
1031
1867
  command.query['fields'] = fields unless fields.nil?
1032
1868
  command.query['quotaUser'] = quota_user unless quota_user.nil?
@@ -1191,7 +2027,8 @@ module Google
1191
2027
  # Name of a bucket.
1192
2028
  # @param [String] object
1193
2029
  # Name of the object. For information about how to URL encode object names to be
1194
- # path safe, see Encoding URI Path Parts.
2030
+ # path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/
2031
+ # request-endpoints#encoding).
1195
2032
  # @param [String] entity
1196
2033
  # The entity holding the permission. Can be user-userId, user-emailAddress,
1197
2034
  # group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
@@ -1237,7 +2074,8 @@ module Google
1237
2074
  # Name of a bucket.
1238
2075
  # @param [String] object
1239
2076
  # Name of the object. For information about how to URL encode object names to be
1240
- # path safe, see Encoding URI Path Parts.
2077
+ # path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/
2078
+ # request-endpoints#encoding).
1241
2079
  # @param [String] entity
1242
2080
  # The entity holding the permission. Can be user-userId, user-emailAddress,
1243
2081
  # group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
@@ -1285,7 +2123,8 @@ module Google
1285
2123
  # Name of a bucket.
1286
2124
  # @param [String] object
1287
2125
  # Name of the object. For information about how to URL encode object names to be
1288
- # path safe, see Encoding URI Path Parts.
2126
+ # path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/
2127
+ # request-endpoints#encoding).
1289
2128
  # @param [Google::Apis::StorageV1::ObjectAccessControl] object_access_control_object
1290
2129
  # @param [Fixnum] generation
1291
2130
  # If present, selects a specific revision of this object (as opposed to the
@@ -1332,7 +2171,8 @@ module Google
1332
2171
  # Name of a bucket.
1333
2172
  # @param [String] object
1334
2173
  # Name of the object. For information about how to URL encode object names to be
1335
- # path safe, see Encoding URI Path Parts.
2174
+ # path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/
2175
+ # request-endpoints#encoding).
1336
2176
  # @param [Fixnum] generation
1337
2177
  # If present, selects a specific revision of this object (as opposed to the
1338
2178
  # latest version, the default).
@@ -1376,7 +2216,8 @@ module Google
1376
2216
  # Name of a bucket.
1377
2217
  # @param [String] object
1378
2218
  # Name of the object. For information about how to URL encode object names to be
1379
- # path safe, see Encoding URI Path Parts.
2219
+ # path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/
2220
+ # request-endpoints#encoding).
1380
2221
  # @param [String] entity
1381
2222
  # The entity holding the permission. Can be user-userId, user-emailAddress,
1382
2223
  # group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
@@ -1427,7 +2268,8 @@ module Google
1427
2268
  # Name of a bucket.
1428
2269
  # @param [String] object
1429
2270
  # Name of the object. For information about how to URL encode object names to be
1430
- # path safe, see Encoding URI Path Parts.
2271
+ # path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/
2272
+ # request-endpoints#encoding).
1431
2273
  # @param [String] entity
1432
2274
  # The entity holding the permission. Can be user-userId, user-emailAddress,
1433
2275
  # group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
@@ -1473,13 +2315,50 @@ module Google
1473
2315
  execute_or_queue_command(command, &block)
1474
2316
  end
1475
2317
 
2318
+ # Initiates a long-running bulk restore operation on the specified bucket.
2319
+ # @param [String] bucket
2320
+ # Name of the bucket in which the object resides.
2321
+ # @param [Google::Apis::StorageV1::BulkRestoreObjectsRequest] bulk_restore_objects_request_object
2322
+ # @param [String] fields
2323
+ # Selector specifying which fields to include in a partial response.
2324
+ # @param [String] quota_user
2325
+ # An opaque string that represents a user for quota purposes. Must not exceed 40
2326
+ # characters.
2327
+ # @param [String] user_ip
2328
+ # Deprecated. Please use quotaUser instead.
2329
+ # @param [Google::Apis::RequestOptions] options
2330
+ # Request-specific options
2331
+ #
2332
+ # @yield [result, err] Result & error if block supplied
2333
+ # @yieldparam result [Google::Apis::StorageV1::GoogleLongrunningOperation] parsed result object
2334
+ # @yieldparam err [StandardError] error object if request failed
2335
+ #
2336
+ # @return [Google::Apis::StorageV1::GoogleLongrunningOperation]
2337
+ #
2338
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2339
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2340
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2341
+ def bulk_restore_objects(bucket, bulk_restore_objects_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2342
+ command = make_simple_command(:post, 'b/{bucket}/o/bulkRestore', options)
2343
+ command.request_representation = Google::Apis::StorageV1::BulkRestoreObjectsRequest::Representation
2344
+ command.request_object = bulk_restore_objects_request_object
2345
+ command.response_representation = Google::Apis::StorageV1::GoogleLongrunningOperation::Representation
2346
+ command.response_class = Google::Apis::StorageV1::GoogleLongrunningOperation
2347
+ command.params['bucket'] = bucket unless bucket.nil?
2348
+ command.query['fields'] = fields unless fields.nil?
2349
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2350
+ command.query['userIp'] = user_ip unless user_ip.nil?
2351
+ execute_or_queue_command(command, &block)
2352
+ end
2353
+
1476
2354
  # Concatenates a list of existing objects into a new object in the same bucket.
1477
2355
  # @param [String] destination_bucket
1478
2356
  # Name of the bucket containing the source objects. The destination object is
1479
2357
  # stored in this bucket.
1480
2358
  # @param [String] destination_object
1481
2359
  # Name of the new object. For information about how to URL encode object names
1482
- # to be path safe, see Encoding URI Path Parts.
2360
+ # to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/
2361
+ # storage/docs/request-endpoints#encoding).
1483
2362
  # @param [Google::Apis::StorageV1::ComposeRequest] compose_request_object
1484
2363
  # @param [String] destination_predefined_acl
1485
2364
  # Apply a predefined set of access controls to the destination object.
@@ -1539,11 +2418,13 @@ module Google
1539
2418
  # Name of the bucket in which to find the source object.
1540
2419
  # @param [String] source_object
1541
2420
  # Name of the source object. For information about how to URL encode object
1542
- # names to be path safe, see Encoding URI Path Parts.
2421
+ # names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/
2422
+ # storage/docs/request-endpoints#encoding).
1543
2423
  # @param [String] destination_bucket
1544
2424
  # Name of the bucket in which to store the new object. Overrides the provided
1545
2425
  # object metadata's bucket value, if any.For information about how to URL encode
1546
- # object names to be path safe, see Encoding URI Path Parts.
2426
+ # object names to be path safe, see [Encoding URI Path Parts](https://cloud.
2427
+ # google.com/storage/docs/request-endpoints#encoding).
1547
2428
  # @param [String] destination_object
1548
2429
  # Name of the new object. Required when the object metadata is not otherwise
1549
2430
  # provided. Overrides the object metadata's name value, if any.
@@ -1643,7 +2524,8 @@ module Google
1643
2524
  # Name of the bucket in which the object resides.
1644
2525
  # @param [String] object
1645
2526
  # Name of the object. For information about how to URL encode object names to be
1646
- # path safe, see Encoding URI Path Parts.
2527
+ # path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/
2528
+ # request-endpoints#encoding).
1647
2529
  # @param [Fixnum] generation
1648
2530
  # If present, permanently deletes a specific revision of this object (as opposed
1649
2531
  # to the latest version, the default).
@@ -1704,7 +2586,8 @@ module Google
1704
2586
  # Name of the bucket in which the object resides.
1705
2587
  # @param [String] object
1706
2588
  # Name of the object. For information about how to URL encode object names to be
1707
- # path safe, see Encoding URI Path Parts.
2589
+ # path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/
2590
+ # request-endpoints#encoding).
1708
2591
  # @param [Fixnum] generation
1709
2592
  # If present, selects a specific revision of this object (as opposed to the
1710
2593
  # latest version, the default).
@@ -1725,6 +2608,9 @@ module Google
1725
2608
  # does not match the given value.
1726
2609
  # @param [String] projection
1727
2610
  # Set of properties to return. Defaults to noAcl.
2611
+ # @param [Boolean] soft_deleted
2612
+ # If true, only soft-deleted object versions will be listed. The default is
2613
+ # false. For more information, see Soft Delete.
1728
2614
  # @param [String] user_project
1729
2615
  # The project to be billed for this request. Required for Requester Pays buckets.
1730
2616
  # @param [String] fields
@@ -1748,7 +2634,7 @@ module Google
1748
2634
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1749
2635
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1750
2636
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1751
- def get_object(bucket, object, generation: nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, projection: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block)
2637
+ def get_object(bucket, object, generation: nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, projection: nil, soft_deleted: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block)
1752
2638
 
1753
2639
  if download_dest.nil?
1754
2640
  command = make_simple_command(:get, 'b/{bucket}/o/{object}', options)
@@ -1766,6 +2652,7 @@ module Google
1766
2652
  command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
1767
2653
  command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
1768
2654
  command.query['projection'] = projection unless projection.nil?
2655
+ command.query['softDeleted'] = soft_deleted unless soft_deleted.nil?
1769
2656
  command.query['userProject'] = user_project unless user_project.nil?
1770
2657
  command.query['fields'] = fields unless fields.nil?
1771
2658
  command.query['quotaUser'] = quota_user unless quota_user.nil?
@@ -1778,7 +2665,8 @@ module Google
1778
2665
  # Name of the bucket in which the object resides.
1779
2666
  # @param [String] object
1780
2667
  # Name of the object. For information about how to URL encode object names to be
1781
- # path safe, see Encoding URI Path Parts.
2668
+ # path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/
2669
+ # request-endpoints#encoding).
1782
2670
  # @param [Fixnum] generation
1783
2671
  # If present, selects a specific revision of this object (as opposed to the
1784
2672
  # latest version, the default).
@@ -1849,8 +2737,8 @@ module Google
1849
2737
  # @param [String] name
1850
2738
  # Name of the object. Required when the object metadata is not otherwise
1851
2739
  # provided. Overrides the object metadata's name value, if any. For information
1852
- # about how to URL encode object names to be path safe, see Encoding URI Path
1853
- # Parts.
2740
+ # about how to URL encode object names to be path safe, see [Encoding URI Path
2741
+ # Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).
1854
2742
  # @param [String] predefined_acl
1855
2743
  # Apply a predefined set of access controls to this object.
1856
2744
  # @param [String] projection
@@ -1924,9 +2812,14 @@ module Google
1924
2812
  # Filter results to objects whose names are lexicographically before endOffset.
1925
2813
  # If startOffset is also set, the objects listed will have names between
1926
2814
  # startOffset (inclusive) and endOffset (exclusive).
2815
+ # @param [Boolean] include_folders_as_prefixes
2816
+ # Only applicable if delimiter is set to '/'. If true, will also include folders
2817
+ # and managed folders (besides objects) in the returned prefixes.
1927
2818
  # @param [Boolean] include_trailing_delimiter
1928
2819
  # If true, objects that end in exactly one instance of delimiter will have their
1929
2820
  # metadata included in items in addition to prefixes.
2821
+ # @param [String] match_glob
2822
+ # Filter results to objects and prefixes that match this glob pattern.
1930
2823
  # @param [Fixnum] max_results
1931
2824
  # Maximum number of items plus prefixes to return in a single page of responses.
1932
2825
  # As duplicate prefixes are omitted, fewer total results may be returned than
@@ -1939,6 +2832,9 @@ module Google
1939
2832
  # Filter results to objects whose names begin with this prefix.
1940
2833
  # @param [String] projection
1941
2834
  # Set of properties to return. Defaults to noAcl.
2835
+ # @param [Boolean] soft_deleted
2836
+ # If true, only soft-deleted object versions will be listed. The default is
2837
+ # false. For more information, see Soft Delete.
1942
2838
  # @param [String] start_offset
1943
2839
  # Filter results to objects whose names are lexicographically equal to or after
1944
2840
  # startOffset. If endOffset is also set, the objects listed will have names
@@ -1967,18 +2863,21 @@ module Google
1967
2863
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1968
2864
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1969
2865
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1970
- def list_objects(bucket, delimiter: nil, end_offset: nil, include_trailing_delimiter: nil, max_results: nil, page_token: nil, prefix: nil, projection: nil, start_offset: nil, user_project: nil, versions: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2866
+ def list_objects(bucket, delimiter: nil, end_offset: nil, include_folders_as_prefixes: nil, include_trailing_delimiter: nil, match_glob: nil, max_results: nil, page_token: nil, prefix: nil, projection: nil, soft_deleted: nil, start_offset: nil, user_project: nil, versions: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1971
2867
  command = make_simple_command(:get, 'b/{bucket}/o', options)
1972
2868
  command.response_representation = Google::Apis::StorageV1::Objects::Representation
1973
2869
  command.response_class = Google::Apis::StorageV1::Objects
1974
2870
  command.params['bucket'] = bucket unless bucket.nil?
1975
2871
  command.query['delimiter'] = delimiter unless delimiter.nil?
1976
2872
  command.query['endOffset'] = end_offset unless end_offset.nil?
2873
+ command.query['includeFoldersAsPrefixes'] = include_folders_as_prefixes unless include_folders_as_prefixes.nil?
1977
2874
  command.query['includeTrailingDelimiter'] = include_trailing_delimiter unless include_trailing_delimiter.nil?
2875
+ command.query['matchGlob'] = match_glob unless match_glob.nil?
1978
2876
  command.query['maxResults'] = max_results unless max_results.nil?
1979
2877
  command.query['pageToken'] = page_token unless page_token.nil?
1980
2878
  command.query['prefix'] = prefix unless prefix.nil?
1981
2879
  command.query['projection'] = projection unless projection.nil?
2880
+ command.query['softDeleted'] = soft_deleted unless soft_deleted.nil?
1982
2881
  command.query['startOffset'] = start_offset unless start_offset.nil?
1983
2882
  command.query['userProject'] = user_project unless user_project.nil?
1984
2883
  command.query['versions'] = versions unless versions.nil?
@@ -1993,7 +2892,8 @@ module Google
1993
2892
  # Name of the bucket in which the object resides.
1994
2893
  # @param [String] object
1995
2894
  # Name of the object. For information about how to URL encode object names to be
1996
- # path safe, see Encoding URI Path Parts.
2895
+ # path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/
2896
+ # request-endpoints#encoding).
1997
2897
  # @param [Google::Apis::StorageV1::Object] object_object
1998
2898
  # @param [Fixnum] generation
1999
2899
  # If present, selects a specific revision of this object (as opposed to the
@@ -2013,6 +2913,9 @@ module Google
2013
2913
  # @param [Fixnum] if_metageneration_not_match
2014
2914
  # Makes the operation conditional on whether the object's current metageneration
2015
2915
  # does not match the given value.
2916
+ # @param [Boolean] override_unlocked_retention
2917
+ # Must be true to remove the retention configuration, reduce its unlocked
2918
+ # retention period, or change its mode from unlocked to locked.
2016
2919
  # @param [String] predefined_acl
2017
2920
  # Apply a predefined set of access controls to this object.
2018
2921
  # @param [String] projection
@@ -2038,7 +2941,7 @@ module Google
2038
2941
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2039
2942
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2040
2943
  # @raise [Google::Apis::AuthorizationError] Authorization is required
2041
- def patch_object(bucket, object, object_object = nil, generation: nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, predefined_acl: nil, projection: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2944
+ def patch_object(bucket, object, object_object = nil, generation: nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, override_unlocked_retention: nil, predefined_acl: nil, projection: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2042
2945
  command = make_simple_command(:patch, 'b/{bucket}/o/{object}', options)
2043
2946
  command.request_representation = Google::Apis::StorageV1::Object::Representation
2044
2947
  command.request_object = object_object
@@ -2051,6 +2954,7 @@ module Google
2051
2954
  command.query['ifGenerationNotMatch'] = if_generation_not_match unless if_generation_not_match.nil?
2052
2955
  command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
2053
2956
  command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
2957
+ command.query['overrideUnlockedRetention'] = override_unlocked_retention unless override_unlocked_retention.nil?
2054
2958
  command.query['predefinedAcl'] = predefined_acl unless predefined_acl.nil?
2055
2959
  command.query['projection'] = projection unless projection.nil?
2056
2960
  command.query['userProject'] = user_project unless user_project.nil?
@@ -2060,21 +2964,91 @@ module Google
2060
2964
  execute_or_queue_command(command, &block)
2061
2965
  end
2062
2966
 
2967
+ # Restores a soft-deleted object.
2968
+ # @param [String] bucket
2969
+ # Name of the bucket in which the object resides.
2970
+ # @param [String] object
2971
+ # Name of the object. For information about how to URL encode object names to be
2972
+ # path safe, see Encoding URI Path Parts.
2973
+ # @param [Fixnum] generation
2974
+ # Selects a specific revision of this object.
2975
+ # @param [Boolean] copy_source_acl
2976
+ # If true, copies the source object's ACL; otherwise, uses the bucket's default
2977
+ # object ACL. The default is false.
2978
+ # @param [Fixnum] if_generation_match
2979
+ # Makes the operation conditional on whether the object's one live generation
2980
+ # matches the given value. Setting to 0 makes the operation succeed only if
2981
+ # there are no live versions of the object.
2982
+ # @param [Fixnum] if_generation_not_match
2983
+ # Makes the operation conditional on whether none of the object's live
2984
+ # generations match the given value. If no live object exists, the precondition
2985
+ # fails. Setting to 0 makes the operation succeed only if there is a live
2986
+ # version of the object.
2987
+ # @param [Fixnum] if_metageneration_match
2988
+ # Makes the operation conditional on whether the object's one live
2989
+ # metageneration matches the given value.
2990
+ # @param [Fixnum] if_metageneration_not_match
2991
+ # Makes the operation conditional on whether none of the object's live
2992
+ # metagenerations match the given value.
2993
+ # @param [String] projection
2994
+ # Set of properties to return. Defaults to full.
2995
+ # @param [String] user_project
2996
+ # The project to be billed for this request. Required for Requester Pays buckets.
2997
+ # @param [String] fields
2998
+ # Selector specifying which fields to include in a partial response.
2999
+ # @param [String] quota_user
3000
+ # An opaque string that represents a user for quota purposes. Must not exceed 40
3001
+ # characters.
3002
+ # @param [String] user_ip
3003
+ # Deprecated. Please use quotaUser instead.
3004
+ # @param [Google::Apis::RequestOptions] options
3005
+ # Request-specific options
3006
+ #
3007
+ # @yield [result, err] Result & error if block supplied
3008
+ # @yieldparam result [Google::Apis::StorageV1::Object] parsed result object
3009
+ # @yieldparam err [StandardError] error object if request failed
3010
+ #
3011
+ # @return [Google::Apis::StorageV1::Object]
3012
+ #
3013
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3014
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3015
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3016
+ def restore_object(bucket, object, generation, copy_source_acl: nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, projection: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3017
+ command = make_simple_command(:post, 'b/{bucket}/o/{object}/restore', options)
3018
+ command.response_representation = Google::Apis::StorageV1::Object::Representation
3019
+ command.response_class = Google::Apis::StorageV1::Object
3020
+ command.params['bucket'] = bucket unless bucket.nil?
3021
+ command.params['object'] = object unless object.nil?
3022
+ command.query['copySourceAcl'] = copy_source_acl unless copy_source_acl.nil?
3023
+ command.query['generation'] = generation unless generation.nil?
3024
+ command.query['ifGenerationMatch'] = if_generation_match unless if_generation_match.nil?
3025
+ command.query['ifGenerationNotMatch'] = if_generation_not_match unless if_generation_not_match.nil?
3026
+ command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
3027
+ command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
3028
+ command.query['projection'] = projection unless projection.nil?
3029
+ command.query['userProject'] = user_project unless user_project.nil?
3030
+ command.query['fields'] = fields unless fields.nil?
3031
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3032
+ command.query['userIp'] = user_ip unless user_ip.nil?
3033
+ execute_or_queue_command(command, &block)
3034
+ end
3035
+
2063
3036
  # Rewrites a source object to a destination object. Optionally overrides
2064
3037
  # metadata.
2065
3038
  # @param [String] source_bucket
2066
3039
  # Name of the bucket in which to find the source object.
2067
3040
  # @param [String] source_object
2068
3041
  # Name of the source object. For information about how to URL encode object
2069
- # names to be path safe, see Encoding URI Path Parts.
3042
+ # names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/
3043
+ # storage/docs/request-endpoints#encoding).
2070
3044
  # @param [String] destination_bucket
2071
3045
  # Name of the bucket in which to store the new object. Overrides the provided
2072
3046
  # object metadata's bucket value, if any.
2073
3047
  # @param [String] destination_object
2074
3048
  # Name of the new object. Required when the object metadata is not otherwise
2075
3049
  # provided. Overrides the object metadata's name value, if any. For information
2076
- # about how to URL encode object names to be path safe, see Encoding URI Path
2077
- # Parts.
3050
+ # about how to URL encode object names to be path safe, see [Encoding URI Path
3051
+ # Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).
2078
3052
  # @param [Google::Apis::StorageV1::Object] object_object
2079
3053
  # @param [String] destination_kms_key_name
2080
3054
  # Resource name of the Cloud KMS key, of the form projects/my-project/locations/
@@ -2185,7 +3159,8 @@ module Google
2185
3159
  # Name of the bucket in which the object resides.
2186
3160
  # @param [String] object
2187
3161
  # Name of the object. For information about how to URL encode object names to be
2188
- # path safe, see Encoding URI Path Parts.
3162
+ # path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/
3163
+ # request-endpoints#encoding).
2189
3164
  # @param [Google::Apis::StorageV1::Policy] policy_object
2190
3165
  # @param [Fixnum] generation
2191
3166
  # If present, selects a specific revision of this object (as opposed to the
@@ -2233,7 +3208,8 @@ module Google
2233
3208
  # Name of the bucket in which the object resides.
2234
3209
  # @param [String] object
2235
3210
  # Name of the object. For information about how to URL encode object names to be
2236
- # path safe, see Encoding URI Path Parts.
3211
+ # path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/
3212
+ # request-endpoints#encoding).
2237
3213
  # @param [Array<String>, String] permissions
2238
3214
  # Permissions to test.
2239
3215
  # @param [Fixnum] generation
@@ -2280,7 +3256,8 @@ module Google
2280
3256
  # Name of the bucket in which the object resides.
2281
3257
  # @param [String] object
2282
3258
  # Name of the object. For information about how to URL encode object names to be
2283
- # path safe, see Encoding URI Path Parts.
3259
+ # path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/
3260
+ # request-endpoints#encoding).
2284
3261
  # @param [Google::Apis::StorageV1::Object] object_object
2285
3262
  # @param [Fixnum] generation
2286
3263
  # If present, selects a specific revision of this object (as opposed to the
@@ -2300,6 +3277,9 @@ module Google
2300
3277
  # @param [Fixnum] if_metageneration_not_match
2301
3278
  # Makes the operation conditional on whether the object's current metageneration
2302
3279
  # does not match the given value.
3280
+ # @param [Boolean] override_unlocked_retention
3281
+ # Must be true to remove the retention configuration, reduce its unlocked
3282
+ # retention period, or change its mode from unlocked to locked.
2303
3283
  # @param [String] predefined_acl
2304
3284
  # Apply a predefined set of access controls to this object.
2305
3285
  # @param [String] projection
@@ -2325,7 +3305,7 @@ module Google
2325
3305
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2326
3306
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2327
3307
  # @raise [Google::Apis::AuthorizationError] Authorization is required
2328
- def update_object(bucket, object, object_object = nil, generation: nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, predefined_acl: nil, projection: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3308
+ def update_object(bucket, object, object_object = nil, generation: nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, override_unlocked_retention: nil, predefined_acl: nil, projection: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2329
3309
  command = make_simple_command(:put, 'b/{bucket}/o/{object}', options)
2330
3310
  command.request_representation = Google::Apis::StorageV1::Object::Representation
2331
3311
  command.request_object = object_object
@@ -2338,6 +3318,7 @@ module Google
2338
3318
  command.query['ifGenerationNotMatch'] = if_generation_not_match unless if_generation_not_match.nil?
2339
3319
  command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
2340
3320
  command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
3321
+ command.query['overrideUnlockedRetention'] = override_unlocked_retention unless override_unlocked_retention.nil?
2341
3322
  command.query['predefinedAcl'] = predefined_acl unless predefined_acl.nil?
2342
3323
  command.query['projection'] = projection unless projection.nil?
2343
3324
  command.query['userProject'] = user_project unless user_project.nil?
@@ -2427,6 +3408,123 @@ module Google
2427
3408
  execute_or_queue_command(command, &block)
2428
3409
  end
2429
3410
 
3411
+ # Starts asynchronous cancellation on a long-running operation. The server makes
3412
+ # a best effort to cancel the operation, but success is not guaranteed.
3413
+ # @param [String] bucket
3414
+ # The parent bucket of the operation resource.
3415
+ # @param [String] operation_id
3416
+ # The ID of the operation resource.
3417
+ # @param [String] fields
3418
+ # Selector specifying which fields to include in a partial response.
3419
+ # @param [String] quota_user
3420
+ # An opaque string that represents a user for quota purposes. Must not exceed 40
3421
+ # characters.
3422
+ # @param [String] user_ip
3423
+ # Deprecated. Please use quotaUser instead.
3424
+ # @param [Google::Apis::RequestOptions] options
3425
+ # Request-specific options
3426
+ #
3427
+ # @yield [result, err] Result & error if block supplied
3428
+ # @yieldparam result [NilClass] No result returned for this method
3429
+ # @yieldparam err [StandardError] error object if request failed
3430
+ #
3431
+ # @return [void]
3432
+ #
3433
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3434
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3435
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3436
+ def cancel_bucket_operation(bucket, operation_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3437
+ command = make_simple_command(:post, 'b/{bucket}/operations/{operationId}/cancel', options)
3438
+ command.params['bucket'] = bucket unless bucket.nil?
3439
+ command.params['operationId'] = operation_id unless operation_id.nil?
3440
+ command.query['fields'] = fields unless fields.nil?
3441
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3442
+ command.query['userIp'] = user_ip unless user_ip.nil?
3443
+ execute_or_queue_command(command, &block)
3444
+ end
3445
+
3446
+ # Gets the latest state of a long-running operation.
3447
+ # @param [String] bucket
3448
+ # The parent bucket of the operation resource.
3449
+ # @param [String] operation_id
3450
+ # The ID of the operation resource.
3451
+ # @param [String] fields
3452
+ # Selector specifying which fields to include in a partial response.
3453
+ # @param [String] quota_user
3454
+ # An opaque string that represents a user for quota purposes. Must not exceed 40
3455
+ # characters.
3456
+ # @param [String] user_ip
3457
+ # Deprecated. Please use quotaUser instead.
3458
+ # @param [Google::Apis::RequestOptions] options
3459
+ # Request-specific options
3460
+ #
3461
+ # @yield [result, err] Result & error if block supplied
3462
+ # @yieldparam result [Google::Apis::StorageV1::GoogleLongrunningOperation] parsed result object
3463
+ # @yieldparam err [StandardError] error object if request failed
3464
+ #
3465
+ # @return [Google::Apis::StorageV1::GoogleLongrunningOperation]
3466
+ #
3467
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3468
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3469
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3470
+ def get_bucket_operation(bucket, operation_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3471
+ command = make_simple_command(:get, 'b/{bucket}/operations/{operationId}', options)
3472
+ command.response_representation = Google::Apis::StorageV1::GoogleLongrunningOperation::Representation
3473
+ command.response_class = Google::Apis::StorageV1::GoogleLongrunningOperation
3474
+ command.params['bucket'] = bucket unless bucket.nil?
3475
+ command.params['operationId'] = operation_id unless operation_id.nil?
3476
+ command.query['fields'] = fields unless fields.nil?
3477
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3478
+ command.query['userIp'] = user_ip unless user_ip.nil?
3479
+ execute_or_queue_command(command, &block)
3480
+ end
3481
+
3482
+ # Lists operations that match the specified filter in the request.
3483
+ # @param [String] bucket
3484
+ # Name of the bucket in which to look for operations.
3485
+ # @param [String] filter
3486
+ # A filter to narrow down results to a preferred subset. The filtering language
3487
+ # is documented in more detail in [AIP-160](https://google.aip.dev/160).
3488
+ # @param [Fixnum] page_size
3489
+ # Maximum number of items to return in a single page of responses. Fewer total
3490
+ # results may be returned than requested. The service uses this parameter or 100
3491
+ # items, whichever is smaller.
3492
+ # @param [String] page_token
3493
+ # A previously-returned page token representing part of the larger set of
3494
+ # results to view.
3495
+ # @param [String] fields
3496
+ # Selector specifying which fields to include in a partial response.
3497
+ # @param [String] quota_user
3498
+ # An opaque string that represents a user for quota purposes. Must not exceed 40
3499
+ # characters.
3500
+ # @param [String] user_ip
3501
+ # Deprecated. Please use quotaUser instead.
3502
+ # @param [Google::Apis::RequestOptions] options
3503
+ # Request-specific options
3504
+ #
3505
+ # @yield [result, err] Result & error if block supplied
3506
+ # @yieldparam result [Google::Apis::StorageV1::GoogleLongrunningListOperationsResponse] parsed result object
3507
+ # @yieldparam err [StandardError] error object if request failed
3508
+ #
3509
+ # @return [Google::Apis::StorageV1::GoogleLongrunningListOperationsResponse]
3510
+ #
3511
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3512
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3513
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3514
+ def list_bucket_operations(bucket, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3515
+ command = make_simple_command(:get, 'b/{bucket}/operations', options)
3516
+ command.response_representation = Google::Apis::StorageV1::GoogleLongrunningListOperationsResponse::Representation
3517
+ command.response_class = Google::Apis::StorageV1::GoogleLongrunningListOperationsResponse
3518
+ command.params['bucket'] = bucket unless bucket.nil?
3519
+ command.query['filter'] = filter unless filter.nil?
3520
+ command.query['pageSize'] = page_size unless page_size.nil?
3521
+ command.query['pageToken'] = page_token unless page_token.nil?
3522
+ command.query['fields'] = fields unless fields.nil?
3523
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3524
+ command.query['userIp'] = user_ip unless user_ip.nil?
3525
+ execute_or_queue_command(command, &block)
3526
+ end
3527
+
2430
3528
  # Creates a new HMAC key for the specified service account.
2431
3529
  # @param [String] project_id
2432
3530
  # Project ID owning the service account.