google-api-client 0.42.0 → 0.42.1
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 +70 -0
- data/generated/google/apis/admob_v1.rb +1 -1
- data/generated/google/apis/admob_v1/service.rb +1 -1
- data/generated/google/apis/appsmarket_v2.rb +1 -1
- data/generated/google/apis/billingbudgets_v1beta1.rb +1 -1
- data/generated/google/apis/billingbudgets_v1beta1/classes.rb +28 -13
- data/generated/google/apis/billingbudgets_v1beta1/representations.rb +1 -0
- data/generated/google/apis/blogger_v3.rb +1 -1
- data/generated/google/apis/chat_v1.rb +1 -1
- data/generated/google/apis/chat_v1/classes.rb +111 -0
- data/generated/google/apis/chat_v1/representations.rb +50 -0
- data/generated/google/apis/chat_v1/service.rb +32 -0
- data/generated/google/apis/classroom_v1.rb +1 -1
- data/generated/google/apis/classroom_v1/service.rb +5 -2
- data/generated/google/apis/cloudbuild_v1.rb +1 -1
- data/generated/google/apis/cloudbuild_v1/classes.rb +1 -1
- data/generated/google/apis/cloudidentity_v1beta1.rb +1 -1
- data/generated/google/apis/cloudidentity_v1beta1/classes.rb +25 -0
- data/generated/google/apis/cloudidentity_v1beta1/representations.rb +15 -0
- data/generated/google/apis/cloudscheduler_v1.rb +1 -1
- data/generated/google/apis/cloudscheduler_v1/classes.rb +5 -5
- data/generated/google/apis/cloudscheduler_v1beta1.rb +1 -1
- data/generated/google/apis/cloudscheduler_v1beta1/classes.rb +5 -5
- data/generated/google/apis/cloudtrace_v1.rb +1 -1
- data/generated/google/apis/cloudtrace_v1/classes.rb +2 -3
- data/generated/google/apis/cloudtrace_v1/service.rb +1 -7
- data/generated/google/apis/cloudtrace_v2.rb +1 -1
- data/generated/google/apis/cloudtrace_v2/classes.rb +6 -5
- data/generated/google/apis/cloudtrace_v2/service.rb +3 -6
- data/generated/google/apis/compute_beta.rb +1 -1
- data/generated/google/apis/compute_beta/classes.rb +279 -0
- data/generated/google/apis/compute_beta/representations.rb +90 -0
- data/generated/google/apis/compute_beta/service.rb +257 -0
- data/generated/google/apis/compute_v1.rb +1 -1
- data/generated/google/apis/compute_v1/classes.rb +279 -0
- data/generated/google/apis/compute_v1/representations.rb +90 -0
- data/generated/google/apis/compute_v1/service.rb +257 -0
- data/generated/google/apis/container_v1.rb +1 -1
- data/generated/google/apis/container_v1/classes.rb +9 -0
- data/generated/google/apis/container_v1/representations.rb +1 -0
- data/generated/google/apis/container_v1beta1.rb +1 -1
- data/generated/google/apis/container_v1beta1/classes.rb +15 -0
- data/generated/google/apis/container_v1beta1/representations.rb +2 -0
- data/generated/google/apis/content_v2.rb +1 -1
- data/generated/google/apis/content_v2/classes.rb +2 -2
- data/generated/google/apis/content_v2_1.rb +1 -1
- data/generated/google/apis/content_v2_1/classes.rb +4 -4
- data/generated/google/apis/customsearch_v1.rb +1 -1
- data/generated/google/apis/customsearch_v1/service.rb +12 -2
- data/generated/google/apis/datacatalog_v1beta1.rb +1 -1
- data/generated/google/apis/datacatalog_v1beta1/classes.rb +3 -3
- data/generated/google/apis/dataflow_v1b3.rb +1 -1
- data/generated/google/apis/dataflow_v1b3/service.rb +2 -2
- data/generated/google/apis/dataproc_v1.rb +1 -1
- data/generated/google/apis/dataproc_v1/classes.rb +9 -9
- data/generated/google/apis/dataproc_v1beta2.rb +1 -1
- data/generated/google/apis/dataproc_v1beta2/classes.rb +9 -9
- data/generated/google/apis/datastore_v1.rb +1 -1
- data/generated/google/apis/datastore_v1/classes.rb +1 -1
- data/generated/google/apis/displayvideo_v1.rb +1 -1
- data/generated/google/apis/displayvideo_v1/service.rb +2 -1
- data/generated/google/apis/dlp_v2.rb +1 -1
- data/generated/google/apis/dlp_v2/classes.rb +5 -2
- data/generated/google/apis/dns_v1.rb +1 -1
- data/generated/google/apis/dns_v1beta2.rb +1 -1
- data/generated/google/apis/dns_v2beta1.rb +4 -4
- data/generated/google/apis/dns_v2beta1/classes.rb +313 -162
- data/generated/google/apis/dns_v2beta1/service.rb +247 -180
- data/generated/google/apis/drive_v2.rb +1 -1
- data/generated/google/apis/drive_v2/classes.rb +66 -2
- data/generated/google/apis/drive_v2/representations.rb +22 -0
- data/generated/google/apis/drive_v2/service.rb +23 -10
- data/generated/google/apis/drive_v3.rb +1 -1
- data/generated/google/apis/drive_v3/classes.rb +65 -2
- data/generated/google/apis/drive_v3/representations.rb +22 -0
- data/generated/google/apis/drive_v3/service.rb +8 -5
- data/generated/google/apis/firestore_v1.rb +1 -1
- data/generated/google/apis/firestore_v1/classes.rb +152 -0
- data/generated/google/apis/firestore_v1/representations.rb +63 -0
- data/generated/google/apis/firestore_v1/service.rb +78 -0
- data/generated/google/apis/firestore_v1beta1.rb +1 -1
- data/generated/google/apis/firestore_v1beta1/classes.rb +152 -0
- data/generated/google/apis/firestore_v1beta1/representations.rb +63 -0
- data/generated/google/apis/firestore_v1beta1/service.rb +78 -0
- data/generated/google/apis/gmail_v1.rb +1 -1
- data/generated/google/apis/gmail_v1/classes.rb +53 -53
- data/generated/google/apis/gmail_v1/service.rb +72 -72
- data/generated/google/apis/healthcare_v1.rb +1 -1
- data/generated/google/apis/healthcare_v1/service.rb +48 -1
- data/generated/google/apis/healthcare_v1beta1.rb +1 -1
- data/generated/google/apis/healthcare_v1beta1/service.rb +60 -1
- data/generated/google/apis/iam_v1.rb +1 -1
- data/generated/google/apis/iam_v1/classes.rb +22 -3
- data/generated/google/apis/iam_v1/service.rb +18 -6
- data/generated/google/apis/memcache_v1beta2.rb +1 -1
- data/generated/google/apis/memcache_v1beta2/classes.rb +1 -1
- data/generated/google/apis/ml_v1.rb +1 -1
- data/generated/google/apis/ml_v1/classes.rb +17 -11
- data/generated/google/apis/monitoring_v3.rb +1 -1
- data/generated/google/apis/monitoring_v3/classes.rb +54 -30
- data/generated/google/apis/networkmanagement_v1.rb +1 -1
- data/generated/google/apis/networkmanagement_v1/classes.rb +6 -6
- data/generated/google/apis/networkmanagement_v1beta1.rb +1 -1
- data/generated/google/apis/networkmanagement_v1beta1/classes.rb +6 -6
- data/generated/google/apis/osconfig_v1.rb +1 -1
- data/generated/google/apis/osconfig_v1/classes.rb +2 -2
- data/generated/google/apis/osconfig_v1beta.rb +1 -1
- data/generated/google/apis/osconfig_v1beta/classes.rb +2 -2
- data/generated/google/apis/realtimebidding_v1.rb +1 -1
- data/generated/google/apis/recommendationengine_v1beta1.rb +36 -0
- data/generated/google/apis/recommendationengine_v1beta1/classes.rb +2015 -0
- data/generated/google/apis/recommendationengine_v1beta1/representations.rb +848 -0
- data/generated/google/apis/recommendationengine_v1beta1/service.rb +990 -0
- data/generated/google/apis/remotebuildexecution_v1.rb +1 -1
- data/generated/google/apis/remotebuildexecution_v1alpha.rb +1 -1
- data/generated/google/apis/remotebuildexecution_v2.rb +1 -1
- data/generated/google/apis/reseller_v1.rb +4 -3
- data/generated/google/apis/reseller_v1/classes.rb +219 -160
- data/generated/google/apis/reseller_v1/service.rb +247 -252
- data/generated/google/apis/run_v1.rb +2 -2
- data/generated/google/apis/run_v1/classes.rb +6 -1
- data/generated/google/apis/run_v1/service.rb +1 -1
- data/generated/google/apis/run_v1alpha1.rb +2 -2
- data/generated/google/apis/run_v1alpha1/service.rb +1 -1
- data/generated/google/apis/run_v1beta1.rb +2 -2
- data/generated/google/apis/run_v1beta1/service.rb +1 -1
- data/generated/google/apis/searchconsole_v1.rb +4 -3
- data/generated/google/apis/searchconsole_v1/service.rb +3 -2
- data/generated/google/apis/serviceconsumermanagement_v1.rb +1 -1
- data/generated/google/apis/serviceconsumermanagement_v1/classes.rb +2 -2
- data/generated/google/apis/serviceconsumermanagement_v1beta1.rb +1 -1
- data/generated/google/apis/serviceconsumermanagement_v1beta1/classes.rb +2 -2
- data/generated/google/apis/servicecontrol_v1.rb +1 -1
- data/generated/google/apis/servicecontrol_v1/classes.rb +6 -6
- data/generated/google/apis/servicemanagement_v1.rb +1 -1
- data/generated/google/apis/servicemanagement_v1/classes.rb +2 -2
- data/generated/google/apis/servicenetworking_v1.rb +1 -1
- data/generated/google/apis/servicenetworking_v1/classes.rb +2 -2
- data/generated/google/apis/servicenetworking_v1beta.rb +1 -1
- data/generated/google/apis/servicenetworking_v1beta/classes.rb +2 -2
- data/generated/google/apis/serviceusage_v1.rb +1 -1
- data/generated/google/apis/serviceusage_v1/classes.rb +2 -2
- data/generated/google/apis/serviceusage_v1beta1.rb +1 -1
- data/generated/google/apis/serviceusage_v1beta1/classes.rb +2 -2
- data/generated/google/apis/sheets_v4.rb +1 -1
- data/generated/google/apis/sheets_v4/classes.rb +28 -28
- data/generated/google/apis/vision_v1.rb +1 -1
- data/generated/google/apis/vision_v1/classes.rb +2 -0
- data/generated/google/apis/vision_v1p1beta1.rb +1 -1
- data/generated/google/apis/vision_v1p1beta1/classes.rb +2 -0
- data/generated/google/apis/vision_v1p2beta1.rb +1 -1
- data/generated/google/apis/vision_v1p2beta1/classes.rb +2 -0
- data/generated/google/apis/youtube_v3.rb +1 -1
- data/generated/google/apis/youtube_v3/classes.rb +2 -2
- data/generated/google/apis/youtube_v3/service.rb +1 -0
- data/lib/google/apis/version.rb +1 -1
- metadata +7 -3
|
@@ -26,7 +26,7 @@ module Google
|
|
|
26
26
|
# @see https://developers.google.com/drive/
|
|
27
27
|
module DriveV2
|
|
28
28
|
VERSION = 'V2'
|
|
29
|
-
REVISION = '
|
|
29
|
+
REVISION = '20200706'
|
|
30
30
|
|
|
31
31
|
# See, edit, create, and delete all of your Google Drive files
|
|
32
32
|
AUTH_DRIVE = 'https://www.googleapis.com/auth/drive'
|
|
@@ -1340,6 +1340,53 @@ module Google
|
|
|
1340
1340
|
end
|
|
1341
1341
|
end
|
|
1342
1342
|
|
|
1343
|
+
# A restriction for accessing the content of the file.
|
|
1344
|
+
class ContentRestriction
|
|
1345
|
+
include Google::Apis::Core::Hashable
|
|
1346
|
+
|
|
1347
|
+
# Whether the content of the file is read-only.
|
|
1348
|
+
# Corresponds to the JSON property `readOnly`
|
|
1349
|
+
# @return [Boolean]
|
|
1350
|
+
attr_accessor :read_only
|
|
1351
|
+
alias_method :read_only?, :read_only
|
|
1352
|
+
|
|
1353
|
+
# Reason for why the content of the file is restricted. This is only mutable on
|
|
1354
|
+
# requests that also set readOnly=true.
|
|
1355
|
+
# Corresponds to the JSON property `reason`
|
|
1356
|
+
# @return [String]
|
|
1357
|
+
attr_accessor :reason
|
|
1358
|
+
|
|
1359
|
+
# Information about a Drive user.
|
|
1360
|
+
# Corresponds to the JSON property `restrictingUser`
|
|
1361
|
+
# @return [Google::Apis::DriveV2::User]
|
|
1362
|
+
attr_accessor :restricting_user
|
|
1363
|
+
|
|
1364
|
+
# The time at which the content restriction was set (formatted RFC 3339
|
|
1365
|
+
# timestamp). Only populated if readOnly is true.
|
|
1366
|
+
# Corresponds to the JSON property `restrictionDate`
|
|
1367
|
+
# @return [DateTime]
|
|
1368
|
+
attr_accessor :restriction_date
|
|
1369
|
+
|
|
1370
|
+
# The type of the content restriction. Currently the only possible value is
|
|
1371
|
+
# globalContentRestriction.
|
|
1372
|
+
# Corresponds to the JSON property `type`
|
|
1373
|
+
# @return [String]
|
|
1374
|
+
attr_accessor :type
|
|
1375
|
+
|
|
1376
|
+
def initialize(**args)
|
|
1377
|
+
update!(**args)
|
|
1378
|
+
end
|
|
1379
|
+
|
|
1380
|
+
# Update properties of this object
|
|
1381
|
+
def update!(**args)
|
|
1382
|
+
@read_only = args[:read_only] if args.key?(:read_only)
|
|
1383
|
+
@reason = args[:reason] if args.key?(:reason)
|
|
1384
|
+
@restricting_user = args[:restricting_user] if args.key?(:restricting_user)
|
|
1385
|
+
@restriction_date = args[:restriction_date] if args.key?(:restriction_date)
|
|
1386
|
+
@type = args[:type] if args.key?(:type)
|
|
1387
|
+
end
|
|
1388
|
+
end
|
|
1389
|
+
|
|
1343
1390
|
# Representation of a shared drive.
|
|
1344
1391
|
class Drive
|
|
1345
1392
|
include Google::Apis::Core::Hashable
|
|
@@ -1743,6 +1790,12 @@ module Google
|
|
|
1743
1790
|
# @return [Google::Apis::DriveV2::File::Capabilities]
|
|
1744
1791
|
attr_accessor :capabilities
|
|
1745
1792
|
|
|
1793
|
+
# Restrictions for accessing the content of the file. Only populated if such a
|
|
1794
|
+
# restriction exists.
|
|
1795
|
+
# Corresponds to the JSON property `contentRestrictions`
|
|
1796
|
+
# @return [Array<Google::Apis::DriveV2::ContentRestriction>]
|
|
1797
|
+
attr_accessor :content_restrictions
|
|
1798
|
+
|
|
1746
1799
|
# Whether the options to copy, print, or download this file, should be disabled
|
|
1747
1800
|
# for readers and commenters.
|
|
1748
1801
|
# Corresponds to the JSON property `copyRequiresWriterPermission`
|
|
@@ -2140,6 +2193,7 @@ module Google
|
|
|
2140
2193
|
@can_comment = args[:can_comment] if args.key?(:can_comment)
|
|
2141
2194
|
@can_read_revisions = args[:can_read_revisions] if args.key?(:can_read_revisions)
|
|
2142
2195
|
@capabilities = args[:capabilities] if args.key?(:capabilities)
|
|
2196
|
+
@content_restrictions = args[:content_restrictions] if args.key?(:content_restrictions)
|
|
2143
2197
|
@copy_requires_writer_permission = args[:copy_requires_writer_permission] if args.key?(:copy_requires_writer_permission)
|
|
2144
2198
|
@copyable = args[:copyable] if args.key?(:copyable)
|
|
2145
2199
|
@created_date = args[:created_date] if args.key?(:created_date)
|
|
@@ -2300,6 +2354,12 @@ module Google
|
|
|
2300
2354
|
attr_accessor :can_modify_content
|
|
2301
2355
|
alias_method :can_modify_content?, :can_modify_content
|
|
2302
2356
|
|
|
2357
|
+
# Whether the current user can modify restrictions on content of this file.
|
|
2358
|
+
# Corresponds to the JSON property `canModifyContentRestriction`
|
|
2359
|
+
# @return [Boolean]
|
|
2360
|
+
attr_accessor :can_modify_content_restriction
|
|
2361
|
+
alias_method :can_modify_content_restriction?, :can_modify_content_restriction
|
|
2362
|
+
|
|
2303
2363
|
# Whether the current user can move children of this folder outside of the
|
|
2304
2364
|
# shared drive. This is false when the item is not a folder. Only populated for
|
|
2305
2365
|
# items in shared drives.
|
|
@@ -2454,6 +2514,7 @@ module Google
|
|
|
2454
2514
|
@can_edit = args[:can_edit] if args.key?(:can_edit)
|
|
2455
2515
|
@can_list_children = args[:can_list_children] if args.key?(:can_list_children)
|
|
2456
2516
|
@can_modify_content = args[:can_modify_content] if args.key?(:can_modify_content)
|
|
2517
|
+
@can_modify_content_restriction = args[:can_modify_content_restriction] if args.key?(:can_modify_content_restriction)
|
|
2457
2518
|
@can_move_children_out_of_drive = args[:can_move_children_out_of_drive] if args.key?(:can_move_children_out_of_drive)
|
|
2458
2519
|
@can_move_children_out_of_team_drive = args[:can_move_children_out_of_team_drive] if args.key?(:can_move_children_out_of_team_drive)
|
|
2459
2520
|
@can_move_children_within_drive = args[:can_move_children_within_drive] if args.key?(:can_move_children_within_drive)
|
|
@@ -2698,8 +2759,11 @@ module Google
|
|
|
2698
2759
|
attr_accessor :starred
|
|
2699
2760
|
alias_method :starred?, :starred
|
|
2700
2761
|
|
|
2701
|
-
# Whether
|
|
2702
|
-
# the
|
|
2762
|
+
# Whether the file has been trashed, either explicitly or from a trashed parent
|
|
2763
|
+
# folder. Only the owner may trash a file. The trashed item is excluded from all
|
|
2764
|
+
# files.list responses returned for any user who does not own the file. However,
|
|
2765
|
+
# all users with access to the file can see the trashed item metadata in an API
|
|
2766
|
+
# response. All users with access can copy, download, export, and share the file.
|
|
2703
2767
|
# Corresponds to the JSON property `trashed`
|
|
2704
2768
|
# @return [Boolean]
|
|
2705
2769
|
attr_accessor :trashed
|
|
@@ -160,6 +160,12 @@ module Google
|
|
|
160
160
|
include Google::Apis::Core::JsonObjectSupport
|
|
161
161
|
end
|
|
162
162
|
|
|
163
|
+
class ContentRestriction
|
|
164
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
165
|
+
|
|
166
|
+
include Google::Apis::Core::JsonObjectSupport
|
|
167
|
+
end
|
|
168
|
+
|
|
163
169
|
class Drive
|
|
164
170
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
165
171
|
|
|
@@ -693,6 +699,19 @@ module Google
|
|
|
693
699
|
end
|
|
694
700
|
end
|
|
695
701
|
|
|
702
|
+
class ContentRestriction
|
|
703
|
+
# @private
|
|
704
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
705
|
+
property :read_only, as: 'readOnly'
|
|
706
|
+
property :reason, as: 'reason'
|
|
707
|
+
property :restricting_user, as: 'restrictingUser', class: Google::Apis::DriveV2::User, decorator: Google::Apis::DriveV2::User::Representation
|
|
708
|
+
|
|
709
|
+
property :restriction_date, as: 'restrictionDate', type: DateTime
|
|
710
|
+
|
|
711
|
+
property :type, as: 'type'
|
|
712
|
+
end
|
|
713
|
+
end
|
|
714
|
+
|
|
696
715
|
class Drive
|
|
697
716
|
# @private
|
|
698
717
|
class Representation < Google::Apis::Core::JsonRepresentation
|
|
@@ -777,6 +796,8 @@ module Google
|
|
|
777
796
|
property :can_read_revisions, as: 'canReadRevisions'
|
|
778
797
|
property :capabilities, as: 'capabilities', class: Google::Apis::DriveV2::File::Capabilities, decorator: Google::Apis::DriveV2::File::Capabilities::Representation
|
|
779
798
|
|
|
799
|
+
collection :content_restrictions, as: 'contentRestrictions', class: Google::Apis::DriveV2::ContentRestriction, decorator: Google::Apis::DriveV2::ContentRestriction::Representation
|
|
800
|
+
|
|
780
801
|
property :copy_requires_writer_permission, as: 'copyRequiresWriterPermission'
|
|
781
802
|
property :copyable, as: 'copyable'
|
|
782
803
|
property :created_date, as: 'createdDate', type: DateTime
|
|
@@ -880,6 +901,7 @@ module Google
|
|
|
880
901
|
property :can_edit, as: 'canEdit'
|
|
881
902
|
property :can_list_children, as: 'canListChildren'
|
|
882
903
|
property :can_modify_content, as: 'canModifyContent'
|
|
904
|
+
property :can_modify_content_restriction, as: 'canModifyContentRestriction'
|
|
883
905
|
property :can_move_children_out_of_drive, as: 'canMoveChildrenOutOfDrive'
|
|
884
906
|
property :can_move_children_out_of_team_drive, as: 'canMoveChildrenOutOfTeamDrive'
|
|
885
907
|
property :can_move_children_within_drive, as: 'canMoveChildrenWithinDrive'
|
|
@@ -1131,7 +1131,7 @@ module Google
|
|
|
1131
1131
|
execute_or_queue_command(command, &block)
|
|
1132
1132
|
end
|
|
1133
1133
|
|
|
1134
|
-
# Creates a copy of the specified file.
|
|
1134
|
+
# Creates a copy of the specified file. Folders cannot be copied.
|
|
1135
1135
|
# @param [String] file_id
|
|
1136
1136
|
# The ID of the file to copy.
|
|
1137
1137
|
# @param [Google::Apis::DriveV2::File] file_object
|
|
@@ -1489,9 +1489,12 @@ module Google
|
|
|
1489
1489
|
|
|
1490
1490
|
# Lists the user's files.
|
|
1491
1491
|
# @param [String] corpora
|
|
1492
|
-
#
|
|
1493
|
-
#
|
|
1494
|
-
#
|
|
1492
|
+
# Groupings of files to which the query applies. Supported groupings are: 'user'
|
|
1493
|
+
# (files created by, opened by, or shared directly with the user), 'drive' (
|
|
1494
|
+
# files in the specified shared drive as indicated by the 'driveId'), 'domain' (
|
|
1495
|
+
# files shared to the user's domain), and 'allDrives' (A combination of 'user'
|
|
1496
|
+
# and 'drive' for all drives where the user is a member). When able, use 'user'
|
|
1497
|
+
# or 'drive', instead of 'allDrives', for efficiency.
|
|
1495
1498
|
# @param [String] corpus
|
|
1496
1499
|
# The body of items (files/documents) to which the query applies. Deprecated:
|
|
1497
1500
|
# use 'corpora' instead.
|
|
@@ -1594,14 +1597,16 @@ module Google
|
|
|
1594
1597
|
# created as head revision, and previous unpinned revisions are preserved for a
|
|
1595
1598
|
# short period of time. Pinned revisions are stored indefinitely, using
|
|
1596
1599
|
# additional storage quota, up to a maximum of 200 revisions. For details on how
|
|
1597
|
-
# revisions are retained, see the Drive Help Center.
|
|
1600
|
+
# revisions are retained, see the Drive Help Center. Note that this field is
|
|
1601
|
+
# ignored if there is no payload in the request.
|
|
1598
1602
|
# @param [Boolean] ocr
|
|
1599
1603
|
# Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
|
|
1600
1604
|
# @param [String] ocr_language
|
|
1601
1605
|
# If ocr is true, hints at the language to use. Valid values are BCP 47 codes.
|
|
1602
1606
|
# @param [Boolean] pinned
|
|
1603
1607
|
# Whether to pin the new revision. A file can have a maximum of 200 pinned
|
|
1604
|
-
# revisions.
|
|
1608
|
+
# revisions. Note that this field is ignored if there is no payload in the
|
|
1609
|
+
# request.
|
|
1605
1610
|
# @param [String] remove_parents
|
|
1606
1611
|
# Comma-separated list of parent IDs to remove.
|
|
1607
1612
|
# @param [Boolean] set_modified_date
|
|
@@ -1709,7 +1714,11 @@ module Google
|
|
|
1709
1714
|
end
|
|
1710
1715
|
|
|
1711
1716
|
# Moves a file to the trash. The currently authenticated user must own the file
|
|
1712
|
-
# or be at least a fileOrganizer on the parent for shared drive files.
|
|
1717
|
+
# or be at least a fileOrganizer on the parent for shared drive files. Only the
|
|
1718
|
+
# owner may trash a file. The trashed item is excluded from all files.list
|
|
1719
|
+
# responses returned for any user who does not own the file. However, all users
|
|
1720
|
+
# with access to the file can see the trashed item metadata in an API response.
|
|
1721
|
+
# All users with access can copy, download, export, and share the file.
|
|
1713
1722
|
# @param [String] file_id
|
|
1714
1723
|
# The ID of the file to trash.
|
|
1715
1724
|
# @param [Boolean] supports_all_drives
|
|
@@ -1748,7 +1757,9 @@ module Google
|
|
|
1748
1757
|
execute_or_queue_command(command, &block)
|
|
1749
1758
|
end
|
|
1750
1759
|
|
|
1751
|
-
# Restores a file from the trash.
|
|
1760
|
+
# Restores a file from the trash. The currently authenticated user must own the
|
|
1761
|
+
# file or be at least a fileOrganizer on the parent for shared drive files. Only
|
|
1762
|
+
# the owner may untrash a file.
|
|
1752
1763
|
# @param [String] file_id
|
|
1753
1764
|
# The ID of the file to untrash.
|
|
1754
1765
|
# @param [Boolean] supports_all_drives
|
|
@@ -1811,14 +1822,16 @@ module Google
|
|
|
1811
1822
|
# created as head revision, and previous unpinned revisions are preserved for a
|
|
1812
1823
|
# short period of time. Pinned revisions are stored indefinitely, using
|
|
1813
1824
|
# additional storage quota, up to a maximum of 200 revisions. For details on how
|
|
1814
|
-
# revisions are retained, see the Drive Help Center.
|
|
1825
|
+
# revisions are retained, see the Drive Help Center. Note that this field is
|
|
1826
|
+
# ignored if there is no payload in the request.
|
|
1815
1827
|
# @param [Boolean] ocr
|
|
1816
1828
|
# Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
|
|
1817
1829
|
# @param [String] ocr_language
|
|
1818
1830
|
# If ocr is true, hints at the language to use. Valid values are BCP 47 codes.
|
|
1819
1831
|
# @param [Boolean] pinned
|
|
1820
1832
|
# Whether to pin the new revision. A file can have a maximum of 200 pinned
|
|
1821
|
-
# revisions.
|
|
1833
|
+
# revisions. Note that this field is ignored if there is no payload in the
|
|
1834
|
+
# request.
|
|
1822
1835
|
# @param [String] remove_parents
|
|
1823
1836
|
# Comma-separated list of parent IDs to remove.
|
|
1824
1837
|
# @param [Boolean] set_modified_date
|
|
@@ -26,7 +26,7 @@ module Google
|
|
|
26
26
|
# @see https://developers.google.com/drive/
|
|
27
27
|
module DriveV3
|
|
28
28
|
VERSION = 'V3'
|
|
29
|
-
REVISION = '
|
|
29
|
+
REVISION = '20200706'
|
|
30
30
|
|
|
31
31
|
# See, edit, create, and delete all of your Google Drive files
|
|
32
32
|
AUTH_DRIVE = 'https://www.googleapis.com/auth/drive'
|
|
@@ -577,6 +577,53 @@ module Google
|
|
|
577
577
|
end
|
|
578
578
|
end
|
|
579
579
|
|
|
580
|
+
# A restriction for accessing the content of the file.
|
|
581
|
+
class ContentRestriction
|
|
582
|
+
include Google::Apis::Core::Hashable
|
|
583
|
+
|
|
584
|
+
# Whether the content of the file is read-only.
|
|
585
|
+
# Corresponds to the JSON property `readOnly`
|
|
586
|
+
# @return [Boolean]
|
|
587
|
+
attr_accessor :read_only
|
|
588
|
+
alias_method :read_only?, :read_only
|
|
589
|
+
|
|
590
|
+
# Reason for why the content of the file is restricted. This is only mutable on
|
|
591
|
+
# requests that also set readOnly=true.
|
|
592
|
+
# Corresponds to the JSON property `reason`
|
|
593
|
+
# @return [String]
|
|
594
|
+
attr_accessor :reason
|
|
595
|
+
|
|
596
|
+
# Information about a Drive user.
|
|
597
|
+
# Corresponds to the JSON property `restrictingUser`
|
|
598
|
+
# @return [Google::Apis::DriveV3::User]
|
|
599
|
+
attr_accessor :restricting_user
|
|
600
|
+
|
|
601
|
+
# The time at which the content restriction was set (formatted RFC 3339
|
|
602
|
+
# timestamp). Only populated if readOnly is true.
|
|
603
|
+
# Corresponds to the JSON property `restrictionTime`
|
|
604
|
+
# @return [DateTime]
|
|
605
|
+
attr_accessor :restriction_time
|
|
606
|
+
|
|
607
|
+
# The type of the content restriction. Currently the only possible value is
|
|
608
|
+
# globalContentRestriction.
|
|
609
|
+
# Corresponds to the JSON property `type`
|
|
610
|
+
# @return [String]
|
|
611
|
+
attr_accessor :type
|
|
612
|
+
|
|
613
|
+
def initialize(**args)
|
|
614
|
+
update!(**args)
|
|
615
|
+
end
|
|
616
|
+
|
|
617
|
+
# Update properties of this object
|
|
618
|
+
def update!(**args)
|
|
619
|
+
@read_only = args[:read_only] if args.key?(:read_only)
|
|
620
|
+
@reason = args[:reason] if args.key?(:reason)
|
|
621
|
+
@restricting_user = args[:restricting_user] if args.key?(:restricting_user)
|
|
622
|
+
@restriction_time = args[:restriction_time] if args.key?(:restriction_time)
|
|
623
|
+
@type = args[:type] if args.key?(:type)
|
|
624
|
+
end
|
|
625
|
+
end
|
|
626
|
+
|
|
580
627
|
# Representation of a shared drive.
|
|
581
628
|
class Drive
|
|
582
629
|
include Google::Apis::Core::Hashable
|
|
@@ -972,6 +1019,12 @@ module Google
|
|
|
972
1019
|
# @return [Google::Apis::DriveV3::File::ContentHints]
|
|
973
1020
|
attr_accessor :content_hints
|
|
974
1021
|
|
|
1022
|
+
# Restrictions for accessing the content of the file. Only populated if such a
|
|
1023
|
+
# restriction exists.
|
|
1024
|
+
# Corresponds to the JSON property `contentRestrictions`
|
|
1025
|
+
# @return [Array<Google::Apis::DriveV3::ContentRestriction>]
|
|
1026
|
+
attr_accessor :content_restrictions
|
|
1027
|
+
|
|
975
1028
|
# Whether the options to copy, print, or download this file, should be disabled
|
|
976
1029
|
# for readers and commenters.
|
|
977
1030
|
# Corresponds to the JSON property `copyRequiresWriterPermission`
|
|
@@ -1234,8 +1287,10 @@ module Google
|
|
|
1234
1287
|
attr_accessor :thumbnail_version
|
|
1235
1288
|
|
|
1236
1289
|
# Whether the file has been trashed, either explicitly or from a trashed parent
|
|
1237
|
-
# folder. Only the owner may trash a file
|
|
1238
|
-
# the
|
|
1290
|
+
# folder. Only the owner may trash a file. The trashed item is excluded from all
|
|
1291
|
+
# files.list responses returned for any user who does not own the file. However,
|
|
1292
|
+
# all users with access to the file can see the trashed item metadata in an API
|
|
1293
|
+
# response. All users with access can copy, download, export, and share the file.
|
|
1239
1294
|
# Corresponds to the JSON property `trashed`
|
|
1240
1295
|
# @return [Boolean]
|
|
1241
1296
|
attr_accessor :trashed
|
|
@@ -1308,6 +1363,7 @@ module Google
|
|
|
1308
1363
|
@app_properties = args[:app_properties] if args.key?(:app_properties)
|
|
1309
1364
|
@capabilities = args[:capabilities] if args.key?(:capabilities)
|
|
1310
1365
|
@content_hints = args[:content_hints] if args.key?(:content_hints)
|
|
1366
|
+
@content_restrictions = args[:content_restrictions] if args.key?(:content_restrictions)
|
|
1311
1367
|
@copy_requires_writer_permission = args[:copy_requires_writer_permission] if args.key?(:copy_requires_writer_permission)
|
|
1312
1368
|
@created_time = args[:created_time] if args.key?(:created_time)
|
|
1313
1369
|
@description = args[:description] if args.key?(:description)
|
|
@@ -1457,6 +1513,12 @@ module Google
|
|
|
1457
1513
|
attr_accessor :can_modify_content
|
|
1458
1514
|
alias_method :can_modify_content?, :can_modify_content
|
|
1459
1515
|
|
|
1516
|
+
# Whether the current user can modify restrictions on content of this file.
|
|
1517
|
+
# Corresponds to the JSON property `canModifyContentRestriction`
|
|
1518
|
+
# @return [Boolean]
|
|
1519
|
+
attr_accessor :can_modify_content_restriction
|
|
1520
|
+
alias_method :can_modify_content_restriction?, :can_modify_content_restriction
|
|
1521
|
+
|
|
1460
1522
|
# Whether the current user can move children of this folder outside of the
|
|
1461
1523
|
# shared drive. This is false when the item is not a folder. Only populated for
|
|
1462
1524
|
# items in shared drives.
|
|
@@ -1611,6 +1673,7 @@ module Google
|
|
|
1611
1673
|
@can_edit = args[:can_edit] if args.key?(:can_edit)
|
|
1612
1674
|
@can_list_children = args[:can_list_children] if args.key?(:can_list_children)
|
|
1613
1675
|
@can_modify_content = args[:can_modify_content] if args.key?(:can_modify_content)
|
|
1676
|
+
@can_modify_content_restriction = args[:can_modify_content_restriction] if args.key?(:can_modify_content_restriction)
|
|
1614
1677
|
@can_move_children_out_of_drive = args[:can_move_children_out_of_drive] if args.key?(:can_move_children_out_of_drive)
|
|
1615
1678
|
@can_move_children_out_of_team_drive = args[:can_move_children_out_of_team_drive] if args.key?(:can_move_children_out_of_team_drive)
|
|
1616
1679
|
@can_move_children_within_drive = args[:can_move_children_within_drive] if args.key?(:can_move_children_within_drive)
|
|
@@ -82,6 +82,12 @@ module Google
|
|
|
82
82
|
include Google::Apis::Core::JsonObjectSupport
|
|
83
83
|
end
|
|
84
84
|
|
|
85
|
+
class ContentRestriction
|
|
86
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
87
|
+
|
|
88
|
+
include Google::Apis::Core::JsonObjectSupport
|
|
89
|
+
end
|
|
90
|
+
|
|
85
91
|
class Drive
|
|
86
92
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
87
93
|
|
|
@@ -410,6 +416,19 @@ module Google
|
|
|
410
416
|
end
|
|
411
417
|
end
|
|
412
418
|
|
|
419
|
+
class ContentRestriction
|
|
420
|
+
# @private
|
|
421
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
422
|
+
property :read_only, as: 'readOnly'
|
|
423
|
+
property :reason, as: 'reason'
|
|
424
|
+
property :restricting_user, as: 'restrictingUser', class: Google::Apis::DriveV3::User, decorator: Google::Apis::DriveV3::User::Representation
|
|
425
|
+
|
|
426
|
+
property :restriction_time, as: 'restrictionTime', type: DateTime
|
|
427
|
+
|
|
428
|
+
property :type, as: 'type'
|
|
429
|
+
end
|
|
430
|
+
end
|
|
431
|
+
|
|
413
432
|
class Drive
|
|
414
433
|
# @private
|
|
415
434
|
class Representation < Google::Apis::Core::JsonRepresentation
|
|
@@ -493,6 +512,8 @@ module Google
|
|
|
493
512
|
|
|
494
513
|
property :content_hints, as: 'contentHints', class: Google::Apis::DriveV3::File::ContentHints, decorator: Google::Apis::DriveV3::File::ContentHints::Representation
|
|
495
514
|
|
|
515
|
+
collection :content_restrictions, as: 'contentRestrictions', class: Google::Apis::DriveV3::ContentRestriction, decorator: Google::Apis::DriveV3::ContentRestriction::Representation
|
|
516
|
+
|
|
496
517
|
property :copy_requires_writer_permission, as: 'copyRequiresWriterPermission'
|
|
497
518
|
property :created_time, as: 'createdTime', type: DateTime
|
|
498
519
|
|
|
@@ -578,6 +599,7 @@ module Google
|
|
|
578
599
|
property :can_edit, as: 'canEdit'
|
|
579
600
|
property :can_list_children, as: 'canListChildren'
|
|
580
601
|
property :can_modify_content, as: 'canModifyContent'
|
|
602
|
+
property :can_modify_content_restriction, as: 'canModifyContentRestriction'
|
|
581
603
|
property :can_move_children_out_of_drive, as: 'canMoveChildrenOutOfDrive'
|
|
582
604
|
property :can_move_children_out_of_team_drive, as: 'canMoveChildrenOutOfTeamDrive'
|
|
583
605
|
property :can_move_children_within_drive, as: 'canMoveChildrenWithinDrive'
|
|
@@ -771,7 +771,7 @@ module Google
|
|
|
771
771
|
end
|
|
772
772
|
|
|
773
773
|
# Creates a copy of a file and applies any requested updates with patch
|
|
774
|
-
# semantics.
|
|
774
|
+
# semantics. Folders cannot be copied.
|
|
775
775
|
# @param [String] file_id
|
|
776
776
|
# The ID of the file.
|
|
777
777
|
# @param [Google::Apis::DriveV3::File] file_object
|
|
@@ -1104,9 +1104,12 @@ module Google
|
|
|
1104
1104
|
|
|
1105
1105
|
# Lists or searches files.
|
|
1106
1106
|
# @param [String] corpora
|
|
1107
|
-
#
|
|
1108
|
-
#
|
|
1109
|
-
#
|
|
1107
|
+
# Groupings of files to which the query applies. Supported groupings are: 'user'
|
|
1108
|
+
# (files created by, opened by, or shared directly with the user), 'drive' (
|
|
1109
|
+
# files in the specified shared drive as indicated by the 'driveId'), 'domain' (
|
|
1110
|
+
# files shared to the user's domain), and 'allDrives' (A combination of 'user'
|
|
1111
|
+
# and 'drive' for all drives where the user is a member). When able, use 'user'
|
|
1112
|
+
# or 'drive', instead of 'allDrives', for efficiency.
|
|
1110
1113
|
# @param [String] corpus
|
|
1111
1114
|
# The source of files to list. Deprecated: use 'corpora' instead.
|
|
1112
1115
|
# @param [String] drive_id
|
|
@@ -1183,7 +1186,7 @@ module Google
|
|
|
1183
1186
|
execute_or_queue_command(command, &block)
|
|
1184
1187
|
end
|
|
1185
1188
|
|
|
1186
|
-
# Updates a file's metadata and/or content
|
|
1189
|
+
# Updates a file's metadata and/or content. This method supports patch semantics.
|
|
1187
1190
|
# @param [String] file_id
|
|
1188
1191
|
# The ID of the file.
|
|
1189
1192
|
# @param [Google::Apis::DriveV3::File] file_object
|