Class: Google::Apis::DrivelabelsV2::DriveLabelsService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::DrivelabelsV2::DriveLabelsService
- Defined in:
- lib/google/apis/drivelabels_v2/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_v2_batch_delete_label_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2::GoogleProtobufEmpty
Deletes label permissions.
-
#batch_label_permission_update(parent, google_apps_drive_labels_v2_batch_update_label_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsResponse
Updates label permissions.
-
#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) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2::GoogleProtobufEmpty
Deletes label permissions.
-
#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) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsResponse
Updates label permissions.
-
#create_label(google_apps_drive_labels_v2_label_object = nil, language_code: nil, use_admin_access: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2Label
Creates a label.
-
#create_label_permission(parent, google_apps_drive_labels_v2_label_permission_object = nil, use_admin_access: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2LabelPermission
Updates a label's permissions.
-
#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) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2LabelPermission
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::DrivelabelsV2::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::DrivelabelsV2::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::DrivelabelsV2::GoogleProtobufEmpty
Deletes a label's permission.
-
#delta_label(name, google_apps_drive_labels_v2_delta_update_label_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2DeltaUpdateLabelResponse
Updates a single label by applying a set of update requests resulting in a new draft revision.
-
#disable_label(name, google_apps_drive_labels_v2_disable_label_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2Label
Disable a published label.
-
#enable_label(name, google_apps_drive_labels_v2_enable_label_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2Label
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::DrivelabelsV2::GoogleAppsDriveLabelsV2Label
Get a label by its resource name.
-
#get_limit_label(name: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2LabelLimits
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::DrivelabelsV2::GoogleAppsDriveLabelsV2UserCapabilities
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::DrivelabelsV2::GoogleAppsDriveLabelsV2ListLabelLocksResponse
Lists the label locks 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::DrivelabelsV2::GoogleAppsDriveLabelsV2ListLabelPermissionsResponse
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::DrivelabelsV2::GoogleAppsDriveLabelsV2ListLabelLocksResponse
Lists the label locks 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::DrivelabelsV2::GoogleAppsDriveLabelsV2ListLabelPermissionsResponse
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::DrivelabelsV2::GoogleAppsDriveLabelsV2ListLabelsResponse
List labels.
-
#publish_label(name, google_apps_drive_labels_v2_publish_label_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2Label
Publish all draft changes to the label.
-
#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) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2Label
Updates a label's
CopyMode. -
#update_label_label_enabled_app_settings(name, google_apps_drive_labels_v2_update_label_enabled_app_settings_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2Label
Updates a label's
EnabledAppSettings. -
#update_label_permissions(parent, google_apps_drive_labels_v2_label_permission_object = nil, use_admin_access: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2LabelPermission
Updates a label's permissions.
-
#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) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2LabelPermission
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_v2/service.rb', line 47 def initialize super(DEFAULT_ENDPOINT_TEMPLATE, '', client_name: 'google-apis-drivelabels_v2', client_version: Google::Apis::DrivelabelsV2::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_v2/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_v2/service.rb', line 45 def quota_user @quota_user end |
Instance Method Details
#batch_label_permission_delete(parent, google_apps_drive_labels_v2_batch_delete_label_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2::GoogleProtobufEmpty
Deletes label permissions. Permissions affect the label resource as a whole, aren't revisioned, and don't require publishing.
581 582 583 584 585 586 587 588 589 590 591 |
# File 'lib/google/apis/drivelabels_v2/service.rb', line 581 def (parent, = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2/{+parent}/permissions:batchDelete', ) command.request_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2BatchDeleteLabelPermissionsRequest::Representation command.request_object = command.response_representation = Google::Apis::DrivelabelsV2::GoogleProtobufEmpty::Representation command.response_class = Google::Apis::DrivelabelsV2::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_v2_batch_update_label_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsResponse
Updates label permissions. If a permission for the indicated principal doesn't exist, a label permission is created, otherwise the existing permission is updated. Permissions affect the label resource as a whole, aren't revisioned, and don't require publishing.
620 621 622 623 624 625 626 627 628 629 630 |
# File 'lib/google/apis/drivelabels_v2/service.rb', line 620 def (parent, = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2/{+parent}/permissions:batchUpdate', ) command.request_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsRequest::Representation command.request_object = command.response_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsResponse::Representation command.response_class = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsResponse 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_v2_batch_delete_label_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2::GoogleProtobufEmpty
Deletes label permissions. Permissions affect the label resource as a whole, aren't revisioned, and don't require publishing.
850 851 852 853 854 855 856 857 858 859 860 |
# File 'lib/google/apis/drivelabels_v2/service.rb', line 850 def (parent, = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2/{+parent}/permissions:batchDelete', ) command.request_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2BatchDeleteLabelPermissionsRequest::Representation command.request_object = command.response_representation = Google::Apis::DrivelabelsV2::GoogleProtobufEmpty::Representation command.response_class = Google::Apis::DrivelabelsV2::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_v2_batch_update_label_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsResponse
Updates label permissions. If a permission for the indicated principal doesn't exist, a label permission is created, otherwise the existing permission is updated. Permissions affect the label resource as a whole, aren't revisioned, and don't require publishing.
889 890 891 892 893 894 895 896 897 898 899 |
# File 'lib/google/apis/drivelabels_v2/service.rb', line 889 def (parent, = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2/{+parent}/permissions:batchUpdate', ) command.request_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsRequest::Representation command.request_object = command.response_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsResponse::Representation command.response_class = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsResponse 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_v2_label_object = nil, language_code: nil, use_admin_access: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2Label
Creates a label. For more information, see Create and publish a label.
81 82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/google/apis/drivelabels_v2/service.rb', line 81 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) command = make_simple_command(:post, 'v2/labels', ) command.request_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2Label::Representation command.request_object = google_apps_drive_labels_v2_label_object command.response_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2Label::Representation command.response_class = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2Label 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_v2_label_permission_object = nil, use_admin_access: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2LabelPermission
Updates a label's permissions. If a permission for the indicated principal doesn't exist, a label permission is created, otherwise the existing permission is updated. Permissions affect the label resource as a whole, aren' t revisioned, and don't require publishing.
660 661 662 663 664 665 666 667 668 669 670 671 |
# File 'lib/google/apis/drivelabels_v2/service.rb', line 660 def (parent, = nil, use_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2/{+parent}/permissions', ) command.request_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2LabelPermission::Representation command.request_object = command.response_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2LabelPermission::Representation command.response_class = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2LabelPermission 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_v2_label_permission_object = nil, use_admin_access: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2LabelPermission
Updates a label's permissions. If a permission for the indicated principal doesn't exist, a label permission is created, otherwise the existing permission is updated. Permissions affect the label resource as a whole, aren' t revisioned, and don't require publishing.
929 930 931 932 933 934 935 936 937 938 939 940 |
# File 'lib/google/apis/drivelabels_v2/service.rb', line 929 def (parent, = nil, use_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2/{+parent}/permissions', ) command.request_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2LabelPermission::Representation command.request_object = command.response_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2LabelPermission::Representation command.response_class = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2LabelPermission 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::DrivelabelsV2::GoogleProtobufEmpty
Permanently deletes a label and related metadata on Drive items. For more information, see Disable, enable, and delete a label. Once deleted, the label and related Drive item metadata will be deleted. Only draft labels and disabled labels may be deleted.
125 126 127 128 129 130 131 132 133 134 135 |
# File 'lib/google/apis/drivelabels_v2/service.rb', line 125 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, 'v2/{+name}', ) command.response_representation = Google::Apis::DrivelabelsV2::GoogleProtobufEmpty::Representation command.response_class = Google::Apis::DrivelabelsV2::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::DrivelabelsV2::GoogleProtobufEmpty
Deletes a label's permission. Permissions affect the label resource as a whole, aren't revisioned, and don't require publishing.
697 698 699 700 701 702 703 704 705 706 |
# File 'lib/google/apis/drivelabels_v2/service.rb', line 697 def (name, use_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v2/{+name}', ) command.response_representation = Google::Apis::DrivelabelsV2::GoogleProtobufEmpty::Representation command.response_class = Google::Apis::DrivelabelsV2::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::DrivelabelsV2::GoogleProtobufEmpty
Deletes a label's permission. Permissions affect the label resource as a whole, aren't revisioned, and don't require publishing.
966 967 968 969 970 971 972 973 974 975 |
# File 'lib/google/apis/drivelabels_v2/service.rb', line 966 def (name, use_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v2/{+name}', ) command.response_representation = Google::Apis::DrivelabelsV2::GoogleProtobufEmpty::Representation command.response_class = Google::Apis::DrivelabelsV2::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_v2_delta_update_label_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2DeltaUpdateLabelResponse
Updates a single label by applying a set of update requests resulting in a new draft revision. For more information, see Update a label. 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.
163 164 165 166 167 168 169 170 171 172 173 |
# File 'lib/google/apis/drivelabels_v2/service.rb', line 163 def delta_label(name, google_apps_drive_labels_v2_delta_update_label_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2/{+name}:delta', ) command.request_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2DeltaUpdateLabelRequest::Representation command.request_object = google_apps_drive_labels_v2_delta_update_label_request_object command.response_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2DeltaUpdateLabelResponse::Representation command.response_class = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2DeltaUpdateLabelResponse 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_v2_disable_label_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2Label
Disable a published label. For more information, see Disable, enable, and
delete a label. Disabling a label will result in a new disabled
published revision based on the current published revision. If there's 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.
202 203 204 205 206 207 208 209 210 211 212 |
# File 'lib/google/apis/drivelabels_v2/service.rb', line 202 def disable_label(name, google_apps_drive_labels_v2_disable_label_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2/{+name}:disable', ) command.request_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2DisableLabelRequest::Representation command.request_object = google_apps_drive_labels_v2_disable_label_request_object command.response_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2Label::Representation command.response_class = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2Label 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_v2_enable_label_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2Label
Enable a disabled label and restore it to its published state. For more information, see Disable, enable, and delete a label. This will result in a new published revision based on the current disabled published revision. If there's an existing disabled draft revision, a new revision will be created based on that draft and will be enabled.
240 241 242 243 244 245 246 247 248 249 250 |
# File 'lib/google/apis/drivelabels_v2/service.rb', line 240 def enable_label(name, google_apps_drive_labels_v2_enable_label_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2/{+name}:enable', ) command.request_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2EnableLabelRequest::Representation command.request_object = google_apps_drive_labels_v2_enable_label_request_object command.response_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2Label::Representation command.response_class = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2Label 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::DrivelabelsV2::GoogleAppsDriveLabelsV2Label
Get a label by its resource name. For more information, see Search for labels.
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.
288 289 290 291 292 293 294 295 296 297 298 299 |
# File 'lib/google/apis/drivelabels_v2/service.rb', line 288 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, 'v2/{+name}', ) command.response_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2Label::Representation command.response_class = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2Label 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::DrivelabelsV2::GoogleAppsDriveLabelsV2LabelLimits
Get the constraints on the structure of a label; such as, the maximum number of fields allowed and maximum length of the label title.
1039 1040 1041 1042 1043 1044 1045 1046 1047 |
# File 'lib/google/apis/drivelabels_v2/service.rb', line 1039 def get_limit_label(name: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/limits/label', ) command.response_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2LabelLimits::Representation command.response_class = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2LabelLimits 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::DrivelabelsV2::GoogleAppsDriveLabelsV2UserCapabilities
Gets the user capabilities.
1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 |
# File 'lib/google/apis/drivelabels_v2/service.rb', line 1073 def get_user_capabilities(name, customer: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+name}', ) command.response_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2UserCapabilities::Representation command.response_class = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2UserCapabilities 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::DrivelabelsV2::GoogleAppsDriveLabelsV2ListLabelLocksResponse
Lists the label locks on a label.
544 545 546 547 548 549 550 551 552 553 554 |
# File 'lib/google/apis/drivelabels_v2/service.rb', line 544 def list_label_locks(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+parent}/locks', ) command.response_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2ListLabelLocksResponse::Representation command.response_class = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2ListLabelLocksResponse 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::DrivelabelsV2::GoogleAppsDriveLabelsV2ListLabelPermissionsResponse
Lists a label's permissions.
736 737 738 739 740 741 742 743 744 745 746 747 |
# File 'lib/google/apis/drivelabels_v2/service.rb', line 736 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, 'v2/{+parent}/permissions', ) command.response_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2ListLabelPermissionsResponse::Representation command.response_class = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2ListLabelPermissionsResponse 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::DrivelabelsV2::GoogleAppsDriveLabelsV2ListLabelLocksResponse
Lists the label locks on a label.
813 814 815 816 817 818 819 820 821 822 823 |
# File 'lib/google/apis/drivelabels_v2/service.rb', line 813 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, 'v2/{+parent}/locks', ) command.response_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2ListLabelLocksResponse::Representation command.response_class = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2ListLabelLocksResponse 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::DrivelabelsV2::GoogleAppsDriveLabelsV2ListLabelPermissionsResponse
Lists a label's permissions.
1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 |
# File 'lib/google/apis/drivelabels_v2/service.rb', line 1005 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, 'v2/{+parent}/permissions', ) command.response_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2ListLabelPermissionsResponse::Representation command.response_class = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2ListLabelPermissionsResponse 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::DrivelabelsV2::GoogleAppsDriveLabelsV2ListLabelsResponse
List labels. For more information, see Search for labels.
346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 |
# File 'lib/google/apis/drivelabels_v2/service.rb', line 346 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, 'v2/labels', ) command.response_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2ListLabelsResponse::Representation command.response_class = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2ListLabelsResponse 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_v2_publish_label_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2Label
Publish all draft changes to the label. Once published, the label may not return to its draft state. For more information, see Create and publish a label. 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. For more information, see Label lifecycle. 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.FieldTypecannot be changed. * Changes to field validation options cannot reject something that was previously accepted. * Reducing the maximum entries.
398 399 400 401 402 403 404 405 406 407 408 |
# File 'lib/google/apis/drivelabels_v2/service.rb', line 398 def publish_label(name, google_apps_drive_labels_v2_publish_label_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2/{+name}:publish', ) command.request_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2PublishLabelRequest::Representation command.request_object = google_apps_drive_labels_v2_publish_label_request_object command.response_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2Label::Representation command.response_class = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2Label 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_v2_update_label_copy_mode_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2Label
Updates a label's CopyMode. Changes to this policy aren't revisioned, don't
require publishing, and take effect immediately.
432 433 434 435 436 437 438 439 440 441 442 |
# File 'lib/google/apis/drivelabels_v2/service.rb', line 432 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) command = make_simple_command(:post, 'v2/{+name}:updateLabelCopyMode', ) command.request_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2UpdateLabelCopyModeRequest::Representation command.request_object = google_apps_drive_labels_v2_update_label_copy_mode_request_object command.response_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2Label::Representation command.response_class = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2Label 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_enabled_app_settings(name, google_apps_drive_labels_v2_update_label_enabled_app_settings_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2Label
Updates a label's EnabledAppSettings. Enabling a label in a Google Workspace
app allows it to be used in that app. This change isn't revisioned, doesn't
require publishing, and takes effect immediately.
468 469 470 471 472 473 474 475 476 477 478 |
# File 'lib/google/apis/drivelabels_v2/service.rb', line 468 def update_label_label_enabled_app_settings(name, google_apps_drive_labels_v2_update_label_enabled_app_settings_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2/{+name}:updateLabelEnabledAppSettings', ) command.request_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2UpdateLabelEnabledAppSettingsRequest::Representation command.request_object = google_apps_drive_labels_v2_update_label_enabled_app_settings_request_object command.response_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2Label::Representation command.response_class = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2Label 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_v2_label_permission_object = nil, use_admin_access: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2LabelPermission
Updates a label's permissions. If a permission for the indicated principal doesn't exist, a label permission is created, otherwise the existing permission is updated. Permissions affect the label resource as a whole, aren' t revisioned, and don't require publishing.
507 508 509 510 511 512 513 514 515 516 517 518 |
# File 'lib/google/apis/drivelabels_v2/service.rb', line 507 def (parent, = nil, use_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v2/{+parent}/permissions', ) command.request_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2LabelPermission::Representation command.request_object = command.response_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2LabelPermission::Representation command.response_class = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2LabelPermission 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_v2_label_permission_object = nil, use_admin_access: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2LabelPermission
Updates a label's permissions. If a permission for the indicated principal doesn't exist, a label permission is created, otherwise the existing permission is updated. Permissions affect the label resource as a whole, aren' t revisioned, and don't require publishing.
776 777 778 779 780 781 782 783 784 785 786 787 |
# File 'lib/google/apis/drivelabels_v2/service.rb', line 776 def (parent, = nil, use_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v2/{+parent}/permissions', ) command.request_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2LabelPermission::Representation command.request_object = command.response_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2LabelPermission::Representation command.response_class = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2LabelPermission 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 |