Class: Google::Apis::DrivelabelsV2beta::DriveLabelsService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::DrivelabelsV2beta::DriveLabelsService
- Defined in:
- lib/google/apis/drivelabels_v2beta/service.rb
Overview
Drive Labels API
An API for managing Drive Labels
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
Instance Method Summary collapse
-
#batch_label_permission_delete(parent, google_apps_drive_labels_v2beta_batch_delete_label_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2beta::GoogleProtobufEmpty
Deletes Label permissions.
-
#batch_label_permission_update(parent, google_apps_drive_labels_v2beta_batch_update_label_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaBatchUpdateLabelPermissionsResponse
Updates Label permissions.
-
#batch_label_revision_permission_delete(parent, google_apps_drive_labels_v2beta_batch_delete_label_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2beta::GoogleProtobufEmpty
Deletes Label permissions.
-
#batch_label_revision_permission_update(parent, google_apps_drive_labels_v2beta_batch_update_label_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaBatchUpdateLabelPermissionsResponse
Updates Label permissions.
-
#create_label(google_apps_drive_labels_v2beta_label_object = nil, language_code: nil, use_admin_access: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaLabel
Creates a new Label.
-
#create_label_permission(parent, google_apps_drive_labels_v2beta_label_permission_object = nil, use_admin_access: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaLabelPermission
Updates a Label's permissions.
-
#create_label_revision_permission(parent, google_apps_drive_labels_v2beta_label_permission_object = nil, use_admin_access: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaLabelPermission
Updates a Label's permissions.
-
#delete_label(name, use_admin_access: nil, write_control_required_revision_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2beta::GoogleProtobufEmpty
Permanently deletes a Label and related metadata on Drive Items.
-
#delete_label_permission(name, use_admin_access: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2beta::GoogleProtobufEmpty
Deletes a Label's permission.
-
#delete_label_revision_permission(name, use_admin_access: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2beta::GoogleProtobufEmpty
Deletes a Label's permission.
-
#delta_label(name, google_apps_drive_labels_v2beta_delta_update_label_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponse
Updates a single Label by applying a set of update requests resulting in a new draft revision.
-
#disable_label(name, google_apps_drive_labels_v2beta_disable_label_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaLabel
Disable a published Label.
-
#enable_label(name, google_apps_drive_labels_v2beta_enable_label_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaLabel
Enable a disabled Label and restore it to its published state.
-
#get_label(name, language_code: nil, use_admin_access: nil, view: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaLabel
Get a label by its resource name.
-
#get_limit_label(name: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaLabelLimits
Get the constraints on the structure of a Label; such as, the maximum number of Fields allowed and maximum length of the label title.
-
#get_user_capabilities(name, customer: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaUserCapabilities
Gets the user capabilities.
-
#initialize ⇒ DriveLabelsService
constructor
A new instance of DriveLabelsService.
-
#list_label_locks(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaListLabelLocksResponse
Lists the LabelLocks on a Label.
-
#list_label_permissions(parent, page_size: nil, page_token: nil, use_admin_access: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaListLabelPermissionsResponse
Lists a Label's permissions.
-
#list_label_revision_locks(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaListLabelLocksResponse
Lists the LabelLocks on a Label.
-
#list_label_revision_permissions(parent, page_size: nil, page_token: nil, use_admin_access: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaListLabelPermissionsResponse
Lists a Label's permissions.
-
#list_labels(customer: nil, language_code: nil, minimum_role: nil, page_size: nil, page_token: nil, published_only: nil, use_admin_access: nil, view: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaListLabelsResponse
List labels.
-
#publish_label(name, google_apps_drive_labels_v2beta_publish_label_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaLabel
Publish all draft changes to the Label.
-
#update_label_label_copy_mode(name, google_apps_drive_labels_v2beta_update_label_copy_mode_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaLabel
Updates a Label's
CopyMode
. -
#update_label_permissions(parent, google_apps_drive_labels_v2beta_label_permission_object = nil, use_admin_access: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaLabelPermission
Updates a Label's permissions.
-
#update_label_revision_permissions(parent, google_apps_drive_labels_v2beta_label_permission_object = nil, use_admin_access: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaLabelPermission
Updates a Label's permissions.
Constructor Details
#initialize ⇒ DriveLabelsService
Returns a new instance of DriveLabelsService.
45 46 47 48 49 50 |
# File 'lib/google/apis/drivelabels_v2beta/service.rb', line 45 def initialize super('https://drivelabels.googleapis.com/', '', client_name: 'google-apis-drivelabels_v2beta', client_version: Google::Apis::DrivelabelsV2beta::GEM_VERSION) @batch_path = 'batch' end |
Instance Attribute Details
#key ⇒ String
Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
38 39 40 |
# File 'lib/google/apis/drivelabels_v2beta/service.rb', line 38 def key @key end |
#quota_user ⇒ String
Returns Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
43 44 45 |
# File 'lib/google/apis/drivelabels_v2beta/service.rb', line 43 def quota_user @quota_user end |
Instance Method Details
#batch_label_permission_delete(parent, google_apps_drive_labels_v2beta_batch_delete_label_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2beta::GoogleProtobufEmpty
Deletes Label permissions. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.
528 529 530 531 532 533 534 535 536 537 538 |
# File 'lib/google/apis/drivelabels_v2beta/service.rb', line 528 def (parent, = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2beta/{+parent}/permissions:batchDelete', ) command.request_representation = Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaBatchDeleteLabelPermissionsRequest::Representation command.request_object = command.response_representation = Google::Apis::DrivelabelsV2beta::GoogleProtobufEmpty::Representation command.response_class = Google::Apis::DrivelabelsV2beta::GoogleProtobufEmpty command.params['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#batch_label_permission_update(parent, google_apps_drive_labels_v2beta_batch_update_label_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaBatchUpdateLabelPermissionsResponse
Updates Label permissions. If a permission for the indicated principal doesn't exist, a new Label Permission is created, otherwise the existing permission is updated. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.
566 567 568 569 570 571 572 573 574 575 576 |
# File 'lib/google/apis/drivelabels_v2beta/service.rb', line 566 def (parent, = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2beta/{+parent}/permissions:batchUpdate', ) command.request_representation = Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaBatchUpdateLabelPermissionsRequest::Representation command.request_object = command.response_representation = Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaBatchUpdateLabelPermissionsResponse::Representation command.response_class = Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaBatchUpdateLabelPermissionsResponse command.params['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#batch_label_revision_permission_delete(parent, google_apps_drive_labels_v2beta_batch_delete_label_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2beta::GoogleProtobufEmpty
Deletes Label permissions. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.
795 796 797 798 799 800 801 802 803 804 805 |
# File 'lib/google/apis/drivelabels_v2beta/service.rb', line 795 def (parent, = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2beta/{+parent}/permissions:batchDelete', ) command.request_representation = Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaBatchDeleteLabelPermissionsRequest::Representation command.request_object = command.response_representation = Google::Apis::DrivelabelsV2beta::GoogleProtobufEmpty::Representation command.response_class = Google::Apis::DrivelabelsV2beta::GoogleProtobufEmpty command.params['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#batch_label_revision_permission_update(parent, google_apps_drive_labels_v2beta_batch_update_label_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaBatchUpdateLabelPermissionsResponse
Updates Label permissions. If a permission for the indicated principal doesn't exist, a new Label Permission is created, otherwise the existing permission is updated. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.
833 834 835 836 837 838 839 840 841 842 843 |
# File 'lib/google/apis/drivelabels_v2beta/service.rb', line 833 def (parent, = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2beta/{+parent}/permissions:batchUpdate', ) command.request_representation = Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaBatchUpdateLabelPermissionsRequest::Representation command.request_object = command.response_representation = Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaBatchUpdateLabelPermissionsResponse::Representation command.response_class = Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaBatchUpdateLabelPermissionsResponse command.params['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#create_label(google_apps_drive_labels_v2beta_label_object = nil, language_code: nil, use_admin_access: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaLabel
Creates a new Label.
78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/google/apis/drivelabels_v2beta/service.rb', line 78 def create_label(google_apps_drive_labels_v2beta_label_object = nil, language_code: nil, use_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2beta/labels', ) command.request_representation = Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaLabel::Representation command.request_object = google_apps_drive_labels_v2beta_label_object command.response_representation = Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaLabel::Representation command.response_class = Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaLabel command.query['languageCode'] = language_code unless language_code.nil? command.query['useAdminAccess'] = use_admin_access unless use_admin_access.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#create_label_permission(parent, google_apps_drive_labels_v2beta_label_permission_object = nil, use_admin_access: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaLabelPermission
Updates a Label's permissions. If a permission for the indicated principal doesn't exist, a new Label Permission is created, otherwise the existing permission is updated. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.
606 607 608 609 610 611 612 613 614 615 616 617 |
# File 'lib/google/apis/drivelabels_v2beta/service.rb', line 606 def (parent, = nil, use_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2beta/{+parent}/permissions', ) command.request_representation = Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaLabelPermission::Representation command.request_object = command.response_representation = Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaLabelPermission::Representation command.response_class = Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaLabelPermission command.params['parent'] = parent unless parent.nil? command.query['useAdminAccess'] = use_admin_access unless use_admin_access.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#create_label_revision_permission(parent, google_apps_drive_labels_v2beta_label_permission_object = nil, use_admin_access: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaLabelPermission
Updates a Label's permissions. If a permission for the indicated principal doesn't exist, a new Label Permission is created, otherwise the existing permission is updated. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.
873 874 875 876 877 878 879 880 881 882 883 884 |
# File 'lib/google/apis/drivelabels_v2beta/service.rb', line 873 def (parent, = nil, use_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2beta/{+parent}/permissions', ) command.request_representation = Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaLabelPermission::Representation command.request_object = command.response_representation = Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaLabelPermission::Representation command.response_class = Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaLabelPermission command.params['parent'] = parent unless parent.nil? command.query['useAdminAccess'] = use_admin_access unless use_admin_access.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_label(name, use_admin_access: nil, write_control_required_revision_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2beta::GoogleProtobufEmpty
Permanently deletes a Label and related metadata on Drive Items. Once deleted, the Label and related Drive item metadata will be deleted. Only draft Labels, and disabled Labels may be deleted.
120 121 122 123 124 125 126 127 128 129 130 |
# File 'lib/google/apis/drivelabels_v2beta/service.rb', line 120 def delete_label(name, use_admin_access: nil, write_control_required_revision_id: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v2beta/{+name}', ) command.response_representation = Google::Apis::DrivelabelsV2beta::GoogleProtobufEmpty::Representation command.response_class = Google::Apis::DrivelabelsV2beta::GoogleProtobufEmpty command.params['name'] = name unless name.nil? command.query['useAdminAccess'] = use_admin_access unless use_admin_access.nil? command.query['writeControl.requiredRevisionId'] = write_control_required_revision_id unless write_control_required_revision_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_label_permission(name, use_admin_access: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2beta::GoogleProtobufEmpty
Deletes a Label's permission. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.
643 644 645 646 647 648 649 650 651 652 |
# File 'lib/google/apis/drivelabels_v2beta/service.rb', line 643 def (name, use_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v2beta/{+name}', ) command.response_representation = Google::Apis::DrivelabelsV2beta::GoogleProtobufEmpty::Representation command.response_class = Google::Apis::DrivelabelsV2beta::GoogleProtobufEmpty command.params['name'] = name unless name.nil? command.query['useAdminAccess'] = use_admin_access unless use_admin_access.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_label_revision_permission(name, use_admin_access: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2beta::GoogleProtobufEmpty
Deletes a Label's permission. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.
910 911 912 913 914 915 916 917 918 919 |
# File 'lib/google/apis/drivelabels_v2beta/service.rb', line 910 def (name, use_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v2beta/{+name}', ) command.response_representation = Google::Apis::DrivelabelsV2beta::GoogleProtobufEmpty::Representation command.response_class = Google::Apis::DrivelabelsV2beta::GoogleProtobufEmpty command.params['name'] = name unless name.nil? command.query['useAdminAccess'] = use_admin_access unless use_admin_access.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delta_label(name, google_apps_drive_labels_v2beta_delta_update_label_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponse
Updates a single Label by applying a set of update requests resulting in a new draft revision. The batch update is all-or-nothing: If any of the update requests are invalid, no changes are applied. The resulting draft revision must be published before the changes may be used with Drive Items.
156 157 158 159 160 161 162 163 164 165 166 |
# File 'lib/google/apis/drivelabels_v2beta/service.rb', line 156 def delta_label(name, google_apps_drive_labels_v2beta_delta_update_label_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2beta/{+name}:delta', ) command.request_representation = Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequest::Representation command.request_object = google_apps_drive_labels_v2beta_delta_update_label_request_object command.response_representation = Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponse::Representation command.response_class = Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponse command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#disable_label(name, google_apps_drive_labels_v2beta_disable_label_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaLabel
Disable a published Label. Disabling a Label will result in a new disabled
published revision based on the current published revision. If there is a
draft revision, a new disabled draft revision will be created based on the
latest draft revision. Older draft revisions will be deleted. Once disabled, a
label may be deleted with DeleteLabel
.
193 194 195 196 197 198 199 200 201 202 203 |
# File 'lib/google/apis/drivelabels_v2beta/service.rb', line 193 def disable_label(name, google_apps_drive_labels_v2beta_disable_label_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2beta/{+name}:disable', ) command.request_representation = Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaDisableLabelRequest::Representation command.request_object = google_apps_drive_labels_v2beta_disable_label_request_object command.response_representation = Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaLabel::Representation command.response_class = Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaLabel command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#enable_label(name, google_apps_drive_labels_v2beta_enable_label_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaLabel
Enable a disabled Label and restore it to its published state. This will result in a new published revision based on the current disabled published revision. If there is an existing disabled draft revision, a new revision will be created based on that draft and will be enabled.
229 230 231 232 233 234 235 236 237 238 239 |
# File 'lib/google/apis/drivelabels_v2beta/service.rb', line 229 def enable_label(name, google_apps_drive_labels_v2beta_enable_label_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2beta/{+name}:enable', ) command.request_representation = Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaEnableLabelRequest::Representation command.request_object = google_apps_drive_labels_v2beta_enable_label_request_object command.response_representation = Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaLabel::Representation command.response_class = Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaLabel command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_label(name, language_code: nil, use_admin_access: nil, view: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaLabel
Get a label by its resource name. Resource name may be any of: * labels/
id``
- See
labels/
id@latest
*labels/
id@latest
- Gets the latest revision of the label. *labels/
id@published
- Gets the current published revision of the label. *labels/
id@
revision_id`` - Gets the label at the specified revision ID.
276 277 278 279 280 281 282 283 284 285 286 287 |
# File 'lib/google/apis/drivelabels_v2beta/service.rb', line 276 def get_label(name, language_code: nil, use_admin_access: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2beta/{+name}', ) command.response_representation = Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaLabel::Representation command.response_class = Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaLabel command.params['name'] = name unless name.nil? command.query['languageCode'] = language_code unless language_code.nil? command.query['useAdminAccess'] = use_admin_access unless use_admin_access.nil? command.query['view'] = view unless view.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_limit_label(name: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaLabelLimits
Get the constraints on the structure of a Label; such as, the maximum number of Fields allowed and maximum length of the label title.
983 984 985 986 987 988 989 990 991 |
# File 'lib/google/apis/drivelabels_v2beta/service.rb', line 983 def get_limit_label(name: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2beta/limits/label', ) command.response_representation = Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaLabelLimits::Representation command.response_class = Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaLabelLimits command.query['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_user_capabilities(name, customer: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaUserCapabilities
Gets the user capabilities.
1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 |
# File 'lib/google/apis/drivelabels_v2beta/service.rb', line 1017 def get_user_capabilities(name, customer: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2beta/{+name}', ) command.response_representation = Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaUserCapabilities::Representation command.response_class = Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaUserCapabilities command.params['name'] = name unless name.nil? command.query['customer'] = customer unless customer.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_label_locks(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaListLabelLocksResponse
Lists the LabelLocks on a Label.
492 493 494 495 496 497 498 499 500 501 502 |
# File 'lib/google/apis/drivelabels_v2beta/service.rb', line 492 def list_label_locks(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2beta/{+parent}/locks', ) command.response_representation = Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaListLabelLocksResponse::Representation command.response_class = Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaListLabelLocksResponse command.params['parent'] = parent unless parent.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_label_permissions(parent, page_size: nil, page_token: nil, use_admin_access: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaListLabelPermissionsResponse
Lists a Label's permissions.
682 683 684 685 686 687 688 689 690 691 692 693 |
# File 'lib/google/apis/drivelabels_v2beta/service.rb', line 682 def (parent, page_size: nil, page_token: nil, use_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2beta/{+parent}/permissions', ) command.response_representation = Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaListLabelPermissionsResponse::Representation command.response_class = Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaListLabelPermissionsResponse command.params['parent'] = parent unless parent.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['useAdminAccess'] = use_admin_access unless use_admin_access.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_label_revision_locks(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaListLabelLocksResponse
Lists the LabelLocks on a Label.
759 760 761 762 763 764 765 766 767 768 769 |
# File 'lib/google/apis/drivelabels_v2beta/service.rb', line 759 def list_label_revision_locks(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2beta/{+parent}/locks', ) command.response_representation = Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaListLabelLocksResponse::Representation command.response_class = Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaListLabelLocksResponse command.params['parent'] = parent unless parent.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_label_revision_permissions(parent, page_size: nil, page_token: nil, use_admin_access: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaListLabelPermissionsResponse
Lists a Label's permissions.
949 950 951 952 953 954 955 956 957 958 959 960 |
# File 'lib/google/apis/drivelabels_v2beta/service.rb', line 949 def (parent, page_size: nil, page_token: nil, use_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2beta/{+parent}/permissions', ) command.response_representation = Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaListLabelPermissionsResponse::Representation command.response_class = Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaListLabelPermissionsResponse command.params['parent'] = parent unless parent.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['useAdminAccess'] = use_admin_access unless use_admin_access.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_labels(customer: nil, language_code: nil, minimum_role: nil, page_size: nil, page_token: nil, published_only: nil, use_admin_access: nil, view: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaListLabelsResponse
List labels.
333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 |
# File 'lib/google/apis/drivelabels_v2beta/service.rb', line 333 def list_labels(customer: nil, language_code: nil, minimum_role: nil, page_size: nil, page_token: nil, published_only: nil, use_admin_access: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2beta/labels', ) command.response_representation = Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaListLabelsResponse::Representation command.response_class = Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaListLabelsResponse command.query['customer'] = customer unless customer.nil? command.query['languageCode'] = language_code unless language_code.nil? command.query['minimumRole'] = minimum_role unless minimum_role.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['publishedOnly'] = published_only unless published_only.nil? command.query['useAdminAccess'] = use_admin_access unless use_admin_access.nil? command.query['view'] = view unless view.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#publish_label(name, google_apps_drive_labels_v2beta_publish_label_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaLabel
Publish all draft changes to the Label. Once published, the Label may not
return to its draft state. See google.apps.drive.labels.v2.Lifecycle
for
more information. Publishing a Label will result in a new published revision.
All previous draft revisions will be deleted. Previous published revisions
will be kept but are subject to automated deletion as needed. Once published,
some changes are no longer permitted. Generally, any change that would
invalidate or cause new restrictions on existing metadata related to the Label
will be rejected. For example, the following changes to a Label will be
rejected after the Label is published: * The label cannot be directly deleted.
It must be disabled first, then deleted. * Field.FieldType cannot be changed. *
Changes to Field validation options cannot reject something that was
previously accepted. * Reducing the max entries.
382 383 384 385 386 387 388 389 390 391 392 |
# File 'lib/google/apis/drivelabels_v2beta/service.rb', line 382 def publish_label(name, google_apps_drive_labels_v2beta_publish_label_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2beta/{+name}:publish', ) command.request_representation = Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaPublishLabelRequest::Representation command.request_object = google_apps_drive_labels_v2beta_publish_label_request_object command.response_representation = Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaLabel::Representation command.response_class = Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaLabel command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#update_label_label_copy_mode(name, google_apps_drive_labels_v2beta_update_label_copy_mode_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaLabel
Updates a Label's CopyMode
. Changes to this policy are not revisioned, do
not require publishing, and take effect immediately.
416 417 418 419 420 421 422 423 424 425 426 |
# File 'lib/google/apis/drivelabels_v2beta/service.rb', line 416 def update_label_label_copy_mode(name, google_apps_drive_labels_v2beta_update_label_copy_mode_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2beta/{+name}:updateLabelCopyMode', ) command.request_representation = Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaUpdateLabelCopyModeRequest::Representation command.request_object = google_apps_drive_labels_v2beta_update_label_copy_mode_request_object command.response_representation = Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaLabel::Representation command.response_class = Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaLabel command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#update_label_permissions(parent, google_apps_drive_labels_v2beta_label_permission_object = nil, use_admin_access: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaLabelPermission
Updates a Label's permissions. If a permission for the indicated principal doesn't exist, a new Label Permission is created, otherwise the existing permission is updated. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.
455 456 457 458 459 460 461 462 463 464 465 466 |
# File 'lib/google/apis/drivelabels_v2beta/service.rb', line 455 def (parent, = nil, use_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v2beta/{+parent}/permissions', ) command.request_representation = Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaLabelPermission::Representation command.request_object = command.response_representation = Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaLabelPermission::Representation command.response_class = Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaLabelPermission command.params['parent'] = parent unless parent.nil? command.query['useAdminAccess'] = use_admin_access unless use_admin_access.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#update_label_revision_permissions(parent, google_apps_drive_labels_v2beta_label_permission_object = nil, use_admin_access: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaLabelPermission
Updates a Label's permissions. If a permission for the indicated principal doesn't exist, a new Label Permission is created, otherwise the existing permission is updated. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.
722 723 724 725 726 727 728 729 730 731 732 733 |
# File 'lib/google/apis/drivelabels_v2beta/service.rb', line 722 def (parent, = nil, use_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v2beta/{+parent}/permissions', ) command.request_representation = Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaLabelPermission::Representation command.request_object = command.response_representation = Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaLabelPermission::Representation command.response_class = Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaLabelPermission command.params['parent'] = parent unless parent.nil? command.query['useAdminAccess'] = use_admin_access unless use_admin_access.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |