google-apis-drivelabels_v2 0.5.0 → 0.7.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.
@@ -49,6 +49,195 @@ module Google
49
49
  @batch_path = 'batch'
50
50
  end
51
51
 
52
+ # Creates a new Label.
53
+ # @param [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2Label] google_apps_drive_labels_v2_label_object
54
+ # @param [String] language_code
55
+ # The BCP-47 language code to use for evaluating localized Field labels in
56
+ # response. When not specified, values in the default configured language will
57
+ # be used.
58
+ # @param [Boolean] use_admin_access
59
+ # Set to `true` in order to use the user's admin privileges. The server will
60
+ # verify the user is an admin before allowing access.
61
+ # @param [String] fields
62
+ # Selector specifying which fields to include in a partial response.
63
+ # @param [String] quota_user
64
+ # Available to use for quota purposes for server-side applications. Can be any
65
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
66
+ # @param [Google::Apis::RequestOptions] options
67
+ # Request-specific options
68
+ #
69
+ # @yield [result, err] Result & error if block supplied
70
+ # @yieldparam result [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2Label] parsed result object
71
+ # @yieldparam err [StandardError] error object if request failed
72
+ #
73
+ # @return [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2Label]
74
+ #
75
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
76
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
77
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
78
+ def create_label(google_apps_drive_labels_v2_label_object = nil, language_code: nil, use_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block)
79
+ command = make_simple_command(:post, 'v2/labels', options)
80
+ command.request_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2Label::Representation
81
+ command.request_object = google_apps_drive_labels_v2_label_object
82
+ command.response_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2Label::Representation
83
+ command.response_class = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2Label
84
+ command.query['languageCode'] = language_code unless language_code.nil?
85
+ command.query['useAdminAccess'] = use_admin_access unless use_admin_access.nil?
86
+ command.query['fields'] = fields unless fields.nil?
87
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
88
+ execute_or_queue_command(command, &block)
89
+ end
90
+
91
+ # Permanently deletes a Label and related metadata on Drive Items. Once deleted,
92
+ # the Label and related Drive item metadata will be deleted. Only draft Labels,
93
+ # and disabled Labels may be deleted.
94
+ # @param [String] name
95
+ # Required. Label resource name.
96
+ # @param [Boolean] use_admin_access
97
+ # Set to `true` in order to use the user's admin credentials. The server will
98
+ # verify the user is an admin for the Label before allowing access.
99
+ # @param [String] write_control_required_revision_id
100
+ # The revision_id of the label that the write request will be applied to. If
101
+ # this is not the latest revision of the label, the request will not be
102
+ # processed and will return a 400 Bad Request error.
103
+ # @param [String] fields
104
+ # Selector specifying which fields to include in a partial response.
105
+ # @param [String] quota_user
106
+ # Available to use for quota purposes for server-side applications. Can be any
107
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
108
+ # @param [Google::Apis::RequestOptions] options
109
+ # Request-specific options
110
+ #
111
+ # @yield [result, err] Result & error if block supplied
112
+ # @yieldparam result [Google::Apis::DrivelabelsV2::GoogleProtobufEmpty] parsed result object
113
+ # @yieldparam err [StandardError] error object if request failed
114
+ #
115
+ # @return [Google::Apis::DrivelabelsV2::GoogleProtobufEmpty]
116
+ #
117
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
118
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
119
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
120
+ def delete_label(name, use_admin_access: nil, write_control_required_revision_id: nil, fields: nil, quota_user: nil, options: nil, &block)
121
+ command = make_simple_command(:delete, 'v2/{+name}', options)
122
+ command.response_representation = Google::Apis::DrivelabelsV2::GoogleProtobufEmpty::Representation
123
+ command.response_class = Google::Apis::DrivelabelsV2::GoogleProtobufEmpty
124
+ command.params['name'] = name unless name.nil?
125
+ command.query['useAdminAccess'] = use_admin_access unless use_admin_access.nil?
126
+ command.query['writeControl.requiredRevisionId'] = write_control_required_revision_id unless write_control_required_revision_id.nil?
127
+ command.query['fields'] = fields unless fields.nil?
128
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
129
+ execute_or_queue_command(command, &block)
130
+ end
131
+
132
+ # Updates a single Label by applying a set of update requests resulting in a new
133
+ # draft revision. The batch update is all-or-nothing: If any of the update
134
+ # requests are invalid, no changes are applied. The resulting draft revision
135
+ # must be published before the changes may be used with Drive Items.
136
+ # @param [String] name
137
+ # Required. The resource name of the Label to update.
138
+ # @param [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2DeltaUpdateLabelRequest] google_apps_drive_labels_v2_delta_update_label_request_object
139
+ # @param [String] fields
140
+ # Selector specifying which fields to include in a partial response.
141
+ # @param [String] quota_user
142
+ # Available to use for quota purposes for server-side applications. Can be any
143
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
144
+ # @param [Google::Apis::RequestOptions] options
145
+ # Request-specific options
146
+ #
147
+ # @yield [result, err] Result & error if block supplied
148
+ # @yieldparam result [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2DeltaUpdateLabelResponse] parsed result object
149
+ # @yieldparam err [StandardError] error object if request failed
150
+ #
151
+ # @return [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2DeltaUpdateLabelResponse]
152
+ #
153
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
154
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
155
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
156
+ def delta_label(name, google_apps_drive_labels_v2_delta_update_label_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
157
+ command = make_simple_command(:post, 'v2/{+name}:delta', options)
158
+ command.request_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2DeltaUpdateLabelRequest::Representation
159
+ command.request_object = google_apps_drive_labels_v2_delta_update_label_request_object
160
+ command.response_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2DeltaUpdateLabelResponse::Representation
161
+ command.response_class = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2DeltaUpdateLabelResponse
162
+ command.params['name'] = name unless name.nil?
163
+ command.query['fields'] = fields unless fields.nil?
164
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
165
+ execute_or_queue_command(command, &block)
166
+ end
167
+
168
+ # Disable a published Label. Disabling a Label will result in a new disabled
169
+ # published revision based on the current published revision. If there is a
170
+ # draft revision, a new disabled draft revision will be created based on the
171
+ # latest draft revision. Older draft revisions will be deleted. Once disabled, a
172
+ # label may be deleted with `DeleteLabel`.
173
+ # @param [String] name
174
+ # Required. Label resource name.
175
+ # @param [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2DisableLabelRequest] google_apps_drive_labels_v2_disable_label_request_object
176
+ # @param [String] fields
177
+ # Selector specifying which fields to include in a partial response.
178
+ # @param [String] quota_user
179
+ # Available to use for quota purposes for server-side applications. Can be any
180
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
181
+ # @param [Google::Apis::RequestOptions] options
182
+ # Request-specific options
183
+ #
184
+ # @yield [result, err] Result & error if block supplied
185
+ # @yieldparam result [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2Label] parsed result object
186
+ # @yieldparam err [StandardError] error object if request failed
187
+ #
188
+ # @return [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2Label]
189
+ #
190
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
191
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
192
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
193
+ def disable_label(name, google_apps_drive_labels_v2_disable_label_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
194
+ command = make_simple_command(:post, 'v2/{+name}:disable', options)
195
+ command.request_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2DisableLabelRequest::Representation
196
+ command.request_object = google_apps_drive_labels_v2_disable_label_request_object
197
+ command.response_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2Label::Representation
198
+ command.response_class = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2Label
199
+ command.params['name'] = name unless name.nil?
200
+ command.query['fields'] = fields unless fields.nil?
201
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
202
+ execute_or_queue_command(command, &block)
203
+ end
204
+
205
+ # Enable a disabled Label and restore it to its published state. This will
206
+ # result in a new published revision based on the current disabled published
207
+ # revision. If there is an existing disabled draft revision, a new revision will
208
+ # be created based on that draft and will be enabled.
209
+ # @param [String] name
210
+ # Required. Label resource name.
211
+ # @param [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2EnableLabelRequest] google_apps_drive_labels_v2_enable_label_request_object
212
+ # @param [String] fields
213
+ # Selector specifying which fields to include in a partial response.
214
+ # @param [String] quota_user
215
+ # Available to use for quota purposes for server-side applications. Can be any
216
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
217
+ # @param [Google::Apis::RequestOptions] options
218
+ # Request-specific options
219
+ #
220
+ # @yield [result, err] Result & error if block supplied
221
+ # @yieldparam result [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2Label] parsed result object
222
+ # @yieldparam err [StandardError] error object if request failed
223
+ #
224
+ # @return [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2Label]
225
+ #
226
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
227
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
228
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
229
+ def enable_label(name, google_apps_drive_labels_v2_enable_label_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
230
+ command = make_simple_command(:post, 'v2/{+name}:enable', options)
231
+ command.request_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2EnableLabelRequest::Representation
232
+ command.request_object = google_apps_drive_labels_v2_enable_label_request_object
233
+ command.response_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2Label::Representation
234
+ command.response_class = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2Label
235
+ command.params['name'] = name unless name.nil?
236
+ command.query['fields'] = fields unless fields.nil?
237
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
238
+ execute_or_queue_command(command, &block)
239
+ end
240
+
52
241
  # Get a label by its resource name. Resource name may be any of: * `labels/`id``
53
242
  # - See `labels/`id`@latest` * `labels/`id`@latest` - Gets the latest revision
54
243
  # of the label. * `labels/`id`@published` - Gets the current published revision
@@ -153,6 +342,680 @@ module Google
153
342
  command.query['quotaUser'] = quota_user unless quota_user.nil?
154
343
  execute_or_queue_command(command, &block)
155
344
  end
345
+
346
+ # Publish all draft changes to the Label. Once published, the Label may not
347
+ # return to its draft state. See `google.apps.drive.labels.v2.Lifecycle` for
348
+ # more information. Publishing a Label will result in a new published revision.
349
+ # All previous draft revisions will be deleted. Previous published revisions
350
+ # will be kept but are subject to automated deletion as needed. Once published,
351
+ # some changes are no longer permitted. Generally, any change that would
352
+ # invalidate or cause new restrictions on existing metadata related to the Label
353
+ # will be rejected. For example, the following changes to a Label will be
354
+ # rejected after the Label is published: * The label cannot be directly deleted.
355
+ # It must be disabled first, then deleted. * Field.FieldType cannot be changed. *
356
+ # Changes to Field validation options cannot reject something that was
357
+ # previously accepted. * Reducing the max entries.
358
+ # @param [String] name
359
+ # Required. Label resource name.
360
+ # @param [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2PublishLabelRequest] google_apps_drive_labels_v2_publish_label_request_object
361
+ # @param [String] fields
362
+ # Selector specifying which fields to include in a partial response.
363
+ # @param [String] quota_user
364
+ # Available to use for quota purposes for server-side applications. Can be any
365
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
366
+ # @param [Google::Apis::RequestOptions] options
367
+ # Request-specific options
368
+ #
369
+ # @yield [result, err] Result & error if block supplied
370
+ # @yieldparam result [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2Label] parsed result object
371
+ # @yieldparam err [StandardError] error object if request failed
372
+ #
373
+ # @return [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2Label]
374
+ #
375
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
376
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
377
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
378
+ def publish_label(name, google_apps_drive_labels_v2_publish_label_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
379
+ command = make_simple_command(:post, 'v2/{+name}:publish', options)
380
+ command.request_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2PublishLabelRequest::Representation
381
+ command.request_object = google_apps_drive_labels_v2_publish_label_request_object
382
+ command.response_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2Label::Representation
383
+ command.response_class = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2Label
384
+ command.params['name'] = name unless name.nil?
385
+ command.query['fields'] = fields unless fields.nil?
386
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
387
+ execute_or_queue_command(command, &block)
388
+ end
389
+
390
+ # Updates a Label's `CopyMode`. Changes to this policy are not revisioned, do
391
+ # not require publishing, and take effect immediately.
392
+ # @param [String] name
393
+ # Required. The resource name of the Label to update.
394
+ # @param [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2UpdateLabelCopyModeRequest] google_apps_drive_labels_v2_update_label_copy_mode_request_object
395
+ # @param [String] fields
396
+ # Selector specifying which fields to include in a partial response.
397
+ # @param [String] quota_user
398
+ # Available to use for quota purposes for server-side applications. Can be any
399
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
400
+ # @param [Google::Apis::RequestOptions] options
401
+ # Request-specific options
402
+ #
403
+ # @yield [result, err] Result & error if block supplied
404
+ # @yieldparam result [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2Label] parsed result object
405
+ # @yieldparam err [StandardError] error object if request failed
406
+ #
407
+ # @return [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2Label]
408
+ #
409
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
410
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
411
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
412
+ def update_label_label_copy_mode(name, google_apps_drive_labels_v2_update_label_copy_mode_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
413
+ command = make_simple_command(:post, 'v2/{+name}:updateLabelCopyMode', options)
414
+ command.request_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2UpdateLabelCopyModeRequest::Representation
415
+ command.request_object = google_apps_drive_labels_v2_update_label_copy_mode_request_object
416
+ command.response_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2Label::Representation
417
+ command.response_class = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2Label
418
+ command.params['name'] = name unless name.nil?
419
+ command.query['fields'] = fields unless fields.nil?
420
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
421
+ execute_or_queue_command(command, &block)
422
+ end
423
+
424
+ # Updates a Label's permissions. If a permission for the indicated principal
425
+ # doesn't exist, a new Label Permission is created, otherwise the existing
426
+ # permission is updated. Permissions affect the Label resource as a whole, are
427
+ # not revisioned, and do not require publishing.
428
+ # @param [String] parent
429
+ # Required. The parent Label resource name.
430
+ # @param [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2LabelPermission] google_apps_drive_labels_v2_label_permission_object
431
+ # @param [Boolean] use_admin_access
432
+ # Set to `true` in order to use the user's admin credentials. The server will
433
+ # verify the user is an admin for the Label before allowing access.
434
+ # @param [String] fields
435
+ # Selector specifying which fields to include in a partial response.
436
+ # @param [String] quota_user
437
+ # Available to use for quota purposes for server-side applications. Can be any
438
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
439
+ # @param [Google::Apis::RequestOptions] options
440
+ # Request-specific options
441
+ #
442
+ # @yield [result, err] Result & error if block supplied
443
+ # @yieldparam result [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2LabelPermission] parsed result object
444
+ # @yieldparam err [StandardError] error object if request failed
445
+ #
446
+ # @return [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2LabelPermission]
447
+ #
448
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
449
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
450
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
451
+ def update_label_permissions(parent, google_apps_drive_labels_v2_label_permission_object = nil, use_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block)
452
+ command = make_simple_command(:patch, 'v2/{+parent}/permissions', options)
453
+ command.request_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2LabelPermission::Representation
454
+ command.request_object = google_apps_drive_labels_v2_label_permission_object
455
+ command.response_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2LabelPermission::Representation
456
+ command.response_class = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2LabelPermission
457
+ command.params['parent'] = parent unless parent.nil?
458
+ command.query['useAdminAccess'] = use_admin_access unless use_admin_access.nil?
459
+ command.query['fields'] = fields unless fields.nil?
460
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
461
+ execute_or_queue_command(command, &block)
462
+ end
463
+
464
+ # Lists the LabelLocks on a Label.
465
+ # @param [String] parent
466
+ # Required. Label on which Locks are applied. Format: labels/`label`
467
+ # @param [Fixnum] page_size
468
+ # Maximum number of Locks to return per page. Default: 100. Max: 200.
469
+ # @param [String] page_token
470
+ # The token of the page to return.
471
+ # @param [String] fields
472
+ # Selector specifying which fields to include in a partial response.
473
+ # @param [String] quota_user
474
+ # Available to use for quota purposes for server-side applications. Can be any
475
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
476
+ # @param [Google::Apis::RequestOptions] options
477
+ # Request-specific options
478
+ #
479
+ # @yield [result, err] Result & error if block supplied
480
+ # @yieldparam result [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2ListLabelLocksResponse] parsed result object
481
+ # @yieldparam err [StandardError] error object if request failed
482
+ #
483
+ # @return [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2ListLabelLocksResponse]
484
+ #
485
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
486
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
487
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
488
+ def list_label_locks(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
489
+ command = make_simple_command(:get, 'v2/{+parent}/locks', options)
490
+ command.response_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2ListLabelLocksResponse::Representation
491
+ command.response_class = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2ListLabelLocksResponse
492
+ command.params['parent'] = parent unless parent.nil?
493
+ command.query['pageSize'] = page_size unless page_size.nil?
494
+ command.query['pageToken'] = page_token unless page_token.nil?
495
+ command.query['fields'] = fields unless fields.nil?
496
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
497
+ execute_or_queue_command(command, &block)
498
+ end
499
+
500
+ # Deletes Label permissions. Permissions affect the Label resource as a whole,
501
+ # are not revisioned, and do not require publishing.
502
+ # @param [String] parent
503
+ # Required. The parent Label resource name shared by all permissions being
504
+ # deleted. Format: labels/`label` If this is set, the parent field in the
505
+ # UpdateLabelPermissionRequest messages must either be empty or match this field.
506
+ # @param [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2BatchDeleteLabelPermissionsRequest] google_apps_drive_labels_v2_batch_delete_label_permissions_request_object
507
+ # @param [String] fields
508
+ # Selector specifying which fields to include in a partial response.
509
+ # @param [String] quota_user
510
+ # Available to use for quota purposes for server-side applications. Can be any
511
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
512
+ # @param [Google::Apis::RequestOptions] options
513
+ # Request-specific options
514
+ #
515
+ # @yield [result, err] Result & error if block supplied
516
+ # @yieldparam result [Google::Apis::DrivelabelsV2::GoogleProtobufEmpty] parsed result object
517
+ # @yieldparam err [StandardError] error object if request failed
518
+ #
519
+ # @return [Google::Apis::DrivelabelsV2::GoogleProtobufEmpty]
520
+ #
521
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
522
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
523
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
524
+ def batch_label_permission_delete(parent, google_apps_drive_labels_v2_batch_delete_label_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
525
+ command = make_simple_command(:post, 'v2/{+parent}/permissions:batchDelete', options)
526
+ command.request_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2BatchDeleteLabelPermissionsRequest::Representation
527
+ command.request_object = google_apps_drive_labels_v2_batch_delete_label_permissions_request_object
528
+ command.response_representation = Google::Apis::DrivelabelsV2::GoogleProtobufEmpty::Representation
529
+ command.response_class = Google::Apis::DrivelabelsV2::GoogleProtobufEmpty
530
+ command.params['parent'] = parent unless parent.nil?
531
+ command.query['fields'] = fields unless fields.nil?
532
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
533
+ execute_or_queue_command(command, &block)
534
+ end
535
+
536
+ # Updates Label permissions. If a permission for the indicated principal doesn't
537
+ # exist, a new Label Permission is created, otherwise the existing permission is
538
+ # updated. Permissions affect the Label resource as a whole, are not revisioned,
539
+ # and do not require publishing.
540
+ # @param [String] parent
541
+ # Required. The parent Label resource name shared by all permissions being
542
+ # updated. Format: labels/`label` If this is set, the parent field in the
543
+ # UpdateLabelPermissionRequest messages must either be empty or match this field.
544
+ # @param [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsRequest] google_apps_drive_labels_v2_batch_update_label_permissions_request_object
545
+ # @param [String] fields
546
+ # Selector specifying which fields to include in a partial response.
547
+ # @param [String] quota_user
548
+ # Available to use for quota purposes for server-side applications. Can be any
549
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
550
+ # @param [Google::Apis::RequestOptions] options
551
+ # Request-specific options
552
+ #
553
+ # @yield [result, err] Result & error if block supplied
554
+ # @yieldparam result [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsResponse] parsed result object
555
+ # @yieldparam err [StandardError] error object if request failed
556
+ #
557
+ # @return [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsResponse]
558
+ #
559
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
560
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
561
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
562
+ def batch_label_permission_update(parent, google_apps_drive_labels_v2_batch_update_label_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
563
+ command = make_simple_command(:post, 'v2/{+parent}/permissions:batchUpdate', options)
564
+ command.request_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsRequest::Representation
565
+ command.request_object = google_apps_drive_labels_v2_batch_update_label_permissions_request_object
566
+ command.response_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsResponse::Representation
567
+ command.response_class = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsResponse
568
+ command.params['parent'] = parent unless parent.nil?
569
+ command.query['fields'] = fields unless fields.nil?
570
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
571
+ execute_or_queue_command(command, &block)
572
+ end
573
+
574
+ # Updates a Label's permissions. If a permission for the indicated principal
575
+ # doesn't exist, a new Label Permission is created, otherwise the existing
576
+ # permission is updated. Permissions affect the Label resource as a whole, are
577
+ # not revisioned, and do not require publishing.
578
+ # @param [String] parent
579
+ # Required. The parent Label resource name on the Label Permission is created.
580
+ # Format: labels/`label`
581
+ # @param [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2LabelPermission] google_apps_drive_labels_v2_label_permission_object
582
+ # @param [Boolean] use_admin_access
583
+ # Set to `true` in order to use the user's admin credentials. The server will
584
+ # verify the user is an admin for the Label before allowing access.
585
+ # @param [String] fields
586
+ # Selector specifying which fields to include in a partial response.
587
+ # @param [String] quota_user
588
+ # Available to use for quota purposes for server-side applications. Can be any
589
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
590
+ # @param [Google::Apis::RequestOptions] options
591
+ # Request-specific options
592
+ #
593
+ # @yield [result, err] Result & error if block supplied
594
+ # @yieldparam result [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2LabelPermission] parsed result object
595
+ # @yieldparam err [StandardError] error object if request failed
596
+ #
597
+ # @return [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2LabelPermission]
598
+ #
599
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
600
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
601
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
602
+ def create_label_permission(parent, google_apps_drive_labels_v2_label_permission_object = nil, use_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block)
603
+ command = make_simple_command(:post, 'v2/{+parent}/permissions', options)
604
+ command.request_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2LabelPermission::Representation
605
+ command.request_object = google_apps_drive_labels_v2_label_permission_object
606
+ command.response_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2LabelPermission::Representation
607
+ command.response_class = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2LabelPermission
608
+ command.params['parent'] = parent unless parent.nil?
609
+ command.query['useAdminAccess'] = use_admin_access unless use_admin_access.nil?
610
+ command.query['fields'] = fields unless fields.nil?
611
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
612
+ execute_or_queue_command(command, &block)
613
+ end
614
+
615
+ # Deletes a Label's permission. Permissions affect the Label resource as a whole,
616
+ # are not revisioned, and do not require publishing.
617
+ # @param [String] name
618
+ # Required. Label Permission resource name.
619
+ # @param [Boolean] use_admin_access
620
+ # Set to `true` in order to use the user's admin credentials. The server will
621
+ # verify the user is an admin for the Label before allowing access.
622
+ # @param [String] fields
623
+ # Selector specifying which fields to include in a partial response.
624
+ # @param [String] quota_user
625
+ # Available to use for quota purposes for server-side applications. Can be any
626
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
627
+ # @param [Google::Apis::RequestOptions] options
628
+ # Request-specific options
629
+ #
630
+ # @yield [result, err] Result & error if block supplied
631
+ # @yieldparam result [Google::Apis::DrivelabelsV2::GoogleProtobufEmpty] parsed result object
632
+ # @yieldparam err [StandardError] error object if request failed
633
+ #
634
+ # @return [Google::Apis::DrivelabelsV2::GoogleProtobufEmpty]
635
+ #
636
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
637
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
638
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
639
+ def delete_label_permission(name, use_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block)
640
+ command = make_simple_command(:delete, 'v2/{+name}', options)
641
+ command.response_representation = Google::Apis::DrivelabelsV2::GoogleProtobufEmpty::Representation
642
+ command.response_class = Google::Apis::DrivelabelsV2::GoogleProtobufEmpty
643
+ command.params['name'] = name unless name.nil?
644
+ command.query['useAdminAccess'] = use_admin_access unless use_admin_access.nil?
645
+ command.query['fields'] = fields unless fields.nil?
646
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
647
+ execute_or_queue_command(command, &block)
648
+ end
649
+
650
+ # Lists a Label's permissions.
651
+ # @param [String] parent
652
+ # Required. The parent Label resource name on which Label Permission are listed.
653
+ # Format: labels/`label`
654
+ # @param [Fixnum] page_size
655
+ # Maximum number of permissions to return per page. Default: 50. Max: 200.
656
+ # @param [String] page_token
657
+ # The token of the page to return.
658
+ # @param [Boolean] use_admin_access
659
+ # Set to `true` in order to use the user's admin credentials. The server will
660
+ # verify the user is an admin for the Label before allowing access.
661
+ # @param [String] fields
662
+ # Selector specifying which fields to include in a partial response.
663
+ # @param [String] quota_user
664
+ # Available to use for quota purposes for server-side applications. Can be any
665
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
666
+ # @param [Google::Apis::RequestOptions] options
667
+ # Request-specific options
668
+ #
669
+ # @yield [result, err] Result & error if block supplied
670
+ # @yieldparam result [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2ListLabelPermissionsResponse] parsed result object
671
+ # @yieldparam err [StandardError] error object if request failed
672
+ #
673
+ # @return [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2ListLabelPermissionsResponse]
674
+ #
675
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
676
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
677
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
678
+ def list_label_permissions(parent, page_size: nil, page_token: nil, use_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block)
679
+ command = make_simple_command(:get, 'v2/{+parent}/permissions', options)
680
+ command.response_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2ListLabelPermissionsResponse::Representation
681
+ command.response_class = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2ListLabelPermissionsResponse
682
+ command.params['parent'] = parent unless parent.nil?
683
+ command.query['pageSize'] = page_size unless page_size.nil?
684
+ command.query['pageToken'] = page_token unless page_token.nil?
685
+ command.query['useAdminAccess'] = use_admin_access unless use_admin_access.nil?
686
+ command.query['fields'] = fields unless fields.nil?
687
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
688
+ execute_or_queue_command(command, &block)
689
+ end
690
+
691
+ # Updates a Label's permissions. If a permission for the indicated principal
692
+ # doesn't exist, a new Label Permission is created, otherwise the existing
693
+ # permission is updated. Permissions affect the Label resource as a whole, are
694
+ # not revisioned, and do not require publishing.
695
+ # @param [String] parent
696
+ # Required. The parent Label resource name.
697
+ # @param [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2LabelPermission] google_apps_drive_labels_v2_label_permission_object
698
+ # @param [Boolean] use_admin_access
699
+ # Set to `true` in order to use the user's admin credentials. The server will
700
+ # verify the user is an admin for the Label before allowing access.
701
+ # @param [String] fields
702
+ # Selector specifying which fields to include in a partial response.
703
+ # @param [String] quota_user
704
+ # Available to use for quota purposes for server-side applications. Can be any
705
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
706
+ # @param [Google::Apis::RequestOptions] options
707
+ # Request-specific options
708
+ #
709
+ # @yield [result, err] Result & error if block supplied
710
+ # @yieldparam result [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2LabelPermission] parsed result object
711
+ # @yieldparam err [StandardError] error object if request failed
712
+ #
713
+ # @return [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2LabelPermission]
714
+ #
715
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
716
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
717
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
718
+ def update_label_revision_permissions(parent, google_apps_drive_labels_v2_label_permission_object = nil, use_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block)
719
+ command = make_simple_command(:patch, 'v2/{+parent}/permissions', options)
720
+ command.request_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2LabelPermission::Representation
721
+ command.request_object = google_apps_drive_labels_v2_label_permission_object
722
+ command.response_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2LabelPermission::Representation
723
+ command.response_class = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2LabelPermission
724
+ command.params['parent'] = parent unless parent.nil?
725
+ command.query['useAdminAccess'] = use_admin_access unless use_admin_access.nil?
726
+ command.query['fields'] = fields unless fields.nil?
727
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
728
+ execute_or_queue_command(command, &block)
729
+ end
730
+
731
+ # Lists the LabelLocks on a Label.
732
+ # @param [String] parent
733
+ # Required. Label on which Locks are applied. Format: labels/`label`
734
+ # @param [Fixnum] page_size
735
+ # Maximum number of Locks to return per page. Default: 100. Max: 200.
736
+ # @param [String] page_token
737
+ # The token of the page to return.
738
+ # @param [String] fields
739
+ # Selector specifying which fields to include in a partial response.
740
+ # @param [String] quota_user
741
+ # Available to use for quota purposes for server-side applications. Can be any
742
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
743
+ # @param [Google::Apis::RequestOptions] options
744
+ # Request-specific options
745
+ #
746
+ # @yield [result, err] Result & error if block supplied
747
+ # @yieldparam result [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2ListLabelLocksResponse] parsed result object
748
+ # @yieldparam err [StandardError] error object if request failed
749
+ #
750
+ # @return [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2ListLabelLocksResponse]
751
+ #
752
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
753
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
754
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
755
+ def list_label_revision_locks(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
756
+ command = make_simple_command(:get, 'v2/{+parent}/locks', options)
757
+ command.response_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2ListLabelLocksResponse::Representation
758
+ command.response_class = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2ListLabelLocksResponse
759
+ command.params['parent'] = parent unless parent.nil?
760
+ command.query['pageSize'] = page_size unless page_size.nil?
761
+ command.query['pageToken'] = page_token unless page_token.nil?
762
+ command.query['fields'] = fields unless fields.nil?
763
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
764
+ execute_or_queue_command(command, &block)
765
+ end
766
+
767
+ # Deletes Label permissions. Permissions affect the Label resource as a whole,
768
+ # are not revisioned, and do not require publishing.
769
+ # @param [String] parent
770
+ # Required. The parent Label resource name shared by all permissions being
771
+ # deleted. Format: labels/`label` If this is set, the parent field in the
772
+ # UpdateLabelPermissionRequest messages must either be empty or match this field.
773
+ # @param [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2BatchDeleteLabelPermissionsRequest] google_apps_drive_labels_v2_batch_delete_label_permissions_request_object
774
+ # @param [String] fields
775
+ # Selector specifying which fields to include in a partial response.
776
+ # @param [String] quota_user
777
+ # Available to use for quota purposes for server-side applications. Can be any
778
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
779
+ # @param [Google::Apis::RequestOptions] options
780
+ # Request-specific options
781
+ #
782
+ # @yield [result, err] Result & error if block supplied
783
+ # @yieldparam result [Google::Apis::DrivelabelsV2::GoogleProtobufEmpty] parsed result object
784
+ # @yieldparam err [StandardError] error object if request failed
785
+ #
786
+ # @return [Google::Apis::DrivelabelsV2::GoogleProtobufEmpty]
787
+ #
788
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
789
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
790
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
791
+ def batch_label_revision_permission_delete(parent, google_apps_drive_labels_v2_batch_delete_label_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
792
+ command = make_simple_command(:post, 'v2/{+parent}/permissions:batchDelete', options)
793
+ command.request_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2BatchDeleteLabelPermissionsRequest::Representation
794
+ command.request_object = google_apps_drive_labels_v2_batch_delete_label_permissions_request_object
795
+ command.response_representation = Google::Apis::DrivelabelsV2::GoogleProtobufEmpty::Representation
796
+ command.response_class = Google::Apis::DrivelabelsV2::GoogleProtobufEmpty
797
+ command.params['parent'] = parent unless parent.nil?
798
+ command.query['fields'] = fields unless fields.nil?
799
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
800
+ execute_or_queue_command(command, &block)
801
+ end
802
+
803
+ # Updates Label permissions. If a permission for the indicated principal doesn't
804
+ # exist, a new Label Permission is created, otherwise the existing permission is
805
+ # updated. Permissions affect the Label resource as a whole, are not revisioned,
806
+ # and do not require publishing.
807
+ # @param [String] parent
808
+ # Required. The parent Label resource name shared by all permissions being
809
+ # updated. Format: labels/`label` If this is set, the parent field in the
810
+ # UpdateLabelPermissionRequest messages must either be empty or match this field.
811
+ # @param [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsRequest] google_apps_drive_labels_v2_batch_update_label_permissions_request_object
812
+ # @param [String] fields
813
+ # Selector specifying which fields to include in a partial response.
814
+ # @param [String] quota_user
815
+ # Available to use for quota purposes for server-side applications. Can be any
816
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
817
+ # @param [Google::Apis::RequestOptions] options
818
+ # Request-specific options
819
+ #
820
+ # @yield [result, err] Result & error if block supplied
821
+ # @yieldparam result [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsResponse] parsed result object
822
+ # @yieldparam err [StandardError] error object if request failed
823
+ #
824
+ # @return [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsResponse]
825
+ #
826
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
827
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
828
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
829
+ def batch_label_revision_permission_update(parent, google_apps_drive_labels_v2_batch_update_label_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
830
+ command = make_simple_command(:post, 'v2/{+parent}/permissions:batchUpdate', options)
831
+ command.request_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsRequest::Representation
832
+ command.request_object = google_apps_drive_labels_v2_batch_update_label_permissions_request_object
833
+ command.response_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsResponse::Representation
834
+ command.response_class = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsResponse
835
+ command.params['parent'] = parent unless parent.nil?
836
+ command.query['fields'] = fields unless fields.nil?
837
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
838
+ execute_or_queue_command(command, &block)
839
+ end
840
+
841
+ # Updates a Label's permissions. If a permission for the indicated principal
842
+ # doesn't exist, a new Label Permission is created, otherwise the existing
843
+ # permission is updated. Permissions affect the Label resource as a whole, are
844
+ # not revisioned, and do not require publishing.
845
+ # @param [String] parent
846
+ # Required. The parent Label resource name on the Label Permission is created.
847
+ # Format: labels/`label`
848
+ # @param [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2LabelPermission] google_apps_drive_labels_v2_label_permission_object
849
+ # @param [Boolean] use_admin_access
850
+ # Set to `true` in order to use the user's admin credentials. The server will
851
+ # verify the user is an admin for the Label before allowing access.
852
+ # @param [String] fields
853
+ # Selector specifying which fields to include in a partial response.
854
+ # @param [String] quota_user
855
+ # Available to use for quota purposes for server-side applications. Can be any
856
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
857
+ # @param [Google::Apis::RequestOptions] options
858
+ # Request-specific options
859
+ #
860
+ # @yield [result, err] Result & error if block supplied
861
+ # @yieldparam result [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2LabelPermission] parsed result object
862
+ # @yieldparam err [StandardError] error object if request failed
863
+ #
864
+ # @return [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2LabelPermission]
865
+ #
866
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
867
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
868
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
869
+ def create_label_revision_permission(parent, google_apps_drive_labels_v2_label_permission_object = nil, use_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block)
870
+ command = make_simple_command(:post, 'v2/{+parent}/permissions', options)
871
+ command.request_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2LabelPermission::Representation
872
+ command.request_object = google_apps_drive_labels_v2_label_permission_object
873
+ command.response_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2LabelPermission::Representation
874
+ command.response_class = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2LabelPermission
875
+ command.params['parent'] = parent unless parent.nil?
876
+ command.query['useAdminAccess'] = use_admin_access unless use_admin_access.nil?
877
+ command.query['fields'] = fields unless fields.nil?
878
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
879
+ execute_or_queue_command(command, &block)
880
+ end
881
+
882
+ # Deletes a Label's permission. Permissions affect the Label resource as a whole,
883
+ # are not revisioned, and do not require publishing.
884
+ # @param [String] name
885
+ # Required. Label Permission resource name.
886
+ # @param [Boolean] use_admin_access
887
+ # Set to `true` in order to use the user's admin credentials. The server will
888
+ # verify the user is an admin for the Label before allowing access.
889
+ # @param [String] fields
890
+ # Selector specifying which fields to include in a partial response.
891
+ # @param [String] quota_user
892
+ # Available to use for quota purposes for server-side applications. Can be any
893
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
894
+ # @param [Google::Apis::RequestOptions] options
895
+ # Request-specific options
896
+ #
897
+ # @yield [result, err] Result & error if block supplied
898
+ # @yieldparam result [Google::Apis::DrivelabelsV2::GoogleProtobufEmpty] parsed result object
899
+ # @yieldparam err [StandardError] error object if request failed
900
+ #
901
+ # @return [Google::Apis::DrivelabelsV2::GoogleProtobufEmpty]
902
+ #
903
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
904
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
905
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
906
+ def delete_label_revision_permission(name, use_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block)
907
+ command = make_simple_command(:delete, 'v2/{+name}', options)
908
+ command.response_representation = Google::Apis::DrivelabelsV2::GoogleProtobufEmpty::Representation
909
+ command.response_class = Google::Apis::DrivelabelsV2::GoogleProtobufEmpty
910
+ command.params['name'] = name unless name.nil?
911
+ command.query['useAdminAccess'] = use_admin_access unless use_admin_access.nil?
912
+ command.query['fields'] = fields unless fields.nil?
913
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
914
+ execute_or_queue_command(command, &block)
915
+ end
916
+
917
+ # Lists a Label's permissions.
918
+ # @param [String] parent
919
+ # Required. The parent Label resource name on which Label Permission are listed.
920
+ # Format: labels/`label`
921
+ # @param [Fixnum] page_size
922
+ # Maximum number of permissions to return per page. Default: 50. Max: 200.
923
+ # @param [String] page_token
924
+ # The token of the page to return.
925
+ # @param [Boolean] use_admin_access
926
+ # Set to `true` in order to use the user's admin credentials. The server will
927
+ # verify the user is an admin for the Label before allowing access.
928
+ # @param [String] fields
929
+ # Selector specifying which fields to include in a partial response.
930
+ # @param [String] quota_user
931
+ # Available to use for quota purposes for server-side applications. Can be any
932
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
933
+ # @param [Google::Apis::RequestOptions] options
934
+ # Request-specific options
935
+ #
936
+ # @yield [result, err] Result & error if block supplied
937
+ # @yieldparam result [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2ListLabelPermissionsResponse] parsed result object
938
+ # @yieldparam err [StandardError] error object if request failed
939
+ #
940
+ # @return [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2ListLabelPermissionsResponse]
941
+ #
942
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
943
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
944
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
945
+ def list_label_revision_permissions(parent, page_size: nil, page_token: nil, use_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block)
946
+ command = make_simple_command(:get, 'v2/{+parent}/permissions', options)
947
+ command.response_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2ListLabelPermissionsResponse::Representation
948
+ command.response_class = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2ListLabelPermissionsResponse
949
+ command.params['parent'] = parent unless parent.nil?
950
+ command.query['pageSize'] = page_size unless page_size.nil?
951
+ command.query['pageToken'] = page_token unless page_token.nil?
952
+ command.query['useAdminAccess'] = use_admin_access unless use_admin_access.nil?
953
+ command.query['fields'] = fields unless fields.nil?
954
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
955
+ execute_or_queue_command(command, &block)
956
+ end
957
+
958
+ # Get the constraints on the structure of a Label; such as, the maximum number
959
+ # of Fields allowed and maximum length of the label title.
960
+ # @param [String] name
961
+ # Required. Label revision resource name Must be: "limits/label"
962
+ # @param [String] fields
963
+ # Selector specifying which fields to include in a partial response.
964
+ # @param [String] quota_user
965
+ # Available to use for quota purposes for server-side applications. Can be any
966
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
967
+ # @param [Google::Apis::RequestOptions] options
968
+ # Request-specific options
969
+ #
970
+ # @yield [result, err] Result & error if block supplied
971
+ # @yieldparam result [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2LabelLimits] parsed result object
972
+ # @yieldparam err [StandardError] error object if request failed
973
+ #
974
+ # @return [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2LabelLimits]
975
+ #
976
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
977
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
978
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
979
+ def get_limit_label(name: nil, fields: nil, quota_user: nil, options: nil, &block)
980
+ command = make_simple_command(:get, 'v2/limits/label', options)
981
+ command.response_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2LabelLimits::Representation
982
+ command.response_class = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2LabelLimits
983
+ command.query['name'] = name unless name.nil?
984
+ command.query['fields'] = fields unless fields.nil?
985
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
986
+ execute_or_queue_command(command, &block)
987
+ end
988
+
989
+ # Gets the user capabilities.
990
+ # @param [String] name
991
+ # Required. The resource name of the user. Only "users/me/capabilities" is
992
+ # supported.
993
+ # @param [String] fields
994
+ # Selector specifying which fields to include in a partial response.
995
+ # @param [String] quota_user
996
+ # Available to use for quota purposes for server-side applications. Can be any
997
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
998
+ # @param [Google::Apis::RequestOptions] options
999
+ # Request-specific options
1000
+ #
1001
+ # @yield [result, err] Result & error if block supplied
1002
+ # @yieldparam result [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2UserCapabilities] parsed result object
1003
+ # @yieldparam err [StandardError] error object if request failed
1004
+ #
1005
+ # @return [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2UserCapabilities]
1006
+ #
1007
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1008
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1009
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1010
+ def get_user_capabilities(name, fields: nil, quota_user: nil, options: nil, &block)
1011
+ command = make_simple_command(:get, 'v2/{+name}', options)
1012
+ command.response_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2UserCapabilities::Representation
1013
+ command.response_class = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2UserCapabilities
1014
+ command.params['name'] = name unless name.nil?
1015
+ command.query['fields'] = fields unless fields.nil?
1016
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1017
+ execute_or_queue_command(command, &block)
1018
+ end
156
1019
 
157
1020
  protected
158
1021