Class: Google::Apis::DrivelabelsV2beta::DriveLabelsService

Inherits:
Core::BaseService
  • Object
show all
Defined in:
lib/google/apis/drivelabels_v2beta/service.rb

Overview

Drive Labels API

An API for managing Drive Labels

Examples:

require 'google/apis/drivelabels_v2beta'

Drivelabels = Google::Apis::DrivelabelsV2beta # Alias the module
service = Drivelabels::DriveLabelsService.new

See Also:

Constant Summary collapse

DEFAULT_ENDPOINT_TEMPLATE =
"https://drivelabels.$UNIVERSE_DOMAIN$/"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeDriveLabelsService

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

#keyString

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.

Returns:

  • (String)

    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_userString

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.

Returns:

  • (String)

    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.

Parameters:

  • parent (String)

    Required. The parent Label resource name shared by all permissions being deleted. Format: labels/label If this is set, the parent field in the UpdateLabelPermissionRequest messages must either be empty or match this field.

  • google_apps_drive_labels_v2beta_batch_delete_label_permissions_request_object (Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaBatchDeleteLabelPermissionsRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



530
531
532
533
534
535
536
537
538
539
540
# File 'lib/google/apis/drivelabels_v2beta/service.rb', line 530

def batch_label_permission_delete(parent, google_apps_drive_labels_v2beta_batch_delete_label_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2beta/{+parent}/permissions:batchDelete', options)
  command.request_representation = Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaBatchDeleteLabelPermissionsRequest::Representation
  command.request_object = google_apps_drive_labels_v2beta_batch_delete_label_permissions_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.

Parameters:

  • parent (String)

    Required. The parent Label resource name shared by all permissions being updated. Format: labels/label If this is set, the parent field in the UpdateLabelPermissionRequest messages must either be empty or match this field.

  • google_apps_drive_labels_v2beta_batch_update_label_permissions_request_object (Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaBatchUpdateLabelPermissionsRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



568
569
570
571
572
573
574
575
576
577
578
# File 'lib/google/apis/drivelabels_v2beta/service.rb', line 568

def batch_label_permission_update(parent, google_apps_drive_labels_v2beta_batch_update_label_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2beta/{+parent}/permissions:batchUpdate', options)
  command.request_representation = Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaBatchUpdateLabelPermissionsRequest::Representation
  command.request_object = google_apps_drive_labels_v2beta_batch_update_label_permissions_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.

Parameters:

  • parent (String)

    Required. The parent Label resource name shared by all permissions being deleted. Format: labels/label If this is set, the parent field in the UpdateLabelPermissionRequest messages must either be empty or match this field.

  • google_apps_drive_labels_v2beta_batch_delete_label_permissions_request_object (Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaBatchDeleteLabelPermissionsRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



797
798
799
800
801
802
803
804
805
806
807
# File 'lib/google/apis/drivelabels_v2beta/service.rb', line 797

def 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, &block)
  command = make_simple_command(:post, 'v2beta/{+parent}/permissions:batchDelete', options)
  command.request_representation = Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaBatchDeleteLabelPermissionsRequest::Representation
  command.request_object = google_apps_drive_labels_v2beta_batch_delete_label_permissions_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.

Parameters:

  • parent (String)

    Required. The parent Label resource name shared by all permissions being updated. Format: labels/label If this is set, the parent field in the UpdateLabelPermissionRequest messages must either be empty or match this field.

  • google_apps_drive_labels_v2beta_batch_update_label_permissions_request_object (Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaBatchUpdateLabelPermissionsRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



835
836
837
838
839
840
841
842
843
844
845
# File 'lib/google/apis/drivelabels_v2beta/service.rb', line 835

def 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, &block)
  command = make_simple_command(:post, 'v2beta/{+parent}/permissions:batchUpdate', options)
  command.request_representation = Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaBatchUpdateLabelPermissionsRequest::Representation
  command.request_object = google_apps_drive_labels_v2beta_batch_update_label_permissions_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.

Parameters:

  • google_apps_drive_labels_v2beta_label_object (Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaLabel) (defaults to: nil)
  • language_code (String) (defaults to: nil)

    The BCP-47 language code to use for evaluating localized Field labels in response. When not specified, values in the default configured language will be used.

  • use_admin_access (Boolean) (defaults to: nil)

    Set to true in order to use the user's admin privileges. The server will verify the user is an admin before allowing access.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



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', options)
  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.

Parameters:

  • parent (String)

    Required. The parent Label resource name on the Label Permission is created. Format: labels/label

  • google_apps_drive_labels_v2beta_label_permission_object (Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaLabelPermission) (defaults to: nil)
  • use_admin_access (Boolean) (defaults to: nil)

    Set to true in order to use the user's admin credentials. The server will verify the user is an admin for the Label before allowing access.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



608
609
610
611
612
613
614
615
616
617
618
619
# File 'lib/google/apis/drivelabels_v2beta/service.rb', line 608

def create_label_permission(parent, google_apps_drive_labels_v2beta_label_permission_object = nil, use_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2beta/{+parent}/permissions', options)
  command.request_representation = Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaLabelPermission::Representation
  command.request_object = google_apps_drive_labels_v2beta_label_permission_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.

Parameters:

  • parent (String)

    Required. The parent Label resource name on the Label Permission is created. Format: labels/label

  • google_apps_drive_labels_v2beta_label_permission_object (Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaLabelPermission) (defaults to: nil)
  • use_admin_access (Boolean) (defaults to: nil)

    Set to true in order to use the user's admin credentials. The server will verify the user is an admin for the Label before allowing access.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



875
876
877
878
879
880
881
882
883
884
885
886
# File 'lib/google/apis/drivelabels_v2beta/service.rb', line 875

def 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, &block)
  command = make_simple_command(:post, 'v2beta/{+parent}/permissions', options)
  command.request_representation = Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaLabelPermission::Representation
  command.request_object = google_apps_drive_labels_v2beta_label_permission_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.

Parameters:

  • name (String)

    Required. Label resource name.

  • use_admin_access (Boolean) (defaults to: nil)

    Set to true in order to use the user's admin credentials. The server will verify the user is an admin for the Label before allowing access.

  • write_control_required_revision_id (String) (defaults to: nil)

    The revision_id of the label that the write request will be applied to. If this is not the latest revision of the label, the request will not be processed and will return a 400 Bad Request error.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



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}', options)
  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.

Parameters:

  • name (String)

    Required. Label Permission resource name.

  • use_admin_access (Boolean) (defaults to: nil)

    Set to true in order to use the user's admin credentials. The server will verify the user is an admin for the Label before allowing access.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



645
646
647
648
649
650
651
652
653
654
# File 'lib/google/apis/drivelabels_v2beta/service.rb', line 645

def delete_label_permission(name, use_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'v2beta/{+name}', options)
  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.

Parameters:

  • name (String)

    Required. Label Permission resource name.

  • use_admin_access (Boolean) (defaults to: nil)

    Set to true in order to use the user's admin credentials. The server will verify the user is an admin for the Label before allowing access.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



912
913
914
915
916
917
918
919
920
921
# File 'lib/google/apis/drivelabels_v2beta/service.rb', line 912

def delete_label_revision_permission(name, use_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'v2beta/{+name}', options)
  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.

Parameters:

  • name (String)

    Required. The resource name of the Label to update.

  • google_apps_drive_labels_v2beta_delta_update_label_request_object (Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



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', options)
  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.

Parameters:

  • name (String)

    Required. Label resource name.

  • google_apps_drive_labels_v2beta_disable_label_request_object (Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaDisableLabelRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



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', options)
  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.

Parameters:

  • name (String)

    Required. Label resource name.

  • google_apps_drive_labels_v2beta_enable_label_request_object (Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaEnableLabelRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



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', options)
  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.

Parameters:

  • name (String)

    Required. Label resource name. May be any of: * labels/id(equivalent to labels/`id`@latest) * `labels/`id`@latest` * `labels/`id`@published` * `labels/ `id`@`revision_id

  • language_code (String) (defaults to: nil)

    The BCP-47 language code to use for evaluating localized field labels. When not specified, values in the default configured language are used.

  • use_admin_access (Boolean) (defaults to: nil)

    Set to true in order to use the user's admin credentials. The server verifies that the user is an admin for the label before allowing access.

  • view (String) (defaults to: nil)

    When specified, only certain fields belonging to the indicated view are returned.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



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}', options)
  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.

Parameters:

  • name (String) (defaults to: nil)

    Required. Label revision resource name Must be: "limits/label"

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



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', options)
  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.

Parameters:

  • name (String)

    Required. The resource name of the user. Only "users/me/capabilities" is supported.

  • customer (String) (defaults to: nil)

    The customer to scope this request to. For example: "customers/abcd1234". If unset, will return settings within the current customer.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



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}', options)
  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.

Parameters:

  • parent (String)

    Required. Label on which Locks are applied. Format: labels/label

  • page_size (Fixnum) (defaults to: nil)

    Maximum number of Locks to return per page. Default: 100. Max: 200.

  • page_token (String) (defaults to: nil)

    The token of the page to return.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



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', options)
  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.

Parameters:

  • parent (String)

    Required. The parent Label resource name on which Label Permission are listed. Format: labels/label

  • page_size (Fixnum) (defaults to: nil)

    Maximum number of permissions to return per page. Default: 50. Max: 200.

  • page_token (String) (defaults to: nil)

    The token of the page to return.

  • use_admin_access (Boolean) (defaults to: nil)

    Set to true in order to use the user's admin credentials. The server will verify the user is an admin for the Label before allowing access.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



684
685
686
687
688
689
690
691
692
693
694
695
# File 'lib/google/apis/drivelabels_v2beta/service.rb', line 684

def list_label_permissions(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', options)
  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.

Parameters:

  • parent (String)

    Required. Label on which Locks are applied. Format: labels/label

  • page_size (Fixnum) (defaults to: nil)

    Maximum number of Locks to return per page. Default: 100. Max: 200.

  • page_token (String) (defaults to: nil)

    The token of the page to return.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



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', options)
  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.

Parameters:

  • parent (String)

    Required. The parent Label resource name on which Label Permission are listed. Format: labels/label

  • page_size (Fixnum) (defaults to: nil)

    Maximum number of permissions to return per page. Default: 50. Max: 200.

  • page_token (String) (defaults to: nil)

    The token of the page to return.

  • use_admin_access (Boolean) (defaults to: nil)

    Set to true in order to use the user's admin credentials. The server will verify the user is an admin for the Label before allowing access.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



951
952
953
954
955
956
957
958
959
960
961
962
# File 'lib/google/apis/drivelabels_v2beta/service.rb', line 951

def list_label_revision_permissions(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', options)
  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.

Parameters:

  • customer (String) (defaults to: nil)

    The customer to scope this list request to. For example: "customers/abcd1234". If unset, will return all labels within the current customer.

  • language_code (String) (defaults to: nil)

    The BCP-47 language code to use for evaluating localized field labels. When not specified, values in the default configured language are used.

  • minimum_role (String) (defaults to: nil)

    Specifies the level of access the user must have on the returned Labels. The minimum role a user must have on a label. Defaults to READER.

  • page_size (Fixnum) (defaults to: nil)

    Maximum number of labels to return per page. Default: 50. Max: 200.

  • page_token (String) (defaults to: nil)

    The token of the page to return.

  • published_only (Boolean) (defaults to: nil)

    Whether to include only published labels in the results. * When true, only the current published label revisions are returned. Disabled labels are included. Returned label resource names reference the published revision ( labels/id/revision_id). * When `false`, the current label revisions are returned, which might not be published. Returned label resource names don't reference a specific revision (`labels/`id).

  • use_admin_access (Boolean) (defaults to: nil)

    Set to true in order to use the user's admin credentials. This will return all Labels within the customer.

  • view (String) (defaults to: nil)

    When specified, only certain fields belonging to the indicated view are returned.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



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', options)
  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.

Parameters:

  • name (String)

    Required. Label resource name.

  • google_apps_drive_labels_v2beta_publish_label_request_object (Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaPublishLabelRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



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', options)
  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.

Parameters:

  • name (String)

    Required. The resource name of the Label to update.

  • google_apps_drive_labels_v2beta_update_label_copy_mode_request_object (Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaUpdateLabelCopyModeRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



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', options)
  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.

Parameters:

  • parent (String)

    Required. The parent Label resource name.

  • google_apps_drive_labels_v2beta_label_permission_object (Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaLabelPermission) (defaults to: nil)
  • use_admin_access (Boolean) (defaults to: nil)

    Set to true in order to use the user's admin credentials. The server will verify the user is an admin for the Label before allowing access.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



457
458
459
460
461
462
463
464
465
466
467
468
# File 'lib/google/apis/drivelabels_v2beta/service.rb', line 457

def update_label_permissions(parent, google_apps_drive_labels_v2beta_label_permission_object = nil, use_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'v2beta/{+parent}/permissions', options)
  command.request_representation = Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaLabelPermission::Representation
  command.request_object = google_apps_drive_labels_v2beta_label_permission_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.

Parameters:

  • parent (String)

    Required. The parent Label resource name.

  • google_apps_drive_labels_v2beta_label_permission_object (Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaLabelPermission) (defaults to: nil)
  • use_admin_access (Boolean) (defaults to: nil)

    Set to true in order to use the user's admin credentials. The server will verify the user is an admin for the Label before allowing access.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



724
725
726
727
728
729
730
731
732
733
734
735
# File 'lib/google/apis/drivelabels_v2beta/service.rb', line 724

def 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, &block)
  command = make_simple_command(:patch, 'v2beta/{+parent}/permissions', options)
  command.request_representation = Google::Apis::DrivelabelsV2beta::GoogleAppsDriveLabelsV2betaLabelPermission::Representation
  command.request_object = google_apps_drive_labels_v2beta_label_permission_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