google-apis-drive_v3 0.61.0 → 0.63.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/OVERVIEW.md +1 -1
- data/lib/google/apis/drive_v3/classes.rb +86 -13
- data/lib/google/apis/drive_v3/gem_version.rb +3 -3
- data/lib/google/apis/drive_v3/representations.rb +22 -0
- data/lib/google/apis/drive_v3/service.rb +67 -59
- data/lib/google/apis/drive_v3.rb +1 -1
- metadata +4 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 93ecd54379da1d4a8dde5a077f62b78c632ae8ceb96276f3b7df931e2955a5e9
|
4
|
+
data.tar.gz: 346e988d1824ba5e1c02a0c3848420953b414cf26a10943e61c6d236c4fe3e4c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0bd4aee62749a9d3c077d8bd5266ec5b25ed4cd680c9143122b4cdd8b606285807e92f51fae19dc3e0e46d6466c23cc1209817d2d06fe3e225ccbb85c2129baa
|
7
|
+
data.tar.gz: 66fe34925b68fa5585ad2e633f9184390838dcb6cd13ac6b3d6df31ec2febc462f5b33b7f144597b57fa7e7efdf8e85a0971bdba1561a8b8c6257a55dc7e057f
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,14 @@
|
|
1
1
|
# Release history for google-apis-drive_v3
|
2
2
|
|
3
|
+
### v0.63.0 (2025-04-06)
|
4
|
+
|
5
|
+
* Regenerated from discovery document revision 20250329
|
6
|
+
|
7
|
+
### v0.62.0 (2025-03-02)
|
8
|
+
|
9
|
+
* Regenerated from discovery document revision 20250220
|
10
|
+
* Regenerated using generator version 0.16.0
|
11
|
+
|
3
12
|
### v0.61.0 (2024-12-15)
|
4
13
|
|
5
14
|
* Regenerated from discovery document revision 20241206
|
data/OVERVIEW.md
CHANGED
@@ -79,7 +79,7 @@ Gem names for modern clients are often of the form `google-cloud-<service_name>`
|
|
79
79
|
|
80
80
|
**For most users, we recommend the modern client, if one is available.** Compared with simple clients, modern clients are generally much easier to use and more Ruby-like, support more advanced features such as streaming and long-running operations, and often provide much better performance. You may consider using a simple client instead, if a modern client is not yet available for the service you want to use, or if you are not able to use gRPC on your infrastructure.
|
81
81
|
|
82
|
-
The [product documentation](https://developers.google.com/drive/) may provide guidance regarding the preferred client library to use.
|
82
|
+
The [product documentation](https://developers.google.com/workspace/drive/) may provide guidance regarding the preferred client library to use.
|
83
83
|
|
84
84
|
## Supported Ruby versions
|
85
85
|
|
@@ -772,7 +772,7 @@ module Google
|
|
772
772
|
|
773
773
|
# A region of the document represented as a JSON string. For details on defining
|
774
774
|
# anchor properties, refer to [Manage comments and replies](https://developers.
|
775
|
-
# google.com/drive/api/v3/manage-comments).
|
775
|
+
# google.com/workspace/drive/api/v3/manage-comments).
|
776
776
|
# Corresponds to the JSON property `anchor`
|
777
777
|
# @return [String]
|
778
778
|
attr_accessor :anchor
|
@@ -993,6 +993,34 @@ module Google
|
|
993
993
|
end
|
994
994
|
end
|
995
995
|
|
996
|
+
# A restriction for copy and download of the file.
|
997
|
+
class DownloadRestriction
|
998
|
+
include Google::Apis::Core::Hashable
|
999
|
+
|
1000
|
+
# Whether download and copy is restricted for readers.
|
1001
|
+
# Corresponds to the JSON property `restrictedForReaders`
|
1002
|
+
# @return [Boolean]
|
1003
|
+
attr_accessor :restricted_for_readers
|
1004
|
+
alias_method :restricted_for_readers?, :restricted_for_readers
|
1005
|
+
|
1006
|
+
# Whether download and copy is restricted for writers. If true, download is also
|
1007
|
+
# restricted for readers.
|
1008
|
+
# Corresponds to the JSON property `restrictedForWriters`
|
1009
|
+
# @return [Boolean]
|
1010
|
+
attr_accessor :restricted_for_writers
|
1011
|
+
alias_method :restricted_for_writers?, :restricted_for_writers
|
1012
|
+
|
1013
|
+
def initialize(**args)
|
1014
|
+
update!(**args)
|
1015
|
+
end
|
1016
|
+
|
1017
|
+
# Update properties of this object
|
1018
|
+
def update!(**args)
|
1019
|
+
@restricted_for_readers = args[:restricted_for_readers] if args.key?(:restricted_for_readers)
|
1020
|
+
@restricted_for_writers = args[:restricted_for_writers] if args.key?(:restricted_for_writers)
|
1021
|
+
end
|
1022
|
+
end
|
1023
|
+
|
996
1024
|
# Representation of a shared drive. Some resource methods (such as `drives.
|
997
1025
|
# update`) require a `driveId`. Use the `drives.list` method to retrieve the ID
|
998
1026
|
# for a shared drive.
|
@@ -1348,6 +1376,11 @@ module Google
|
|
1348
1376
|
attr_accessor :domain_users_only
|
1349
1377
|
alias_method :domain_users_only?, :domain_users_only
|
1350
1378
|
|
1379
|
+
# A restriction for copy and download of the file.
|
1380
|
+
# Corresponds to the JSON property `downloadRestriction`
|
1381
|
+
# @return [Google::Apis::DriveV3::DownloadRestriction]
|
1382
|
+
attr_accessor :download_restriction
|
1383
|
+
|
1351
1384
|
# Whether access to items inside this shared drive is restricted to its members.
|
1352
1385
|
# Corresponds to the JSON property `driveMembersOnly`
|
1353
1386
|
# @return [Boolean]
|
@@ -1370,6 +1403,7 @@ module Google
|
|
1370
1403
|
@admin_managed_restrictions = args[:admin_managed_restrictions] if args.key?(:admin_managed_restrictions)
|
1371
1404
|
@copy_requires_writer_permission = args[:copy_requires_writer_permission] if args.key?(:copy_requires_writer_permission)
|
1372
1405
|
@domain_users_only = args[:domain_users_only] if args.key?(:domain_users_only)
|
1406
|
+
@download_restriction = args[:download_restriction] if args.key?(:download_restriction)
|
1373
1407
|
@drive_members_only = args[:drive_members_only] if args.key?(:drive_members_only)
|
1374
1408
|
@sharing_folders_requires_organizer_permission = args[:sharing_folders_requires_organizer_permission] if args.key?(:sharing_folders_requires_organizer_permission)
|
1375
1409
|
end
|
@@ -1540,6 +1574,13 @@ module Google
|
|
1540
1574
|
# @return [Google::Apis::DriveV3::File::ImageMediaMetadata]
|
1541
1575
|
attr_accessor :image_media_metadata
|
1542
1576
|
|
1577
|
+
# Whether this file has inherited permissions disabled. Inherited permissions
|
1578
|
+
# are enabled by default.
|
1579
|
+
# Corresponds to the JSON property `inheritedPermissionsDisabled`
|
1580
|
+
# @return [Boolean]
|
1581
|
+
attr_accessor :inherited_permissions_disabled
|
1582
|
+
alias_method :inherited_permissions_disabled?, :inherited_permissions_disabled
|
1583
|
+
|
1543
1584
|
# Output only. Whether the file was created or opened by the requesting app.
|
1544
1585
|
# Corresponds to the JSON property `isAppAuthorized`
|
1545
1586
|
# @return [Boolean]
|
@@ -1837,6 +1878,7 @@ module Google
|
|
1837
1878
|
@icon_link = args[:icon_link] if args.key?(:icon_link)
|
1838
1879
|
@id = args[:id] if args.key?(:id)
|
1839
1880
|
@image_media_metadata = args[:image_media_metadata] if args.key?(:image_media_metadata)
|
1881
|
+
@inherited_permissions_disabled = args[:inherited_permissions_disabled] if args.key?(:inherited_permissions_disabled)
|
1840
1882
|
@is_app_authorized = args[:is_app_authorized] if args.key?(:is_app_authorized)
|
1841
1883
|
@kind = args[:kind] if args.key?(:kind)
|
1842
1884
|
@label_info = args[:label_info] if args.key?(:label_info)
|
@@ -1965,6 +2007,12 @@ module Google
|
|
1965
2007
|
attr_accessor :can_delete_children
|
1966
2008
|
alias_method :can_delete_children?, :can_delete_children
|
1967
2009
|
|
2010
|
+
# Whether a user can disable inherited permissions.
|
2011
|
+
# Corresponds to the JSON property `canDisableInheritedPermissions`
|
2012
|
+
# @return [Boolean]
|
2013
|
+
attr_accessor :can_disable_inherited_permissions
|
2014
|
+
alias_method :can_disable_inherited_permissions?, :can_disable_inherited_permissions
|
2015
|
+
|
1968
2016
|
# Output only. Whether the current user can download this file.
|
1969
2017
|
# Corresponds to the JSON property `canDownload`
|
1970
2018
|
# @return [Boolean]
|
@@ -1979,6 +2027,12 @@ module Google
|
|
1979
2027
|
attr_accessor :can_edit
|
1980
2028
|
alias_method :can_edit?, :can_edit
|
1981
2029
|
|
2030
|
+
# Whether a user can re-enable inherited permissions.
|
2031
|
+
# Corresponds to the JSON property `canEnableInheritedPermissions`
|
2032
|
+
# @return [Boolean]
|
2033
|
+
attr_accessor :can_enable_inherited_permissions
|
2034
|
+
alias_method :can_enable_inherited_permissions?, :can_enable_inherited_permissions
|
2035
|
+
|
1982
2036
|
# Output only. Whether the current user can list the children of this folder.
|
1983
2037
|
# This is always false when the item is not a folder.
|
1984
2038
|
# Corresponds to the JSON property `canListChildren`
|
@@ -2189,8 +2243,10 @@ module Google
|
|
2189
2243
|
@can_copy = args[:can_copy] if args.key?(:can_copy)
|
2190
2244
|
@can_delete = args[:can_delete] if args.key?(:can_delete)
|
2191
2245
|
@can_delete_children = args[:can_delete_children] if args.key?(:can_delete_children)
|
2246
|
+
@can_disable_inherited_permissions = args[:can_disable_inherited_permissions] if args.key?(:can_disable_inherited_permissions)
|
2192
2247
|
@can_download = args[:can_download] if args.key?(:can_download)
|
2193
2248
|
@can_edit = args[:can_edit] if args.key?(:can_edit)
|
2249
|
+
@can_enable_inherited_permissions = args[:can_enable_inherited_permissions] if args.key?(:can_enable_inherited_permissions)
|
2194
2250
|
@can_list_children = args[:can_list_children] if args.key?(:can_list_children)
|
2195
2251
|
@can_modify_content = args[:can_modify_content] if args.key?(:can_modify_content)
|
2196
2252
|
@can_modify_content_restriction = args[:can_modify_content_restriction] if args.key?(:can_modify_content_restriction)
|
@@ -3056,10 +3112,10 @@ module Google
|
|
3056
3112
|
# A permission for a file. A permission grants a user, group, domain, or the
|
3057
3113
|
# world access to a file or a folder hierarchy. By default, permissions requests
|
3058
3114
|
# only return a subset of fields. Permission kind, ID, type, and role are always
|
3059
|
-
# returned. To retrieve specific fields, see https://developers.google.com/
|
3060
|
-
# api/guides/fields-parameter. Some resource methods (such as `
|
3061
|
-
# update`) require a `permissionId`. Use the `permissions.list`
|
3062
|
-
# retrieve the ID for a file, folder, or shared drive.
|
3115
|
+
# returned. To retrieve specific fields, see https://developers.google.com/
|
3116
|
+
# workspace/drive/api/guides/fields-parameter. Some resource methods (such as `
|
3117
|
+
# permissions.update`) require a `permissionId`. Use the `permissions.list`
|
3118
|
+
# method to retrieve the ID for a file, folder, or shared drive.
|
3063
3119
|
class Permission
|
3064
3120
|
include Google::Apis::Core::Hashable
|
3065
3121
|
|
@@ -3112,6 +3168,13 @@ module Google
|
|
3112
3168
|
# @return [String]
|
3113
3169
|
attr_accessor :id
|
3114
3170
|
|
3171
|
+
# When true, only organizers, owners, and users with permissions added directly
|
3172
|
+
# on the item can access it.
|
3173
|
+
# Corresponds to the JSON property `inheritedPermissionsDisabled`
|
3174
|
+
# @return [Boolean]
|
3175
|
+
attr_accessor :inherited_permissions_disabled
|
3176
|
+
alias_method :inherited_permissions_disabled?, :inherited_permissions_disabled
|
3177
|
+
|
3115
3178
|
# Output only. Identifies what kind of resource this is. Value: the fixed string
|
3116
3179
|
# `"drive#permission"`.
|
3117
3180
|
# Corresponds to the JSON property `kind`
|
@@ -3125,9 +3188,8 @@ module Google
|
|
3125
3188
|
attr_accessor :pending_owner
|
3126
3189
|
alias_method :pending_owner?, :pending_owner
|
3127
3190
|
|
3128
|
-
# Output only. Details of whether the permissions on this
|
3129
|
-
#
|
3130
|
-
# present only for shared drive items.
|
3191
|
+
# Output only. Details of whether the permissions on this item are inherited or
|
3192
|
+
# directly on this item.
|
3131
3193
|
# Corresponds to the JSON property `permissionDetails`
|
3132
3194
|
# @return [Array<Google::Apis::DriveV3::Permission::PermissionDetail>]
|
3133
3195
|
attr_accessor :permission_details
|
@@ -3159,7 +3221,11 @@ module Google
|
|
3159
3221
|
attr_accessor :type
|
3160
3222
|
|
3161
3223
|
# Indicates the view for this permission. Only populated for permissions that
|
3162
|
-
# belong to a view.
|
3224
|
+
# belong to a view. published and metadata are the only supported values. -
|
3225
|
+
# published: The permission's role is published_reader. - metadata: The item is
|
3226
|
+
# only visible to the metadata view because the item has limited access and the
|
3227
|
+
# scope has at least read access to the parent. Note: The metadata view is
|
3228
|
+
# currently only supported on folders.
|
3163
3229
|
# Corresponds to the JSON property `view`
|
3164
3230
|
# @return [String]
|
3165
3231
|
attr_accessor :view
|
@@ -3177,6 +3243,7 @@ module Google
|
|
3177
3243
|
@email_address = args[:email_address] if args.key?(:email_address)
|
3178
3244
|
@expiration_time = args[:expiration_time] if args.key?(:expiration_time)
|
3179
3245
|
@id = args[:id] if args.key?(:id)
|
3246
|
+
@inherited_permissions_disabled = args[:inherited_permissions_disabled] if args.key?(:inherited_permissions_disabled)
|
3180
3247
|
@kind = args[:kind] if args.key?(:kind)
|
3181
3248
|
@pending_owner = args[:pending_owner] if args.key?(:pending_owner)
|
3182
3249
|
@permission_details = args[:permission_details] if args.key?(:permission_details)
|
@@ -3199,7 +3266,7 @@ module Google
|
|
3199
3266
|
alias_method :inherited?, :inherited
|
3200
3267
|
|
3201
3268
|
# Output only. The ID of the item from which this permission is inherited. This
|
3202
|
-
# is
|
3269
|
+
# is only populated for items in shared drives.
|
3203
3270
|
# Corresponds to the JSON property `inheritedFrom`
|
3204
3271
|
# @return [String]
|
3205
3272
|
attr_accessor :inherited_from
|
@@ -3211,7 +3278,7 @@ module Google
|
|
3211
3278
|
attr_accessor :permission_type
|
3212
3279
|
|
3213
3280
|
# Output only. The primary role for this user. While new values may be added in
|
3214
|
-
# the future, the following are currently possible: * `organizer` * `
|
3281
|
+
# the future, the following are currently possible: * `owner` * `organizer` * `
|
3215
3282
|
# fileOrganizer` * `writer` * `commenter` * `reader`
|
3216
3283
|
# Corresponds to the JSON property `role`
|
3217
3284
|
# @return [String]
|
@@ -3532,8 +3599,8 @@ module Google
|
|
3532
3599
|
attr_accessor :published
|
3533
3600
|
alias_method :published?, :published
|
3534
3601
|
|
3535
|
-
# Output only. A link to the published revision. This is only populated for
|
3536
|
-
#
|
3602
|
+
# Output only. A link to the published revision. This is only populated for Docs
|
3603
|
+
# Editors files.
|
3537
3604
|
# Corresponds to the JSON property `publishedLink`
|
3538
3605
|
# @return [String]
|
3539
3606
|
attr_accessor :published_link
|
@@ -4016,6 +4083,11 @@ module Google
|
|
4016
4083
|
attr_accessor :domain_users_only
|
4017
4084
|
alias_method :domain_users_only?, :domain_users_only
|
4018
4085
|
|
4086
|
+
# A restriction for copy and download of the file.
|
4087
|
+
# Corresponds to the JSON property `downloadRestriction`
|
4088
|
+
# @return [Google::Apis::DriveV3::DownloadRestriction]
|
4089
|
+
attr_accessor :download_restriction
|
4090
|
+
|
4019
4091
|
# If true, only users with the organizer role can share folders. If false, users
|
4020
4092
|
# with either the organizer role or the file organizer role can share folders.
|
4021
4093
|
# Corresponds to the JSON property `sharingFoldersRequiresOrganizerPermission`
|
@@ -4039,6 +4111,7 @@ module Google
|
|
4039
4111
|
@admin_managed_restrictions = args[:admin_managed_restrictions] if args.key?(:admin_managed_restrictions)
|
4040
4112
|
@copy_requires_writer_permission = args[:copy_requires_writer_permission] if args.key?(:copy_requires_writer_permission)
|
4041
4113
|
@domain_users_only = args[:domain_users_only] if args.key?(:domain_users_only)
|
4114
|
+
@download_restriction = args[:download_restriction] if args.key?(:download_restriction)
|
4042
4115
|
@sharing_folders_requires_organizer_permission = args[:sharing_folders_requires_organizer_permission] if args.key?(:sharing_folders_requires_organizer_permission)
|
4043
4116
|
@team_members_only = args[:team_members_only] if args.key?(:team_members_only)
|
4044
4117
|
end
|
@@ -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.
|
19
|
+
GEM_VERSION = "0.63.0"
|
20
20
|
|
21
21
|
# Version of the code generator used to generate this client
|
22
|
-
GENERATOR_VERSION = "0.
|
22
|
+
GENERATOR_VERSION = "0.16.0"
|
23
23
|
|
24
24
|
# Revision of the discovery document this client was generated from
|
25
|
-
REVISION = "
|
25
|
+
REVISION = "20250329"
|
26
26
|
end
|
27
27
|
end
|
28
28
|
end
|
@@ -118,6 +118,12 @@ module Google
|
|
118
118
|
include Google::Apis::Core::JsonObjectSupport
|
119
119
|
end
|
120
120
|
|
121
|
+
class DownloadRestriction
|
122
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
123
|
+
|
124
|
+
include Google::Apis::Core::JsonObjectSupport
|
125
|
+
end
|
126
|
+
|
121
127
|
class Drive
|
122
128
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
123
129
|
|
@@ -618,6 +624,14 @@ module Google
|
|
618
624
|
end
|
619
625
|
end
|
620
626
|
|
627
|
+
class DownloadRestriction
|
628
|
+
# @private
|
629
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
630
|
+
property :restricted_for_readers, as: 'restrictedForReaders'
|
631
|
+
property :restricted_for_writers, as: 'restrictedForWriters'
|
632
|
+
end
|
633
|
+
end
|
634
|
+
|
621
635
|
class Drive
|
622
636
|
# @private
|
623
637
|
class Representation < Google::Apis::Core::JsonRepresentation
|
@@ -681,6 +695,8 @@ module Google
|
|
681
695
|
property :admin_managed_restrictions, as: 'adminManagedRestrictions'
|
682
696
|
property :copy_requires_writer_permission, as: 'copyRequiresWriterPermission'
|
683
697
|
property :domain_users_only, as: 'domainUsersOnly'
|
698
|
+
property :download_restriction, as: 'downloadRestriction', class: Google::Apis::DriveV3::DownloadRestriction, decorator: Google::Apis::DriveV3::DownloadRestriction::Representation
|
699
|
+
|
684
700
|
property :drive_members_only, as: 'driveMembersOnly'
|
685
701
|
property :sharing_folders_requires_organizer_permission, as: 'sharingFoldersRequiresOrganizerPermission'
|
686
702
|
end
|
@@ -724,6 +740,7 @@ module Google
|
|
724
740
|
property :id, as: 'id'
|
725
741
|
property :image_media_metadata, as: 'imageMediaMetadata', class: Google::Apis::DriveV3::File::ImageMediaMetadata, decorator: Google::Apis::DriveV3::File::ImageMediaMetadata::Representation
|
726
742
|
|
743
|
+
property :inherited_permissions_disabled, as: 'inheritedPermissionsDisabled'
|
727
744
|
property :is_app_authorized, as: 'isAppAuthorized'
|
728
745
|
property :kind, as: 'kind'
|
729
746
|
property :label_info, as: 'labelInfo', class: Google::Apis::DriveV3::File::LabelInfo, decorator: Google::Apis::DriveV3::File::LabelInfo::Representation
|
@@ -797,8 +814,10 @@ module Google
|
|
797
814
|
property :can_copy, as: 'canCopy'
|
798
815
|
property :can_delete, as: 'canDelete'
|
799
816
|
property :can_delete_children, as: 'canDeleteChildren'
|
817
|
+
property :can_disable_inherited_permissions, as: 'canDisableInheritedPermissions'
|
800
818
|
property :can_download, as: 'canDownload'
|
801
819
|
property :can_edit, as: 'canEdit'
|
820
|
+
property :can_enable_inherited_permissions, as: 'canEnableInheritedPermissions'
|
802
821
|
property :can_list_children, as: 'canListChildren'
|
803
822
|
property :can_modify_content, as: 'canModifyContent'
|
804
823
|
property :can_modify_content_restriction, as: 'canModifyContentRestriction'
|
@@ -1061,6 +1080,7 @@ module Google
|
|
1061
1080
|
property :expiration_time, as: 'expirationTime', type: DateTime
|
1062
1081
|
|
1063
1082
|
property :id, as: 'id'
|
1083
|
+
property :inherited_permissions_disabled, as: 'inheritedPermissionsDisabled'
|
1064
1084
|
property :kind, as: 'kind'
|
1065
1085
|
property :pending_owner, as: 'pendingOwner'
|
1066
1086
|
collection :permission_details, as: 'permissionDetails', class: Google::Apis::DriveV3::Permission::PermissionDetail, decorator: Google::Apis::DriveV3::Permission::PermissionDetail::Representation
|
@@ -1254,6 +1274,8 @@ module Google
|
|
1254
1274
|
property :admin_managed_restrictions, as: 'adminManagedRestrictions'
|
1255
1275
|
property :copy_requires_writer_permission, as: 'copyRequiresWriterPermission'
|
1256
1276
|
property :domain_users_only, as: 'domainUsersOnly'
|
1277
|
+
property :download_restriction, as: 'downloadRestriction', class: Google::Apis::DriveV3::DownloadRestriction, decorator: Google::Apis::DriveV3::DownloadRestriction::Representation
|
1278
|
+
|
1257
1279
|
property :sharing_folders_requires_organizer_permission, as: 'sharingFoldersRequiresOrganizerPermission'
|
1258
1280
|
property :team_members_only, as: 'teamMembersOnly'
|
1259
1281
|
end
|
@@ -30,7 +30,7 @@ module Google
|
|
30
30
|
# Drive = Google::Apis::DriveV3 # Alias the module
|
31
31
|
# service = Drive::DriveService.new
|
32
32
|
#
|
33
|
-
# @see https://developers.google.com/drive/
|
33
|
+
# @see https://developers.google.com/workspace/drive/
|
34
34
|
class DriveService < Google::Apis::Core::BaseService
|
35
35
|
DEFAULT_ENDPOINT_TEMPLATE = "https://www.$UNIVERSE_DOMAIN$/"
|
36
36
|
|
@@ -53,9 +53,9 @@ module Google
|
|
53
53
|
|
54
54
|
# Gets information about the user, the user's Drive, and system capabilities.
|
55
55
|
# For more information, see [Return user info](https://developers.google.com/
|
56
|
-
# drive/api/guides/user-info). Required: The `fields` parameter must
|
57
|
-
# return the exact fields you need, see [Return specific fields](
|
58
|
-
# developers.google.com/drive/api/guides/fields-parameter).
|
56
|
+
# workspace/drive/api/guides/user-info). Required: The `fields` parameter must
|
57
|
+
# be set. To return the exact fields you need, see [Return specific fields](
|
58
|
+
# https://developers.google.com/workspace/drive/api/guides/fields-parameter).
|
59
59
|
# @param [String] fields
|
60
60
|
# Selector specifying which fields to include in a partial response.
|
61
61
|
# @param [String] quota_user
|
@@ -187,7 +187,7 @@ module Google
|
|
187
187
|
end
|
188
188
|
|
189
189
|
# Gets a specific app. For more information, see [Return user info](https://
|
190
|
-
# developers.google.com/drive/api/guides/user-info).
|
190
|
+
# developers.google.com/workspace/drive/api/guides/user-info).
|
191
191
|
# @param [String] app_id
|
192
192
|
# The ID of the app.
|
193
193
|
# @param [String] fields
|
@@ -218,7 +218,7 @@ module Google
|
|
218
218
|
end
|
219
219
|
|
220
220
|
# Lists a user's installed apps. For more information, see [Return user info](
|
221
|
-
# https://developers.google.com/drive/api/guides/user-info).
|
221
|
+
# https://developers.google.com/workspace/drive/api/guides/user-info).
|
222
222
|
# @param [String] app_filter_extensions
|
223
223
|
# A comma-separated list of file extensions to limit returned results. All
|
224
224
|
# results within the given app query scope which can open any of the given file
|
@@ -262,8 +262,8 @@ module Google
|
|
262
262
|
end
|
263
263
|
|
264
264
|
# Gets the starting pageToken for listing future changes. For more information,
|
265
|
-
# see [Retrieve changes](https://developers.google.com/drive/api/
|
266
|
-
# changes).
|
265
|
+
# see [Retrieve changes](https://developers.google.com/workspace/drive/api/
|
266
|
+
# guides/manage-changes).
|
267
267
|
# @param [String] drive_id
|
268
268
|
# The ID of the shared drive for which the starting pageToken for listing future
|
269
269
|
# changes from that shared drive will be returned.
|
@@ -304,8 +304,8 @@ module Google
|
|
304
304
|
end
|
305
305
|
|
306
306
|
# Lists the changes for a user or shared drive. For more information, see [
|
307
|
-
# Retrieve changes](https://developers.google.com/drive/api/guides/
|
308
|
-
# changes).
|
307
|
+
# Retrieve changes](https://developers.google.com/workspace/drive/api/guides/
|
308
|
+
# manage-changes).
|
309
309
|
# @param [String] page_token
|
310
310
|
# The token for continuing a previous list request on the next page. This should
|
311
311
|
# be set to the value of 'nextPageToken' from the previous response or to the
|
@@ -388,7 +388,8 @@ module Google
|
|
388
388
|
end
|
389
389
|
|
390
390
|
# Subscribes to changes for a user. For more information, see [Notifications for
|
391
|
-
# resource changes](https://developers.google.com/drive/api/guides/
|
391
|
+
# resource changes](https://developers.google.com/workspace/drive/api/guides/
|
392
|
+
# push).
|
392
393
|
# @param [String] page_token
|
393
394
|
# The token for continuing a previous list request on the next page. This should
|
394
395
|
# be set to the value of 'nextPageToken' from the previous response or to the
|
@@ -474,8 +475,8 @@ module Google
|
|
474
475
|
end
|
475
476
|
|
476
477
|
# Stops watching resources through this channel. For more information, see [
|
477
|
-
# Notifications for resource changes](https://developers.google.com/
|
478
|
-
# guides/push).
|
478
|
+
# Notifications for resource changes](https://developers.google.com/workspace/
|
479
|
+
# drive/api/guides/push).
|
479
480
|
# @param [Google::Apis::DriveV3::Channel] channel_object
|
480
481
|
# @param [String] fields
|
481
482
|
# Selector specifying which fields to include in a partial response.
|
@@ -504,10 +505,10 @@ module Google
|
|
504
505
|
end
|
505
506
|
|
506
507
|
# Creates a comment on a file. For more information, see [Manage comments and
|
507
|
-
# replies](https://developers.google.com/drive/api/guides/manage-
|
508
|
-
# Required: The `fields` parameter must be set. To return the exact
|
509
|
-
# need, see [Return specific fields](https://developers.google.com/
|
510
|
-
# guides/fields-parameter).
|
508
|
+
# replies](https://developers.google.com/workspace/drive/api/guides/manage-
|
509
|
+
# comments). Required: The `fields` parameter must be set. To return the exact
|
510
|
+
# fields you need, see [Return specific fields](https://developers.google.com/
|
511
|
+
# workspace/drive/api/guides/fields-parameter).
|
511
512
|
# @param [String] file_id
|
512
513
|
# The ID of the file.
|
513
514
|
# @param [Google::Apis::DriveV3::Comment] comment_object
|
@@ -541,10 +542,10 @@ module Google
|
|
541
542
|
end
|
542
543
|
|
543
544
|
# Deletes a comment. For more information, see [Manage comments and replies](
|
544
|
-
# https://developers.google.com/drive/api/guides/manage-comments).
|
545
|
-
# `fields` parameter must be set. To return the exact fields you
|
546
|
-
# Return specific fields](https://developers.google.com/
|
547
|
-
# parameter).
|
545
|
+
# https://developers.google.com/workspace/drive/api/guides/manage-comments).
|
546
|
+
# Required: The `fields` parameter must be set. To return the exact fields you
|
547
|
+
# need, see [Return specific fields](https://developers.google.com/workspace/
|
548
|
+
# drive/api/guides/fields-parameter).
|
548
549
|
# @param [String] file_id
|
549
550
|
# The ID of the file.
|
550
551
|
# @param [String] comment_id
|
@@ -576,10 +577,10 @@ module Google
|
|
576
577
|
end
|
577
578
|
|
578
579
|
# Gets a comment by ID. For more information, see [Manage comments and replies](
|
579
|
-
# https://developers.google.com/drive/api/guides/manage-comments).
|
580
|
-
# `fields` parameter must be set. To return the exact fields you
|
581
|
-
# Return specific fields](https://developers.google.com/
|
582
|
-
# parameter).
|
580
|
+
# https://developers.google.com/workspace/drive/api/guides/manage-comments).
|
581
|
+
# Required: The `fields` parameter must be set. To return the exact fields you
|
582
|
+
# need, see [Return specific fields](https://developers.google.com/workspace/
|
583
|
+
# drive/api/guides/fields-parameter).
|
583
584
|
# @param [String] file_id
|
584
585
|
# The ID of the file.
|
585
586
|
# @param [String] comment_id
|
@@ -617,10 +618,10 @@ module Google
|
|
617
618
|
end
|
618
619
|
|
619
620
|
# Lists a file's comments. For more information, see [Manage comments and
|
620
|
-
# replies](https://developers.google.com/drive/api/guides/manage-
|
621
|
-
# Required: The `fields` parameter must be set. To return the exact
|
622
|
-
# need, see [Return specific fields](https://developers.google.com/
|
623
|
-
# guides/fields-parameter).
|
621
|
+
# replies](https://developers.google.com/workspace/drive/api/guides/manage-
|
622
|
+
# comments). Required: The `fields` parameter must be set. To return the exact
|
623
|
+
# fields you need, see [Return specific fields](https://developers.google.com/
|
624
|
+
# workspace/drive/api/guides/fields-parameter).
|
624
625
|
# @param [String] file_id
|
625
626
|
# The ID of the file.
|
626
627
|
# @param [Boolean] include_deleted
|
@@ -666,10 +667,10 @@ module Google
|
|
666
667
|
end
|
667
668
|
|
668
669
|
# Updates a comment with patch semantics. For more information, see [Manage
|
669
|
-
# comments and replies](https://developers.google.com/drive/api/guides/
|
670
|
-
# comments). Required: The `fields` parameter must be set. To return the
|
671
|
-
# fields you need, see [Return specific fields](https://developers.google.
|
672
|
-
# drive/api/guides/fields-parameter).
|
670
|
+
# comments and replies](https://developers.google.com/workspace/drive/api/guides/
|
671
|
+
# manage-comments). Required: The `fields` parameter must be set. To return the
|
672
|
+
# exact fields you need, see [Return specific fields](https://developers.google.
|
673
|
+
# com/workspace/drive/api/guides/fields-parameter).
|
673
674
|
# @param [String] file_id
|
674
675
|
# The ID of the file.
|
675
676
|
# @param [String] comment_id
|
@@ -847,8 +848,8 @@ module Google
|
|
847
848
|
|
848
849
|
# Lists the user's shared drives. This method accepts the `q` parameter, which
|
849
850
|
# is a search query combining one or more search terms. For more information,
|
850
|
-
# see the [Search for shared drives](/drive/api/guides/search-
|
851
|
-
# guide.
|
851
|
+
# see the [Search for shared drives](/workspace/drive/api/guides/search-
|
852
|
+
# shareddrives) guide.
|
852
853
|
# @param [Fixnum] page_size
|
853
854
|
# Maximum number of shared drives to return per page.
|
854
855
|
# @param [String] page_token
|
@@ -1028,18 +1029,18 @@ module Google
|
|
1028
1029
|
# 120 GB - *Accepted Media MIME types:*`*/*` Note: Specify a valid MIME type,
|
1029
1030
|
# rather than the literal `*/*` value. The literal `*/*` is only used to
|
1030
1031
|
# indicate that any valid MIME type can be uploaded. For more information on
|
1031
|
-
# uploading files, see [Upload file data](/drive/api/guides/manage-
|
1032
|
-
# Apps creating shortcuts with `files.create` must specify the MIME
|
1033
|
-
# application/vnd.google-apps.shortcut`. Apps should specify a file
|
1034
|
-
# the `name` property when inserting files with the API. For
|
1035
|
-
# operation to insert a JPEG file should specify something like `"
|
1036
|
-
# jpg"` in the metadata. Subsequent `GET` requests include the read-
|
1037
|
-
# fileExtension` property populated with the extension originally
|
1038
|
-
# the `title` property. When a Google Drive user requests to
|
1039
|
-
# when the file is downloaded through the sync client, Drive
|
1040
|
-
# filename (with extension) based on the title. In cases where the
|
1041
|
-
# missing, Drive attempts to determine the extension based on the
|
1042
|
-
# type.
|
1032
|
+
# uploading files, see [Upload file data](/workspace/drive/api/guides/manage-
|
1033
|
+
# uploads). Apps creating shortcuts with `files.create` must specify the MIME
|
1034
|
+
# type `application/vnd.google-apps.shortcut`. Apps should specify a file
|
1035
|
+
# extension in the `name` property when inserting files with the API. For
|
1036
|
+
# example, an operation to insert a JPEG file should specify something like `"
|
1037
|
+
# name": "cat.jpg"` in the metadata. Subsequent `GET` requests include the read-
|
1038
|
+
# only `fileExtension` property populated with the extension originally
|
1039
|
+
# specified in the `title` property. When a Google Drive user requests to
|
1040
|
+
# download a file, or when the file is downloaded through the sync client, Drive
|
1041
|
+
# builds a full filename (with extension) based on the title. In cases where the
|
1042
|
+
# extension is missing, Drive attempts to determine the extension based on the
|
1043
|
+
# file's MIME type.
|
1043
1044
|
# @param [Google::Apis::DriveV3::File] file_object
|
1044
1045
|
# @param [Boolean] enforce_single_parent
|
1045
1046
|
# Deprecated. Creating files in multiple folders is no longer supported.
|
@@ -1312,9 +1313,9 @@ module Google
|
|
1312
1313
|
# Gets a file's metadata or content by ID. If you provide the URL parameter `
|
1313
1314
|
# alt=media`, then the response includes the file contents in the response body.
|
1314
1315
|
# Downloading content with `alt=media` only works if the file is stored in Drive.
|
1315
|
-
# To download Google Docs, Sheets, and Slides use [`files.export`](/
|
1316
|
-
# reference/rest/v3/files/export) instead. For more information, see [
|
1317
|
-
# export files](/drive/api/guides/manage-downloads).
|
1316
|
+
# To download Google Docs, Sheets, and Slides use [`files.export`](/workspace/
|
1317
|
+
# drive/api/reference/rest/v3/files/export) instead. For more information, see [
|
1318
|
+
# Download & export files](/workspace/drive/api/guides/manage-downloads).
|
1318
1319
|
# @param [String] file_id
|
1319
1320
|
# The ID of the file.
|
1320
1321
|
# @param [Boolean] acknowledge_abuse
|
@@ -1373,10 +1374,10 @@ module Google
|
|
1373
1374
|
|
1374
1375
|
# Lists the user's files. This method accepts the `q` parameter, which is a
|
1375
1376
|
# search query combining one or more search terms. For more information, see the
|
1376
|
-
# [Search for files & folders](/drive/api/guides/search-files) guide. *
|
1377
|
-
# This method returns *all* files by default, including trashed files. If
|
1378
|
-
# don't want trashed files to appear in the list, use the `trashed=false`
|
1379
|
-
# parameter to remove trashed files from the results.
|
1377
|
+
# [Search for files & folders](/workspace/drive/api/guides/search-files) guide. *
|
1378
|
+
# Note:* This method returns *all* files by default, including trashed files. If
|
1379
|
+
# you don't want trashed files to appear in the list, use the `trashed=false`
|
1380
|
+
# query parameter to remove trashed files from the results.
|
1380
1381
|
# @param [String] corpora
|
1381
1382
|
# Bodies of items (files/documents) to which the query applies. Supported bodies
|
1382
1383
|
# are 'user', 'domain', 'drive', and 'allDrives'. Prefer 'user' or 'drive' to '
|
@@ -1549,7 +1550,8 @@ module Google
|
|
1549
1550
|
# size:* 5,120 GB - *Accepted Media MIME types:*`*/*` Note: Specify a valid MIME
|
1550
1551
|
# type, rather than the literal `*/*` value. The literal `*/*` is only used to
|
1551
1552
|
# indicate that any valid MIME type can be uploaded. For more information on
|
1552
|
-
# uploading files, see [Upload file data](/drive/api/guides/manage-
|
1553
|
+
# uploading files, see [Upload file data](/workspace/drive/api/guides/manage-
|
1554
|
+
# uploads).
|
1553
1555
|
# @param [String] file_id
|
1554
1556
|
# The ID of the file.
|
1555
1557
|
# @param [Google::Apis::DriveV3::File] file_object
|
@@ -1709,7 +1711,7 @@ module Google
|
|
1709
1711
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1710
1712
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1711
1713
|
def cancel_operation(name, fields: nil, quota_user: nil, options: nil, &block)
|
1712
|
-
command = make_simple_command(:post, '
|
1714
|
+
command = make_simple_command(:post, 'operations/{name}:cancel', options)
|
1713
1715
|
command.params['name'] = name unless name.nil?
|
1714
1716
|
command.query['fields'] = fields unless fields.nil?
|
1715
1717
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
@@ -1740,7 +1742,7 @@ module Google
|
|
1740
1742
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1741
1743
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1742
1744
|
def delete_operation(name, fields: nil, quota_user: nil, options: nil, &block)
|
1743
|
-
command = make_simple_command(:delete, '
|
1745
|
+
command = make_simple_command(:delete, 'operations/{name}', options)
|
1744
1746
|
command.params['name'] = name unless name.nil?
|
1745
1747
|
command.query['fields'] = fields unless fields.nil?
|
1746
1748
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
@@ -1893,6 +1895,8 @@ module Google
|
|
1893
1895
|
# The ID of the file or shared drive.
|
1894
1896
|
# @param [String] permission_id
|
1895
1897
|
# The ID of the permission.
|
1898
|
+
# @param [Boolean] enforce_expansive_access
|
1899
|
+
# Whether the request should enforce expansive access rules.
|
1896
1900
|
# @param [Boolean] supports_all_drives
|
1897
1901
|
# Whether the requesting application supports both My Drives and shared drives.
|
1898
1902
|
# @param [Boolean] supports_team_drives
|
@@ -1919,10 +1923,11 @@ module Google
|
|
1919
1923
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1920
1924
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1921
1925
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1922
|
-
def delete_permission(file_id, permission_id, supports_all_drives: nil, supports_team_drives: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block)
|
1926
|
+
def delete_permission(file_id, permission_id, enforce_expansive_access: nil, supports_all_drives: nil, supports_team_drives: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block)
|
1923
1927
|
command = make_simple_command(:delete, 'files/{fileId}/permissions/{permissionId}', options)
|
1924
1928
|
command.params['fileId'] = file_id unless file_id.nil?
|
1925
1929
|
command.params['permissionId'] = permission_id unless permission_id.nil?
|
1930
|
+
command.query['enforceExpansiveAccess'] = enforce_expansive_access unless enforce_expansive_access.nil?
|
1926
1931
|
command.query['supportsAllDrives'] = supports_all_drives unless supports_all_drives.nil?
|
1927
1932
|
command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
|
1928
1933
|
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
@@ -2038,6 +2043,8 @@ module Google
|
|
2038
2043
|
# @param [String] permission_id
|
2039
2044
|
# The ID of the permission.
|
2040
2045
|
# @param [Google::Apis::DriveV3::Permission] permission_object
|
2046
|
+
# @param [Boolean] enforce_expansive_access
|
2047
|
+
# Whether the request should enforce expansive access rules.
|
2041
2048
|
# @param [Boolean] remove_expiration
|
2042
2049
|
# Whether to remove the expiration date.
|
2043
2050
|
# @param [Boolean] supports_all_drives
|
@@ -2070,7 +2077,7 @@ module Google
|
|
2070
2077
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2071
2078
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2072
2079
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2073
|
-
def update_permission(file_id, permission_id, permission_object = nil, remove_expiration: nil, supports_all_drives: nil, supports_team_drives: nil, transfer_ownership: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block)
|
2080
|
+
def update_permission(file_id, permission_id, permission_object = nil, enforce_expansive_access: nil, remove_expiration: nil, supports_all_drives: nil, supports_team_drives: nil, transfer_ownership: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block)
|
2074
2081
|
command = make_simple_command(:patch, 'files/{fileId}/permissions/{permissionId}', options)
|
2075
2082
|
command.request_representation = Google::Apis::DriveV3::Permission::Representation
|
2076
2083
|
command.request_object = permission_object
|
@@ -2078,6 +2085,7 @@ module Google
|
|
2078
2085
|
command.response_class = Google::Apis::DriveV3::Permission
|
2079
2086
|
command.params['fileId'] = file_id unless file_id.nil?
|
2080
2087
|
command.params['permissionId'] = permission_id unless permission_id.nil?
|
2088
|
+
command.query['enforceExpansiveAccess'] = enforce_expansive_access unless enforce_expansive_access.nil?
|
2081
2089
|
command.query['removeExpiration'] = remove_expiration unless remove_expiration.nil?
|
2082
2090
|
command.query['supportsAllDrives'] = supports_all_drives unless supports_all_drives.nil?
|
2083
2091
|
command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
|
data/lib/google/apis/drive_v3.rb
CHANGED
@@ -23,7 +23,7 @@ module Google
|
|
23
23
|
#
|
24
24
|
# The Google Drive API allows clients to access resources from Google Drive.
|
25
25
|
#
|
26
|
-
# @see https://developers.google.com/drive/
|
26
|
+
# @see https://developers.google.com/workspace/drive/
|
27
27
|
module DriveV3
|
28
28
|
# Version of the Google Drive API this client connects to.
|
29
29
|
# This is NOT the gem version.
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-apis-drive_v3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.63.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-04-16 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: google-apis-core
|
@@ -58,9 +57,8 @@ licenses:
|
|
58
57
|
metadata:
|
59
58
|
bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
|
60
59
|
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.
|
60
|
+
documentation_uri: https://googleapis.dev/ruby/google-apis-drive_v3/v0.63.0
|
62
61
|
source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-drive_v3
|
63
|
-
post_install_message:
|
64
62
|
rdoc_options: []
|
65
63
|
require_paths:
|
66
64
|
- lib
|
@@ -75,8 +73,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
75
73
|
- !ruby/object:Gem::Version
|
76
74
|
version: '0'
|
77
75
|
requirements: []
|
78
|
-
rubygems_version: 3.5
|
79
|
-
signing_key:
|
76
|
+
rubygems_version: 3.6.5
|
80
77
|
specification_version: 4
|
81
78
|
summary: Simple REST client for Google Drive API V3
|
82
79
|
test_files: []
|