google-apis-storage_v1 0.24.0 → 0.25.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5034469e0103790dd96ab06b044c987e1726521c6cc2d50f1331bb5d10101b27
4
- data.tar.gz: 3e17a0ee65922e9228da5dfe56d6310e2bbe0bb5b23e7dd30e1a70aa1962bff3
3
+ metadata.gz: 97d723a830a6b3c4533858d6ef2860700803d1ee0f31db97de0353013d5798a9
4
+ data.tar.gz: 56136bf429ae75777b77a4558173b67b690b73c0f84d478a04f58352655c469c
5
5
  SHA512:
6
- metadata.gz: 9e4459da1abbfebbdbc48f5538fed89aff681f656e6da91d310fca43934cd8b9730eaffee6a9dc8d3b408ab7e27ec16a1fe3cbfe57cea53b65c594f764cb2e3c
7
- data.tar.gz: 49bd875e7b6791bd67bb889e592a4f26831e1e12e7d9b2dcd6a81dcfd5f7155f5ae54d9b2cad78b4e7656d6110ca230e04c175e786a169adeab5685122ee4077
6
+ metadata.gz: f59961dfbbc27597440a1ebc55e8a21867c00c0f9b8a84debb474f5c0393906b19b95c5638075435e821ddce88cb18d6ec6d500136997720a860acf067743f47
7
+ data.tar.gz: 157005bc3557e49e37a58f38439babd494a7f88f4b279a2489ce51b5d9f3846ba9af742991d964f1527c4c549f3eb87c211690f566aa4457100540154089f77b
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Release history for google-apis-storage_v1
2
2
 
3
+ ### v0.25.0 (2023-09-10)
4
+
5
+ * Regenerated from discovery document revision 20230907
6
+
3
7
  ### v0.24.0 (2023-07-16)
4
8
 
5
9
  * Regenerated from discovery document revision 20230710
@@ -979,6 +979,59 @@ module Google
979
979
  end
980
980
  end
981
981
 
982
+ # A bulk restore objects request.
983
+ class BulkRestoreObjectsRequest
984
+ include Google::Apis::Core::Hashable
985
+
986
+ # If false (default), the restore will not overwrite live objects with the same
987
+ # name at the destination. This means some deleted objects may be skipped. If
988
+ # true, live objects will be overwritten resulting in a noncurrent object (if
989
+ # versioning is enabled). If versioning is not enabled, overwriting the object
990
+ # will result in a soft-deleted object. In either case, if a noncurrent object
991
+ # already exists with the same name, a live version can be written without issue.
992
+ # Corresponds to the JSON property `allowOverwrite`
993
+ # @return [Boolean]
994
+ attr_accessor :allow_overwrite
995
+ alias_method :allow_overwrite?, :allow_overwrite
996
+
997
+ # If true, copies the source object's ACL; otherwise, uses the bucket's default
998
+ # object ACL. The default is false.
999
+ # Corresponds to the JSON property `copySourceAcl`
1000
+ # @return [Boolean]
1001
+ attr_accessor :copy_source_acl
1002
+ alias_method :copy_source_acl?, :copy_source_acl
1003
+
1004
+ # Restores only the objects matching any of the specified glob(s). If this
1005
+ # parameter is not specified, all objects will be restored within the specified
1006
+ # time range.
1007
+ # Corresponds to the JSON property `matchGlobs`
1008
+ # @return [Array<String>]
1009
+ attr_accessor :match_globs
1010
+
1011
+ # Restores only the objects that were soft-deleted after this time.
1012
+ # Corresponds to the JSON property `softDeletedAfterTime`
1013
+ # @return [DateTime]
1014
+ attr_accessor :soft_deleted_after_time
1015
+
1016
+ # Restores only the objects that were soft-deleted before this time.
1017
+ # Corresponds to the JSON property `softDeletedBeforeTime`
1018
+ # @return [DateTime]
1019
+ attr_accessor :soft_deleted_before_time
1020
+
1021
+ def initialize(**args)
1022
+ update!(**args)
1023
+ end
1024
+
1025
+ # Update properties of this object
1026
+ def update!(**args)
1027
+ @allow_overwrite = args[:allow_overwrite] if args.key?(:allow_overwrite)
1028
+ @copy_source_acl = args[:copy_source_acl] if args.key?(:copy_source_acl)
1029
+ @match_globs = args[:match_globs] if args.key?(:match_globs)
1030
+ @soft_deleted_after_time = args[:soft_deleted_after_time] if args.key?(:soft_deleted_after_time)
1031
+ @soft_deleted_before_time = args[:soft_deleted_before_time] if args.key?(:soft_deleted_before_time)
1032
+ end
1033
+ end
1034
+
982
1035
  # An notification channel used to watch for resource changes.
983
1036
  class Channel
984
1037
  include Google::Apis::Core::Hashable
@@ -1184,6 +1237,131 @@ module Google
1184
1237
  end
1185
1238
  end
1186
1239
 
1240
+ # The response message for storage.buckets.operations.list.
1241
+ class GoogleLongrunningListOperationsResponse
1242
+ include Google::Apis::Core::Hashable
1243
+
1244
+ # The continuation token, used to page through large result sets. Provide this
1245
+ # value in a subsequent request to return the next page of results.
1246
+ # Corresponds to the JSON property `nextPageToken`
1247
+ # @return [String]
1248
+ attr_accessor :next_page_token
1249
+
1250
+ # A list of operations that matches the specified filter in the request.
1251
+ # Corresponds to the JSON property `operations`
1252
+ # @return [Array<Google::Apis::StorageV1::GoogleLongrunningOperation>]
1253
+ attr_accessor :operations
1254
+
1255
+ def initialize(**args)
1256
+ update!(**args)
1257
+ end
1258
+
1259
+ # Update properties of this object
1260
+ def update!(**args)
1261
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1262
+ @operations = args[:operations] if args.key?(:operations)
1263
+ end
1264
+ end
1265
+
1266
+ # This resource represents a long-running operation that is the result of a
1267
+ # network API call.
1268
+ class GoogleLongrunningOperation
1269
+ include Google::Apis::Core::Hashable
1270
+
1271
+ # If the value is "false", it means the operation is still in progress. If "true"
1272
+ # , the operation is completed, and either "error" or "response" is available.
1273
+ # Corresponds to the JSON property `done`
1274
+ # @return [Boolean]
1275
+ attr_accessor :done
1276
+ alias_method :done?, :done
1277
+
1278
+ # The "Status" type defines a logical error model that is suitable for different
1279
+ # programming environments, including REST APIs and RPC APIs. It is used by [
1280
+ # gRPC](https://github.com/grpc). Each "Status" message contains three pieces of
1281
+ # data: error code, error message, and error details. You can find out more
1282
+ # about this error model and how to work with it in the [API Design Guide](https:
1283
+ # //cloud.google.com/apis/design/errors).
1284
+ # Corresponds to the JSON property `error`
1285
+ # @return [Google::Apis::StorageV1::GoogleRpcStatus]
1286
+ attr_accessor :error
1287
+
1288
+ # Service-specific metadata associated with the operation. It typically contains
1289
+ # progress information and common metadata such as create time. Some services
1290
+ # might not provide such metadata. Any method that returns a long-running
1291
+ # operation should document the metadata type, if any.
1292
+ # Corresponds to the JSON property `metadata`
1293
+ # @return [Hash<String,Object>]
1294
+ attr_accessor :metadata
1295
+
1296
+ # The server-assigned name, which is only unique within the same service that
1297
+ # originally returns it. If you use the default HTTP mapping, the "name" should
1298
+ # be a resource name ending with "operations/`operationId`".
1299
+ # Corresponds to the JSON property `name`
1300
+ # @return [String]
1301
+ attr_accessor :name
1302
+
1303
+ # The normal response of the operation in case of success. If the original
1304
+ # method returns no data on success, such as "Delete", the response is google.
1305
+ # protobuf.Empty. If the original method is standard Get/Create/Update, the
1306
+ # response should be the resource. For other methods, the response should have
1307
+ # the type "XxxResponse", where "Xxx" is the original method name. For example,
1308
+ # if the original method name is "TakeSnapshot()", the inferred response type is
1309
+ # "TakeSnapshotResponse".
1310
+ # Corresponds to the JSON property `response`
1311
+ # @return [Hash<String,Object>]
1312
+ attr_accessor :response
1313
+
1314
+ def initialize(**args)
1315
+ update!(**args)
1316
+ end
1317
+
1318
+ # Update properties of this object
1319
+ def update!(**args)
1320
+ @done = args[:done] if args.key?(:done)
1321
+ @error = args[:error] if args.key?(:error)
1322
+ @metadata = args[:metadata] if args.key?(:metadata)
1323
+ @name = args[:name] if args.key?(:name)
1324
+ @response = args[:response] if args.key?(:response)
1325
+ end
1326
+ end
1327
+
1328
+ # The "Status" type defines a logical error model that is suitable for different
1329
+ # programming environments, including REST APIs and RPC APIs. It is used by [
1330
+ # gRPC](https://github.com/grpc). Each "Status" message contains three pieces of
1331
+ # data: error code, error message, and error details. You can find out more
1332
+ # about this error model and how to work with it in the [API Design Guide](https:
1333
+ # //cloud.google.com/apis/design/errors).
1334
+ class GoogleRpcStatus
1335
+ include Google::Apis::Core::Hashable
1336
+
1337
+ # The status code, which should be an enum value of google.rpc.Code.
1338
+ # Corresponds to the JSON property `code`
1339
+ # @return [Fixnum]
1340
+ attr_accessor :code
1341
+
1342
+ # A list of messages that carry the error details. There is a common set of
1343
+ # message types for APIs to use.
1344
+ # Corresponds to the JSON property `details`
1345
+ # @return [Array<Hash<String,Object>>]
1346
+ attr_accessor :details
1347
+
1348
+ # A developer-facing error message, which should be in English.
1349
+ # Corresponds to the JSON property `message`
1350
+ # @return [String]
1351
+ attr_accessor :message
1352
+
1353
+ def initialize(**args)
1354
+ update!(**args)
1355
+ end
1356
+
1357
+ # Update properties of this object
1358
+ def update!(**args)
1359
+ @code = args[:code] if args.key?(:code)
1360
+ @details = args[:details] if args.key?(:details)
1361
+ @message = args[:message] if args.key?(:message)
1362
+ end
1363
+ end
1364
+
1187
1365
  # JSON template to produce a JSON-style HMAC Key resource for Create responses.
1188
1366
  class HmacKey
1189
1367
  include Google::Apis::Core::Hashable
@@ -16,13 +16,13 @@ module Google
16
16
  module Apis
17
17
  module StorageV1
18
18
  # Version of the google-apis-storage_v1 gem
19
- GEM_VERSION = "0.24.0"
19
+ GEM_VERSION = "0.25.0"
20
20
 
21
21
  # Version of the code generator used to generate this client
22
22
  GENERATOR_VERSION = "0.12.0"
23
23
 
24
24
  # Revision of the discovery document this client was generated from
25
- REVISION = "20230710"
25
+ REVISION = "20230907"
26
26
  end
27
27
  end
28
28
  end
@@ -154,6 +154,12 @@ module Google
154
154
  include Google::Apis::Core::JsonObjectSupport
155
155
  end
156
156
 
157
+ class BulkRestoreObjectsRequest
158
+ class Representation < Google::Apis::Core::JsonRepresentation; end
159
+
160
+ include Google::Apis::Core::JsonObjectSupport
161
+ end
162
+
157
163
  class Channel
158
164
  class Representation < Google::Apis::Core::JsonRepresentation; end
159
165
 
@@ -184,6 +190,24 @@ module Google
184
190
  include Google::Apis::Core::JsonObjectSupport
185
191
  end
186
192
 
193
+ class GoogleLongrunningListOperationsResponse
194
+ class Representation < Google::Apis::Core::JsonRepresentation; end
195
+
196
+ include Google::Apis::Core::JsonObjectSupport
197
+ end
198
+
199
+ class GoogleLongrunningOperation
200
+ class Representation < Google::Apis::Core::JsonRepresentation; end
201
+
202
+ include Google::Apis::Core::JsonObjectSupport
203
+ end
204
+
205
+ class GoogleRpcStatus
206
+ class Representation < Google::Apis::Core::JsonRepresentation; end
207
+
208
+ include Google::Apis::Core::JsonObjectSupport
209
+ end
210
+
187
211
  class HmacKey
188
212
  class Representation < Google::Apis::Core::JsonRepresentation; end
189
213
 
@@ -540,6 +564,19 @@ module Google
540
564
  end
541
565
  end
542
566
 
567
+ class BulkRestoreObjectsRequest
568
+ # @private
569
+ class Representation < Google::Apis::Core::JsonRepresentation
570
+ property :allow_overwrite, as: 'allowOverwrite'
571
+ property :copy_source_acl, as: 'copySourceAcl'
572
+ collection :match_globs, as: 'matchGlobs'
573
+ property :soft_deleted_after_time, as: 'softDeletedAfterTime', type: DateTime
574
+
575
+ property :soft_deleted_before_time, as: 'softDeletedBeforeTime', type: DateTime
576
+
577
+ end
578
+ end
579
+
543
580
  class Channel
544
581
  # @private
545
582
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -594,6 +631,36 @@ module Google
594
631
  end
595
632
  end
596
633
 
634
+ class GoogleLongrunningListOperationsResponse
635
+ # @private
636
+ class Representation < Google::Apis::Core::JsonRepresentation
637
+ property :next_page_token, as: 'nextPageToken'
638
+ collection :operations, as: 'operations', class: Google::Apis::StorageV1::GoogleLongrunningOperation, decorator: Google::Apis::StorageV1::GoogleLongrunningOperation::Representation
639
+
640
+ end
641
+ end
642
+
643
+ class GoogleLongrunningOperation
644
+ # @private
645
+ class Representation < Google::Apis::Core::JsonRepresentation
646
+ property :done, as: 'done'
647
+ property :error, as: 'error', class: Google::Apis::StorageV1::GoogleRpcStatus, decorator: Google::Apis::StorageV1::GoogleRpcStatus::Representation
648
+
649
+ hash :metadata, as: 'metadata'
650
+ property :name, as: 'name'
651
+ hash :response, as: 'response'
652
+ end
653
+ end
654
+
655
+ class GoogleRpcStatus
656
+ # @private
657
+ class Representation < Google::Apis::Core::JsonRepresentation
658
+ property :code, as: 'code'
659
+ collection :details, as: 'details'
660
+ property :message, as: 'message'
661
+ end
662
+ end
663
+
597
664
  class HmacKey
598
665
  # @private
599
666
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -1479,6 +1479,42 @@ module Google
1479
1479
  execute_or_queue_command(command, &block)
1480
1480
  end
1481
1481
 
1482
+ # Initiates a long-running bulk restore operation on the specified bucket.
1483
+ # @param [String] bucket
1484
+ # Name of the bucket in which the object resides.
1485
+ # @param [Google::Apis::StorageV1::BulkRestoreObjectsRequest] bulk_restore_objects_request_object
1486
+ # @param [String] fields
1487
+ # Selector specifying which fields to include in a partial response.
1488
+ # @param [String] quota_user
1489
+ # An opaque string that represents a user for quota purposes. Must not exceed 40
1490
+ # characters.
1491
+ # @param [String] user_ip
1492
+ # Deprecated. Please use quotaUser instead.
1493
+ # @param [Google::Apis::RequestOptions] options
1494
+ # Request-specific options
1495
+ #
1496
+ # @yield [result, err] Result & error if block supplied
1497
+ # @yieldparam result [Google::Apis::StorageV1::GoogleLongrunningOperation] parsed result object
1498
+ # @yieldparam err [StandardError] error object if request failed
1499
+ #
1500
+ # @return [Google::Apis::StorageV1::GoogleLongrunningOperation]
1501
+ #
1502
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1503
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1504
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1505
+ def bulk_restore_objects(bucket, bulk_restore_objects_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1506
+ command = make_simple_command(:post, 'b/{bucket}/o/bulkRestore', options)
1507
+ command.request_representation = Google::Apis::StorageV1::BulkRestoreObjectsRequest::Representation
1508
+ command.request_object = bulk_restore_objects_request_object
1509
+ command.response_representation = Google::Apis::StorageV1::GoogleLongrunningOperation::Representation
1510
+ command.response_class = Google::Apis::StorageV1::GoogleLongrunningOperation
1511
+ command.params['bucket'] = bucket unless bucket.nil?
1512
+ command.query['fields'] = fields unless fields.nil?
1513
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1514
+ command.query['userIp'] = user_ip unless user_ip.nil?
1515
+ execute_or_queue_command(command, &block)
1516
+ end
1517
+
1482
1518
  # Concatenates a list of existing objects into a new object in the same bucket.
1483
1519
  # @param [String] destination_bucket
1484
1520
  # Name of the bucket containing the source objects. The destination object is
@@ -1736,6 +1772,9 @@ module Google
1736
1772
  # does not match the given value.
1737
1773
  # @param [String] projection
1738
1774
  # Set of properties to return. Defaults to noAcl.
1775
+ # @param [Boolean] soft_deleted
1776
+ # If true, only soft-deleted object versions will be listed. The default is
1777
+ # false. For more information, see Soft Delete.
1739
1778
  # @param [String] user_project
1740
1779
  # The project to be billed for this request. Required for Requester Pays buckets.
1741
1780
  # @param [String] fields
@@ -1759,7 +1798,7 @@ module Google
1759
1798
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1760
1799
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1761
1800
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1762
- 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)
1801
+ 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)
1763
1802
 
1764
1803
  if download_dest.nil?
1765
1804
  command = make_simple_command(:get, 'b/{bucket}/o/{object}', options)
@@ -1777,6 +1816,7 @@ module Google
1777
1816
  command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
1778
1817
  command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
1779
1818
  command.query['projection'] = projection unless projection.nil?
1819
+ command.query['softDeleted'] = soft_deleted unless soft_deleted.nil?
1780
1820
  command.query['userProject'] = user_project unless user_project.nil?
1781
1821
  command.query['fields'] = fields unless fields.nil?
1782
1822
  command.query['quotaUser'] = quota_user unless quota_user.nil?
@@ -1953,6 +1993,9 @@ module Google
1953
1993
  # Filter results to objects whose names begin with this prefix.
1954
1994
  # @param [String] projection
1955
1995
  # Set of properties to return. Defaults to noAcl.
1996
+ # @param [Boolean] soft_deleted
1997
+ # If true, only soft-deleted object versions will be listed. The default is
1998
+ # false. For more information, see Soft Delete.
1956
1999
  # @param [String] start_offset
1957
2000
  # Filter results to objects whose names are lexicographically equal to or after
1958
2001
  # startOffset. If endOffset is also set, the objects listed will have names
@@ -1981,7 +2024,7 @@ module Google
1981
2024
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1982
2025
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1983
2026
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1984
- def list_objects(bucket, delimiter: nil, end_offset: nil, include_trailing_delimiter: nil, match_glob: 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)
2027
+ def list_objects(bucket, delimiter: nil, end_offset: 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)
1985
2028
  command = make_simple_command(:get, 'b/{bucket}/o', options)
1986
2029
  command.response_representation = Google::Apis::StorageV1::Objects::Representation
1987
2030
  command.response_class = Google::Apis::StorageV1::Objects
@@ -1994,6 +2037,7 @@ module Google
1994
2037
  command.query['pageToken'] = page_token unless page_token.nil?
1995
2038
  command.query['prefix'] = prefix unless prefix.nil?
1996
2039
  command.query['projection'] = projection unless projection.nil?
2040
+ command.query['softDeleted'] = soft_deleted unless soft_deleted.nil?
1997
2041
  command.query['startOffset'] = start_offset unless start_offset.nil?
1998
2042
  command.query['userProject'] = user_project unless user_project.nil?
1999
2043
  command.query['versions'] = versions unless versions.nil?
@@ -2076,6 +2120,72 @@ module Google
2076
2120
  execute_or_queue_command(command, &block)
2077
2121
  end
2078
2122
 
2123
+ # Restores a soft-deleted object.
2124
+ # @param [String] bucket
2125
+ # Name of the bucket in which the object resides.
2126
+ # @param [String] object
2127
+ # Name of the object. For information about how to URL encode object names to be
2128
+ # path safe, see Encoding URI Path Parts.
2129
+ # @param [Google::Apis::StorageV1::Object] object_object
2130
+ # @param [Fixnum] if_generation_match
2131
+ # Makes the operation conditional on whether the object's one live generation
2132
+ # matches the given value. Setting to 0 makes the operation succeed only if
2133
+ # there are no live versions of the object.
2134
+ # @param [Fixnum] if_generation_not_match
2135
+ # Makes the operation conditional on whether none of the object's live
2136
+ # generations match the given value. If no live object exists, the precondition
2137
+ # fails. Setting to 0 makes the operation succeed only if there is a live
2138
+ # version of the object.
2139
+ # @param [Fixnum] if_metageneration_match
2140
+ # Makes the operation conditional on whether the object's one live
2141
+ # metageneration matches the given value.
2142
+ # @param [Fixnum] if_metageneration_not_match
2143
+ # Makes the operation conditional on whether none of the object's live
2144
+ # metagenerations match the given value.
2145
+ # @param [String] projection
2146
+ # Set of properties to return. Defaults to full.
2147
+ # @param [String] user_project
2148
+ # The project to be billed for this request. Required for Requester Pays buckets.
2149
+ # @param [String] fields
2150
+ # Selector specifying which fields to include in a partial response.
2151
+ # @param [String] quota_user
2152
+ # An opaque string that represents a user for quota purposes. Must not exceed 40
2153
+ # characters.
2154
+ # @param [String] user_ip
2155
+ # Deprecated. Please use quotaUser instead.
2156
+ # @param [Google::Apis::RequestOptions] options
2157
+ # Request-specific options
2158
+ #
2159
+ # @yield [result, err] Result & error if block supplied
2160
+ # @yieldparam result [Google::Apis::StorageV1::Object] parsed result object
2161
+ # @yieldparam err [StandardError] error object if request failed
2162
+ #
2163
+ # @return [Google::Apis::StorageV1::Object]
2164
+ #
2165
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2166
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2167
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2168
+ def restore_object(bucket, object, object_object = 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)
2169
+ command = make_simple_command(:post, 'b/{bucket}/o/{object}/restore', options)
2170
+ command.request_representation = Google::Apis::StorageV1::Object::Representation
2171
+ command.request_object = object_object
2172
+ command.response_representation = Google::Apis::StorageV1::Object::Representation
2173
+ command.response_class = Google::Apis::StorageV1::Object
2174
+ command.params['bucket'] = bucket unless bucket.nil?
2175
+ command.params['object'] = object unless object.nil?
2176
+ command.query['generation'] = generation unless generation.nil?
2177
+ command.query['ifGenerationMatch'] = if_generation_match unless if_generation_match.nil?
2178
+ command.query['ifGenerationNotMatch'] = if_generation_not_match unless if_generation_not_match.nil?
2179
+ command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
2180
+ command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
2181
+ command.query['projection'] = projection unless projection.nil?
2182
+ command.query['userProject'] = user_project unless user_project.nil?
2183
+ command.query['fields'] = fields unless fields.nil?
2184
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2185
+ command.query['userIp'] = user_ip unless user_ip.nil?
2186
+ execute_or_queue_command(command, &block)
2187
+ end
2188
+
2079
2189
  # Rewrites a source object to a destination object. Optionally overrides
2080
2190
  # metadata.
2081
2191
  # @param [String] source_bucket
@@ -2447,6 +2557,123 @@ module Google
2447
2557
  execute_or_queue_command(command, &block)
2448
2558
  end
2449
2559
 
2560
+ # Starts asynchronous cancellation on a long-running operation. The server makes
2561
+ # a best effort to cancel the operation, but success is not guaranteed.
2562
+ # @param [String] bucket
2563
+ # The parent bucket of the operation resource.
2564
+ # @param [String] operation_id
2565
+ # The ID of the operation resource.
2566
+ # @param [String] fields
2567
+ # Selector specifying which fields to include in a partial response.
2568
+ # @param [String] quota_user
2569
+ # An opaque string that represents a user for quota purposes. Must not exceed 40
2570
+ # characters.
2571
+ # @param [String] user_ip
2572
+ # Deprecated. Please use quotaUser instead.
2573
+ # @param [Google::Apis::RequestOptions] options
2574
+ # Request-specific options
2575
+ #
2576
+ # @yield [result, err] Result & error if block supplied
2577
+ # @yieldparam result [NilClass] No result returned for this method
2578
+ # @yieldparam err [StandardError] error object if request failed
2579
+ #
2580
+ # @return [void]
2581
+ #
2582
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2583
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2584
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2585
+ def cancel_bucket_operation(bucket, operation_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2586
+ command = make_simple_command(:post, 'b/{bucket}/operations/{operationId}/cancel', options)
2587
+ command.params['bucket'] = bucket unless bucket.nil?
2588
+ command.params['operationId'] = operation_id unless operation_id.nil?
2589
+ command.query['fields'] = fields unless fields.nil?
2590
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2591
+ command.query['userIp'] = user_ip unless user_ip.nil?
2592
+ execute_or_queue_command(command, &block)
2593
+ end
2594
+
2595
+ # Gets the latest state of a long-running operation.
2596
+ # @param [String] bucket
2597
+ # The parent bucket of the operation resource.
2598
+ # @param [String] operation_id
2599
+ # The ID of the operation resource.
2600
+ # @param [String] fields
2601
+ # Selector specifying which fields to include in a partial response.
2602
+ # @param [String] quota_user
2603
+ # An opaque string that represents a user for quota purposes. Must not exceed 40
2604
+ # characters.
2605
+ # @param [String] user_ip
2606
+ # Deprecated. Please use quotaUser instead.
2607
+ # @param [Google::Apis::RequestOptions] options
2608
+ # Request-specific options
2609
+ #
2610
+ # @yield [result, err] Result & error if block supplied
2611
+ # @yieldparam result [Google::Apis::StorageV1::GoogleLongrunningOperation] parsed result object
2612
+ # @yieldparam err [StandardError] error object if request failed
2613
+ #
2614
+ # @return [Google::Apis::StorageV1::GoogleLongrunningOperation]
2615
+ #
2616
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2617
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2618
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2619
+ def get_bucket_operation(bucket, operation_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2620
+ command = make_simple_command(:get, 'b/{bucket}/operations/{operationId}', options)
2621
+ command.response_representation = Google::Apis::StorageV1::GoogleLongrunningOperation::Representation
2622
+ command.response_class = Google::Apis::StorageV1::GoogleLongrunningOperation
2623
+ command.params['bucket'] = bucket unless bucket.nil?
2624
+ command.params['operationId'] = operation_id unless operation_id.nil?
2625
+ command.query['fields'] = fields unless fields.nil?
2626
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2627
+ command.query['userIp'] = user_ip unless user_ip.nil?
2628
+ execute_or_queue_command(command, &block)
2629
+ end
2630
+
2631
+ # Lists operations that match the specified filter in the request.
2632
+ # @param [String] bucket
2633
+ # Name of the bucket in which to look for operations.
2634
+ # @param [String] filter
2635
+ # A filter to narrow down results to a preferred subset. The filtering language
2636
+ # is documented in more detail in [AIP-160](https://google.aip.dev/160).
2637
+ # @param [Fixnum] page_size
2638
+ # Maximum number of items to return in a single page of responses. Fewer total
2639
+ # results may be returned than requested. The service uses this parameter or 100
2640
+ # items, whichever is smaller.
2641
+ # @param [String] page_token
2642
+ # A previously-returned page token representing part of the larger set of
2643
+ # results to view.
2644
+ # @param [String] fields
2645
+ # Selector specifying which fields to include in a partial response.
2646
+ # @param [String] quota_user
2647
+ # An opaque string that represents a user for quota purposes. Must not exceed 40
2648
+ # characters.
2649
+ # @param [String] user_ip
2650
+ # Deprecated. Please use quotaUser instead.
2651
+ # @param [Google::Apis::RequestOptions] options
2652
+ # Request-specific options
2653
+ #
2654
+ # @yield [result, err] Result & error if block supplied
2655
+ # @yieldparam result [Google::Apis::StorageV1::GoogleLongrunningListOperationsResponse] parsed result object
2656
+ # @yieldparam err [StandardError] error object if request failed
2657
+ #
2658
+ # @return [Google::Apis::StorageV1::GoogleLongrunningListOperationsResponse]
2659
+ #
2660
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2661
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2662
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2663
+ def list_bucket_operations(bucket, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2664
+ command = make_simple_command(:get, 'b/{bucket}/operations', options)
2665
+ command.response_representation = Google::Apis::StorageV1::GoogleLongrunningListOperationsResponse::Representation
2666
+ command.response_class = Google::Apis::StorageV1::GoogleLongrunningListOperationsResponse
2667
+ command.params['bucket'] = bucket unless bucket.nil?
2668
+ command.query['filter'] = filter unless filter.nil?
2669
+ command.query['pageSize'] = page_size unless page_size.nil?
2670
+ command.query['pageToken'] = page_token unless page_token.nil?
2671
+ command.query['fields'] = fields unless fields.nil?
2672
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2673
+ command.query['userIp'] = user_ip unless user_ip.nil?
2674
+ execute_or_queue_command(command, &block)
2675
+ end
2676
+
2450
2677
  # Creates a new HMAC key for the specified service account.
2451
2678
  # @param [String] project_id
2452
2679
  # Project ID owning the service account.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-apis-storage_v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.24.0
4
+ version: 0.25.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-07-16 00:00:00.000000000 Z
11
+ date: 2023-09-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-apis-core
@@ -58,7 +58,7 @@ licenses:
58
58
  metadata:
59
59
  bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
60
60
  changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-storage_v1/CHANGELOG.md
61
- documentation_uri: https://googleapis.dev/ruby/google-apis-storage_v1/v0.24.0
61
+ documentation_uri: https://googleapis.dev/ruby/google-apis-storage_v1/v0.25.0
62
62
  source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-storage_v1
63
63
  post_install_message:
64
64
  rdoc_options: []
@@ -75,7 +75,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
75
75
  - !ruby/object:Gem::Version
76
76
  version: '0'
77
77
  requirements: []
78
- rubygems_version: 3.4.2
78
+ rubygems_version: 3.4.19
79
79
  signing_key:
80
80
  specification_version: 4
81
81
  summary: Simple REST client for Cloud Storage JSON API V1