google-apis-drive_v3 0.55.0 → 0.56.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: bf97b73de411f12bc4446c075acba2c742153dd0bf1b1633c7f0f02f6ae22d62
4
- data.tar.gz: 6872287245476fd9c24c50b3dce010a63495681e4a165ffd656c23a35755b7bb
3
+ metadata.gz: 44b01bdd14e7ed5584ac7de19b6dc2d34988ddde5af36e643edbe5de0cdd568f
4
+ data.tar.gz: 3efb87406e9749886a0586790ced01f0807452b7c6fb4c083c153dfffde75e4f
5
5
  SHA512:
6
- metadata.gz: 0043b8b2de981e9aa8964d13b84c26824687e2fca7ddd7e7b5fdc32a272cb538793f7bc78a736f64faff1943bc789706d4fc1546746c4f15edfede3d736fd789
7
- data.tar.gz: cfb2b727a9533627d00d840558c3071dd0b344314b56bced886e7dcad86952019ff958ef7d4f6f83ce35c35d8b9ca92fcddbd59e5ee5ac1177ef70d739ac589a
6
+ metadata.gz: 30cb75cc927a04c6a0d987e61dcf7b72b7fe35913e68e2095e6fc9a68943840635eff2b6d53fa48d25a477a37d33a892fb7dec77f90fca9b129d490123697296
7
+ data.tar.gz: f2354d1cfeb71774c843f0e338937a5254a6b7bbd67a94c9010f303626d1ac3f392c731ababa92521fbf98d3932ec554567bbf1b4438d12271b18047ffa7e578
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Release history for google-apis-drive_v3
2
2
 
3
+ ### v0.56.0 (2024-09-08)
4
+
5
+ * Regenerated from discovery document revision 20240903
6
+
3
7
  ### v0.55.0 (2024-08-18)
4
8
 
5
9
  * Regenerated from discovery document revision 20240809
@@ -2803,6 +2803,31 @@ module Google
2803
2803
  end
2804
2804
  end
2805
2805
 
2806
+ # The response message for Operations.ListOperations.
2807
+ class ListOperationsResponse
2808
+ include Google::Apis::Core::Hashable
2809
+
2810
+ # The standard List next-page token.
2811
+ # Corresponds to the JSON property `nextPageToken`
2812
+ # @return [String]
2813
+ attr_accessor :next_page_token
2814
+
2815
+ # A list of operations that matches the specified filter in the request.
2816
+ # Corresponds to the JSON property `operations`
2817
+ # @return [Array<Google::Apis::DriveV3::Operation>]
2818
+ attr_accessor :operations
2819
+
2820
+ def initialize(**args)
2821
+ update!(**args)
2822
+ end
2823
+
2824
+ # Update properties of this object
2825
+ def update!(**args)
2826
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
2827
+ @operations = args[:operations] if args.key?(:operations)
2828
+ end
2829
+ end
2830
+
2806
2831
  # A request to modify the set of labels on a file. This request may contain many
2807
2832
  # modifications that will either all succeed or all fail atomically.
2808
2833
  class ModifyLabelsRequest
@@ -2855,6 +2880,68 @@ module Google
2855
2880
  end
2856
2881
  end
2857
2882
 
2883
+ # This resource represents a long-running operation that is the result of a
2884
+ # network API call.
2885
+ class Operation
2886
+ include Google::Apis::Core::Hashable
2887
+
2888
+ # If the value is `false`, it means the operation is still in progress. If `true`
2889
+ # , the operation is completed, and either `error` or `response` is available.
2890
+ # Corresponds to the JSON property `done`
2891
+ # @return [Boolean]
2892
+ attr_accessor :done
2893
+ alias_method :done?, :done
2894
+
2895
+ # The `Status` type defines a logical error model that is suitable for different
2896
+ # programming environments, including REST APIs and RPC APIs. It is used by [
2897
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
2898
+ # data: error code, error message, and error details. You can find out more
2899
+ # about this error model and how to work with it in the [API Design Guide](https:
2900
+ # //cloud.google.com/apis/design/errors).
2901
+ # Corresponds to the JSON property `error`
2902
+ # @return [Google::Apis::DriveV3::Status]
2903
+ attr_accessor :error
2904
+
2905
+ # Service-specific metadata associated with the operation. It typically contains
2906
+ # progress information and common metadata such as create time. Some services
2907
+ # might not provide such metadata. Any method that returns a long-running
2908
+ # operation should document the metadata type, if any.
2909
+ # Corresponds to the JSON property `metadata`
2910
+ # @return [Hash<String,Object>]
2911
+ attr_accessor :metadata
2912
+
2913
+ # The server-assigned name, which is only unique within the same service that
2914
+ # originally returns it. If you use the default HTTP mapping, the `name` should
2915
+ # be a resource name ending with `operations/`unique_id``.
2916
+ # Corresponds to the JSON property `name`
2917
+ # @return [String]
2918
+ attr_accessor :name
2919
+
2920
+ # The normal, successful response of the operation. If the original method
2921
+ # returns no data on success, such as `Delete`, the response is `google.protobuf.
2922
+ # Empty`. If the original method is standard `Get`/`Create`/`Update`, the
2923
+ # response should be the resource. For other methods, the response should have
2924
+ # the type `XxxResponse`, where `Xxx` is the original method name. For example,
2925
+ # if the original method name is `TakeSnapshot()`, the inferred response type is
2926
+ # `TakeSnapshotResponse`.
2927
+ # Corresponds to the JSON property `response`
2928
+ # @return [Hash<String,Object>]
2929
+ attr_accessor :response
2930
+
2931
+ def initialize(**args)
2932
+ update!(**args)
2933
+ end
2934
+
2935
+ # Update properties of this object
2936
+ def update!(**args)
2937
+ @done = args[:done] if args.key?(:done)
2938
+ @error = args[:error] if args.key?(:error)
2939
+ @metadata = args[:metadata] if args.key?(:metadata)
2940
+ @name = args[:name] if args.key?(:name)
2941
+ @response = args[:response] if args.key?(:response)
2942
+ end
2943
+ end
2944
+
2858
2945
  # A permission for a file. A permission grants a user, group, domain, or the
2859
2946
  # world access to a file or a folder hierarchy. Some resource methods (such as `
2860
2947
  # permissions.update`) require a `permissionId`. Use the `permissions.list`
@@ -3396,6 +3483,45 @@ module Google
3396
3483
  end
3397
3484
  end
3398
3485
 
3486
+ # The `Status` type defines a logical error model that is suitable for different
3487
+ # programming environments, including REST APIs and RPC APIs. It is used by [
3488
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
3489
+ # data: error code, error message, and error details. You can find out more
3490
+ # about this error model and how to work with it in the [API Design Guide](https:
3491
+ # //cloud.google.com/apis/design/errors).
3492
+ class Status
3493
+ include Google::Apis::Core::Hashable
3494
+
3495
+ # The status code, which should be an enum value of google.rpc.Code.
3496
+ # Corresponds to the JSON property `code`
3497
+ # @return [Fixnum]
3498
+ attr_accessor :code
3499
+
3500
+ # A list of messages that carry the error details. There is a common set of
3501
+ # message types for APIs to use.
3502
+ # Corresponds to the JSON property `details`
3503
+ # @return [Array<Hash<String,Object>>]
3504
+ attr_accessor :details
3505
+
3506
+ # A developer-facing error message, which should be in English. Any user-facing
3507
+ # error message should be localized and sent in the google.rpc.Status.details
3508
+ # field, or localized by the client.
3509
+ # Corresponds to the JSON property `message`
3510
+ # @return [String]
3511
+ attr_accessor :message
3512
+
3513
+ def initialize(**args)
3514
+ update!(**args)
3515
+ end
3516
+
3517
+ # Update properties of this object
3518
+ def update!(**args)
3519
+ @code = args[:code] if args.key?(:code)
3520
+ @details = args[:details] if args.key?(:details)
3521
+ @message = args[:message] if args.key?(:message)
3522
+ end
3523
+ end
3524
+
3399
3525
  # Deprecated: use the drive collection instead.
3400
3526
  class TeamDrive
3401
3527
  include Google::Apis::Core::Hashable
@@ -16,13 +16,13 @@ module Google
16
16
  module Apis
17
17
  module DriveV3
18
18
  # Version of the google-apis-drive_v3 gem
19
- GEM_VERSION = "0.55.0"
19
+ GEM_VERSION = "0.56.0"
20
20
 
21
21
  # Version of the code generator used to generate this client
22
22
  GENERATOR_VERSION = "0.15.1"
23
23
 
24
24
  # Revision of the discovery document this client was generated from
25
- REVISION = "20240809"
25
+ REVISION = "20240903"
26
26
  end
27
27
  end
28
28
  end
@@ -238,6 +238,12 @@ module Google
238
238
  include Google::Apis::Core::JsonObjectSupport
239
239
  end
240
240
 
241
+ class ListOperationsResponse
242
+ class Representation < Google::Apis::Core::JsonRepresentation; end
243
+
244
+ include Google::Apis::Core::JsonObjectSupport
245
+ end
246
+
241
247
  class ModifyLabelsRequest
242
248
  class Representation < Google::Apis::Core::JsonRepresentation; end
243
249
 
@@ -250,6 +256,12 @@ module Google
250
256
  include Google::Apis::Core::JsonObjectSupport
251
257
  end
252
258
 
259
+ class Operation
260
+ class Representation < Google::Apis::Core::JsonRepresentation; end
261
+
262
+ include Google::Apis::Core::JsonObjectSupport
263
+ end
264
+
253
265
  class Permission
254
266
  class Representation < Google::Apis::Core::JsonRepresentation; end
255
267
 
@@ -304,6 +316,12 @@ module Google
304
316
  include Google::Apis::Core::JsonObjectSupport
305
317
  end
306
318
 
319
+ class Status
320
+ class Representation < Google::Apis::Core::JsonRepresentation; end
321
+
322
+ include Google::Apis::Core::JsonObjectSupport
323
+ end
324
+
307
325
  class TeamDrive
308
326
  class Representation < Google::Apis::Core::JsonRepresentation; end
309
327
 
@@ -938,6 +956,15 @@ module Google
938
956
  end
939
957
  end
940
958
 
959
+ class ListOperationsResponse
960
+ # @private
961
+ class Representation < Google::Apis::Core::JsonRepresentation
962
+ property :next_page_token, as: 'nextPageToken'
963
+ collection :operations, as: 'operations', class: Google::Apis::DriveV3::Operation, decorator: Google::Apis::DriveV3::Operation::Representation
964
+
965
+ end
966
+ end
967
+
941
968
  class ModifyLabelsRequest
942
969
  # @private
943
970
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -956,6 +983,18 @@ module Google
956
983
  end
957
984
  end
958
985
 
986
+ class Operation
987
+ # @private
988
+ class Representation < Google::Apis::Core::JsonRepresentation
989
+ property :done, as: 'done'
990
+ property :error, as: 'error', class: Google::Apis::DriveV3::Status, decorator: Google::Apis::DriveV3::Status::Representation
991
+
992
+ hash :metadata, as: 'metadata'
993
+ property :name, as: 'name'
994
+ hash :response, as: 'response'
995
+ end
996
+ end
997
+
959
998
  class Permission
960
999
  # @private
961
1000
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -1078,6 +1117,15 @@ module Google
1078
1117
  end
1079
1118
  end
1080
1119
 
1120
+ class Status
1121
+ # @private
1122
+ class Representation < Google::Apis::Core::JsonRepresentation
1123
+ property :code, as: 'code'
1124
+ collection :details, as: 'details'
1125
+ property :message, as: 'message'
1126
+ end
1127
+ end
1128
+
1081
1129
  class TeamDrive
1082
1130
  # @private
1083
1131
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -1018,6 +1018,50 @@ module Google
1018
1018
  execute_or_queue_command(command, &block)
1019
1019
  end
1020
1020
 
1021
+ # Downloads content of a file. Operations are valid for 24 hours from the time
1022
+ # of creation.
1023
+ # @param [String] file_id
1024
+ # Required. The ID of the file to download.
1025
+ # @param [String] mime_type
1026
+ # Optional. The MIME type the file should be downloaded as. This field can only
1027
+ # be set when downloading Google Workspace documents. See [Export MIME types for
1028
+ # Google Workspace documents](/drive/api/guides/ref-export-formats) for the list
1029
+ # of supported MIME types. If not set, a Google Workspace document is downloaded
1030
+ # with a default MIME type. The default MIME type might change in the future.
1031
+ # @param [String] revision_id
1032
+ # Optional. The revision ID of the file to download. This field can only be set
1033
+ # when downloading blob files, Google Docs, and Google Sheets. Returns `
1034
+ # INVALID_ARGUMENT` if downloading a specific revision on the file is
1035
+ # unsupported.
1036
+ # @param [String] fields
1037
+ # Selector specifying which fields to include in a partial response.
1038
+ # @param [String] quota_user
1039
+ # Available to use for quota purposes for server-side applications. Can be any
1040
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1041
+ # @param [Google::Apis::RequestOptions] options
1042
+ # Request-specific options
1043
+ #
1044
+ # @yield [result, err] Result & error if block supplied
1045
+ # @yieldparam result [Google::Apis::DriveV3::Operation] parsed result object
1046
+ # @yieldparam err [StandardError] error object if request failed
1047
+ #
1048
+ # @return [Google::Apis::DriveV3::Operation]
1049
+ #
1050
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1051
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1052
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1053
+ def download_file(file_id, mime_type: nil, revision_id: nil, fields: nil, quota_user: nil, options: nil, &block)
1054
+ command = make_simple_command(:post, 'files/{fileId}/download', options)
1055
+ command.response_representation = Google::Apis::DriveV3::Operation::Representation
1056
+ command.response_class = Google::Apis::DriveV3::Operation
1057
+ command.params['fileId'] = file_id unless file_id.nil?
1058
+ command.query['mimeType'] = mime_type unless mime_type.nil?
1059
+ command.query['revisionId'] = revision_id unless revision_id.nil?
1060
+ command.query['fields'] = fields unless fields.nil?
1061
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1062
+ execute_or_queue_command(command, &block)
1063
+ end
1064
+
1021
1065
  # Permanently deletes all of the user's trashed files.
1022
1066
  # @param [String] drive_id
1023
1067
  # If set, empties the trash of the provided shared drive.
@@ -1491,6 +1535,143 @@ module Google
1491
1535
  execute_or_queue_command(command, &block)
1492
1536
  end
1493
1537
 
1538
+ # Starts asynchronous cancellation on a long-running operation. The server makes
1539
+ # a best effort to cancel the operation, but success is not guaranteed. If the
1540
+ # server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
1541
+ # Clients can use Operations.GetOperation or other methods to check whether the
1542
+ # cancellation succeeded or whether the operation completed despite cancellation.
1543
+ # On successful cancellation, the operation is not deleted; instead, it becomes
1544
+ # an operation with an Operation.error value with a google.rpc.Status.code of 1,
1545
+ # corresponding to `Code.CANCELLED`.
1546
+ # @param [String] name
1547
+ # The name of the operation resource to be cancelled.
1548
+ # @param [String] fields
1549
+ # Selector specifying which fields to include in a partial response.
1550
+ # @param [String] quota_user
1551
+ # Available to use for quota purposes for server-side applications. Can be any
1552
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1553
+ # @param [Google::Apis::RequestOptions] options
1554
+ # Request-specific options
1555
+ #
1556
+ # @yield [result, err] Result & error if block supplied
1557
+ # @yieldparam result [NilClass] No result returned for this method
1558
+ # @yieldparam err [StandardError] error object if request failed
1559
+ #
1560
+ # @return [void]
1561
+ #
1562
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1563
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1564
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1565
+ def cancel_operation(name, fields: nil, quota_user: nil, options: nil, &block)
1566
+ command = make_simple_command(:post, 'operation/{name}:cancel', options)
1567
+ command.params['name'] = name unless name.nil?
1568
+ command.query['fields'] = fields unless fields.nil?
1569
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1570
+ execute_or_queue_command(command, &block)
1571
+ end
1572
+
1573
+ # Deletes a long-running operation. This method indicates that the client is no
1574
+ # longer interested in the operation result. It does not cancel the operation.
1575
+ # If the server doesn't support this method, it returns `google.rpc.Code.
1576
+ # UNIMPLEMENTED`.
1577
+ # @param [String] name
1578
+ # The name of the operation resource to be deleted.
1579
+ # @param [String] fields
1580
+ # Selector specifying which fields to include in a partial response.
1581
+ # @param [String] quota_user
1582
+ # Available to use for quota purposes for server-side applications. Can be any
1583
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1584
+ # @param [Google::Apis::RequestOptions] options
1585
+ # Request-specific options
1586
+ #
1587
+ # @yield [result, err] Result & error if block supplied
1588
+ # @yieldparam result [NilClass] No result returned for this method
1589
+ # @yieldparam err [StandardError] error object if request failed
1590
+ #
1591
+ # @return [void]
1592
+ #
1593
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1594
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1595
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1596
+ def delete_operation(name, fields: nil, quota_user: nil, options: nil, &block)
1597
+ command = make_simple_command(:delete, 'operation/{name}', options)
1598
+ command.params['name'] = name unless name.nil?
1599
+ command.query['fields'] = fields unless fields.nil?
1600
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1601
+ execute_or_queue_command(command, &block)
1602
+ end
1603
+
1604
+ # Gets the latest state of a long-running operation. Clients can use this method
1605
+ # to poll the operation result at intervals as recommended by the API service.
1606
+ # @param [String] name
1607
+ # The name of the operation resource.
1608
+ # @param [String] fields
1609
+ # Selector specifying which fields to include in a partial response.
1610
+ # @param [String] quota_user
1611
+ # Available to use for quota purposes for server-side applications. Can be any
1612
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1613
+ # @param [Google::Apis::RequestOptions] options
1614
+ # Request-specific options
1615
+ #
1616
+ # @yield [result, err] Result & error if block supplied
1617
+ # @yieldparam result [Google::Apis::DriveV3::Operation] parsed result object
1618
+ # @yieldparam err [StandardError] error object if request failed
1619
+ #
1620
+ # @return [Google::Apis::DriveV3::Operation]
1621
+ #
1622
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1623
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1624
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1625
+ def get_operation(name, fields: nil, quota_user: nil, options: nil, &block)
1626
+ command = make_simple_command(:get, 'operations/{name}', options)
1627
+ command.response_representation = Google::Apis::DriveV3::Operation::Representation
1628
+ command.response_class = Google::Apis::DriveV3::Operation
1629
+ command.params['name'] = name unless name.nil?
1630
+ command.query['fields'] = fields unless fields.nil?
1631
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1632
+ execute_or_queue_command(command, &block)
1633
+ end
1634
+
1635
+ # Lists operations that match the specified filter in the request. If the server
1636
+ # doesn't support this method, it returns `UNIMPLEMENTED`.
1637
+ # @param [String] filter
1638
+ # The standard list filter.
1639
+ # @param [String] name
1640
+ # The name of the operation's parent resource.
1641
+ # @param [Fixnum] page_size
1642
+ # The standard list page size.
1643
+ # @param [String] page_token
1644
+ # The standard list page token.
1645
+ # @param [String] fields
1646
+ # Selector specifying which fields to include in a partial response.
1647
+ # @param [String] quota_user
1648
+ # Available to use for quota purposes for server-side applications. Can be any
1649
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1650
+ # @param [Google::Apis::RequestOptions] options
1651
+ # Request-specific options
1652
+ #
1653
+ # @yield [result, err] Result & error if block supplied
1654
+ # @yieldparam result [Google::Apis::DriveV3::ListOperationsResponse] parsed result object
1655
+ # @yieldparam err [StandardError] error object if request failed
1656
+ #
1657
+ # @return [Google::Apis::DriveV3::ListOperationsResponse]
1658
+ #
1659
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1660
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1661
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1662
+ def list_operations(filter: nil, name: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1663
+ command = make_simple_command(:get, 'operations', options)
1664
+ command.response_representation = Google::Apis::DriveV3::ListOperationsResponse::Representation
1665
+ command.response_class = Google::Apis::DriveV3::ListOperationsResponse
1666
+ command.query['filter'] = filter unless filter.nil?
1667
+ command.query['name'] = name unless name.nil?
1668
+ command.query['pageSize'] = page_size unless page_size.nil?
1669
+ command.query['pageToken'] = page_token unless page_token.nil?
1670
+ command.query['fields'] = fields unless fields.nil?
1671
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1672
+ execute_or_queue_command(command, &block)
1673
+ end
1674
+
1494
1675
  # Creates a permission for a file or shared drive. **Warning:** Concurrent
1495
1676
  # permissions operations on the same file are not supported; only the last
1496
1677
  # update is applied.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-apis-drive_v3
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.55.0
4
+ version: 0.56.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: 2024-08-18 00:00:00.000000000 Z
11
+ date: 2024-09-15 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-drive_v3/CHANGELOG.md
61
- documentation_uri: https://googleapis.dev/ruby/google-apis-drive_v3/v0.55.0
61
+ documentation_uri: https://googleapis.dev/ruby/google-apis-drive_v3/v0.56.0
62
62
  source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-drive_v3
63
63
  post_install_message:
64
64
  rdoc_options: []