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
Constant Summary collapse
- DEFAULT_ENDPOINT_TEMPLATE =
"https://drivelabels.$UNIVERSE_DOMAIN$/"
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.
47 48 49 50 51 52 |
# File 'lib/google/apis/drivelabels_v2beta/service.rb', line 47 def initialize super(DEFAULT_ENDPOINT_TEMPLATE, '', 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.
40 41 42 |
# File 'lib/google/apis/drivelabels_v2beta/service.rb', line 40 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.
45 46 47 |
# File 'lib/google/apis/drivelabels_v2beta/service.rb', line 45 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.
530 531 532 533 534 535 536 537 538 539 540 |
# File 'lib/google/apis/drivelabels_v2beta/service.rb', line 530 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.
568 569 570 571 572 573 574 575 576 577 578 |
# File 'lib/google/apis/drivelabels_v2beta/service.rb', line 568 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.
797 798 799 800 801 802 803 804 805 806 807 |
# File 'lib/google/apis/drivelabels_v2beta/service.rb', line 797 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.
835 836 837 838 839 840 841 842 843 844 845 |
# File 'lib/google/apis/drivelabels_v2beta/service.rb', line 835 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.
80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/google/apis/drivelabels_v2beta/service.rb', line 80 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.
608 609 610 611 612 613 614 615 616 617 618 619 |
# File 'lib/google/apis/drivelabels_v2beta/service.rb', line 608 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.
875 876 877 878 879 880 881 882 883 884 885 886 |
# File 'lib/google/apis/drivelabels_v2beta/service.rb', line 875 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.
122 123 124 125 126 127 128 129 130 131 132 |
# File 'lib/google/apis/drivelabels_v2beta/service.rb', line 122 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.
645 646 647 648 649 650 651 652 653 654 |
# File 'lib/google/apis/drivelabels_v2beta/service.rb', line 645 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.
912 913 914 915 916 917 918 919 920 921 |
# File 'lib/google/apis/drivelabels_v2beta/service.rb', line 912 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.
158 159 160 161 162 163 164 165 166 167 168 |
# File 'lib/google/apis/drivelabels_v2beta/service.rb', line 158 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
.
195 196 197 198 199 200 201 202 203 204 205 |
# File 'lib/google/apis/drivelabels_v2beta/service.rb', line 195 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.
231 232 233 234 235 236 237 238 239 240 241 |
# File 'lib/google/apis/drivelabels_v2beta/service.rb', line 231 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.
278 279 280 281 282 283 284 285 286 287 288 289 |
# File 'lib/google/apis/drivelabels_v2beta/service.rb', line 278 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.
985 986 987 988 989 990 991 992 993 |
# File 'lib/google/apis/drivelabels_v2beta/service.rb', line 985 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.
1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 |
# File 'lib/google/apis/drivelabels_v2beta/service.rb', line 1019 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.
494 495 496 497 498 499 500 501 502 503 504 |
# File 'lib/google/apis/drivelabels_v2beta/service.rb', line 494 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.
684 685 686 687 688 689 690 691 692 693 694 695 |
# File 'lib/google/apis/drivelabels_v2beta/service.rb', line 684 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.
761 762 763 764 765 766 767 768 769 770 771 |
# File 'lib/google/apis/drivelabels_v2beta/service.rb', line 761 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.
951 952 953 954 955 956 957 958 959 960 961 962 |
# File 'lib/google/apis/drivelabels_v2beta/service.rb', line 951 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.
335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 |
# File 'lib/google/apis/drivelabels_v2beta/service.rb', line 335 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.
384 385 386 387 388 389 390 391 392 393 394 |
# File 'lib/google/apis/drivelabels_v2beta/service.rb', line 384 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.
418 419 420 421 422 423 424 425 426 427 428 |
# File 'lib/google/apis/drivelabels_v2beta/service.rb', line 418 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.
457 458 459 460 461 462 463 464 465 466 467 468 |
# File 'lib/google/apis/drivelabels_v2beta/service.rb', line 457 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.
724 725 726 727 728 729 730 731 732 733 734 735 |
# File 'lib/google/apis/drivelabels_v2beta/service.rb', line 724 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 |