listSubscribers method

Future<GoogleCloudChannelV1ListSubscribersResponse> listSubscribers(
  1. String account, {
  2. int? pageSize,
  3. String? pageToken,
  4. String? $fields,
})

Lists service accounts with subscriber privileges on the Cloud Pub/Sub topic created for this Channel Services account.

Possible error codes: * PERMISSION_DENIED: The reseller account making the request and the provided reseller account are different, or the impersonated user is not a super admin. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: The topic resource doesn't exist. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. Return value: A list of service email addresses.

Request parameters:

account - Required. Resource name of the account. Value must have pattern ^accounts/\[^/\]+$.

pageSize - Optional. The maximum number of service accounts to return. The service may return fewer than this value. If unspecified, returns at most 100 service accounts. The maximum value is 1000; the server will coerce values above 1000.

pageToken - Optional. A page token, received from a previous ListSubscribers call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListSubscribers must match the call that provided the page token.

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

Completes with a GoogleCloudChannelV1ListSubscribersResponse.

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<GoogleCloudChannelV1ListSubscribersResponse> listSubscribers(
  core.String account, {
  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('$account') + ':listSubscribers';

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