google-apis-drive_v2 0.39.0 → 0.41.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 298545cf06daaf2dc1fa477396cd34aaf21a302a8a05f768a022e066c1d6949c
4
- data.tar.gz: 857f03312fe68587fd4beef5aee958000483450f39aa3c7918376c8fd7eb2d94
3
+ metadata.gz: fe56bd23a7c40ff15ce9845baeca77036282bf8f2e807b81a7d851844ec384be
4
+ data.tar.gz: 4977b5fcac850fcba1fb1ef51f63af3a26e832e4def9996936ef4d3379b40446
5
5
  SHA512:
6
- metadata.gz: 1cf4c06ad366389637b9427ca4adf70a02f457060914b7e60d49655100d11ac5333ae4aac000ce63228b29694cee411338c2f1082b6c39913d0845d9cb5a3b90
7
- data.tar.gz: 3666f44ebae5e98cdc24111a551a4e75551dc7c7b57205e6c977cd14afa751fdf60186b52c353556348cfe84fb29bc9783149c9e2cf344cfa23537b31a71667c
6
+ metadata.gz: 4ac4ce61aebd343b9e5097099ed456e2a8c99617a618d96a3df14eed9792bbe234b8f453c31b8f79547322b503d24baf59d1e43c4fbeb725f6ec3de68fd582bc
7
+ data.tar.gz: dd67246971fd9af0d3be1811018bc08b6973b1539ab93fdcb4e071177efeef95eab86c55f7ca25c86f43a0d532bb293a1378dec4f5213c01f65e38acb0ea525b
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Release history for google-apis-drive_v2
2
2
 
3
+ ### v0.41.0 (2023-08-27)
4
+
5
+ * Regenerated from discovery document revision 20230822
6
+
7
+ ### v0.40.0 (2023-07-23)
8
+
9
+ * Regenerated from discovery document revision 20230714
10
+
3
11
  ### v0.39.0 (2023-06-11)
4
12
 
5
13
  * Regenerated from discovery document revision 20230603
@@ -452,7 +452,8 @@ module Google
452
452
 
453
453
  # The apps resource provides a list of the apps that a user has installed, with
454
454
  # information about each app's supported MIME types, file extensions, and other
455
- # details.
455
+ # details. Some resource methods (such as `apps.get`) require an `appId`. Use
456
+ # the `apps.list` method to retrieve the ID for an installed application.
456
457
  class App
457
458
  include Google::Apis::Core::Hashable
458
459
 
@@ -717,7 +718,9 @@ module Google
717
718
  attr_accessor :deleted
718
719
  alias_method :deleted?, :deleted
719
720
 
720
- # Representation of a shared drive.
721
+ # Representation of a shared drive. Some resource methods (such as `drives.
722
+ # update`) require a `driveId`. Use the `drives.list` method to retrieve the ID
723
+ # for a shared drive.
721
724
  # Corresponds to the JSON property `drive`
722
725
  # @return [Google::Apis::DriveV2::Drive]
723
726
  attr_accessor :drive
@@ -727,7 +730,8 @@ module Google
727
730
  # @return [String]
728
731
  attr_accessor :drive_id
729
732
 
730
- # The metadata for a file.
733
+ # The metadata for a file. Some resource methods (such as `files.update`)
734
+ # require a `fileId`. Use the `files.list` method to retrieve the ID for a file.
731
735
  # Corresponds to the JSON property `file`
732
736
  # @return [Google::Apis::DriveV2::File]
733
737
  attr_accessor :file
@@ -991,7 +995,9 @@ module Google
991
995
  end
992
996
  end
993
997
 
994
- # A reference to a folder's child.
998
+ # A reference to a folder's child. Some resource methods (such as `children.get`)
999
+ # require a `childId`. Use the `children.list` method to retrieve the ID of the
1000
+ # child.
995
1001
  class ChildReference
996
1002
  include Google::Apis::Core::Hashable
997
1003
 
@@ -1028,7 +1034,9 @@ module Google
1028
1034
  end
1029
1035
  end
1030
1036
 
1031
- # A comment on a file in Google Drive.
1037
+ # A comment on a file in Google Drive. Some resource methods (such as `comments.
1038
+ # update`) require a `commentId`. Use the `comments.list` method to retrieve the
1039
+ # ID for a comment in a file.
1032
1040
  class Comment
1033
1041
  include Google::Apis::Core::Hashable
1034
1042
 
@@ -1213,7 +1221,9 @@ module Google
1213
1221
  end
1214
1222
  end
1215
1223
 
1216
- # A comment on a file in Google Drive.
1224
+ # A comment on a file in Google Drive. Some resource methods (such as `replies.
1225
+ # update`) require a `replyId`. Use the `replies.list` method to retrieve the ID
1226
+ # for a reply.
1217
1227
  class CommentReply
1218
1228
  include Google::Apis::Core::Hashable
1219
1229
 
@@ -1339,6 +1349,14 @@ module Google
1339
1349
  class ContentRestriction
1340
1350
  include Google::Apis::Core::Hashable
1341
1351
 
1352
+ # Whether the content restriction can only be modified or removed by a user who
1353
+ # owns the file. For files in shared drives, any user with `organizer`
1354
+ # capabilities can modify or remove this content restriction.
1355
+ # Corresponds to the JSON property `ownerRestricted`
1356
+ # @return [Boolean]
1357
+ attr_accessor :owner_restricted
1358
+ alias_method :owner_restricted?, :owner_restricted
1359
+
1342
1360
  # Whether the content of the file is read-only. If a file is read-only, a new
1343
1361
  # revision of the file may not be added, comments may not be added or modified,
1344
1362
  # and the title of the file may not be modified.
@@ -1376,6 +1394,7 @@ module Google
1376
1394
 
1377
1395
  # Update properties of this object
1378
1396
  def update!(**args)
1397
+ @owner_restricted = args[:owner_restricted] if args.key?(:owner_restricted)
1379
1398
  @read_only = args[:read_only] if args.key?(:read_only)
1380
1399
  @reason = args[:reason] if args.key?(:reason)
1381
1400
  @restricting_user = args[:restricting_user] if args.key?(:restricting_user)
@@ -1384,7 +1403,9 @@ module Google
1384
1403
  end
1385
1404
  end
1386
1405
 
1387
- # Representation of a shared drive.
1406
+ # Representation of a shared drive. Some resource methods (such as `drives.
1407
+ # update`) require a `driveId`. Use the `drives.list` method to retrieve the ID
1408
+ # for a shared drive.
1388
1409
  class Drive
1389
1410
  include Google::Apis::Core::Hashable
1390
1411
 
@@ -1795,7 +1816,8 @@ module Google
1795
1816
  end
1796
1817
  end
1797
1818
 
1798
- # The metadata for a file.
1819
+ # The metadata for a file. Some resource methods (such as `files.update`)
1820
+ # require a `fileId`. Use the `files.list` method to retrieve the ID for a file.
1799
1821
  class File
1800
1822
  include Google::Apis::Core::Hashable
1801
1823
 
@@ -2218,7 +2240,10 @@ module Google
2218
2240
  # @return [Google::Apis::DriveV2::User]
2219
2241
  attr_accessor :trashing_user
2220
2242
 
2221
- # A permission for a file.
2243
+ # A permission for a file. A permission grants a user, group, domain, or the
2244
+ # world access to a file or a folder hierarchy. Some resource methods (such as `
2245
+ # permissions.update`) require a `permissionId`. Use the `permissions.list`
2246
+ # method to retrieve the ID for a file, folder, or shared drive.
2222
2247
  # Corresponds to the JSON property `userPermission`
2223
2248
  # @return [Google::Apis::DriveV2::Permission]
2224
2249
  attr_accessor :user_permission
@@ -2449,19 +2474,33 @@ module Google
2449
2474
  attr_accessor :can_modify_content
2450
2475
  alias_method :can_modify_content?, :can_modify_content
2451
2476
 
2452
- # Output only. Whether the current user can modify restrictions on content of
2453
- # this file.
2477
+ # Deprecated: Output only. Use one of `canModifyEditorContentRestriction`, `
2478
+ # canModifyOwnerContentRestriction` or `canRemoveContentRestriction`.
2454
2479
  # Corresponds to the JSON property `canModifyContentRestriction`
2455
2480
  # @return [Boolean]
2456
2481
  attr_accessor :can_modify_content_restriction
2457
2482
  alias_method :can_modify_content_restriction?, :can_modify_content_restriction
2458
2483
 
2484
+ # Output only. Whether the current user can add or modify content restrictions
2485
+ # on the file which are editor restricted.
2486
+ # Corresponds to the JSON property `canModifyEditorContentRestriction`
2487
+ # @return [Boolean]
2488
+ attr_accessor :can_modify_editor_content_restriction
2489
+ alias_method :can_modify_editor_content_restriction?, :can_modify_editor_content_restriction
2490
+
2459
2491
  # Output only. Whether the current user can modify the labels on the file.
2460
2492
  # Corresponds to the JSON property `canModifyLabels`
2461
2493
  # @return [Boolean]
2462
2494
  attr_accessor :can_modify_labels
2463
2495
  alias_method :can_modify_labels?, :can_modify_labels
2464
2496
 
2497
+ # Output only. Whether the current user can add or modify content restrictions
2498
+ # which are owner restricted.
2499
+ # Corresponds to the JSON property `canModifyOwnerContentRestriction`
2500
+ # @return [Boolean]
2501
+ attr_accessor :can_modify_owner_content_restriction
2502
+ alias_method :can_modify_owner_content_restriction?, :can_modify_owner_content_restriction
2503
+
2465
2504
  # Output only. Whether the current user can move children of this folder outside
2466
2505
  # of the shared drive. This is false when the item is not a folder. Only
2467
2506
  # populated for items in shared drives.
@@ -2567,6 +2606,13 @@ module Google
2567
2606
  attr_accessor :can_remove_children
2568
2607
  alias_method :can_remove_children?, :can_remove_children
2569
2608
 
2609
+ # Output only. Whether there is a content restriction on the file that can be
2610
+ # removed by the current user.
2611
+ # Corresponds to the JSON property `canRemoveContentRestriction`
2612
+ # @return [Boolean]
2613
+ attr_accessor :can_remove_content_restriction
2614
+ alias_method :can_remove_content_restriction?, :can_remove_content_restriction
2615
+
2570
2616
  # Output only. Whether the current user can remove a parent from the item
2571
2617
  # without adding another parent in the same request. Not populated for shared
2572
2618
  # drive files.
@@ -2630,7 +2676,9 @@ module Google
2630
2676
  @can_list_children = args[:can_list_children] if args.key?(:can_list_children)
2631
2677
  @can_modify_content = args[:can_modify_content] if args.key?(:can_modify_content)
2632
2678
  @can_modify_content_restriction = args[:can_modify_content_restriction] if args.key?(:can_modify_content_restriction)
2679
+ @can_modify_editor_content_restriction = args[:can_modify_editor_content_restriction] if args.key?(:can_modify_editor_content_restriction)
2633
2680
  @can_modify_labels = args[:can_modify_labels] if args.key?(:can_modify_labels)
2681
+ @can_modify_owner_content_restriction = args[:can_modify_owner_content_restriction] if args.key?(:can_modify_owner_content_restriction)
2634
2682
  @can_move_children_out_of_drive = args[:can_move_children_out_of_drive] if args.key?(:can_move_children_out_of_drive)
2635
2683
  @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)
2636
2684
  @can_move_children_within_drive = args[:can_move_children_within_drive] if args.key?(:can_move_children_within_drive)
@@ -2646,6 +2694,7 @@ module Google
2646
2694
  @can_read_revisions = args[:can_read_revisions] if args.key?(:can_read_revisions)
2647
2695
  @can_read_team_drive = args[:can_read_team_drive] if args.key?(:can_read_team_drive)
2648
2696
  @can_remove_children = args[:can_remove_children] if args.key?(:can_remove_children)
2697
+ @can_remove_content_restriction = args[:can_remove_content_restriction] if args.key?(:can_remove_content_restriction)
2649
2698
  @can_remove_my_drive_parent = args[:can_remove_my_drive_parent] if args.key?(:can_remove_my_drive_parent)
2650
2699
  @can_rename = args[:can_rename] if args.key?(:can_rename)
2651
2700
  @can_share = args[:can_share] if args.key?(:can_share)
@@ -3470,7 +3519,9 @@ module Google
3470
3519
  end
3471
3520
  end
3472
3521
 
3473
- # A reference to a file's parent.
3522
+ # A reference to a file's parent. Some resource methods (such as `parents.get`)
3523
+ # require a `parentId`. Use the `parents.list` method to retrieve the ID for a
3524
+ # parent.
3474
3525
  class ParentReference
3475
3526
  include Google::Apis::Core::Hashable
3476
3527
 
@@ -3514,7 +3565,10 @@ module Google
3514
3565
  end
3515
3566
  end
3516
3567
 
3517
- # A permission for a file.
3568
+ # A permission for a file. A permission grants a user, group, domain, or the
3569
+ # world access to a file or a folder hierarchy. Some resource methods (such as `
3570
+ # permissions.update`) require a `permissionId`. Use the `permissions.list`
3571
+ # method to retrieve the ID for a file, folder, or shared drive.
3518
3572
  class Permission
3519
3573
  include Google::Apis::Core::Hashable
3520
3574
 
@@ -3843,7 +3897,9 @@ module Google
3843
3897
  # application. The following limits apply to file properties: * Maximum of 100
3844
3898
  # properties total per file * Maximum of 30 private properties per app * Maximum
3845
3899
  # of 30 public properties * Maximum of 124 bytes size limit on (key + value)
3846
- # string in UTF-8 encoding for a single property
3900
+ # string in UTF-8 encoding for a single property Some resource methods (such as `
3901
+ # properties.update`) require a `propertyKey`. Use the `properties.list` method
3902
+ # to retrieve the key for a property.
3847
3903
  class Property
3848
3904
  include Google::Apis::Core::Hashable
3849
3905
 
@@ -3933,7 +3989,9 @@ module Google
3933
3989
  end
3934
3990
  end
3935
3991
 
3936
- # A revision of a file.
3992
+ # A revision of a file. Some resource methods (such as `revisions.update`)
3993
+ # require a `revisionId`. Use the `revisions.list` method to retrieve the ID for
3994
+ # a revision.
3937
3995
  class Revision
3938
3996
  include Google::Apis::Core::Hashable
3939
3997
 
@@ -16,13 +16,13 @@ module Google
16
16
  module Apis
17
17
  module DriveV2
18
18
  # Version of the google-apis-drive_v2 gem
19
- GEM_VERSION = "0.39.0"
19
+ GEM_VERSION = "0.41.0"
20
20
 
21
21
  # Version of the code generator used to generate this client
22
22
  GENERATOR_VERSION = "0.12.0"
23
23
 
24
24
  # Revision of the discovery document this client was generated from
25
- REVISION = "20230603"
25
+ REVISION = "20230822"
26
26
  end
27
27
  end
28
28
  end
@@ -756,6 +756,7 @@ module Google
756
756
  class ContentRestriction
757
757
  # @private
758
758
  class Representation < Google::Apis::Core::JsonRepresentation
759
+ property :owner_restricted, as: 'ownerRestricted'
759
760
  property :read_only, as: 'readOnly'
760
761
  property :reason, as: 'reason'
761
762
  property :restricting_user, as: 'restrictingUser', class: Google::Apis::DriveV2::User, decorator: Google::Apis::DriveV2::User::Representation
@@ -969,7 +970,9 @@ module Google
969
970
  property :can_list_children, as: 'canListChildren'
970
971
  property :can_modify_content, as: 'canModifyContent'
971
972
  property :can_modify_content_restriction, as: 'canModifyContentRestriction'
973
+ property :can_modify_editor_content_restriction, as: 'canModifyEditorContentRestriction'
972
974
  property :can_modify_labels, as: 'canModifyLabels'
975
+ property :can_modify_owner_content_restriction, as: 'canModifyOwnerContentRestriction'
973
976
  property :can_move_children_out_of_drive, as: 'canMoveChildrenOutOfDrive'
974
977
  property :can_move_children_out_of_team_drive, as: 'canMoveChildrenOutOfTeamDrive'
975
978
  property :can_move_children_within_drive, as: 'canMoveChildrenWithinDrive'
@@ -985,6 +988,7 @@ module Google
985
988
  property :can_read_revisions, as: 'canReadRevisions'
986
989
  property :can_read_team_drive, as: 'canReadTeamDrive'
987
990
  property :can_remove_children, as: 'canRemoveChildren'
991
+ property :can_remove_content_restriction, as: 'canRemoveContentRestriction'
988
992
  property :can_remove_my_drive_parent, as: 'canRemoveMyDriveParent'
989
993
  property :can_rename, as: 'canRename'
990
994
  property :can_share, as: 'canShare'
@@ -826,7 +826,7 @@ module Google
826
826
  execute_or_queue_command(command, &block)
827
827
  end
828
828
 
829
- # Permanently deletes a shared drive for which the user is an organizer. The
829
+ # Permanently deletes a shared drive for which the user is an `organizer`. The
830
830
  # shared drive cannot contain any untrashed items.
831
831
  # @param [String] drive_id
832
832
  # The ID of the shared drive.
@@ -1151,8 +1151,10 @@ module Google
1151
1151
  execute_or_queue_command(command, &block)
1152
1152
  end
1153
1153
 
1154
- # Permanently deletes a file by ID. Skips the trash. The currently authenticated
1155
- # user must own the file or be an organizer on the parent for shared drive files.
1154
+ # Permanently deletes a file owned by the user without moving it to the trash.
1155
+ # If the file belongs to a shared drive, the user must be an `organizer` on the
1156
+ # parent folder. If the target is a folder, all descendants owned by the user
1157
+ # are also deleted.
1156
1158
  # @param [String] file_id
1157
1159
  # The ID of the file to delete.
1158
1160
  # @param [Boolean] enforce_single_parent
@@ -1565,7 +1567,7 @@ module Google
1565
1567
 
1566
1568
  # Lists the labels on a file.
1567
1569
  # @param [String] file_id
1568
- # The ID for the file or shared drive.
1570
+ # The ID for the file.
1569
1571
  # @param [Fixnum] max_results
1570
1572
  # The maximum number of labels to return per page. When not set, defaults to 100.
1571
1573
  # @param [String] page_token
@@ -1785,13 +1787,7 @@ module Google
1785
1787
  end
1786
1788
 
1787
1789
  # Moves a file to the trash. The currently authenticated user must own the file
1788
- # or be at least a `fileOrganizer` on the parent for shared drive files. Only
1789
- # the owner may trash a file. The trashed item is excluded from all `files.list`
1790
- # responses returned for any user who doesn't own the file. However, all users
1791
- # with access to the file can see the trashed item metadata in an API response.
1792
- # All users with access can copy, download, export, and share the file. *Note:*
1793
- # Files moved to the trash still appear by default in results from the `files.
1794
- # list` method. To permanently remove a file, use `files.delete`.
1790
+ # or be at least a `fileOrganizer` on the parent for shared drive files.
1795
1791
  # @param [String] file_id
1796
1792
  # The ID of the file to trash.
1797
1793
  # @param [String] include_labels
@@ -1837,7 +1833,6 @@ module Google
1837
1833
 
1838
1834
  # Restores a file from the trash. The currently authenticated user must own the
1839
1835
  # file or be at least a `fileOrganizer` on the parent for shared drive files.
1840
- # Only the owner may untrash a file.
1841
1836
  # @param [String] file_id
1842
1837
  # The ID of the file to untrash.
1843
1838
  # @param [String] include_labels
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-apis-drive_v2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.39.0
4
+ version: 0.41.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-11 00:00:00.000000000 Z
11
+ date: 2023-08-27 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_v2/CHANGELOG.md
61
- documentation_uri: https://googleapis.dev/ruby/google-apis-drive_v2/v0.39.0
61
+ documentation_uri: https://googleapis.dev/ruby/google-apis-drive_v2/v0.41.0
62
62
  source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-drive_v2
63
63
  post_install_message:
64
64
  rdoc_options: []
@@ -75,7 +75,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
75
75
  - !ruby/object:Gem::Version
76
76
  version: '0'
77
77
  requirements: []
78
- rubygems_version: 3.4.2
78
+ rubygems_version: 3.4.19
79
79
  signing_key:
80
80
  specification_version: 4
81
81
  summary: Simple REST client for Google Drive API V2