Class: Google::Apis::AdminDirectoryV1::DirectoryService

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

Overview

Admin SDK API

Admin SDK lets administrators of enterprise domains to view and manage resources like user, groups etc. It also provides audit and usage reports of domain.

Examples:

require 'google/apis/admin_directory_v1'

Admin = Google::Apis::AdminDirectoryV1 # Alias the module
service = Admin::DirectoryService.new

See Also:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeDirectoryService

Returns a new instance of DirectoryService.



47
48
49
50
# File 'generated/google/apis/admin_directory_v1/service.rb', line 47

def initialize
  super('https://admin.googleapis.com/', '')
  @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 'generated/google/apis/admin_directory_v1/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 'generated/google/apis/admin_directory_v1/service.rb', line 45

def quota_user
  @quota_user
end

Instance Method Details

#action_chromeosdevice(customer_id, resource_id, chrome_os_device_action_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Takes an action that affects a Chrome OS Device. This includes deprovisioning, disabling, and re-enabling devices. Warning: * Deprovisioning a device will stop device policy syncing and remove device-level printers. After a device is deprovisioned, it must be wiped before it can be re-enrolled. * Lost or stolen devices should use the disable action. * Re-enabling a disabled device will consume a device license. If you do not have sufficient licenses available when completing the re-enable action, you will receive an error. For more information about deprovisioning and disabling devices, visit the help center.

Parameters:

  • customer_id (String)

    The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customerId. The customerId is also returned as part of the Users resource.

  • resource_id (String)

    The unique ID of the device. The resourceIds are returned in the response from the chromeosdevices.list method.

  • chrome_os_device_action_object (Google::Apis::AdminDirectoryV1::ChromeOsDeviceAction) (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:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

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



213
214
215
216
217
218
219
220
221
222
# File 'generated/google/apis/admin_directory_v1/service.rb', line 213

def action_chromeosdevice(customer_id, resource_id, chrome_os_device_action_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'admin/directory/v1/customer/{customerId}/devices/chromeos/{resourceId}/action', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::ChromeOsDeviceAction::Representation
  command.request_object = chrome_os_device_action_object
  command.params['customerId'] = customer_id unless customer_id.nil?
  command.params['resourceId'] = resource_id unless resource_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

#action_mobile_device(customer_id, resource_id, mobile_device_action_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Takes an action that affects a mobile device. For example, remotely wiping a device.

Parameters:

  • customer_id (String)

    The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customerId. The customerId is also returned as part of the Users resource.

  • resource_id (String)

    The unique ID the API service uses to identify the mobile device.

  • mobile_device_action_object (Google::Apis::AdminDirectoryV1::MobileDeviceAction) (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:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

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



1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
# File 'generated/google/apis/admin_directory_v1/service.rb', line 1482

def action_mobile_device(customer_id, resource_id, mobile_device_action_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'admin/directory/v1/customer/{customerId}/devices/mobile/{resourceId}/action', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::MobileDeviceAction::Representation
  command.request_object = mobile_device_action_object
  command.params['customerId'] = customer_id unless customer_id.nil?
  command.params['resourceId'] = resource_id unless resource_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

#calendar_resource(customer, calendar_resource_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::CalendarResource

Inserts a calendar resource.

Parameters:

  • customer (String)

    The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.

  • calendar_resource_object (Google::Apis::AdminDirectoryV1::CalendarResource) (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



2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
# File 'generated/google/apis/admin_directory_v1/service.rb', line 2191

def calendar_resource(customer, calendar_resource_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'admin/directory/v1/customer/{customer}/resources/calendars', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::CalendarResource::Representation
  command.request_object = calendar_resource_object
  command.response_representation = Google::Apis::AdminDirectoryV1::CalendarResource::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::CalendarResource
  command.params['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

#delete_asp(user_key, code_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Delete an ASP issued by a user.

Parameters:

  • user_key (String)

    Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.

  • code_id (Fixnum)

    The unique ID of the ASP to be deleted.

  • 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:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

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



75
76
77
78
79
80
81
82
# File 'generated/google/apis/admin_directory_v1/service.rb', line 75

def delete_asp(user_key, code_id, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'admin/directory/v1/users/{userKey}/asps/{codeId}', options)
  command.params['userKey'] = user_key unless user_key.nil?
  command.params['codeId'] = code_id unless code_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_calendar_resource(customer, calendar_resource_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Deletes a calendar resource.

Parameters:

  • customer (String)

    The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.

  • calendar_resource_id (String)

    The unique ID of the calendar resource to delete.

  • 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:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

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



2124
2125
2126
2127
2128
2129
2130
2131
# File 'generated/google/apis/admin_directory_v1/service.rb', line 2124

def delete_calendar_resource(customer, calendar_resource_id, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'admin/directory/v1/customer/{customer}/resources/calendars/{calendarResourceId}', options)
  command.params['customer'] = customer unless customer.nil?
  command.params['calendarResourceId'] = calendar_resource_id unless calendar_resource_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_domain(customer, domain_name, fields: nil, quota_user: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Deletes a domain of the customer.

Parameters:

  • customer (String)

    Immutable ID of the G Suite account.

  • domain_name (String)

    Name of domain to be deleted

  • 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:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

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



770
771
772
773
774
775
776
777
# File 'generated/google/apis/admin_directory_v1/service.rb', line 770

def delete_domain(customer, domain_name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'admin/directory/v1/customer/{customer}/domains/{domainName}', options)
  command.params['customer'] = customer unless customer.nil?
  command.params['domainName'] = domain_name unless domain_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

#delete_domain_alias(customer, domain_alias_name, fields: nil, quota_user: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Deletes a domain Alias of the customer.

Parameters:

  • customer (String)

    Immutable ID of the G Suite account.

  • domain_alias_name (String)

    Name of domain alias to be retrieved.

  • 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:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

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



640
641
642
643
644
645
646
647
# File 'generated/google/apis/admin_directory_v1/service.rb', line 640

def delete_domain_alias(customer, domain_alias_name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'admin/directory/v1/customer/{customer}/domainaliases/{domainAliasName}', options)
  command.params['customer'] = customer unless customer.nil?
  command.params['domainAliasName'] = domain_alias_name unless domain_alias_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

#delete_group(group_key, fields: nil, quota_user: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Deletes a group.

Parameters:

  • group_key (String)

    Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.

  • 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:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

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



896
897
898
899
900
901
902
# File 'generated/google/apis/admin_directory_v1/service.rb', line 896

def delete_group(group_key, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'admin/directory/v1/groups/{groupKey}', options)
  command.params['groupKey'] = group_key unless group_key.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_group_alias(group_key, group_alias, fields: nil, quota_user: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Removes an alias.

Parameters:

  • group_key (String)

    Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.

  • group_alias (String)

    The alias to be removed

  • 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:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

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



1117
1118
1119
1120
1121
1122
1123
1124
# File 'generated/google/apis/admin_directory_v1/service.rb', line 1117

def delete_group_alias(group_key, group_alias, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'admin/directory/v1/groups/{groupKey}/aliases/{alias}', options)
  command.params['groupKey'] = group_key unless group_key.nil?
  command.params['alias'] = group_alias unless group_alias.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_member(group_key, member_key, fields: nil, quota_user: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Removes a member from a group.

Parameters:

  • group_key (String)

    Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.

  • member_key (String)

    Identifies the group member in the API request. A group member can be a user or another group. The value can be the member's (group or user) primary email address, alias, or unique ID.

  • 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:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

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



1216
1217
1218
1219
1220
1221
1222
1223
# File 'generated/google/apis/admin_directory_v1/service.rb', line 1216

def delete_member(group_key, member_key, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'admin/directory/v1/groups/{groupKey}/members/{memberKey}', options)
  command.params['groupKey'] = group_key unless group_key.nil?
  command.params['memberKey'] = member_key unless member_key.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_mobile_device(customer_id, resource_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Removes a mobile device.

Parameters:

  • customer_id (String)

    The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customerId. The customerId is also returned as part of the Users resource.

  • resource_id (String)

    The unique ID the API service uses to identify the mobile device.

  • 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:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

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



1518
1519
1520
1521
1522
1523
1524
1525
# File 'generated/google/apis/admin_directory_v1/service.rb', line 1518

def delete_mobile_device(customer_id, resource_id, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'admin/directory/v1/customer/{customerId}/devices/mobile/{resourceId}', options)
  command.params['customerId'] = customer_id unless customer_id.nil?
  command.params['resourceId'] = resource_id unless resource_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_org_unit(customer_id, org_unit_path, fields: nil, quota_user: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Removes an organizational unit.

Parameters:

  • customer_id (String)

    The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customerId. The customerId is also returned as part of the Users resource.

  • org_unit_path (String)

    The full path of the organizational unit or its unique ID.

  • 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:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

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



1644
1645
1646
1647
1648
1649
1650
1651
# File 'generated/google/apis/admin_directory_v1/service.rb', line 1644

def delete_org_unit(customer_id, org_unit_path, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'admin/directory/v1/customer/{customerId}/orgunits/{+orgUnitPath}', options)
  command.params['customerId'] = customer_id unless customer_id.nil?
  command.params['orgUnitPath'] = org_unit_path unless org_unit_path.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_resource_building(customer, building_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Deletes a building.

Parameters:

  • customer (String)

    The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.

  • building_id (String)

    The id of the building to delete.

  • 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:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

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



1898
1899
1900
1901
1902
1903
1904
1905
# File 'generated/google/apis/admin_directory_v1/service.rb', line 1898

def delete_resource_building(customer, building_id, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'admin/directory/v1/customer/{customer}/resources/buildings/{buildingId}', options)
  command.params['customer'] = customer unless customer.nil?
  command.params['buildingId'] = building_id unless building_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_resource_feature(customer, feature_key, fields: nil, quota_user: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Deletes a feature.

Parameters:

  • customer (String)

    The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.

  • feature_key (String)

    The unique ID of the feature to delete.

  • 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:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

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



2362
2363
2364
2365
2366
2367
2368
2369
# File 'generated/google/apis/admin_directory_v1/service.rb', line 2362

def delete_resource_feature(customer, feature_key, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'admin/directory/v1/customer/{customer}/resources/features/{featureKey}', options)
  command.params['customer'] = customer unless customer.nil?
  command.params['featureKey'] = feature_key unless feature_key.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_role(customer, role_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Deletes a role.

Parameters:

  • customer (String)

    Immutable ID of the G Suite account.

  • role_id (String)

    Immutable ID of the role.

  • 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:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

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



2754
2755
2756
2757
2758
2759
2760
2761
# File 'generated/google/apis/admin_directory_v1/service.rb', line 2754

def delete_role(customer, role_id, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'admin/directory/v1/customer/{customer}/roles/{roleId}', options)
  command.params['customer'] = customer unless customer.nil?
  command.params['roleId'] = role_id unless role_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_role_assignment(customer, role_assignment_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Deletes a role assignment.

Parameters:

  • customer (String)

    Immutable ID of the G Suite account.

  • role_assignment_id (String)

    Immutable ID of the role assignment.

  • 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:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

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



2613
2614
2615
2616
2617
2618
2619
2620
# File 'generated/google/apis/admin_directory_v1/service.rb', line 2613

def delete_role_assignment(customer, role_assignment_id, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'admin/directory/v1/customer/{customer}/roleassignments/{roleAssignmentId}', options)
  command.params['customer'] = customer unless customer.nil?
  command.params['roleAssignmentId'] = role_assignment_id unless role_assignment_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_schema(customer_id, schema_key, fields: nil, quota_user: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Delete schema

Parameters:

  • customer_id (String)

    Immutable ID of the G Suite account.

  • schema_key (String)

    Name or immutable ID of the schema.

  • 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:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

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



2959
2960
2961
2962
2963
2964
2965
2966
# File 'generated/google/apis/admin_directory_v1/service.rb', line 2959

def delete_schema(customer_id, schema_key, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'admin/directory/v1/customer/{customerId}/schemas/{schemaKey}', options)
  command.params['customerId'] = customer_id unless customer_id.nil?
  command.params['schemaKey'] = schema_key unless schema_key.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_token(user_key, client_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Delete all access tokens issued by a user for an application.

Parameters:

  • user_key (String)

    Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.

  • client_id (String)

    The Client ID of the application the token is issued to.

  • 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:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

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



3159
3160
3161
3162
3163
3164
3165
3166
# File 'generated/google/apis/admin_directory_v1/service.rb', line 3159

def delete_token(user_key, client_id, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'admin/directory/v1/users/{userKey}/tokens/{clientId}', options)
  command.params['userKey'] = user_key unless user_key.nil?
  command.params['clientId'] = client_id unless client_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_user(user_key, fields: nil, quota_user: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Deletes a user.

Parameters:

  • user_key (String)

    Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.

  • 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:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

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



3283
3284
3285
3286
3287
3288
3289
# File 'generated/google/apis/admin_directory_v1/service.rb', line 3283

def delete_user(user_key, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'admin/directory/v1/users/{userKey}', options)
  command.params['userKey'] = user_key unless user_key.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_user_alias(user_key, user_alias, fields: nil, quota_user: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Removes an alias.

Parameters:

  • user_key (String)

    Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.

  • user_alias (String)

    The alias to be removed.

  • 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:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

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



3697
3698
3699
3700
3701
3702
3703
3704
# File 'generated/google/apis/admin_directory_v1/service.rb', line 3697

def delete_user_alias(user_key, user_alias, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'admin/directory/v1/users/{userKey}/aliases/{alias}', options)
  command.params['userKey'] = user_key unless user_key.nil?
  command.params['alias'] = user_alias unless user_alias.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_user_photo(user_key, fields: nil, quota_user: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Removes the user's photo.

Parameters:

  • user_key (String)

    Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.

  • 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:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

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



3828
3829
3830
3831
3832
3833
3834
# File 'generated/google/apis/admin_directory_v1/service.rb', line 3828

def delete_user_photo(user_key, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'admin/directory/v1/users/{userKey}/photos/thumbnail', options)
  command.params['userKey'] = user_key unless user_key.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#generate_verification_code(user_key, fields: nil, quota_user: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Generate new backup verification codes for the user.

Parameters:

  • user_key (String)

    Email or immutable ID of the user

  • 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:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

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



3956
3957
3958
3959
3960
3961
3962
# File 'generated/google/apis/admin_directory_v1/service.rb', line 3956

def generate_verification_code(user_key, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'admin/directory/v1/users/{userKey}/verificationCodes/generate', options)
  command.params['userKey'] = user_key unless user_key.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_asp(user_key, code_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Asp

Get information about an ASP issued by a user.

Parameters:

  • user_key (String)

    Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.

  • code_id (Fixnum)

    The unique ID of the ASP.

  • 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



107
108
109
110
111
112
113
114
115
116
# File 'generated/google/apis/admin_directory_v1/service.rb', line 107

def get_asp(user_key, code_id, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/users/{userKey}/asps/{codeId}', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::Asp::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Asp
  command.params['userKey'] = user_key unless user_key.nil?
  command.params['codeId'] = code_id unless code_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

#get_calendar_resource(customer, calendar_resource_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::CalendarResource

Retrieves a calendar resource.

Parameters:

  • customer (String)

    The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.

  • calendar_resource_id (String)

    The unique ID of the calendar resource to retrieve.

  • 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



2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
# File 'generated/google/apis/admin_directory_v1/service.rb', line 2157

def get_calendar_resource(customer, calendar_resource_id, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/customer/{customer}/resources/calendars/{calendarResourceId}', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::CalendarResource::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::CalendarResource
  command.params['customer'] = customer unless customer.nil?
  command.params['calendarResourceId'] = calendar_resource_id unless calendar_resource_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

#get_chrome_os_device(customer_id, device_id, projection: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::ChromeOsDevice

Retrieves a Chrome OS device's properties.

Parameters:

  • customer_id (String)

    The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customerId. The customerId is also returned as part of the Users resource.

  • device_id (String)

    The unique ID of the device. The deviceIds are returned in the response from the chromeosdevices.list method.

  • projection (String) (defaults to: nil)

    Determines whether the response contains the full list of properties or only a subset.

  • 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



254
255
256
257
258
259
260
261
262
263
264
# File 'generated/google/apis/admin_directory_v1/service.rb', line 254

def get_chrome_os_device(customer_id, device_id, projection: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/customer/{customerId}/devices/chromeos/{deviceId}', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::ChromeOsDevice::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::ChromeOsDevice
  command.params['customerId'] = customer_id unless customer_id.nil?
  command.params['deviceId'] = device_id unless device_id.nil?
  command.query['projection'] = projection unless projection.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_customer(customer_key, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Customer

Retrieves a customer.

Parameters:

  • customer_key (String)

    Id of the customer to be retrieved

  • 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



542
543
544
545
546
547
548
549
550
# File 'generated/google/apis/admin_directory_v1/service.rb', line 542

def get_customer(customer_key, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/customers/{customerKey}', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::Customer::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Customer
  command.params['customerKey'] = customer_key unless customer_key.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_customer_device_chromeo_command(customer_id, device_id, command_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::DirectoryChromeosdevicesCommand

Gets command data a specific command issued to the device.

Parameters:

  • customer_id (String)

    Immutable. Immutable ID of the G Suite account.

  • device_id (String)

    Immutable. Immutable ID of Chrome OS Device.

  • command_id (Fixnum)

    Immutable. Immutable ID of Chrome OS Device Command.

  • 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



510
511
512
513
514
515
516
517
518
519
520
# File 'generated/google/apis/admin_directory_v1/service.rb', line 510

def get_customer_device_chromeo_command(customer_id, device_id, command_id, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/customer/{customerId}/devices/chromeos/{deviceId}/commands/{commandId}', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::DirectoryChromeosdevicesCommand::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::DirectoryChromeosdevicesCommand
  command.params['customerId'] = customer_id unless customer_id.nil?
  command.params['deviceId'] = device_id unless device_id.nil?
  command.params['commandId'] = command_id unless command_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

#get_domain(customer, domain_name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Domains

Retrieves a domain of the customer.

Parameters:

  • customer (String)

    Immutable ID of the G Suite account.

  • domain_name (String)

    Name of domain to be retrieved

  • 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



801
802
803
804
805
806
807
808
809
810
# File 'generated/google/apis/admin_directory_v1/service.rb', line 801

def get_domain(customer, domain_name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/customer/{customer}/domains/{domainName}', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::Domains::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Domains
  command.params['customer'] = customer unless customer.nil?
  command.params['domainName'] = domain_name unless domain_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_domain_alias(customer, domain_alias_name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::DomainAlias

Retrieves a domain alias of the customer.

Parameters:

  • customer (String)

    Immutable ID of the G Suite account.

  • domain_alias_name (String)

    Name of domain alias to be retrieved.

  • 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



671
672
673
674
675
676
677
678
679
680
# File 'generated/google/apis/admin_directory_v1/service.rb', line 671

def get_domain_alias(customer, domain_alias_name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/customer/{customer}/domainaliases/{domainAliasName}', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::DomainAlias::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::DomainAlias
  command.params['customer'] = customer unless customer.nil?
  command.params['domainAliasName'] = domain_alias_name unless domain_alias_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_group(group_key, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Group

Retrieves a group's properties.

Parameters:

  • group_key (String)

    Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.

  • 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



925
926
927
928
929
930
931
932
933
# File 'generated/google/apis/admin_directory_v1/service.rb', line 925

def get_group(group_key, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/groups/{groupKey}', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::Group::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Group
  command.params['groupKey'] = group_key unless group_key.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_member(group_key, member_key, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Member

Retrieves a group member's properties.

Parameters:

  • group_key (String)

    Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.

  • member_key (String)

    Identifies the group member in the API request. A group member can be a user or another group. The value can be the member's (group or user) primary email address, alias, or unique ID.

  • 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



1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
# File 'generated/google/apis/admin_directory_v1/service.rb', line 1250

def get_member(group_key, member_key, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/groups/{groupKey}/members/{memberKey}', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::Member::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Member
  command.params['groupKey'] = group_key unless group_key.nil?
  command.params['memberKey'] = member_key unless member_key.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_mobile_device(customer_id, resource_id, projection: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::MobileDevice

Retrieves a mobile device's properties.

Parameters:

  • customer_id (String)

    The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customerId. The customerId is also returned as part of the Users resource.

  • resource_id (String)

    The unique ID the API service uses to identify the mobile device.

  • projection (String) (defaults to: nil)

    Restrict information returned to a set of selected fields.

  • 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



1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
# File 'generated/google/apis/admin_directory_v1/service.rb', line 1554

def get_mobile_device(customer_id, resource_id, projection: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/customer/{customerId}/devices/mobile/{resourceId}', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::MobileDevice::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::MobileDevice
  command.params['customerId'] = customer_id unless customer_id.nil?
  command.params['resourceId'] = resource_id unless resource_id.nil?
  command.query['projection'] = projection unless projection.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_org_unit(customer_id, org_unit_path, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::OrgUnit

Retrieves an organizational unit.

Parameters:

  • customer_id (String)

    The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customerId. The customerId is also returned as part of the Users resource.

  • org_unit_path (String)

    The full path of the organizational unit or its unique ID.

  • 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



1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
# File 'generated/google/apis/admin_directory_v1/service.rb', line 1678

def get_org_unit(customer_id, org_unit_path, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/customer/{customerId}/orgunits/{+orgUnitPath}', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::OrgUnit::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::OrgUnit
  command.params['customerId'] = customer_id unless customer_id.nil?
  command.params['orgUnitPath'] = org_unit_path unless org_unit_path.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_resource_building(customer, building_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Building

Retrieves a building.

Parameters:

  • customer (String)

    The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.

  • building_id (String)

    The unique ID of the building to retrieve.

  • 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



1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
# File 'generated/google/apis/admin_directory_v1/service.rb', line 1931

def get_resource_building(customer, building_id, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/customer/{customer}/resources/buildings/{buildingId}', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::Building::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Building
  command.params['customer'] = customer unless customer.nil?
  command.params['buildingId'] = building_id unless building_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

#get_resource_feature(customer, feature_key, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Feature

Retrieves a feature.

Parameters:

  • customer (String)

    The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.

  • feature_key (String)

    The unique ID of the feature to retrieve.

  • 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



2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
# File 'generated/google/apis/admin_directory_v1/service.rb', line 2395

def get_resource_feature(customer, feature_key, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/customer/{customer}/resources/features/{featureKey}', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::Feature::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Feature
  command.params['customer'] = customer unless customer.nil?
  command.params['featureKey'] = feature_key unless feature_key.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_role(customer, role_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Role

Retrieves a role.

Parameters:

  • customer (String)

    Immutable ID of the G Suite account.

  • role_id (String)

    Immutable ID of the role.

  • 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



2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
# File 'generated/google/apis/admin_directory_v1/service.rb', line 2785

def get_role(customer, role_id, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/customer/{customer}/roles/{roleId}', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::Role::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Role
  command.params['customer'] = customer unless customer.nil?
  command.params['roleId'] = role_id unless role_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

#get_role_assignment(customer, role_assignment_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::RoleAssignment

Retrieve a role assignment.

Parameters:

  • customer (String)

    Immutable ID of the G Suite account.

  • role_assignment_id (String)

    Immutable ID of the role assignment.

  • 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



2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
# File 'generated/google/apis/admin_directory_v1/service.rb', line 2644

def get_role_assignment(customer, role_assignment_id, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/customer/{customer}/roleassignments/{roleAssignmentId}', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::RoleAssignment::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::RoleAssignment
  command.params['customer'] = customer unless customer.nil?
  command.params['roleAssignmentId'] = role_assignment_id unless role_assignment_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

#get_schema(customer_id, schema_key, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Schema

Retrieve schema

Parameters:

  • customer_id (String)

    Immutable ID of the G Suite account.

  • schema_key (String)

    Name or immutable ID of the schema.

  • 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



2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
# File 'generated/google/apis/admin_directory_v1/service.rb', line 2990

def get_schema(customer_id, schema_key, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/customer/{customerId}/schemas/{schemaKey}', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::Schema::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Schema
  command.params['customerId'] = customer_id unless customer_id.nil?
  command.params['schemaKey'] = schema_key unless schema_key.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_token(user_key, client_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Token

Get information about an access token issued by a user.

Parameters:

  • user_key (String)

    Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.

  • client_id (String)

    The Client ID of the application the token is issued to.

  • 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



3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
# File 'generated/google/apis/admin_directory_v1/service.rb', line 3191

def get_token(user_key, client_id, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/users/{userKey}/tokens/{clientId}', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::Token::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Token
  command.params['userKey'] = user_key unless user_key.nil?
  command.params['clientId'] = client_id unless client_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

#get_user(user_key, custom_field_mask: nil, projection: nil, view_type: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::User

Retrieves a user.

Parameters:

  • user_key (String)

    Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.

  • custom_field_mask (String) (defaults to: nil)

    A comma-separated list of schema names. All fields from these schemas are fetched. This should only be set when projection=custom.

  • projection (String) (defaults to: nil)

    What subset of fields to fetch for this user.

  • view_type (String) (defaults to: nil)

    Whether to fetch the administrator-only or domain-wide public view of the user. For more information, see Retrieve a user as a non-administrator.

  • 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



3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
# File 'generated/google/apis/admin_directory_v1/service.rb', line 3321

def get_user(user_key, custom_field_mask: nil, projection: nil, view_type: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/users/{userKey}', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::User::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::User
  command.params['userKey'] = user_key unless user_key.nil?
  command.query['customFieldMask'] = custom_field_mask unless custom_field_mask.nil?
  command.query['projection'] = projection unless projection.nil?
  command.query['viewType'] = view_type unless view_type.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_photo(user_key, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::UserPhoto

Retrieves the user's photo.

Parameters:

  • user_key (String)

    Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.

  • 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



3857
3858
3859
3860
3861
3862
3863
3864
3865
# File 'generated/google/apis/admin_directory_v1/service.rb', line 3857

def get_user_photo(user_key, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/users/{userKey}/photos/thumbnail', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::UserPhoto::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::UserPhoto
  command.params['userKey'] = user_key unless user_key.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#has_member_member(group_key, member_key, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::MembersHasMember

Checks whether the given user is a member of the group. Membership can be direct or nested.

Parameters:

  • group_key (String)

    Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.

  • member_key (String)

    Identifies the user member in the API request. The value can be the user's primary email address, alias, or unique ID.

  • 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



1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
# File 'generated/google/apis/admin_directory_v1/service.rb', line 1286

def has_member_member(group_key, member_key, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/groups/{groupKey}/hasMember/{memberKey}', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::MembersHasMember::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::MembersHasMember
  command.params['groupKey'] = group_key unless group_key.nil?
  command.params['memberKey'] = member_key unless member_key.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#insert_domain(customer, domains_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Domains

Inserts a domain of the customer.

Parameters:

  • customer (String)

    Immutable ID of the G Suite account.

  • domains_object (Google::Apis::AdminDirectoryV1::Domains) (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



833
834
835
836
837
838
839
840
841
842
843
# File 'generated/google/apis/admin_directory_v1/service.rb', line 833

def insert_domain(customer, domains_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'admin/directory/v1/customer/{customer}/domains', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::Domains::Representation
  command.request_object = domains_object
  command.response_representation = Google::Apis::AdminDirectoryV1::Domains::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Domains
  command.params['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

#insert_domain_alias(customer, domain_alias_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::DomainAlias

Inserts a domain alias of the customer.

Parameters:

  • customer (String)

    Immutable ID of the G Suite account.

  • domain_alias_object (Google::Apis::AdminDirectoryV1::DomainAlias) (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



703
704
705
706
707
708
709
710
711
712
713
# File 'generated/google/apis/admin_directory_v1/service.rb', line 703

def insert_domain_alias(customer, domain_alias_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'admin/directory/v1/customer/{customer}/domainaliases', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::DomainAlias::Representation
  command.request_object = domain_alias_object
  command.response_representation = Google::Apis::AdminDirectoryV1::DomainAlias::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::DomainAlias
  command.params['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

#insert_group(group_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Group

Creates a group.

Parameters:

  • group_object (Google::Apis::AdminDirectoryV1::Group) (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



954
955
956
957
958
959
960
961
962
963
# File 'generated/google/apis/admin_directory_v1/service.rb', line 954

def insert_group(group_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'admin/directory/v1/groups', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::Group::Representation
  command.request_object = group_object
  command.response_representation = Google::Apis::AdminDirectoryV1::Group::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Group
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#insert_group_alias(group_key, alias_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Alias

Adds an alias for the group.

Parameters:

  • group_key (String)

    Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.

  • alias_object (Google::Apis::AdminDirectoryV1::Alias) (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



1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
# File 'generated/google/apis/admin_directory_v1/service.rb', line 1148

def insert_group_alias(group_key, alias_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'admin/directory/v1/groups/{groupKey}/aliases', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::Alias::Representation
  command.request_object = alias_object
  command.response_representation = Google::Apis::AdminDirectoryV1::Alias::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Alias
  command.params['groupKey'] = group_key unless group_key.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#insert_member(group_key, member_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Member

Adds a user to the specified group.

Parameters:

  • group_key (String)

    Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.

  • member_object (Google::Apis::AdminDirectoryV1::Member) (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



1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
# File 'generated/google/apis/admin_directory_v1/service.rb', line 1319

def insert_member(group_key, member_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'admin/directory/v1/groups/{groupKey}/members', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::Member::Representation
  command.request_object = member_object
  command.response_representation = Google::Apis::AdminDirectoryV1::Member::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Member
  command.params['groupKey'] = group_key unless group_key.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#insert_org_unit(customer_id, org_unit_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::OrgUnit

Adds an organizational unit.

Parameters:

  • customer_id (String)

    The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customerId. The customerId is also returned as part of the Users resource.

  • org_unit_object (Google::Apis::AdminDirectoryV1::OrgUnit) (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



1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
# File 'generated/google/apis/admin_directory_v1/service.rb', line 1713

def insert_org_unit(customer_id, org_unit_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'admin/directory/v1/customer/{customerId}/orgunits', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::OrgUnit::Representation
  command.request_object = org_unit_object
  command.response_representation = Google::Apis::AdminDirectoryV1::OrgUnit::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::OrgUnit
  command.params['customerId'] = customer_id unless customer_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

#insert_resource_building(customer, building_object = nil, coordinates_source: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Building

Inserts a building.

Parameters:

  • customer (String)

    The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.

  • building_object (Google::Apis::AdminDirectoryV1::Building) (defaults to: nil)
  • coordinates_source (String) (defaults to: nil)

    Source from which Building.coordinates are derived.

  • 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



1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
# File 'generated/google/apis/admin_directory_v1/service.rb', line 1967

def insert_resource_building(customer, building_object = nil, coordinates_source: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'admin/directory/v1/customer/{customer}/resources/buildings', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::Building::Representation
  command.request_object = building_object
  command.response_representation = Google::Apis::AdminDirectoryV1::Building::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Building
  command.params['customer'] = customer unless customer.nil?
  command.query['coordinatesSource'] = coordinates_source unless coordinates_source.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#insert_resource_feature(customer, feature_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Feature

Inserts a feature.

Parameters:

  • customer (String)

    The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.

  • feature_object (Google::Apis::AdminDirectoryV1::Feature) (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



2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
# File 'generated/google/apis/admin_directory_v1/service.rb', line 2429

def insert_resource_feature(customer, feature_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'admin/directory/v1/customer/{customer}/resources/features', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::Feature::Representation
  command.request_object = feature_object
  command.response_representation = Google::Apis::AdminDirectoryV1::Feature::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Feature
  command.params['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

#insert_role(customer, role_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Role

Creates a role.

Parameters:

  • customer (String)

    Immutable ID of the G Suite account.

  • role_object (Google::Apis::AdminDirectoryV1::Role) (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



2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
# File 'generated/google/apis/admin_directory_v1/service.rb', line 2817

def insert_role(customer, role_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'admin/directory/v1/customer/{customer}/roles', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::Role::Representation
  command.request_object = role_object
  command.response_representation = Google::Apis::AdminDirectoryV1::Role::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Role
  command.params['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

#insert_role_assignment(customer, role_assignment_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::RoleAssignment

Creates a role assignment.

Parameters:

  • customer (String)

    Immutable ID of the G Suite account.

  • role_assignment_object (Google::Apis::AdminDirectoryV1::RoleAssignment) (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



2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
# File 'generated/google/apis/admin_directory_v1/service.rb', line 2676

def insert_role_assignment(customer, role_assignment_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'admin/directory/v1/customer/{customer}/roleassignments', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::RoleAssignment::Representation
  command.request_object = role_assignment_object
  command.response_representation = Google::Apis::AdminDirectoryV1::RoleAssignment::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::RoleAssignment
  command.params['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

#insert_schema(customer_id, schema_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Schema

Create schema.

Parameters:

  • customer_id (String)

    Immutable ID of the G Suite account.

  • schema_object (Google::Apis::AdminDirectoryV1::Schema) (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



3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
# File 'generated/google/apis/admin_directory_v1/service.rb', line 3022

def insert_schema(customer_id, schema_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'admin/directory/v1/customer/{customerId}/schemas', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::Schema::Representation
  command.request_object = schema_object
  command.response_representation = Google::Apis::AdminDirectoryV1::Schema::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Schema
  command.params['customerId'] = customer_id unless customer_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

#insert_user(user_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::User

Creates a user.

Parameters:

  • user_object (Google::Apis::AdminDirectoryV1::User) (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



3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
# File 'generated/google/apis/admin_directory_v1/service.rb', line 3353

def insert_user(user_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'admin/directory/v1/users', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::User::Representation
  command.request_object = user_object
  command.response_representation = Google::Apis::AdminDirectoryV1::User::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::User
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#insert_user_alias(user_key, alias_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Alias

Adds an alias.

Parameters:

  • user_key (String)

    Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.

  • alias_object (Google::Apis::AdminDirectoryV1::Alias) (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



3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
# File 'generated/google/apis/admin_directory_v1/service.rb', line 3728

def insert_user_alias(user_key, alias_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'admin/directory/v1/users/{userKey}/aliases', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::Alias::Representation
  command.request_object = alias_object
  command.response_representation = Google::Apis::AdminDirectoryV1::Alias::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Alias
  command.params['userKey'] = user_key unless user_key.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#invalidate_verification_code(user_key, fields: nil, quota_user: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Invalidate the current backup verification codes for the user.

Parameters:

  • user_key (String)

    Email or immutable ID of the user

  • 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:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

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



3984
3985
3986
3987
3988
3989
3990
# File 'generated/google/apis/admin_directory_v1/service.rb', line 3984

def invalidate_verification_code(user_key, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'admin/directory/v1/users/{userKey}/verificationCodes/invalidate', options)
  command.params['userKey'] = user_key unless user_key.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#issue_customer_device_chromeo_command(customer_id, device_id, directory_chromeosdevices_issue_command_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::DirectoryChromeosdevicesIssueCommandResponse

Issues a command for the device to execute.

Parameters:

  • customer_id (String)

    Immutable. Immutable ID of the G Suite account.

  • device_id (String)

    Immutable. Immutable ID of Chrome OS Device.

  • directory_chromeosdevices_issue_command_request_object (Google::Apis::AdminDirectoryV1::DirectoryChromeosdevicesIssueCommandRequest) (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



473
474
475
476
477
478
479
480
481
482
483
484
# File 'generated/google/apis/admin_directory_v1/service.rb', line 473

def issue_customer_device_chromeo_command(customer_id, device_id, directory_chromeosdevices_issue_command_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'admin/directory/v1/customer/{customerId}/devices/chromeos/{deviceId}:issueCommand', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::DirectoryChromeosdevicesIssueCommandRequest::Representation
  command.request_object = directory_chromeosdevices_issue_command_request_object
  command.response_representation = Google::Apis::AdminDirectoryV1::DirectoryChromeosdevicesIssueCommandResponse::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::DirectoryChromeosdevicesIssueCommandResponse
  command.params['customerId'] = customer_id unless customer_id.nil?
  command.params['deviceId'] = device_id unless device_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

#list_asps(user_key, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Asps

List the ASPs issued by a user.

Parameters:

  • user_key (String)

    Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.

  • 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



139
140
141
142
143
144
145
146
147
# File 'generated/google/apis/admin_directory_v1/service.rb', line 139

def list_asps(user_key, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/users/{userKey}/asps', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::Asps::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Asps
  command.params['userKey'] = user_key unless user_key.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_calendar_resources(customer, max_results: nil, order_by: nil, page_token: nil, query: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::CalendarResources

Retrieves a list of calendar resources for an account.

Parameters:

  • customer (String)

    The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.

  • max_results (Fixnum) (defaults to: nil)

    Maximum number of results to return.

  • order_by (String) (defaults to: nil)

    Field(s) to sort results by in either ascending or descending order. Supported fields include resourceId, resourceName, capacity, buildingId, and floorName. If no order is specified, defaults to ascending. Should be of the form "field [asc|desc], field [asc|desc], ...". For example buildingId, capacity desc would return results sorted first by buildingId in ascending order then by capacity in descending order.

  • page_token (String) (defaults to: nil)

    Token to specify the next page in the list.

  • query (String) (defaults to: nil)

    String query used to filter results. Should be of the form "field operator value" where field can be any of supported fields and operators can be any of supported operations. Operators include '=' for exact match, '!=' for mismatch and ':' for prefix match or HAS match where applicable. For prefix match, the value should always be followed by a *. Logical operators NOT and AND are supported (in this order of precedence). Supported fields include generatedResourceName, name, buildingId, floor_name, capacity, featureInstances.feature.name, resourceEmail, resourceCategory. For example buildingId=US-NYC-9TH AND featureInstances.feature.name:Phone.

  • 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



2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
# File 'generated/google/apis/admin_directory_v1/service.rb', line 2246

def list_calendar_resources(customer, max_results: nil, order_by: nil, page_token: nil, query: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/customer/{customer}/resources/calendars', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::CalendarResources::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::CalendarResources
  command.params['customer'] = customer unless customer.nil?
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['orderBy'] = order_by unless order_by.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['query'] = query unless query.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_chrome_os_devices(customer_id, max_results: nil, order_by: nil, org_unit_path: nil, page_token: nil, projection: nil, query: nil, sort_order: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::ChromeOsDevices

Retrieves a paginated list of Chrome OS devices within an account.

Parameters:

  • customer_id (String)

    The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customerId. The customerId is also returned as part of the Users resource.

  • max_results (Fixnum) (defaults to: nil)

    Maximum number of results to return.

  • order_by (String) (defaults to: nil)

    Device property to use for sorting results.

  • org_unit_path (String) (defaults to: nil)

    The full path of the organizational unit or its unique ID.

  • page_token (String) (defaults to: nil)

    The pageToken query parameter is used to request the next page of query results. The follow-on request's pageToken query parameter is the nextPageToken from your previous response.

  • projection (String) (defaults to: nil)

    Restrict information returned to a set of selected fields.

  • query (String) (defaults to: nil)

    Search string in the format given at http://support.google.com/chromeos/a/bin/ answer.py?answer=1698333

  • sort_order (String) (defaults to: nil)

    Whether to return results in ascending or descending order. Must be used with the orderBy parameter.

  • 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



307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
# File 'generated/google/apis/admin_directory_v1/service.rb', line 307

def list_chrome_os_devices(customer_id, max_results: nil, order_by: nil, org_unit_path: nil, page_token: nil, projection: nil, query: nil, sort_order: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/customer/{customerId}/devices/chromeos', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::ChromeOsDevices::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::ChromeOsDevices
  command.params['customerId'] = customer_id unless customer_id.nil?
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['orderBy'] = order_by unless order_by.nil?
  command.query['orgUnitPath'] = org_unit_path unless org_unit_path.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['projection'] = projection unless projection.nil?
  command.query['query'] = query unless query.nil?
  command.query['sortOrder'] = sort_order unless sort_order.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_domain_aliases(customer, parent_domain_name: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::DomainAliases

Lists the domain aliases of the customer.

Parameters:

  • customer (String)

    Immutable ID of the G Suite account.

  • parent_domain_name (String) (defaults to: nil)

    Name of the parent domain for which domain aliases are to be fetched.

  • 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



737
738
739
740
741
742
743
744
745
746
# File 'generated/google/apis/admin_directory_v1/service.rb', line 737

def list_domain_aliases(customer, parent_domain_name: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/customer/{customer}/domainaliases', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::DomainAliases::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::DomainAliases
  command.params['customer'] = customer unless customer.nil?
  command.query['parentDomainName'] = parent_domain_name unless parent_domain_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

#list_domains(customer, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Domains2

Lists the domains of the customer.

Parameters:

  • customer (String)

    Immutable ID of the G Suite account.

  • 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



865
866
867
868
869
870
871
872
873
# File 'generated/google/apis/admin_directory_v1/service.rb', line 865

def list_domains(customer, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/customer/{customer}/domains', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::Domains2::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Domains2
  command.params['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_group_aliases(group_key, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Aliases

Lists all aliases for a group.

Parameters:

  • group_key (String)

    Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.

  • 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



1181
1182
1183
1184
1185
1186
1187
1188
1189
# File 'generated/google/apis/admin_directory_v1/service.rb', line 1181

def list_group_aliases(group_key, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/groups/{groupKey}/aliases', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::Aliases::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Aliases
  command.params['groupKey'] = group_key unless group_key.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_groups(customer: nil, domain: nil, max_results: nil, order_by: nil, page_token: nil, query: nil, sort_order: nil, user_key: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Groups

Retrieve all groups of a domain or of a user given a userKey (paginated)

Parameters:

  • customer (String) (defaults to: nil)

    The unique ID for the customer's G Suite account. In case of a multi-domain account, to fetch all groups for a customer, fill this field instead of domain. As an account administrator, you can also use the my_customer alias to represent your account's customerId. The customerId is also returned as part of the Users

  • domain (String) (defaults to: nil)

    The domain name. Use this field to get fields from only one domain. To return all domains for a customer account, use the customer query parameter instead.

  • max_results (Fixnum) (defaults to: nil)

    Maximum number of results to return. Max allowed value is 200.

  • order_by (String) (defaults to: nil)

    Column to use for sorting results

  • page_token (String) (defaults to: nil)

    Token to specify next page in the list

  • query (String) (defaults to: nil)

    Query string search. Should be of the form "". Complete documentation is at https: //developers.google.com/admin-sdk/directory/v1/guides/search-groups

  • sort_order (String) (defaults to: nil)

    Whether to return results in ascending or descending order. Only of use when orderBy is also used

  • user_key (String) (defaults to: nil)

    Email or immutable ID of the user if only those groups are to be listed, the given user is a member of. If it's an ID, it should match with the ID of the user object.

  • 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



1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
# File 'generated/google/apis/admin_directory_v1/service.rb', line 1008

def list_groups(customer: nil, domain: nil, max_results: nil, order_by: nil, page_token: nil, query: nil, sort_order: nil, user_key: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/groups', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::Groups::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Groups
  command.query['customer'] = customer unless customer.nil?
  command.query['domain'] = domain unless domain.nil?
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['orderBy'] = order_by unless order_by.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['query'] = query unless query.nil?
  command.query['sortOrder'] = sort_order unless sort_order.nil?
  command.query['userKey'] = user_key unless user_key.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_members(group_key, include_derived_membership: nil, max_results: nil, page_token: nil, roles: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Members

Retrieves a paginated list of all members in a group.

Parameters:

  • group_key (String)

    Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.

  • include_derived_membership (Boolean) (defaults to: nil)

    Whether to list indirect memberships. Default: false.

  • max_results (Fixnum) (defaults to: nil)

    Maximum number of results to return. Max allowed value is 200.

  • page_token (String) (defaults to: nil)

    Token to specify next page in the list.

  • roles (String) (defaults to: nil)

    The roles query parameter allows you to retrieve group members by role. Allowed values are OWNER, MANAGER, and MEMBER.

  • 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



1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
# File 'generated/google/apis/admin_directory_v1/service.rb', line 1361

def list_members(group_key, include_derived_membership: nil, max_results: nil, page_token: nil, roles: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/groups/{groupKey}/members', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::Members::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Members
  command.params['groupKey'] = group_key unless group_key.nil?
  command.query['includeDerivedMembership'] = include_derived_membership unless include_derived_membership.nil?
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['roles'] = roles unless roles.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_mobile_devices(customer_id, max_results: nil, order_by: nil, page_token: nil, projection: nil, query: nil, sort_order: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::MobileDevices

Retrieves a paginated list of all mobile devices for an account.

Parameters:

  • customer_id (String)

    The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customerId. The customerId is also returned as part of the Users resource.

  • max_results (Fixnum) (defaults to: nil)

    Maximum number of results to return. Max allowed value is 100.

  • order_by (String) (defaults to: nil)

    Device property to use for sorting results.

  • page_token (String) (defaults to: nil)

    Token to specify next page in the list

  • projection (String) (defaults to: nil)

    Restrict information returned to a set of selected fields.

  • query (String) (defaults to: nil)

    Search string in the format given at https://developers.google.com/admin-sdk/ directory/v1/search-operators

  • sort_order (String) (defaults to: nil)

    Whether to return results in ascending or descending order. Must be used with the orderBy parameter.

  • 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



1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
# File 'generated/google/apis/admin_directory_v1/service.rb', line 1603

def list_mobile_devices(customer_id, max_results: nil, order_by: nil, page_token: nil, projection: nil, query: nil, sort_order: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/customer/{customerId}/devices/mobile', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::MobileDevices::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::MobileDevices
  command.params['customerId'] = customer_id unless customer_id.nil?
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['orderBy'] = order_by unless order_by.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['projection'] = projection unless projection.nil?
  command.query['query'] = query unless query.nil?
  command.query['sortOrder'] = sort_order unless sort_order.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_org_units(customer_id, org_unit_path: nil, type: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::OrgUnits

Retrieves a list of all organizational units for an account.

Parameters:

  • customer_id (String)

    The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customerId. The customerId is also returned as part of the Users resource.

  • org_unit_path (String) (defaults to: nil)

    The full path to the organizational unit or its unique ID. Returns the children of the specified organizational unit.

  • type (String) (defaults to: nil)

    Whether to return all sub-organizations or just immediate children.

  • 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



1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
# File 'generated/google/apis/admin_directory_v1/service.rb', line 1753

def list_org_units(customer_id, org_unit_path: nil, type: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/customer/{customerId}/orgunits', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::OrgUnits::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::OrgUnits
  command.params['customerId'] = customer_id unless customer_id.nil?
  command.query['orgUnitPath'] = org_unit_path unless org_unit_path.nil?
  command.query['type'] = type unless type.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_privileges(customer, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Privileges

Retrieves a paginated list of all privileges for a customer.

Parameters:

  • customer (String)

    Immutable ID of the G Suite account.

  • 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



1864
1865
1866
1867
1868
1869
1870
1871
1872
# File 'generated/google/apis/admin_directory_v1/service.rb', line 1864

def list_privileges(customer, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/customer/{customer}/roles/ALL/privileges', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::Privileges::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Privileges
  command.params['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_resource_buildings(customer, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Buildings

Retrieves a list of buildings for an account.

Parameters:

  • customer (String)

    The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.

  • max_results (Fixnum) (defaults to: nil)

    Maximum number of results to return.

  • page_token (String) (defaults to: nil)

    Token to specify the next page in the list.

  • 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



2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
# File 'generated/google/apis/admin_directory_v1/service.rb', line 2006

def list_resource_buildings(customer, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/customer/{customer}/resources/buildings', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::Buildings::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Buildings
  command.params['customer'] = customer unless customer.nil?
  command.query['maxResults'] = max_results unless max_results.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_resource_features(customer, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Features

Retrieves a list of features for an account.

Parameters:

  • customer (String)

    The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.

  • max_results (Fixnum) (defaults to: nil)

    Maximum number of results to return.

  • page_token (String) (defaults to: nil)

    Token to specify the next page in the list.

  • 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



2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
# File 'generated/google/apis/admin_directory_v1/service.rb', line 2467

def list_resource_features(customer, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/customer/{customer}/resources/features', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::Features::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Features
  command.params['customer'] = customer unless customer.nil?
  command.query['maxResults'] = max_results unless max_results.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_role_assignments(customer, max_results: nil, page_token: nil, role_id: nil, user_key: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::RoleAssignments

Retrieves a paginated list of all roleAssignments.

Parameters:

  • customer (String)

    Immutable ID of the G Suite account.

  • max_results (Fixnum) (defaults to: nil)

    Maximum number of results to return.

  • page_token (String) (defaults to: nil)

    Token to specify the next page in the list.

  • role_id (String) (defaults to: nil)

    Immutable ID of a role. If included in the request, returns only role assignments containing this role ID.

  • user_key (String) (defaults to: nil)

    The user's primary email address, alias email address, or unique user ID. If included in the request, returns role assignments only for this user.

  • 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



2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
# File 'generated/google/apis/admin_directory_v1/service.rb', line 2718

def list_role_assignments(customer, max_results: nil, page_token: nil, role_id: nil, user_key: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/customer/{customer}/roleassignments', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::RoleAssignments::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::RoleAssignments
  command.params['customer'] = customer unless customer.nil?
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['roleId'] = role_id unless role_id.nil?
  command.query['userKey'] = user_key unless user_key.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_roles(customer, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Roles

Retrieves a paginated list of all the roles in a domain.

Parameters:

  • customer (String)

    Immutable ID of the G Suite account.

  • max_results (Fixnum) (defaults to: nil)

    Maximum number of results to return.

  • page_token (String) (defaults to: nil)

    Token to specify the next page in the list.

  • 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



2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
# File 'generated/google/apis/admin_directory_v1/service.rb', line 2853

def list_roles(customer, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/customer/{customer}/roles', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::Roles::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Roles
  command.params['customer'] = customer unless customer.nil?
  command.query['maxResults'] = max_results unless max_results.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_schemas(customer_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Schemas

Retrieve all schemas for a customer

Parameters:

  • customer_id (String)

    Immutable ID of the G Suite account.

  • 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



3054
3055
3056
3057
3058
3059
3060
3061
3062
# File 'generated/google/apis/admin_directory_v1/service.rb', line 3054

def list_schemas(customer_id, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/customer/{customerId}/schemas', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::Schemas::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Schemas
  command.params['customerId'] = customer_id unless customer_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

#list_tokens(user_key, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Tokens

Returns the set of tokens specified user has issued to 3rd party applications.

Parameters:

  • user_key (String)

    Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.

  • 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



3223
3224
3225
3226
3227
3228
3229
3230
3231
# File 'generated/google/apis/admin_directory_v1/service.rb', line 3223

def list_tokens(user_key, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/users/{userKey}/tokens', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::Tokens::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Tokens
  command.params['userKey'] = user_key unless user_key.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_user_aliases(user_key, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Aliases

Lists all aliases for a user.

Parameters:

  • user_key (String)

    Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.

  • 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



3761
3762
3763
3764
3765
3766
3767
3768
3769
# File 'generated/google/apis/admin_directory_v1/service.rb', line 3761

def list_user_aliases(user_key, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/users/{userKey}/aliases', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::Aliases::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Aliases
  command.params['userKey'] = user_key unless user_key.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_users(custom_field_mask: nil, customer: nil, domain: nil, max_results: nil, order_by: nil, page_token: nil, projection: nil, query: nil, show_deleted: nil, sort_order: nil, view_type: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Users

Retrieves a paginated list of either deleted users or all users in a domain.

Parameters:

  • custom_field_mask (String) (defaults to: nil)

    A comma-separated list of schema names. All fields from these schemas are fetched. This should only be set when projection=custom.

  • customer (String) (defaults to: nil)

    The unique ID for the customer's G Suite account. In case of a multi-domain account, to fetch all groups for a customer, fill this field instead of domain. You can also use the my_customer alias to represent your account's customerId. The customerId is also returned as part of the Users resource. Either the customer or the domain parameter must be provided.

  • domain (String) (defaults to: nil)

    The domain name. Use this field to get fields from only one domain. To return all domains for a customer account, use the customer query parameter instead. Either the customer or the domain parameter must be provided.

  • max_results (Fixnum) (defaults to: nil)

    Maximum number of results to return.

  • order_by (String) (defaults to: nil)

    Property to use for sorting results.

  • page_token (String) (defaults to: nil)

    Token to specify next page in the list

  • projection (String) (defaults to: nil)

    What subset of fields to fetch for this user.

  • query (String) (defaults to: nil)

    Query string for searching user fields. For more information on constructing user queries, see Search for Users.

  • show_deleted (String) (defaults to: nil)

    If set to true, retrieves the list of deleted users. (Default: false)

  • sort_order (String) (defaults to: nil)

    Whether to return results in ascending or descending order.

  • view_type (String) (defaults to: nil)

    Whether to fetch the administrator-only or domain-wide public view of the user. For more information, see Retrieve a user as a non-administrator.

  • 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



3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
# File 'generated/google/apis/admin_directory_v1/service.rb', line 3416

def list_users(custom_field_mask: nil, customer: nil, domain: nil, max_results: nil, order_by: nil, page_token: nil, projection: nil, query: nil, show_deleted: nil, sort_order: nil, view_type: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/users', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::Users::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Users
  command.query['customFieldMask'] = custom_field_mask unless custom_field_mask.nil?
  command.query['customer'] = customer unless customer.nil?
  command.query['domain'] = domain unless domain.nil?
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['orderBy'] = order_by unless order_by.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['projection'] = projection unless projection.nil?
  command.query['query'] = query unless query.nil?
  command.query['showDeleted'] = show_deleted unless show_deleted.nil?
  command.query['sortOrder'] = sort_order unless sort_order.nil?
  command.query['viewType'] = view_type unless view_type.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_verification_codes(user_key, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::VerificationCodes

Returns the current set of valid backup verification codes for the specified user.

Parameters:

  • user_key (String)

    Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.

  • 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



4014
4015
4016
4017
4018
4019
4020
4021
4022
# File 'generated/google/apis/admin_directory_v1/service.rb', line 4014

def list_verification_codes(user_key, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/users/{userKey}/verificationCodes', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::VerificationCodes::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::VerificationCodes
  command.params['userKey'] = user_key unless user_key.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#make_user_admin(user_key, user_make_admin_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Makes a user a super administrator.

Parameters:

  • user_key (String)

    Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.

  • user_make_admin_object (Google::Apis::AdminDirectoryV1::UserMakeAdmin) (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:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

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



3458
3459
3460
3461
3462
3463
3464
3465
3466
# File 'generated/google/apis/admin_directory_v1/service.rb', line 3458

def make_user_admin(user_key, user_make_admin_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'admin/directory/v1/users/{userKey}/makeAdmin', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::UserMakeAdmin::Representation
  command.request_object = user_make_admin_object
  command.params['userKey'] = user_key unless user_key.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#move_chromeosdevice_devices_to_ou(customer_id, org_unit_path, chrome_os_move_devices_to_ou_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Move or insert multiple Chrome OS devices to an organizational unit. You can move up to 50 devices at once.

Parameters:

  • customer_id (String)

    Immutable ID of the G Suite account

  • org_unit_path (String)

    Full path of the target organizational unit or its ID

  • chrome_os_move_devices_to_ou_object (Google::Apis::AdminDirectoryV1::ChromeOsMoveDevicesToOu) (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:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

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



348
349
350
351
352
353
354
355
356
357
# File 'generated/google/apis/admin_directory_v1/service.rb', line 348

def move_chromeosdevice_devices_to_ou(customer_id, org_unit_path, chrome_os_move_devices_to_ou_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'admin/directory/v1/customer/{customerId}/devices/chromeos/moveDevicesToOu', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::ChromeOsMoveDevicesToOu::Representation
  command.request_object = chrome_os_move_devices_to_ou_object
  command.params['customerId'] = customer_id unless customer_id.nil?
  command.query['orgUnitPath'] = org_unit_path unless org_unit_path.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#patch_calendar_resource(customer, calendar_resource_id, calendar_resource_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::CalendarResource

Patches a calendar resource via Apiary Patch Orchestration.

Parameters:

  • customer (String)

    The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.

  • calendar_resource_id (String)

    The unique ID of the calendar resource to update.

  • calendar_resource_object (Google::Apis::AdminDirectoryV1::CalendarResource) (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



2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
# File 'generated/google/apis/admin_directory_v1/service.rb', line 2285

def patch_calendar_resource(customer, calendar_resource_id, calendar_resource_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'admin/directory/v1/customer/{customer}/resources/calendars/{calendarResourceId}', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::CalendarResource::Representation
  command.request_object = calendar_resource_object
  command.response_representation = Google::Apis::AdminDirectoryV1::CalendarResource::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::CalendarResource
  command.params['customer'] = customer unless customer.nil?
  command.params['calendarResourceId'] = calendar_resource_id unless calendar_resource_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

#patch_chrome_os_device(customer_id, device_id, chrome_os_device_object = nil, projection: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::ChromeOsDevice

Updates a device's updatable properties, such as annotatedUser, annotatedLocation, notes, orgUnitPath, or annotatedAssetId. This method supports patch semantics.

Parameters:

  • customer_id (String)

    The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customerId. The customerId is also returned as part of the Users resource.

  • device_id (String)

    The unique ID of the device. The deviceIds are returned in the response from the chromeosdevices.list method.

  • chrome_os_device_object (Google::Apis::AdminDirectoryV1::ChromeOsDevice) (defaults to: nil)
  • projection (String) (defaults to: nil)

    Restrict information returned to a set of selected fields.

  • 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



391
392
393
394
395
396
397
398
399
400
401
402
403
# File 'generated/google/apis/admin_directory_v1/service.rb', line 391

def patch_chrome_os_device(customer_id, device_id, chrome_os_device_object = nil, projection: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'admin/directory/v1/customer/{customerId}/devices/chromeos/{deviceId}', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::ChromeOsDevice::Representation
  command.request_object = chrome_os_device_object
  command.response_representation = Google::Apis::AdminDirectoryV1::ChromeOsDevice::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::ChromeOsDevice
  command.params['customerId'] = customer_id unless customer_id.nil?
  command.params['deviceId'] = device_id unless device_id.nil?
  command.query['projection'] = projection unless projection.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#patch_customer(customer_key, customer_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Customer

Patch Customers via Apiary Patch Orchestration

Parameters:

  • customer_key (String)

    Id of the customer to be updated

  • customer_object (Google::Apis::AdminDirectoryV1::Customer) (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



573
574
575
576
577
578
579
580
581
582
583
# File 'generated/google/apis/admin_directory_v1/service.rb', line 573

def patch_customer(customer_key, customer_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'admin/directory/v1/customers/{customerKey}', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::Customer::Representation
  command.request_object = customer_object
  command.response_representation = Google::Apis::AdminDirectoryV1::Customer::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Customer
  command.params['customerKey'] = customer_key unless customer_key.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#patch_group(group_key, group_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Group

Updates a group's properties. This method supports patch semantics.

Parameters:

  • group_key (String)

    Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.

  • group_object (Google::Apis::AdminDirectoryV1::Group) (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



1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
# File 'generated/google/apis/admin_directory_v1/service.rb', line 1048

def patch_group(group_key, group_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'admin/directory/v1/groups/{groupKey}', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::Group::Representation
  command.request_object = group_object
  command.response_representation = Google::Apis::AdminDirectoryV1::Group::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Group
  command.params['groupKey'] = group_key unless group_key.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#patch_member(group_key, member_key, member_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Member

Updates the membership properties of a user in the specified group. This method supports patch semantics.

Parameters:

  • group_key (String)

    Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.

  • member_key (String)

    Identifies the group member in the API request. A group member can be a user or another group. The value can be the member's (group or user) primary email address, alias, or unique ID.

  • member_object (Google::Apis::AdminDirectoryV1::Member) (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



1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
# File 'generated/google/apis/admin_directory_v1/service.rb', line 1403

def patch_member(group_key, member_key, member_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'admin/directory/v1/groups/{groupKey}/members/{memberKey}', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::Member::Representation
  command.request_object = member_object
  command.response_representation = Google::Apis::AdminDirectoryV1::Member::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Member
  command.params['groupKey'] = group_key unless group_key.nil?
  command.params['memberKey'] = member_key unless member_key.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#patch_org_unit(customer_id, org_unit_path, org_unit_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::OrgUnit

Updates an organizational unit. This method supports patch semantics

Parameters:

  • customer_id (String)

    The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customerId. The customerId is also returned as part of the Users resource.

  • org_unit_path (String)

    The full path of the organizational unit or its unique ID.

  • org_unit_object (Google::Apis::AdminDirectoryV1::OrgUnit) (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



1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
# File 'generated/google/apis/admin_directory_v1/service.rb', line 1792

def patch_org_unit(customer_id, org_unit_path, org_unit_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'admin/directory/v1/customer/{customerId}/orgunits/{+orgUnitPath}', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::OrgUnit::Representation
  command.request_object = org_unit_object
  command.response_representation = Google::Apis::AdminDirectoryV1::OrgUnit::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::OrgUnit
  command.params['customerId'] = customer_id unless customer_id.nil?
  command.params['orgUnitPath'] = org_unit_path unless org_unit_path.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#patch_resource_building(customer, building_id, building_object = nil, coordinates_source: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Building

Patches a building via Apiary Patch Orchestration.

Parameters:

  • customer (String)

    The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.

  • building_id (String)

    The id of the building to update.

  • building_object (Google::Apis::AdminDirectoryV1::Building) (defaults to: nil)
  • coordinates_source (String) (defaults to: nil)

    Source from which Building.coordinates are derived.

  • 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



2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
# File 'generated/google/apis/admin_directory_v1/service.rb', line 2045

def patch_resource_building(customer, building_id, building_object = nil, coordinates_source: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'admin/directory/v1/customer/{customer}/resources/buildings/{buildingId}', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::Building::Representation
  command.request_object = building_object
  command.response_representation = Google::Apis::AdminDirectoryV1::Building::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Building
  command.params['customer'] = customer unless customer.nil?
  command.params['buildingId'] = building_id unless building_id.nil?
  command.query['coordinatesSource'] = coordinates_source unless coordinates_source.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#patch_resource_feature(customer, feature_key, feature_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Feature

Patches a feature via Apiary Patch Orchestration.

Parameters:

  • customer (String)

    The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.

  • feature_key (String)

    The unique ID of the feature to update.

  • feature_object (Google::Apis::AdminDirectoryV1::Feature) (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



2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
# File 'generated/google/apis/admin_directory_v1/service.rb', line 2504

def patch_resource_feature(customer, feature_key, feature_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'admin/directory/v1/customer/{customer}/resources/features/{featureKey}', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::Feature::Representation
  command.request_object = feature_object
  command.response_representation = Google::Apis::AdminDirectoryV1::Feature::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Feature
  command.params['customer'] = customer unless customer.nil?
  command.params['featureKey'] = feature_key unless feature_key.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#patch_role(customer, role_id, role_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Role

Patch role via Apiary Patch Orchestration

Parameters:

  • customer (String)

    Immutable ID of the G Suite account.

  • role_id (String)

    Immutable ID of the role.

  • role_object (Google::Apis::AdminDirectoryV1::Role) (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



2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
# File 'generated/google/apis/admin_directory_v1/service.rb', line 2888

def patch_role(customer, role_id, role_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'admin/directory/v1/customer/{customer}/roles/{roleId}', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::Role::Representation
  command.request_object = role_object
  command.response_representation = Google::Apis::AdminDirectoryV1::Role::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Role
  command.params['customer'] = customer unless customer.nil?
  command.params['roleId'] = role_id unless role_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

#patch_schema(customer_id, schema_key, schema_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Schema

Patch Schema via Apiary Patch Orchestration

Parameters:

  • customer_id (String)

    Immutable ID of the G Suite account.

  • schema_key (String)

    Name or immutable ID of the schema.

  • schema_object (Google::Apis::AdminDirectoryV1::Schema) (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



3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
# File 'generated/google/apis/admin_directory_v1/service.rb', line 3087

def patch_schema(customer_id, schema_key, schema_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'admin/directory/v1/customer/{customerId}/schemas/{schemaKey}', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::Schema::Representation
  command.request_object = schema_object
  command.response_representation = Google::Apis::AdminDirectoryV1::Schema::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Schema
  command.params['customerId'] = customer_id unless customer_id.nil?
  command.params['schemaKey'] = schema_key unless schema_key.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#patch_user(user_key, user_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::User

Updates a user using patch semantics. The update method should be used instead, since it also supports patch semantics and has better performance. This method is unable to clear fields that contain repeated objects (addresses, phones, etc). Use the update method instead.

Parameters:

  • user_key (String)

    Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.

  • user_object (Google::Apis::AdminDirectoryV1::User) (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



3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
# File 'generated/google/apis/admin_directory_v1/service.rb', line 3493

def patch_user(user_key, user_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'admin/directory/v1/users/{userKey}', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::User::Representation
  command.request_object = user_object
  command.response_representation = Google::Apis::AdminDirectoryV1::User::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::User
  command.params['userKey'] = user_key unless user_key.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#patch_user_photo(user_key, user_photo_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::UserPhoto

Adds a photo for the user. This method supports patch semantics.

Parameters:

  • user_key (String)

    Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.

  • user_photo_object (Google::Apis::AdminDirectoryV1::UserPhoto) (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



3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
# File 'generated/google/apis/admin_directory_v1/service.rb', line 3890

def patch_user_photo(user_key, user_photo_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'admin/directory/v1/users/{userKey}/photos/thumbnail', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::UserPhoto::Representation
  command.request_object = user_photo_object
  command.response_representation = Google::Apis::AdminDirectoryV1::UserPhoto::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::UserPhoto
  command.params['userKey'] = user_key unless user_key.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#rename_resource_feature(customer, old_name, feature_rename_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Renames a feature.

Parameters:

  • customer (String)

    The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.

  • old_name (String)

    The unique ID of the feature to rename.

  • feature_rename_object (Google::Apis::AdminDirectoryV1::FeatureRename) (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:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

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



2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
# File 'generated/google/apis/admin_directory_v1/service.rb', line 2542

def rename_resource_feature(customer, old_name, feature_rename_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'admin/directory/v1/customer/{customer}/resources/features/{oldName}/rename', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::FeatureRename::Representation
  command.request_object = feature_rename_object
  command.params['customer'] = customer unless customer.nil?
  command.params['oldName'] = old_name unless old_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

#sign_user_out(user_key, fields: nil, quota_user: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Sign a user out of all web and device sessions and reset their sign-in cookies. User will have to sign in by authenticating again.

Parameters:

  • user_key (String)

    Identifies the target user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.

  • 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:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

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



3527
3528
3529
3530
3531
3532
3533
# File 'generated/google/apis/admin_directory_v1/service.rb', line 3527

def sign_user_out(user_key, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'admin/directory/v1/users/{userKey}/signOut', options)
  command.params['userKey'] = user_key unless user_key.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#stop_channel(channel_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Stop watching resources through this channel.

Parameters:

  • channel_object (Google::Apis::AdminDirectoryV1::Channel) (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:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

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



168
169
170
171
172
173
174
175
# File 'generated/google/apis/admin_directory_v1/service.rb', line 168

def stop_channel(channel_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'admin/directory_v1/channels/stop', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::Channel::Representation
  command.request_object = channel_object
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#turn_two_step_verification_off(user_key, fields: nil, quota_user: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Turn off 2-Step Verification for user.

Parameters:

  • user_key (String)

    Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.

  • 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:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

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



3254
3255
3256
3257
3258
3259
3260
# File 'generated/google/apis/admin_directory_v1/service.rb', line 3254

def turn_two_step_verification_off(user_key, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'admin/directory/v1/users/{userKey}/twoStepVerification/turnOff', options)
  command.params['userKey'] = user_key unless user_key.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#undelete_user(user_key, user_undelete_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Undeletes a deleted user.

Parameters:

  • user_key (String)

    The immutable id of the user

  • user_undelete_object (Google::Apis::AdminDirectoryV1::UserUndelete) (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:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

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



3556
3557
3558
3559
3560
3561
3562
3563
3564
# File 'generated/google/apis/admin_directory_v1/service.rb', line 3556

def undelete_user(user_key, user_undelete_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'admin/directory/v1/users/{userKey}/undelete', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::UserUndelete::Representation
  command.request_object = user_undelete_object
  command.params['userKey'] = user_key unless user_key.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_calendar_resource(customer, calendar_resource_id, calendar_resource_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::CalendarResource

Updates a calendar resource. This method supports patch semantics, meaning you only need to include the fields you wish to update. Fields that are not present in the request will be preserved.

Parameters:

  • customer (String)

    The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.

  • calendar_resource_id (String)

    The unique ID of the calendar resource to update.

  • calendar_resource_object (Google::Apis::AdminDirectoryV1::CalendarResource) (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



2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
# File 'generated/google/apis/admin_directory_v1/service.rb', line 2325

def update_calendar_resource(customer, calendar_resource_id, calendar_resource_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:put, 'admin/directory/v1/customer/{customer}/resources/calendars/{calendarResourceId}', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::CalendarResource::Representation
  command.request_object = calendar_resource_object
  command.response_representation = Google::Apis::AdminDirectoryV1::CalendarResource::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::CalendarResource
  command.params['customer'] = customer unless customer.nil?
  command.params['calendarResourceId'] = calendar_resource_id unless calendar_resource_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

#update_chrome_os_device(customer_id, device_id, chrome_os_device_object = nil, projection: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::ChromeOsDevice

Updates a device's updatable properties, such as annotatedUser, annotatedLocation, notes, orgUnitPath, or annotatedAssetId.

Parameters:

  • customer_id (String)

    The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customerId. The customerId is also returned as part of the Users resource.

  • device_id (String)

    The unique ID of the device. The deviceIds are returned in the response from the chromeosdevices.list method.

  • chrome_os_device_object (Google::Apis::AdminDirectoryV1::ChromeOsDevice) (defaults to: nil)
  • projection (String) (defaults to: nil)

    Restrict information returned to a set of selected fields.

  • 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



436
437
438
439
440
441
442
443
444
445
446
447
448
# File 'generated/google/apis/admin_directory_v1/service.rb', line 436

def update_chrome_os_device(customer_id, device_id, chrome_os_device_object = nil, projection: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:put, 'admin/directory/v1/customer/{customerId}/devices/chromeos/{deviceId}', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::ChromeOsDevice::Representation
  command.request_object = chrome_os_device_object
  command.response_representation = Google::Apis::AdminDirectoryV1::ChromeOsDevice::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::ChromeOsDevice
  command.params['customerId'] = customer_id unless customer_id.nil?
  command.params['deviceId'] = device_id unless device_id.nil?
  command.query['projection'] = projection unless projection.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_customer(customer_key, customer_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Customer

Updates a customer.

Parameters:

  • customer_key (String)

    Id of the customer to be updated

  • customer_object (Google::Apis::AdminDirectoryV1::Customer) (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



606
607
608
609
610
611
612
613
614
615
616
# File 'generated/google/apis/admin_directory_v1/service.rb', line 606

def update_customer(customer_key, customer_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:put, 'admin/directory/v1/customers/{customerKey}', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::Customer::Representation
  command.request_object = customer_object
  command.response_representation = Google::Apis::AdminDirectoryV1::Customer::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Customer
  command.params['customerKey'] = customer_key unless customer_key.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_group(group_key, group_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Group

Updates a group's properties.

Parameters:

  • group_key (String)

    Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.

  • group_object (Google::Apis::AdminDirectoryV1::Group) (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



1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
# File 'generated/google/apis/admin_directory_v1/service.rb', line 1082

def update_group(group_key, group_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:put, 'admin/directory/v1/groups/{groupKey}', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::Group::Representation
  command.request_object = group_object
  command.response_representation = Google::Apis::AdminDirectoryV1::Group::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Group
  command.params['groupKey'] = group_key unless group_key.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_member(group_key, member_key, member_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Member

Updates the membership of a user in the specified group.

Parameters:

  • group_key (String)

    Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.

  • member_key (String)

    Identifies the group member in the API request. A group member can be a user or another group. The value can be the member's (group or user) primary email address, alias, or unique ID.

  • member_object (Google::Apis::AdminDirectoryV1::Member) (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



1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
# File 'generated/google/apis/admin_directory_v1/service.rb', line 1442

def update_member(group_key, member_key, member_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:put, 'admin/directory/v1/groups/{groupKey}/members/{memberKey}', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::Member::Representation
  command.request_object = member_object
  command.response_representation = Google::Apis::AdminDirectoryV1::Member::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Member
  command.params['groupKey'] = group_key unless group_key.nil?
  command.params['memberKey'] = member_key unless member_key.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_org_unit(customer_id, org_unit_path, org_unit_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::OrgUnit

Updates an organizational unit.

Parameters:

  • customer_id (String)

    The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customerId. The customerId is also returned as part of the Users resource.

  • org_unit_path (String)

    The full path of the organizational unit or its unique ID.

  • org_unit_object (Google::Apis::AdminDirectoryV1::OrgUnit) (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



1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
# File 'generated/google/apis/admin_directory_v1/service.rb', line 1831

def update_org_unit(customer_id, org_unit_path, org_unit_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:put, 'admin/directory/v1/customer/{customerId}/orgunits/{+orgUnitPath}', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::OrgUnit::Representation
  command.request_object = org_unit_object
  command.response_representation = Google::Apis::AdminDirectoryV1::OrgUnit::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::OrgUnit
  command.params['customerId'] = customer_id unless customer_id.nil?
  command.params['orgUnitPath'] = org_unit_path unless org_unit_path.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_resource_building(customer, building_id, building_object = nil, coordinates_source: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Building

Updates a building.

Parameters:

  • customer (String)

    The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.

  • building_id (String)

    The id of the building to update.

  • building_object (Google::Apis::AdminDirectoryV1::Building) (defaults to: nil)
  • coordinates_source (String) (defaults to: nil)

    Source from which Building.coordinates are derived.

  • 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



2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
# File 'generated/google/apis/admin_directory_v1/service.rb', line 2086

def update_resource_building(customer, building_id, building_object = nil, coordinates_source: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:put, 'admin/directory/v1/customer/{customer}/resources/buildings/{buildingId}', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::Building::Representation
  command.request_object = building_object
  command.response_representation = Google::Apis::AdminDirectoryV1::Building::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Building
  command.params['customer'] = customer unless customer.nil?
  command.params['buildingId'] = building_id unless building_id.nil?
  command.query['coordinatesSource'] = coordinates_source unless coordinates_source.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_resource_feature(customer, feature_key, feature_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Feature

Updates a feature.

Parameters:

  • customer (String)

    The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.

  • feature_key (String)

    The unique ID of the feature to update.

  • feature_object (Google::Apis::AdminDirectoryV1::Feature) (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



2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
# File 'generated/google/apis/admin_directory_v1/service.rb', line 2578

def update_resource_feature(customer, feature_key, feature_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:put, 'admin/directory/v1/customer/{customer}/resources/features/{featureKey}', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::Feature::Representation
  command.request_object = feature_object
  command.response_representation = Google::Apis::AdminDirectoryV1::Feature::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Feature
  command.params['customer'] = customer unless customer.nil?
  command.params['featureKey'] = feature_key unless feature_key.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_role(customer, role_id, role_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Role

Updates a role.

Parameters:

  • customer (String)

    Immutable ID of the G Suite account.

  • role_id (String)

    Immutable ID of the role.

  • role_object (Google::Apis::AdminDirectoryV1::Role) (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



2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
# File 'generated/google/apis/admin_directory_v1/service.rb', line 2924

def update_role(customer, role_id, role_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:put, 'admin/directory/v1/customer/{customer}/roles/{roleId}', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::Role::Representation
  command.request_object = role_object
  command.response_representation = Google::Apis::AdminDirectoryV1::Role::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Role
  command.params['customer'] = customer unless customer.nil?
  command.params['roleId'] = role_id unless role_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

#update_schema(customer_id, schema_key, schema_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Schema

Update schema

Parameters:

  • customer_id (String)

    Immutable ID of the G Suite account.

  • schema_key (String)

    Name or immutable ID of the schema.

  • schema_object (Google::Apis::AdminDirectoryV1::Schema) (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



3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
# File 'generated/google/apis/admin_directory_v1/service.rb', line 3123

def update_schema(customer_id, schema_key, schema_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:put, 'admin/directory/v1/customer/{customerId}/schemas/{schemaKey}', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::Schema::Representation
  command.request_object = schema_object
  command.response_representation = Google::Apis::AdminDirectoryV1::Schema::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Schema
  command.params['customerId'] = customer_id unless customer_id.nil?
  command.params['schemaKey'] = schema_key unless schema_key.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_user(user_key, user_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::User

Updates a user. This method supports patch semantics, meaning you only need to include the fields you wish to update. Fields that are not present in the request will be preserved, and fields set to null will be cleared.

Parameters:

  • user_key (String)

    Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.

  • user_object (Google::Apis::AdminDirectoryV1::User) (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



3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
# File 'generated/google/apis/admin_directory_v1/service.rb', line 3590

def update_user(user_key, user_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:put, 'admin/directory/v1/users/{userKey}', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::User::Representation
  command.request_object = user_object
  command.response_representation = Google::Apis::AdminDirectoryV1::User::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::User
  command.params['userKey'] = user_key unless user_key.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_user_photo(user_key, user_photo_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::UserPhoto

Adds a photo for the user.

Parameters:

  • user_key (String)

    Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.

  • user_photo_object (Google::Apis::AdminDirectoryV1::UserPhoto) (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



3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
# File 'generated/google/apis/admin_directory_v1/service.rb', line 3924

def update_user_photo(user_key, user_photo_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:put, 'admin/directory/v1/users/{userKey}/photos/thumbnail', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::UserPhoto::Representation
  command.request_object = user_photo_object
  command.response_representation = Google::Apis::AdminDirectoryV1::UserPhoto::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::UserPhoto
  command.params['userKey'] = user_key unless user_key.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#watch_user(channel_object = nil, custom_field_mask: nil, customer: nil, domain: nil, event: nil, max_results: nil, order_by: nil, page_token: nil, projection: nil, query: nil, show_deleted: nil, sort_order: nil, view_type: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Channel

Watch for changes in users list

Parameters:

  • channel_object (Google::Apis::AdminDirectoryV1::Channel) (defaults to: nil)
  • custom_field_mask (String) (defaults to: nil)

    Comma-separated list of schema names. All fields from these schemas are fetched. This should only be set when projection=custom.

  • customer (String) (defaults to: nil)

    Immutable ID of the G Suite account. In case of multi-domain, to fetch all users for a customer, fill this field instead of domain.

  • domain (String) (defaults to: nil)

    Name of the domain. Fill this field to get users from only this domain. To return all users in a multi-domain fill customer field instead."

  • event (String) (defaults to: nil)

    Events to watch for.

  • max_results (Fixnum) (defaults to: nil)

    Maximum number of results to return.

  • order_by (String) (defaults to: nil)

    Column to use for sorting results

  • page_token (String) (defaults to: nil)

    Token to specify next page in the list

  • projection (String) (defaults to: nil)

    What subset of fields to fetch for this user.

  • query (String) (defaults to: nil)

    Query string search. Should be of the form "". Complete documentation is at https: //developers.google.com/admin-sdk/directory/v1/guides/search-users

  • show_deleted (String) (defaults to: nil)

    If set to true, retrieves the list of deleted users. (Default: false)

  • sort_order (String) (defaults to: nil)

    Whether to return results in ascending or descending order.

  • view_type (String) (defaults to: nil)

    Whether to fetch the administrator-only or domain-wide public view of the user. For more information, see Retrieve a user as a non-administrator.

  • 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



3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
# File 'generated/google/apis/admin_directory_v1/service.rb', line 3651

def watch_user(channel_object = nil, custom_field_mask: nil, customer: nil, domain: nil, event: nil, max_results: nil, order_by: nil, page_token: nil, projection: nil, query: nil, show_deleted: nil, sort_order: nil, view_type: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'admin/directory/v1/users/watch', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::Channel::Representation
  command.request_object = channel_object
  command.response_representation = Google::Apis::AdminDirectoryV1::Channel::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Channel
  command.query['customFieldMask'] = custom_field_mask unless custom_field_mask.nil?
  command.query['customer'] = customer unless customer.nil?
  command.query['domain'] = domain unless domain.nil?
  command.query['event'] = event unless event.nil?
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['orderBy'] = order_by unless order_by.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['projection'] = projection unless projection.nil?
  command.query['query'] = query unless query.nil?
  command.query['showDeleted'] = show_deleted unless show_deleted.nil?
  command.query['sortOrder'] = sort_order unless sort_order.nil?
  command.query['viewType'] = view_type unless view_type.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#watch_user_alias(user_key, channel_object = nil, event: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Channel

Watch for changes in users list.

Parameters:

  • user_key (String)

    Email or immutable ID of the user

  • channel_object (Google::Apis::AdminDirectoryV1::Channel) (defaults to: nil)
  • event (String) (defaults to: nil)

    Events to watch for.

  • 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



3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
# File 'generated/google/apis/admin_directory_v1/service.rb', line 3794

def watch_user_alias(user_key, channel_object = nil, event: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'admin/directory/v1/users/{userKey}/aliases/watch', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::Channel::Representation
  command.request_object = channel_object
  command.response_representation = Google::Apis::AdminDirectoryV1::Channel::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Channel
  command.params['userKey'] = user_key unless user_key.nil?
  command.query['event'] = event unless event.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end