google-apis-drive_v2 0.24.0 → 0.27.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6d5fd081a42c536394ef334d00eb2dfc5645187c76c432d160e6f2fdb6374546
4
- data.tar.gz: '01816d038b31cabcd800a222dd8e91d7107573756b06bd9bb89bd9376db26f62'
3
+ metadata.gz: 48720b4fcfc1920324e856a67ac6c5a212a5e8ab23f7ae5f6c55371992a47f55
4
+ data.tar.gz: 6e5d6cbed05e01220561e321672fab2e5fc2b54e559e1384160a5dcc524e2560
5
5
  SHA512:
6
- metadata.gz: 91bdbab11d0aebd41732c49e07a3b08bf7409669e48cdac1c8031b9f07cb145840e9268fadcc7d07306197abbb98df9436d02e615b978d13b2eb939edb7f07bd
7
- data.tar.gz: 8fc40b144bf7914101701228daa949f0e9b847a58878020d0f383ae5383e7e15f38c418d94ff95b4d60101318b3797bc065cf24dd5e3cf789f6614b9b4e00643
6
+ metadata.gz: 0e2538b1802fbe8c409fc8d937bd07b86565230def21d2945a0df10df868350900222cfb6674e6023ea90f831214cea99351e36491ac6484ec08a54fedb3da86
7
+ data.tar.gz: 3f0f6c85b2bfff2d9d8fdb65971a58c6e486aa3ca859d51a3a30fefd4e722c98a046e51453c43b81d0275de37b36161b961e47bf60dba8aa1f6ef8722dec3cb1
data/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # Release history for google-apis-drive_v2
2
2
 
3
+ ### v0.27.0 (2022-08-18)
4
+
5
+ * Regenerated from discovery document revision 20220815
6
+
7
+ ### v0.26.0 (2022-07-14)
8
+
9
+ * Regenerated from discovery document revision 20220709
10
+ * Regenerated using generator version 0.9.0
11
+
12
+ ### v0.25.0 (2022-06-30)
13
+
14
+ * Regenerated using generator version 0.8.0
15
+
3
16
  ### v0.24.0 (2022-06-19)
4
17
 
5
18
  * Regenerated using generator version 0.7.0
@@ -1970,6 +1970,11 @@ module Google
1970
1970
  # @return [String]
1971
1971
  attr_accessor :kind
1972
1972
 
1973
+ # An overview of the labels on the file.
1974
+ # Corresponds to the JSON property `labelInfo`
1975
+ # @return [Google::Apis::DriveV2::File::LabelInfo]
1976
+ attr_accessor :label_info
1977
+
1973
1978
  # A group of labels for the file.
1974
1979
  # Corresponds to the JSON property `labels`
1975
1980
  # @return [Google::Apis::DriveV2::File::Labels]
@@ -2100,6 +2105,20 @@ module Google
2100
2105
  # @return [String]
2101
2106
  attr_accessor :self_link
2102
2107
 
2108
+ # The SHA1 checksum associated with this file, if available. This field is only
2109
+ # populated for files with content stored in Google Drive; it is not populated
2110
+ # for Docs Editors or shortcut files.
2111
+ # Corresponds to the JSON property `sha1Checksum`
2112
+ # @return [String]
2113
+ attr_accessor :sha1_checksum
2114
+
2115
+ # The SHA256 checksum associated with this file, if available. This field is
2116
+ # only populated for files with content stored in Google Drive; it is not
2117
+ # populated for Docs Editors or shortcut files.
2118
+ # Corresponds to the JSON property `sha256Checksum`
2119
+ # @return [String]
2120
+ attr_accessor :sha256_checksum
2121
+
2103
2122
  # Deprecated: use capabilities/canShare.
2104
2123
  # Corresponds to the JSON property `shareable`
2105
2124
  # @return [Boolean]
@@ -2251,6 +2270,7 @@ module Google
2251
2270
  @indexable_text = args[:indexable_text] if args.key?(:indexable_text)
2252
2271
  @is_app_authorized = args[:is_app_authorized] if args.key?(:is_app_authorized)
2253
2272
  @kind = args[:kind] if args.key?(:kind)
2273
+ @label_info = args[:label_info] if args.key?(:label_info)
2254
2274
  @labels = args[:labels] if args.key?(:labels)
2255
2275
  @last_modifying_user = args[:last_modifying_user] if args.key?(:last_modifying_user)
2256
2276
  @last_modifying_user_name = args[:last_modifying_user_name] if args.key?(:last_modifying_user_name)
@@ -2273,6 +2293,8 @@ module Google
2273
2293
  @quota_bytes_used = args[:quota_bytes_used] if args.key?(:quota_bytes_used)
2274
2294
  @resource_key = args[:resource_key] if args.key?(:resource_key)
2275
2295
  @self_link = args[:self_link] if args.key?(:self_link)
2296
+ @sha1_checksum = args[:sha1_checksum] if args.key?(:sha1_checksum)
2297
+ @sha256_checksum = args[:sha256_checksum] if args.key?(:sha256_checksum)
2276
2298
  @shareable = args[:shareable] if args.key?(:shareable)
2277
2299
  @shared = args[:shared] if args.key?(:shared)
2278
2300
  @shared_with_me_date = args[:shared_with_me_date] if args.key?(:shared_with_me_date)
@@ -2408,6 +2430,12 @@ module Google
2408
2430
  attr_accessor :can_modify_content_restriction
2409
2431
  alias_method :can_modify_content_restriction?, :can_modify_content_restriction
2410
2432
 
2433
+ # Whether the current user can modify the labels on this file.
2434
+ # Corresponds to the JSON property `canModifyLabels`
2435
+ # @return [Boolean]
2436
+ attr_accessor :can_modify_labels
2437
+ alias_method :can_modify_labels?, :can_modify_labels
2438
+
2411
2439
  # Whether the current user can move children of this folder outside of the
2412
2440
  # shared drive. This is false when the item is not a folder. Only populated for
2413
2441
  # items in shared drives.
@@ -2484,6 +2512,12 @@ module Google
2484
2512
  attr_accessor :can_read_drive
2485
2513
  alias_method :can_read_drive?, :can_read_drive
2486
2514
 
2515
+ # Whether the current user can read the labels on this file.
2516
+ # Corresponds to the JSON property `canReadLabels`
2517
+ # @return [Boolean]
2518
+ attr_accessor :can_read_labels
2519
+ alias_method :can_read_labels?, :can_read_labels
2520
+
2487
2521
  # Whether the current user can read the revisions resource of this file. For a
2488
2522
  # shared drive item, whether revisions of non-folder descendants of this item,
2489
2523
  # or this item itself if it is not a folder, can be read.
@@ -2566,6 +2600,7 @@ module Google
2566
2600
  @can_list_children = args[:can_list_children] if args.key?(:can_list_children)
2567
2601
  @can_modify_content = args[:can_modify_content] if args.key?(:can_modify_content)
2568
2602
  @can_modify_content_restriction = args[:can_modify_content_restriction] if args.key?(:can_modify_content_restriction)
2603
+ @can_modify_labels = args[:can_modify_labels] if args.key?(:can_modify_labels)
2569
2604
  @can_move_children_out_of_drive = args[:can_move_children_out_of_drive] if args.key?(:can_move_children_out_of_drive)
2570
2605
  @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)
2571
2606
  @can_move_children_within_drive = args[:can_move_children_within_drive] if args.key?(:can_move_children_within_drive)
@@ -2577,6 +2612,7 @@ module Google
2577
2612
  @can_move_item_within_team_drive = args[:can_move_item_within_team_drive] if args.key?(:can_move_item_within_team_drive)
2578
2613
  @can_move_team_drive_item = args[:can_move_team_drive_item] if args.key?(:can_move_team_drive_item)
2579
2614
  @can_read_drive = args[:can_read_drive] if args.key?(:can_read_drive)
2615
+ @can_read_labels = args[:can_read_labels] if args.key?(:can_read_labels)
2580
2616
  @can_read_revisions = args[:can_read_revisions] if args.key?(:can_read_revisions)
2581
2617
  @can_read_team_drive = args[:can_read_team_drive] if args.key?(:can_read_team_drive)
2582
2618
  @can_remove_children = args[:can_remove_children] if args.key?(:can_remove_children)
@@ -2782,6 +2818,26 @@ module Google
2782
2818
  end
2783
2819
  end
2784
2820
 
2821
+ # An overview of the labels on the file.
2822
+ class LabelInfo
2823
+ include Google::Apis::Core::Hashable
2824
+
2825
+ # The set of labels on the file as requested by the label IDs in the
2826
+ # includeLabels parameter. By default, no labels are returned.
2827
+ # Corresponds to the JSON property `labels`
2828
+ # @return [Array<Google::Apis::DriveV2::Label>]
2829
+ attr_accessor :labels
2830
+
2831
+ def initialize(**args)
2832
+ update!(**args)
2833
+ end
2834
+
2835
+ # Update properties of this object
2836
+ def update!(**args)
2837
+ @labels = args[:labels] if args.key?(:labels)
2838
+ end
2839
+ end
2840
+
2785
2841
  # A group of labels for the file.
2786
2842
  class Labels
2787
2843
  include Google::Apis::Core::Hashable
@@ -3058,6 +3114,300 @@ module Google
3058
3114
  end
3059
3115
  end
3060
3116
 
3117
+ # Representation of a label and its fields.
3118
+ class Label
3119
+ include Google::Apis::Core::Hashable
3120
+
3121
+ # A map of the label's fields keyed by the field ID.
3122
+ # Corresponds to the JSON property `fields`
3123
+ # @return [Hash<String,Google::Apis::DriveV2::LabelField>]
3124
+ attr_accessor :fields
3125
+
3126
+ # The ID of the label.
3127
+ # Corresponds to the JSON property `id`
3128
+ # @return [String]
3129
+ attr_accessor :id
3130
+
3131
+ # This is always drive#label
3132
+ # Corresponds to the JSON property `kind`
3133
+ # @return [String]
3134
+ attr_accessor :kind
3135
+
3136
+ # The revision ID of the label.
3137
+ # Corresponds to the JSON property `revisionId`
3138
+ # @return [String]
3139
+ attr_accessor :revision_id
3140
+
3141
+ def initialize(**args)
3142
+ update!(**args)
3143
+ end
3144
+
3145
+ # Update properties of this object
3146
+ def update!(**args)
3147
+ @fields = args[:fields] if args.key?(:fields)
3148
+ @id = args[:id] if args.key?(:id)
3149
+ @kind = args[:kind] if args.key?(:kind)
3150
+ @revision_id = args[:revision_id] if args.key?(:revision_id)
3151
+ end
3152
+ end
3153
+
3154
+ # Representation of a label field.
3155
+ class LabelField
3156
+ include Google::Apis::Core::Hashable
3157
+
3158
+ # Only present if valueType is dateString. RFC 3339 formatted date: YYYY-MM-DD.
3159
+ # Corresponds to the JSON property `dateString`
3160
+ # @return [Array<Date>]
3161
+ attr_accessor :date_string
3162
+
3163
+ # The identifier of this field.
3164
+ # Corresponds to the JSON property `id`
3165
+ # @return [String]
3166
+ attr_accessor :id
3167
+
3168
+ # Only present if valueType is integer.
3169
+ # Corresponds to the JSON property `integer`
3170
+ # @return [Array<Fixnum>]
3171
+ attr_accessor :integer
3172
+
3173
+ # This is always drive#labelField.
3174
+ # Corresponds to the JSON property `kind`
3175
+ # @return [String]
3176
+ attr_accessor :kind
3177
+
3178
+ # Only present if valueType is selection.
3179
+ # Corresponds to the JSON property `selection`
3180
+ # @return [Array<String>]
3181
+ attr_accessor :selection
3182
+
3183
+ # Only present if valueType is text.
3184
+ # Corresponds to the JSON property `text`
3185
+ # @return [Array<String>]
3186
+ attr_accessor :text
3187
+
3188
+ # Only present if valueType is user.
3189
+ # Corresponds to the JSON property `user`
3190
+ # @return [Array<Google::Apis::DriveV2::User>]
3191
+ attr_accessor :user
3192
+
3193
+ # The field type. While new values may be supported in the future, the following
3194
+ # are currently allowed:
3195
+ # - dateString
3196
+ # - integer
3197
+ # - selection
3198
+ # - text
3199
+ # - user
3200
+ # Corresponds to the JSON property `valueType`
3201
+ # @return [String]
3202
+ attr_accessor :value_type
3203
+
3204
+ def initialize(**args)
3205
+ update!(**args)
3206
+ end
3207
+
3208
+ # Update properties of this object
3209
+ def update!(**args)
3210
+ @date_string = args[:date_string] if args.key?(:date_string)
3211
+ @id = args[:id] if args.key?(:id)
3212
+ @integer = args[:integer] if args.key?(:integer)
3213
+ @kind = args[:kind] if args.key?(:kind)
3214
+ @selection = args[:selection] if args.key?(:selection)
3215
+ @text = args[:text] if args.key?(:text)
3216
+ @user = args[:user] if args.key?(:user)
3217
+ @value_type = args[:value_type] if args.key?(:value_type)
3218
+ end
3219
+ end
3220
+
3221
+ # A modification to a label's field.
3222
+ class LabelFieldModification
3223
+ include Google::Apis::Core::Hashable
3224
+
3225
+ # The ID of the field to be modified.
3226
+ # Corresponds to the JSON property `fieldId`
3227
+ # @return [String]
3228
+ attr_accessor :field_id
3229
+
3230
+ # This is always drive#labelFieldModification.
3231
+ # Corresponds to the JSON property `kind`
3232
+ # @return [String]
3233
+ attr_accessor :kind
3234
+
3235
+ # Replaces a dateString field with these new values. The values must be strings
3236
+ # in the RFC 3339 full-date format: YYYY-MM-DD.
3237
+ # Corresponds to the JSON property `setDateValues`
3238
+ # @return [Array<Date>]
3239
+ attr_accessor :set_date_values
3240
+
3241
+ # Replaces an integer field with these new values.
3242
+ # Corresponds to the JSON property `setIntegerValues`
3243
+ # @return [Array<Fixnum>]
3244
+ attr_accessor :set_integer_values
3245
+
3246
+ # Replaces a selection field with these new values.
3247
+ # Corresponds to the JSON property `setSelectionValues`
3248
+ # @return [Array<String>]
3249
+ attr_accessor :set_selection_values
3250
+
3251
+ # Replaces a text field with these new values.
3252
+ # Corresponds to the JSON property `setTextValues`
3253
+ # @return [Array<String>]
3254
+ attr_accessor :set_text_values
3255
+
3256
+ # Replaces a user field with these new values. The values must be valid email
3257
+ # addresses.
3258
+ # Corresponds to the JSON property `setUserValues`
3259
+ # @return [Array<String>]
3260
+ attr_accessor :set_user_values
3261
+
3262
+ # Unsets the values for this field.
3263
+ # Corresponds to the JSON property `unsetValues`
3264
+ # @return [Boolean]
3265
+ attr_accessor :unset_values
3266
+ alias_method :unset_values?, :unset_values
3267
+
3268
+ def initialize(**args)
3269
+ update!(**args)
3270
+ end
3271
+
3272
+ # Update properties of this object
3273
+ def update!(**args)
3274
+ @field_id = args[:field_id] if args.key?(:field_id)
3275
+ @kind = args[:kind] if args.key?(:kind)
3276
+ @set_date_values = args[:set_date_values] if args.key?(:set_date_values)
3277
+ @set_integer_values = args[:set_integer_values] if args.key?(:set_integer_values)
3278
+ @set_selection_values = args[:set_selection_values] if args.key?(:set_selection_values)
3279
+ @set_text_values = args[:set_text_values] if args.key?(:set_text_values)
3280
+ @set_user_values = args[:set_user_values] if args.key?(:set_user_values)
3281
+ @unset_values = args[:unset_values] if args.key?(:unset_values)
3282
+ end
3283
+ end
3284
+
3285
+ # A list of labels.
3286
+ class LabelList
3287
+ include Google::Apis::Core::Hashable
3288
+
3289
+ # The list of labels.
3290
+ # Corresponds to the JSON property `items`
3291
+ # @return [Array<Google::Apis::DriveV2::Label>]
3292
+ attr_accessor :items
3293
+
3294
+ # This is always drive#labelList
3295
+ # Corresponds to the JSON property `kind`
3296
+ # @return [String]
3297
+ attr_accessor :kind
3298
+
3299
+ # The page token for the next page of labels. This field will be absent if the
3300
+ # end of the list has been reached. If the token is rejected for any reason, it
3301
+ # should be discarded, and pagination should be restarted from the first page of
3302
+ # results.
3303
+ # Corresponds to the JSON property `nextPageToken`
3304
+ # @return [String]
3305
+ attr_accessor :next_page_token
3306
+
3307
+ def initialize(**args)
3308
+ update!(**args)
3309
+ end
3310
+
3311
+ # Update properties of this object
3312
+ def update!(**args)
3313
+ @items = args[:items] if args.key?(:items)
3314
+ @kind = args[:kind] if args.key?(:kind)
3315
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
3316
+ end
3317
+ end
3318
+
3319
+ # A modification to a label on a file. A LabelModification can be used to apply
3320
+ # a label to a file, update an existing label on a file, or remove a label from
3321
+ # a file.
3322
+ class LabelModification
3323
+ include Google::Apis::Core::Hashable
3324
+
3325
+ # The list of modifications to this label's fields.
3326
+ # Corresponds to the JSON property `fieldModifications`
3327
+ # @return [Array<Google::Apis::DriveV2::LabelFieldModification>]
3328
+ attr_accessor :field_modifications
3329
+
3330
+ # This is always drive#labelModification.
3331
+ # Corresponds to the JSON property `kind`
3332
+ # @return [String]
3333
+ attr_accessor :kind
3334
+
3335
+ # The ID of the label to modify.
3336
+ # Corresponds to the JSON property `labelId`
3337
+ # @return [String]
3338
+ attr_accessor :label_id
3339
+
3340
+ # If true, the label will be removed from the file.
3341
+ # Corresponds to the JSON property `removeLabel`
3342
+ # @return [Boolean]
3343
+ attr_accessor :remove_label
3344
+ alias_method :remove_label?, :remove_label
3345
+
3346
+ def initialize(**args)
3347
+ update!(**args)
3348
+ end
3349
+
3350
+ # Update properties of this object
3351
+ def update!(**args)
3352
+ @field_modifications = args[:field_modifications] if args.key?(:field_modifications)
3353
+ @kind = args[:kind] if args.key?(:kind)
3354
+ @label_id = args[:label_id] if args.key?(:label_id)
3355
+ @remove_label = args[:remove_label] if args.key?(:remove_label)
3356
+ end
3357
+ end
3358
+
3359
+ # A request to modify the set of labels on a file. This request may contain many
3360
+ # modifications that will either all succeed or all fail transactionally.
3361
+ class ModifyLabelsRequest
3362
+ include Google::Apis::Core::Hashable
3363
+
3364
+ # This is always drive#modifyLabelsRequest
3365
+ # Corresponds to the JSON property `kind`
3366
+ # @return [String]
3367
+ attr_accessor :kind
3368
+
3369
+ # The list of modifications to apply to the labels on the file.
3370
+ # Corresponds to the JSON property `labelModifications`
3371
+ # @return [Array<Google::Apis::DriveV2::LabelModification>]
3372
+ attr_accessor :label_modifications
3373
+
3374
+ def initialize(**args)
3375
+ update!(**args)
3376
+ end
3377
+
3378
+ # Update properties of this object
3379
+ def update!(**args)
3380
+ @kind = args[:kind] if args.key?(:kind)
3381
+ @label_modifications = args[:label_modifications] if args.key?(:label_modifications)
3382
+ end
3383
+ end
3384
+
3385
+ # Response to a ModifyLabels request. This contains only those labels which were
3386
+ # added or updated by the request.
3387
+ class ModifyLabelsResponse
3388
+ include Google::Apis::Core::Hashable
3389
+
3390
+ # This is always drive#modifyLabelsResponse
3391
+ # Corresponds to the JSON property `kind`
3392
+ # @return [String]
3393
+ attr_accessor :kind
3394
+
3395
+ # The list of labels which were added or updated by the request.
3396
+ # Corresponds to the JSON property `modifiedLabels`
3397
+ # @return [Array<Google::Apis::DriveV2::Label>]
3398
+ attr_accessor :modified_labels
3399
+
3400
+ def initialize(**args)
3401
+ update!(**args)
3402
+ end
3403
+
3404
+ # Update properties of this object
3405
+ def update!(**args)
3406
+ @kind = args[:kind] if args.key?(:kind)
3407
+ @modified_labels = args[:modified_labels] if args.key?(:modified_labels)
3408
+ end
3409
+ end
3410
+
3061
3411
  # A list of a file's parents.
3062
3412
  class ParentList
3063
3413
  include Google::Apis::Core::Hashable
@@ -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.24.0"
19
+ GEM_VERSION = "0.27.0"
20
20
 
21
21
  # Version of the code generator used to generate this client
22
- GENERATOR_VERSION = "0.7.0"
22
+ GENERATOR_VERSION = "0.9.0"
23
23
 
24
24
  # Revision of the discovery document this client was generated from
25
- REVISION = "20220508"
25
+ REVISION = "20220815"
26
26
  end
27
27
  end
28
28
  end
@@ -223,6 +223,12 @@ module Google
223
223
  include Google::Apis::Core::JsonObjectSupport
224
224
  end
225
225
 
226
+ class LabelInfo
227
+ class Representation < Google::Apis::Core::JsonRepresentation; end
228
+
229
+ include Google::Apis::Core::JsonObjectSupport
230
+ end
231
+
226
232
  class Labels
227
233
  class Representation < Google::Apis::Core::JsonRepresentation; end
228
234
 
@@ -268,6 +274,48 @@ module Google
268
274
  include Google::Apis::Core::JsonObjectSupport
269
275
  end
270
276
 
277
+ class Label
278
+ class Representation < Google::Apis::Core::JsonRepresentation; end
279
+
280
+ include Google::Apis::Core::JsonObjectSupport
281
+ end
282
+
283
+ class LabelField
284
+ class Representation < Google::Apis::Core::JsonRepresentation; end
285
+
286
+ include Google::Apis::Core::JsonObjectSupport
287
+ end
288
+
289
+ class LabelFieldModification
290
+ class Representation < Google::Apis::Core::JsonRepresentation; end
291
+
292
+ include Google::Apis::Core::JsonObjectSupport
293
+ end
294
+
295
+ class LabelList
296
+ class Representation < Google::Apis::Core::JsonRepresentation; end
297
+
298
+ include Google::Apis::Core::JsonObjectSupport
299
+ end
300
+
301
+ class LabelModification
302
+ class Representation < Google::Apis::Core::JsonRepresentation; end
303
+
304
+ include Google::Apis::Core::JsonObjectSupport
305
+ end
306
+
307
+ class ModifyLabelsRequest
308
+ class Representation < Google::Apis::Core::JsonRepresentation; end
309
+
310
+ include Google::Apis::Core::JsonObjectSupport
311
+ end
312
+
313
+ class ModifyLabelsResponse
314
+ class Representation < Google::Apis::Core::JsonRepresentation; end
315
+
316
+ include Google::Apis::Core::JsonObjectSupport
317
+ end
318
+
271
319
  class ParentList
272
320
  class Representation < Google::Apis::Core::JsonRepresentation; end
273
321
 
@@ -834,6 +882,8 @@ module Google
834
882
 
835
883
  property :is_app_authorized, as: 'isAppAuthorized'
836
884
  property :kind, as: 'kind'
885
+ property :label_info, as: 'labelInfo', class: Google::Apis::DriveV2::File::LabelInfo, decorator: Google::Apis::DriveV2::File::LabelInfo::Representation
886
+
837
887
  property :labels, as: 'labels', class: Google::Apis::DriveV2::File::Labels, decorator: Google::Apis::DriveV2::File::Labels::Representation
838
888
 
839
889
  property :last_modifying_user, as: 'lastModifyingUser', class: Google::Apis::DriveV2::User, decorator: Google::Apis::DriveV2::User::Representation
@@ -867,6 +917,8 @@ module Google
867
917
  property :quota_bytes_used, :numeric_string => true, as: 'quotaBytesUsed'
868
918
  property :resource_key, as: 'resourceKey'
869
919
  property :self_link, as: 'selfLink'
920
+ property :sha1_checksum, as: 'sha1Checksum'
921
+ property :sha256_checksum, as: 'sha256Checksum'
870
922
  property :shareable, as: 'shareable'
871
923
  property :shared, as: 'shared'
872
924
  property :shared_with_me_date, as: 'sharedWithMeDate', type: DateTime
@@ -915,6 +967,7 @@ module Google
915
967
  property :can_list_children, as: 'canListChildren'
916
968
  property :can_modify_content, as: 'canModifyContent'
917
969
  property :can_modify_content_restriction, as: 'canModifyContentRestriction'
970
+ property :can_modify_labels, as: 'canModifyLabels'
918
971
  property :can_move_children_out_of_drive, as: 'canMoveChildrenOutOfDrive'
919
972
  property :can_move_children_out_of_team_drive, as: 'canMoveChildrenOutOfTeamDrive'
920
973
  property :can_move_children_within_drive, as: 'canMoveChildrenWithinDrive'
@@ -926,6 +979,7 @@ module Google
926
979
  property :can_move_item_within_team_drive, as: 'canMoveItemWithinTeamDrive'
927
980
  property :can_move_team_drive_item, as: 'canMoveTeamDriveItem'
928
981
  property :can_read_drive, as: 'canReadDrive'
982
+ property :can_read_labels, as: 'canReadLabels'
929
983
  property :can_read_revisions, as: 'canReadRevisions'
930
984
  property :can_read_team_drive, as: 'canReadTeamDrive'
931
985
  property :can_remove_children, as: 'canRemoveChildren'
@@ -982,6 +1036,14 @@ module Google
982
1036
  end
983
1037
  end
984
1038
 
1039
+ class LabelInfo
1040
+ # @private
1041
+ class Representation < Google::Apis::Core::JsonRepresentation
1042
+ collection :labels, as: 'labels', class: Google::Apis::DriveV2::Label, decorator: Google::Apis::DriveV2::Label::Representation
1043
+
1044
+ end
1045
+ end
1046
+
985
1047
  class Labels
986
1048
  # @private
987
1049
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -1052,6 +1114,87 @@ module Google
1052
1114
  end
1053
1115
  end
1054
1116
 
1117
+ class Label
1118
+ # @private
1119
+ class Representation < Google::Apis::Core::JsonRepresentation
1120
+ hash :fields, as: 'fields', class: Google::Apis::DriveV2::LabelField, decorator: Google::Apis::DriveV2::LabelField::Representation
1121
+
1122
+ property :id, as: 'id'
1123
+ property :kind, as: 'kind'
1124
+ property :revision_id, as: 'revisionId'
1125
+ end
1126
+ end
1127
+
1128
+ class LabelField
1129
+ # @private
1130
+ class Representation < Google::Apis::Core::JsonRepresentation
1131
+ collection :date_string, as: 'dateString', type: Date
1132
+
1133
+ property :id, as: 'id'
1134
+ collection :integer, as: 'integer'
1135
+ property :kind, as: 'kind'
1136
+ collection :selection, as: 'selection'
1137
+ collection :text, as: 'text'
1138
+ collection :user, as: 'user', class: Google::Apis::DriveV2::User, decorator: Google::Apis::DriveV2::User::Representation
1139
+
1140
+ property :value_type, as: 'valueType'
1141
+ end
1142
+ end
1143
+
1144
+ class LabelFieldModification
1145
+ # @private
1146
+ class Representation < Google::Apis::Core::JsonRepresentation
1147
+ property :field_id, as: 'fieldId'
1148
+ property :kind, as: 'kind'
1149
+ collection :set_date_values, as: 'setDateValues', type: Date
1150
+
1151
+ collection :set_integer_values, as: 'setIntegerValues'
1152
+ collection :set_selection_values, as: 'setSelectionValues'
1153
+ collection :set_text_values, as: 'setTextValues'
1154
+ collection :set_user_values, as: 'setUserValues'
1155
+ property :unset_values, as: 'unsetValues'
1156
+ end
1157
+ end
1158
+
1159
+ class LabelList
1160
+ # @private
1161
+ class Representation < Google::Apis::Core::JsonRepresentation
1162
+ collection :items, as: 'items', class: Google::Apis::DriveV2::Label, decorator: Google::Apis::DriveV2::Label::Representation
1163
+
1164
+ property :kind, as: 'kind'
1165
+ property :next_page_token, as: 'nextPageToken'
1166
+ end
1167
+ end
1168
+
1169
+ class LabelModification
1170
+ # @private
1171
+ class Representation < Google::Apis::Core::JsonRepresentation
1172
+ collection :field_modifications, as: 'fieldModifications', class: Google::Apis::DriveV2::LabelFieldModification, decorator: Google::Apis::DriveV2::LabelFieldModification::Representation
1173
+
1174
+ property :kind, as: 'kind'
1175
+ property :label_id, as: 'labelId'
1176
+ property :remove_label, as: 'removeLabel'
1177
+ end
1178
+ end
1179
+
1180
+ class ModifyLabelsRequest
1181
+ # @private
1182
+ class Representation < Google::Apis::Core::JsonRepresentation
1183
+ property :kind, as: 'kind'
1184
+ collection :label_modifications, as: 'labelModifications', class: Google::Apis::DriveV2::LabelModification, decorator: Google::Apis::DriveV2::LabelModification::Representation
1185
+
1186
+ end
1187
+ end
1188
+
1189
+ class ModifyLabelsResponse
1190
+ # @private
1191
+ class Representation < Google::Apis::Core::JsonRepresentation
1192
+ property :kind, as: 'kind'
1193
+ collection :modified_labels, as: 'modifiedLabels', class: Google::Apis::DriveV2::Label, decorator: Google::Apis::DriveV2::Label::Representation
1194
+
1195
+ end
1196
+ end
1197
+
1055
1198
  class ParentList
1056
1199
  # @private
1057
1200
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -280,6 +280,9 @@ module Google
280
280
  # list of changes, for example by deletion or loss of access.
281
281
  # @param [Boolean] include_items_from_all_drives
282
282
  # Whether both My Drive and shared drive items should be included in results.
283
+ # @param [String] include_labels
284
+ # A comma-separated list of IDs of labels to include in the labelInfo part of
285
+ # the response.
283
286
  # @param [String] include_permissions_for_view
284
287
  # Specifies which additional view's permissions to include in the response. Only
285
288
  # 'published' is supported.
@@ -325,7 +328,7 @@ module Google
325
328
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
326
329
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
327
330
  # @raise [Google::Apis::AuthorizationError] Authorization is required
328
- def list_changes(drive_id: nil, include_corpus_removals: nil, include_deleted: nil, include_items_from_all_drives: nil, include_permissions_for_view: nil, include_subscribed: nil, include_team_drive_items: nil, max_results: nil, page_token: nil, spaces: nil, start_change_id: nil, supports_all_drives: nil, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
331
+ def list_changes(drive_id: nil, include_corpus_removals: nil, include_deleted: nil, include_items_from_all_drives: nil, include_labels: nil, include_permissions_for_view: nil, include_subscribed: nil, include_team_drive_items: nil, max_results: nil, page_token: nil, spaces: nil, start_change_id: nil, supports_all_drives: nil, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
329
332
  command = make_simple_command(:get, 'changes', options)
330
333
  command.response_representation = Google::Apis::DriveV2::ChangeList::Representation
331
334
  command.response_class = Google::Apis::DriveV2::ChangeList
@@ -333,6 +336,7 @@ module Google
333
336
  command.query['includeCorpusRemovals'] = include_corpus_removals unless include_corpus_removals.nil?
334
337
  command.query['includeDeleted'] = include_deleted unless include_deleted.nil?
335
338
  command.query['includeItemsFromAllDrives'] = include_items_from_all_drives unless include_items_from_all_drives.nil?
339
+ command.query['includeLabels'] = include_labels unless include_labels.nil?
336
340
  command.query['includePermissionsForView'] = include_permissions_for_view unless include_permissions_for_view.nil?
337
341
  command.query['includeSubscribed'] = include_subscribed unless include_subscribed.nil?
338
342
  command.query['includeTeamDriveItems'] = include_team_drive_items unless include_team_drive_items.nil?
@@ -365,6 +369,9 @@ module Google
365
369
  # list of changes, for example by deletion or loss of access.
366
370
  # @param [Boolean] include_items_from_all_drives
367
371
  # Whether both My Drive and shared drive items should be included in results.
372
+ # @param [String] include_labels
373
+ # A comma-separated list of IDs of labels to include in the labelInfo part of
374
+ # the response.
368
375
  # @param [String] include_permissions_for_view
369
376
  # Specifies which additional view's permissions to include in the response. Only
370
377
  # 'published' is supported.
@@ -410,7 +417,7 @@ module Google
410
417
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
411
418
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
412
419
  # @raise [Google::Apis::AuthorizationError] Authorization is required
413
- def watch_change(channel_object = nil, drive_id: nil, include_corpus_removals: nil, include_deleted: nil, include_items_from_all_drives: nil, include_permissions_for_view: nil, include_subscribed: nil, include_team_drive_items: nil, max_results: nil, page_token: nil, spaces: nil, start_change_id: nil, supports_all_drives: nil, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
420
+ def watch_change(channel_object = nil, drive_id: nil, include_corpus_removals: nil, include_deleted: nil, include_items_from_all_drives: nil, include_labels: nil, include_permissions_for_view: nil, include_subscribed: nil, include_team_drive_items: nil, max_results: nil, page_token: nil, spaces: nil, start_change_id: nil, supports_all_drives: nil, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
414
421
  command = make_simple_command(:post, 'changes/watch', options)
415
422
  command.request_representation = Google::Apis::DriveV2::Channel::Representation
416
423
  command.request_object = channel_object
@@ -420,6 +427,7 @@ module Google
420
427
  command.query['includeCorpusRemovals'] = include_corpus_removals unless include_corpus_removals.nil?
421
428
  command.query['includeDeleted'] = include_deleted unless include_deleted.nil?
422
429
  command.query['includeItemsFromAllDrives'] = include_items_from_all_drives unless include_items_from_all_drives.nil?
430
+ command.query['includeLabels'] = include_labels unless include_labels.nil?
423
431
  command.query['includePermissionsForView'] = include_permissions_for_view unless include_permissions_for_view.nil?
424
432
  command.query['includeSubscribed'] = include_subscribed unless include_subscribed.nil?
425
433
  command.query['includeTeamDriveItems'] = include_team_drive_items unless include_team_drive_items.nil?
@@ -1153,6 +1161,9 @@ module Google
1153
1161
  # @param [Boolean] enforce_single_parent
1154
1162
  # Deprecated. Copying files into multiple folders is no longer supported. Use
1155
1163
  # shortcuts instead.
1164
+ # @param [String] include_labels
1165
+ # A comma-separated list of IDs of labels to include in the labelInfo part of
1166
+ # the response.
1156
1167
  # @param [String] include_permissions_for_view
1157
1168
  # Specifies which additional view's permissions to include in the response. Only
1158
1169
  # 'published' is supported.
@@ -1193,7 +1204,7 @@ module Google
1193
1204
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1194
1205
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1195
1206
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1196
- def copy_file(file_id, file_object = nil, convert: nil, enforce_single_parent: nil, include_permissions_for_view: nil, ocr: nil, ocr_language: nil, pinned: nil, supports_all_drives: nil, supports_team_drives: nil, timed_text_language: nil, timed_text_track_name: nil, visibility: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1207
+ def copy_file(file_id, file_object = nil, convert: nil, enforce_single_parent: nil, include_labels: nil, include_permissions_for_view: nil, ocr: nil, ocr_language: nil, pinned: nil, supports_all_drives: nil, supports_team_drives: nil, timed_text_language: nil, timed_text_track_name: nil, visibility: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1197
1208
  command = make_simple_command(:post, 'files/{fileId}/copy', options)
1198
1209
  command.request_representation = Google::Apis::DriveV2::File::Representation
1199
1210
  command.request_object = file_object
@@ -1202,6 +1213,7 @@ module Google
1202
1213
  command.params['fileId'] = file_id unless file_id.nil?
1203
1214
  command.query['convert'] = convert unless convert.nil?
1204
1215
  command.query['enforceSingleParent'] = enforce_single_parent unless enforce_single_parent.nil?
1216
+ command.query['includeLabels'] = include_labels unless include_labels.nil?
1205
1217
  command.query['includePermissionsForView'] = include_permissions_for_view unless include_permissions_for_view.nil?
1206
1218
  command.query['ocr'] = ocr unless ocr.nil?
1207
1219
  command.query['ocrLanguage'] = ocr_language unless ocr_language.nil?
@@ -1381,6 +1393,9 @@ module Google
1381
1393
  # @param [Boolean] acknowledge_abuse
1382
1394
  # Whether the user is acknowledging the risk of downloading known malware or
1383
1395
  # other abusive files.
1396
+ # @param [String] include_labels
1397
+ # A comma-separated list of IDs of labels to include in the labelInfo part of
1398
+ # the response.
1384
1399
  # @param [String] include_permissions_for_view
1385
1400
  # Specifies which additional view's permissions to include in the response. Only
1386
1401
  # 'published' is supported.
@@ -1417,7 +1432,7 @@ module Google
1417
1432
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1418
1433
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1419
1434
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1420
- def get_file(file_id, acknowledge_abuse: nil, include_permissions_for_view: nil, projection: nil, revision_id: nil, supports_all_drives: nil, supports_team_drives: nil, update_viewed_date: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block)
1435
+ def get_file(file_id, acknowledge_abuse: nil, include_labels: nil, include_permissions_for_view: nil, projection: nil, revision_id: nil, supports_all_drives: nil, supports_team_drives: nil, update_viewed_date: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block)
1421
1436
  if download_dest.nil?
1422
1437
  command = make_simple_command(:get, 'files/{fileId}', options)
1423
1438
  else
@@ -1428,6 +1443,7 @@ module Google
1428
1443
  command.response_class = Google::Apis::DriveV2::File
1429
1444
  command.params['fileId'] = file_id unless file_id.nil?
1430
1445
  command.query['acknowledgeAbuse'] = acknowledge_abuse unless acknowledge_abuse.nil?
1446
+ command.query['includeLabels'] = include_labels unless include_labels.nil?
1431
1447
  command.query['includePermissionsForView'] = include_permissions_for_view unless include_permissions_for_view.nil?
1432
1448
  command.query['projection'] = projection unless projection.nil?
1433
1449
  command.query['revisionId'] = revision_id unless revision_id.nil?
@@ -1446,6 +1462,9 @@ module Google
1446
1462
  # Whether to convert this file to the corresponding Docs Editors format.
1447
1463
  # @param [Boolean] enforce_single_parent
1448
1464
  # Deprecated. Creating files in multiple folders is no longer supported.
1465
+ # @param [String] include_labels
1466
+ # A comma-separated list of IDs of labels to include in the labelInfo part of
1467
+ # the response.
1449
1468
  # @param [String] include_permissions_for_view
1450
1469
  # Specifies which additional view's permissions to include in the response. Only
1451
1470
  # 'published' is supported.
@@ -1492,7 +1511,7 @@ module Google
1492
1511
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1493
1512
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1494
1513
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1495
- def insert_file(file_object = nil, convert: nil, enforce_single_parent: nil, include_permissions_for_view: nil, ocr: nil, ocr_language: nil, pinned: nil, supports_all_drives: nil, supports_team_drives: nil, timed_text_language: nil, timed_text_track_name: nil, use_content_as_indexable_text: nil, visibility: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block)
1514
+ def insert_file(file_object = nil, convert: nil, enforce_single_parent: nil, include_labels: nil, include_permissions_for_view: nil, ocr: nil, ocr_language: nil, pinned: nil, supports_all_drives: nil, supports_team_drives: nil, timed_text_language: nil, timed_text_track_name: nil, use_content_as_indexable_text: nil, visibility: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block)
1496
1515
  if upload_source.nil?
1497
1516
  command = make_simple_command(:post, 'files', options)
1498
1517
  else
@@ -1506,6 +1525,7 @@ module Google
1506
1525
  command.response_class = Google::Apis::DriveV2::File
1507
1526
  command.query['convert'] = convert unless convert.nil?
1508
1527
  command.query['enforceSingleParent'] = enforce_single_parent unless enforce_single_parent.nil?
1528
+ command.query['includeLabels'] = include_labels unless include_labels.nil?
1509
1529
  command.query['includePermissionsForView'] = include_permissions_for_view unless include_permissions_for_view.nil?
1510
1530
  command.query['ocr'] = ocr unless ocr.nil?
1511
1531
  command.query['ocrLanguage'] = ocr_language unless ocr_language.nil?
@@ -1537,6 +1557,9 @@ module Google
1537
1557
  # ID of the shared drive to search.
1538
1558
  # @param [Boolean] include_items_from_all_drives
1539
1559
  # Whether both My Drive and shared drive items should be included in results.
1560
+ # @param [String] include_labels
1561
+ # A comma-separated list of IDs of labels to include in the labelInfo part of
1562
+ # the response.
1540
1563
  # @param [String] include_permissions_for_view
1541
1564
  # Specifies which additional view's permissions to include in the response. Only
1542
1565
  # 'published' is supported.
@@ -1587,7 +1610,7 @@ module Google
1587
1610
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1588
1611
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1589
1612
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1590
- def list_files(corpora: nil, corpus: nil, drive_id: nil, include_items_from_all_drives: nil, include_permissions_for_view: nil, include_team_drive_items: nil, max_results: nil, order_by: nil, page_token: nil, projection: nil, q: nil, spaces: nil, supports_all_drives: nil, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1613
+ def list_files(corpora: nil, corpus: nil, drive_id: nil, include_items_from_all_drives: nil, include_labels: nil, include_permissions_for_view: nil, include_team_drive_items: nil, max_results: nil, order_by: nil, page_token: nil, projection: nil, q: nil, spaces: nil, supports_all_drives: nil, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1591
1614
  command = make_simple_command(:get, 'files', options)
1592
1615
  command.response_representation = Google::Apis::DriveV2::FileList::Representation
1593
1616
  command.response_class = Google::Apis::DriveV2::FileList
@@ -1595,6 +1618,7 @@ module Google
1595
1618
  command.query['corpus'] = corpus unless corpus.nil?
1596
1619
  command.query['driveId'] = drive_id unless drive_id.nil?
1597
1620
  command.query['includeItemsFromAllDrives'] = include_items_from_all_drives unless include_items_from_all_drives.nil?
1621
+ command.query['includeLabels'] = include_labels unless include_labels.nil?
1598
1622
  command.query['includePermissionsForView'] = include_permissions_for_view unless include_permissions_for_view.nil?
1599
1623
  command.query['includeTeamDriveItems'] = include_team_drive_items unless include_team_drive_items.nil?
1600
1624
  command.query['maxResults'] = max_results unless max_results.nil?
@@ -1612,6 +1636,83 @@ module Google
1612
1636
  execute_or_queue_command(command, &block)
1613
1637
  end
1614
1638
 
1639
+ # Lists the labels on a file.
1640
+ # @param [String] file_id
1641
+ # The ID of the file.
1642
+ # @param [Fixnum] max_results
1643
+ # The maximum number of labels to return per page. When not set, this defaults
1644
+ # to 100.
1645
+ # @param [String] page_token
1646
+ # The token for continuing a previous list request on the next page. This should
1647
+ # be set to the value of 'nextPageToken' from the previous response.
1648
+ # @param [String] fields
1649
+ # Selector specifying which fields to include in a partial response.
1650
+ # @param [String] quota_user
1651
+ # An opaque string that represents a user for quota purposes. Must not exceed 40
1652
+ # characters.
1653
+ # @param [String] user_ip
1654
+ # Deprecated. Please use quotaUser instead.
1655
+ # @param [Google::Apis::RequestOptions] options
1656
+ # Request-specific options
1657
+ #
1658
+ # @yield [result, err] Result & error if block supplied
1659
+ # @yieldparam result [Google::Apis::DriveV2::LabelList] parsed result object
1660
+ # @yieldparam err [StandardError] error object if request failed
1661
+ #
1662
+ # @return [Google::Apis::DriveV2::LabelList]
1663
+ #
1664
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1665
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1666
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1667
+ def list_file_labels(file_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1668
+ command = make_simple_command(:get, 'files/{fileId}/listLabels', options)
1669
+ command.response_representation = Google::Apis::DriveV2::LabelList::Representation
1670
+ command.response_class = Google::Apis::DriveV2::LabelList
1671
+ command.params['fileId'] = file_id unless file_id.nil?
1672
+ command.query['maxResults'] = max_results unless max_results.nil?
1673
+ command.query['pageToken'] = page_token unless page_token.nil?
1674
+ command.query['fields'] = fields unless fields.nil?
1675
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1676
+ command.query['userIp'] = user_ip unless user_ip.nil?
1677
+ execute_or_queue_command(command, &block)
1678
+ end
1679
+
1680
+ # Modifies the set of labels on a file.
1681
+ # @param [String] file_id
1682
+ # The ID of the file for which the labels are modified.
1683
+ # @param [Google::Apis::DriveV2::ModifyLabelsRequest] modify_labels_request_object
1684
+ # @param [String] fields
1685
+ # Selector specifying which fields to include in a partial response.
1686
+ # @param [String] quota_user
1687
+ # An opaque string that represents a user for quota purposes. Must not exceed 40
1688
+ # characters.
1689
+ # @param [String] user_ip
1690
+ # Deprecated. Please use quotaUser instead.
1691
+ # @param [Google::Apis::RequestOptions] options
1692
+ # Request-specific options
1693
+ #
1694
+ # @yield [result, err] Result & error if block supplied
1695
+ # @yieldparam result [Google::Apis::DriveV2::ModifyLabelsResponse] parsed result object
1696
+ # @yieldparam err [StandardError] error object if request failed
1697
+ #
1698
+ # @return [Google::Apis::DriveV2::ModifyLabelsResponse]
1699
+ #
1700
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1701
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1702
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1703
+ def modify_file_labels(file_id, modify_labels_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1704
+ command = make_simple_command(:post, 'files/{fileId}/modifyLabels', options)
1705
+ command.request_representation = Google::Apis::DriveV2::ModifyLabelsRequest::Representation
1706
+ command.request_object = modify_labels_request_object
1707
+ command.response_representation = Google::Apis::DriveV2::ModifyLabelsResponse::Representation
1708
+ command.response_class = Google::Apis::DriveV2::ModifyLabelsResponse
1709
+ command.params['fileId'] = file_id unless file_id.nil?
1710
+ command.query['fields'] = fields unless fields.nil?
1711
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1712
+ command.query['userIp'] = user_ip unless user_ip.nil?
1713
+ execute_or_queue_command(command, &block)
1714
+ end
1715
+
1615
1716
  # Updates a file's metadata and/or content. When calling this method, only
1616
1717
  # populate fields in the request that you want to modify. When updating fields,
1617
1718
  # some fields might change automatically, such as modifiedDate. This method
@@ -1626,6 +1727,9 @@ module Google
1626
1727
  # @param [Boolean] enforce_single_parent
1627
1728
  # Deprecated. Adding files to multiple folders is no longer supported. Use
1628
1729
  # shortcuts instead.
1730
+ # @param [String] include_labels
1731
+ # A comma-separated list of IDs of labels to include in the labelInfo part of
1732
+ # the response.
1629
1733
  # @param [String] include_permissions_for_view
1630
1734
  # Specifies which additional view's permissions to include in the response. Only
1631
1735
  # 'published' is supported.
@@ -1686,7 +1790,7 @@ module Google
1686
1790
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1687
1791
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1688
1792
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1689
- def patch_file(file_id, file_object = nil, add_parents: nil, convert: nil, enforce_single_parent: nil, include_permissions_for_view: nil, modified_date_behavior: nil, new_revision: nil, ocr: nil, ocr_language: nil, pinned: nil, remove_parents: nil, set_modified_date: nil, supports_all_drives: nil, supports_team_drives: nil, timed_text_language: nil, timed_text_track_name: nil, update_viewed_date: nil, use_content_as_indexable_text: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1793
+ def patch_file(file_id, file_object = nil, add_parents: nil, convert: nil, enforce_single_parent: nil, include_labels: nil, include_permissions_for_view: nil, modified_date_behavior: nil, new_revision: nil, ocr: nil, ocr_language: nil, pinned: nil, remove_parents: nil, set_modified_date: nil, supports_all_drives: nil, supports_team_drives: nil, timed_text_language: nil, timed_text_track_name: nil, update_viewed_date: nil, use_content_as_indexable_text: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1690
1794
  command = make_simple_command(:patch, 'files/{fileId}', options)
1691
1795
  command.request_representation = Google::Apis::DriveV2::File::Representation
1692
1796
  command.request_object = file_object
@@ -1696,6 +1800,7 @@ module Google
1696
1800
  command.query['addParents'] = add_parents unless add_parents.nil?
1697
1801
  command.query['convert'] = convert unless convert.nil?
1698
1802
  command.query['enforceSingleParent'] = enforce_single_parent unless enforce_single_parent.nil?
1803
+ command.query['includeLabels'] = include_labels unless include_labels.nil?
1699
1804
  command.query['includePermissionsForView'] = include_permissions_for_view unless include_permissions_for_view.nil?
1700
1805
  command.query['modifiedDateBehavior'] = modified_date_behavior unless modified_date_behavior.nil?
1701
1806
  command.query['newRevision'] = new_revision unless new_revision.nil?
@@ -1719,6 +1824,9 @@ module Google
1719
1824
  # Set the file's updated time to the current server time.
1720
1825
  # @param [String] file_id
1721
1826
  # The ID of the file to update.
1827
+ # @param [String] include_labels
1828
+ # A comma-separated list of IDs of labels to include in the labelInfo part of
1829
+ # the response.
1722
1830
  # @param [String] include_permissions_for_view
1723
1831
  # Specifies which additional view's permissions to include in the response. Only
1724
1832
  # 'published' is supported.
@@ -1745,11 +1853,12 @@ module Google
1745
1853
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1746
1854
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1747
1855
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1748
- def touch_file(file_id, include_permissions_for_view: nil, supports_all_drives: nil, supports_team_drives: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1856
+ def touch_file(file_id, include_labels: nil, include_permissions_for_view: nil, supports_all_drives: nil, supports_team_drives: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1749
1857
  command = make_simple_command(:post, 'files/{fileId}/touch', options)
1750
1858
  command.response_representation = Google::Apis::DriveV2::File::Representation
1751
1859
  command.response_class = Google::Apis::DriveV2::File
1752
1860
  command.params['fileId'] = file_id unless file_id.nil?
1861
+ command.query['includeLabels'] = include_labels unless include_labels.nil?
1753
1862
  command.query['includePermissionsForView'] = include_permissions_for_view unless include_permissions_for_view.nil?
1754
1863
  command.query['supportsAllDrives'] = supports_all_drives unless supports_all_drives.nil?
1755
1864
  command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
@@ -1767,6 +1876,9 @@ module Google
1767
1876
  # All users with access can copy, download, export, and share the file.
1768
1877
  # @param [String] file_id
1769
1878
  # The ID of the file to trash.
1879
+ # @param [String] include_labels
1880
+ # A comma-separated list of IDs of labels to include in the labelInfo part of
1881
+ # the response.
1770
1882
  # @param [String] include_permissions_for_view
1771
1883
  # Specifies which additional view's permissions to include in the response. Only
1772
1884
  # 'published' is supported.
@@ -1793,11 +1905,12 @@ module Google
1793
1905
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1794
1906
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1795
1907
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1796
- def trash_file(file_id, include_permissions_for_view: nil, supports_all_drives: nil, supports_team_drives: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1908
+ def trash_file(file_id, include_labels: nil, include_permissions_for_view: nil, supports_all_drives: nil, supports_team_drives: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1797
1909
  command = make_simple_command(:post, 'files/{fileId}/trash', options)
1798
1910
  command.response_representation = Google::Apis::DriveV2::File::Representation
1799
1911
  command.response_class = Google::Apis::DriveV2::File
1800
1912
  command.params['fileId'] = file_id unless file_id.nil?
1913
+ command.query['includeLabels'] = include_labels unless include_labels.nil?
1801
1914
  command.query['includePermissionsForView'] = include_permissions_for_view unless include_permissions_for_view.nil?
1802
1915
  command.query['supportsAllDrives'] = supports_all_drives unless supports_all_drives.nil?
1803
1916
  command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
@@ -1812,6 +1925,9 @@ module Google
1812
1925
  # the owner may untrash a file.
1813
1926
  # @param [String] file_id
1814
1927
  # The ID of the file to untrash.
1928
+ # @param [String] include_labels
1929
+ # A comma-separated list of IDs of labels to include in the labelInfo part of
1930
+ # the response.
1815
1931
  # @param [String] include_permissions_for_view
1816
1932
  # Specifies which additional view's permissions to include in the response. Only
1817
1933
  # 'published' is supported.
@@ -1838,11 +1954,12 @@ module Google
1838
1954
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1839
1955
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1840
1956
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1841
- def untrash_file(file_id, include_permissions_for_view: nil, supports_all_drives: nil, supports_team_drives: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1957
+ def untrash_file(file_id, include_labels: nil, include_permissions_for_view: nil, supports_all_drives: nil, supports_team_drives: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1842
1958
  command = make_simple_command(:post, 'files/{fileId}/untrash', options)
1843
1959
  command.response_representation = Google::Apis::DriveV2::File::Representation
1844
1960
  command.response_class = Google::Apis::DriveV2::File
1845
1961
  command.params['fileId'] = file_id unless file_id.nil?
1962
+ command.query['includeLabels'] = include_labels unless include_labels.nil?
1846
1963
  command.query['includePermissionsForView'] = include_permissions_for_view unless include_permissions_for_view.nil?
1847
1964
  command.query['supportsAllDrives'] = supports_all_drives unless supports_all_drives.nil?
1848
1965
  command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
@@ -1866,6 +1983,9 @@ module Google
1866
1983
  # @param [Boolean] enforce_single_parent
1867
1984
  # Deprecated. Adding files to multiple folders is no longer supported. Use
1868
1985
  # shortcuts instead.
1986
+ # @param [String] include_labels
1987
+ # A comma-separated list of IDs of labels to include in the labelInfo part of
1988
+ # the response.
1869
1989
  # @param [String] include_permissions_for_view
1870
1990
  # Specifies which additional view's permissions to include in the response. Only
1871
1991
  # 'published' is supported.
@@ -1930,7 +2050,7 @@ module Google
1930
2050
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1931
2051
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1932
2052
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1933
- def update_file(file_id, file_object = nil, add_parents: nil, convert: nil, enforce_single_parent: nil, include_permissions_for_view: nil, modified_date_behavior: nil, new_revision: nil, ocr: nil, ocr_language: nil, pinned: nil, remove_parents: nil, set_modified_date: nil, supports_all_drives: nil, supports_team_drives: nil, timed_text_language: nil, timed_text_track_name: nil, update_viewed_date: nil, use_content_as_indexable_text: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block)
2053
+ def update_file(file_id, file_object = nil, add_parents: nil, convert: nil, enforce_single_parent: nil, include_labels: nil, include_permissions_for_view: nil, modified_date_behavior: nil, new_revision: nil, ocr: nil, ocr_language: nil, pinned: nil, remove_parents: nil, set_modified_date: nil, supports_all_drives: nil, supports_team_drives: nil, timed_text_language: nil, timed_text_track_name: nil, update_viewed_date: nil, use_content_as_indexable_text: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block)
1934
2054
  if upload_source.nil?
1935
2055
  command = make_simple_command(:put, 'files/{fileId}', options)
1936
2056
  else
@@ -1946,6 +2066,7 @@ module Google
1946
2066
  command.query['addParents'] = add_parents unless add_parents.nil?
1947
2067
  command.query['convert'] = convert unless convert.nil?
1948
2068
  command.query['enforceSingleParent'] = enforce_single_parent unless enforce_single_parent.nil?
2069
+ command.query['includeLabels'] = include_labels unless include_labels.nil?
1949
2070
  command.query['includePermissionsForView'] = include_permissions_for_view unless include_permissions_for_view.nil?
1950
2071
  command.query['modifiedDateBehavior'] = modified_date_behavior unless modified_date_behavior.nil?
1951
2072
  command.query['newRevision'] = new_revision unless new_revision.nil?
@@ -1975,6 +2096,9 @@ module Google
1975
2096
  # @param [Boolean] acknowledge_abuse
1976
2097
  # Whether the user is acknowledging the risk of downloading known malware or
1977
2098
  # other abusive files.
2099
+ # @param [String] include_labels
2100
+ # A comma-separated list of IDs of labels to include in the labelInfo part of
2101
+ # the response.
1978
2102
  # @param [String] include_permissions_for_view
1979
2103
  # Specifies which additional view's permissions to include in the response. Only
1980
2104
  # 'published' is supported.
@@ -2011,7 +2135,7 @@ module Google
2011
2135
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2012
2136
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2013
2137
  # @raise [Google::Apis::AuthorizationError] Authorization is required
2014
- def watch_file(file_id, channel_object = nil, acknowledge_abuse: nil, include_permissions_for_view: nil, projection: nil, revision_id: nil, supports_all_drives: nil, supports_team_drives: nil, update_viewed_date: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block)
2138
+ def watch_file(file_id, channel_object = nil, acknowledge_abuse: nil, include_labels: nil, include_permissions_for_view: nil, projection: nil, revision_id: nil, supports_all_drives: nil, supports_team_drives: nil, update_viewed_date: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block)
2015
2139
  if download_dest.nil?
2016
2140
  command = make_simple_command(:post, 'files/{fileId}/watch', options)
2017
2141
  else
@@ -2024,6 +2148,7 @@ module Google
2024
2148
  command.response_class = Google::Apis::DriveV2::Channel
2025
2149
  command.params['fileId'] = file_id unless file_id.nil?
2026
2150
  command.query['acknowledgeAbuse'] = acknowledge_abuse unless acknowledge_abuse.nil?
2151
+ command.query['includeLabels'] = include_labels unless include_labels.nil?
2027
2152
  command.query['includePermissionsForView'] = include_permissions_for_view unless include_permissions_for_view.nil?
2028
2153
  command.query['projection'] = projection unless projection.nil?
2029
2154
  command.query['revisionId'] = revision_id unless revision_id.nil?
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.24.0
4
+ version: 0.27.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: 2022-06-20 00:00:00.000000000 Z
11
+ date: 2022-08-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-apis-core
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '0.6'
19
+ version: '0.7'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: 2.a
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: '0.6'
29
+ version: '0.7'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a
@@ -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.24.0
61
+ documentation_uri: https://googleapis.dev/ruby/google-apis-drive_v2/v0.27.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: []