patch method

Future<Operation> patch(
  1. GoogleAppsCloudidentityDevicesV1ClientState request,
  2. String name, {
  3. String? customer,
  4. String? updateMask,
  5. String? $fields,
})

Updates the client state for the device user Note: This method is available only to customers who have one of the following SKUs: Enterprise Standard, Enterprise Plus, Enterprise for Education, and Cloud Identity Premium

request - The metadata request object.

Request parameters:

name - Output only. Resource name of the ClientState in format: devices/{device}/deviceUsers/{device_user}/clientState/{partner}, where partner corresponds to the partner storing the data. For partners belonging to the "BeyondCorp Alliance", this is the partner ID specified to you by Google. For all other callers, this is a string of the form: {customer}-suffix, where customer is your customer ID. The suffix is any string the caller specifies. This string will be displayed verbatim in the administration console. This suffix is used in setting up Custom Access Levels in Context-Aware Access. Your organization's customer ID can be obtained from the URL: GET https://www.googleapis.com/admin/directory/v1/customers/my_customer The id field in the response contains the customer ID starting with the letter 'C'. The customer ID to be used in this API is the string after the letter 'C' (not including 'C') Value must have pattern ^devices/\[^/\]+/deviceUsers/\[^/\]+/clientStates/\[^/\]+$.

customer - Optional. Resource name of the customer. If you're using this API for your own organization, use customers/my_customer If you're using this API to manage another organization, use customers/{customer}, where customer is the customer to whom the device belongs.

updateMask - Optional. Comma-separated list of fully qualified names of fields to be updated. If not specified, all updatable fields in ClientState are updated.

$fields - Selector specifying which fields to include in a partial response.

Completes with a Operation.

Completes with a commons.ApiRequestError if the API endpoint returned an error.

If the used http.Client completes with an error when making a REST call, this method will complete with the same error.

Implementation

async.Future<Operation> patch(
  GoogleAppsCloudidentityDevicesV1ClientState request,
  core.String name, {
  core.String? customer,
  core.String? updateMask,
  core.String? $fields,
}) async {
  final body_ = convert.json.encode(request);
  final queryParams_ = <core.String, core.List<core.String>>{
    if (customer != null) 'customer': [customer],
    if (updateMask != null) 'updateMask': [updateMask],
    if ($fields != null) 'fields': [$fields],
  };

  final url_ = 'v1/' + core.Uri.encodeFull('$name');

  final response_ = await _requester.request(
    url_,
    'PATCH',
    body: body_,
    queryParams: queryParams_,
  );
  return Operation.fromJson(response_ as core.Map<core.String, core.dynamic>);
}