list method

Future<GoogleCloudChannelV1ListEntitlementsResponse> list(
  1. String parent, {
  2. int? pageSize,
  3. String? pageToken,
  4. String? $fields,
})

Lists Entitlements belonging to a customer.

Possible error codes: * PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid. Return value: A list of the customer's Entitlements.

Request parameters:

parent - Required. The resource name of the reseller's customer account to list entitlements for. Parent uses the format: accounts/{account_id}/customers/{customer_id} Value must have pattern ^accounts/\[^/\]+/customers/\[^/\]+$.

pageSize - Optional. Requested page size. Server might return fewer results than requested. If unspecified, return at most 50 entitlements. The maximum value is 100; the server will coerce values above 100.

pageToken - Optional. A token for a page of results other than the first page. Obtained using ListEntitlementsResponse.next_page_token of the previous CloudChannelService.ListEntitlements call.

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

Completes with a GoogleCloudChannelV1ListEntitlementsResponse.

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<GoogleCloudChannelV1ListEntitlementsResponse> list(
  core.String parent, {
  core.int? pageSize,
  core.String? pageToken,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if (pageSize != null) 'pageSize': ['${pageSize}'],
    if (pageToken != null) 'pageToken': [pageToken],
    if ($fields != null) 'fields': [$fields],
  };

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

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