listResults method

Future<GoogleAdsSearchads360V23ServicesListBatchJobResultsResponse> listResults(
  1. String resourceName, {
  2. int? pageSize,
  3. String? pageToken,
  4. String? responseContentType,
  5. String? $fields,
})

Returns the results of the batch job.

The job must be done. Supports standard list paging. List of thrown errors: [AuthenticationError]() [AuthorizationError]() [BatchJobError]() [HeaderError]() [InternalError]() [QuotaError]() [RequestError]()

Request parameters:

resourceName - Required. The resource name of the batch job whose results are being listed. Value must have pattern ^customers/\[^/\]+/batchJobs/\[^/\]+$.

pageSize - null

pageToken - Token of the page to retrieve. If not specified, the first page of results will be returned. Use the value obtained from next_page_token in the previous response in order to request the next page of results.

responseContentType - The response content type setting. Determines whether the mutable resource or just the resource name should be returned. Possible string values are:

  • "UNSPECIFIED" : Not specified. Will return the resource name only in the response.
  • "RESOURCE_NAME_ONLY" : The mutate response will be the resource name.
  • "MUTABLE_RESOURCE" : The mutate response will contain the resource name and the resource with mutable fields if possible. Otherwise, only the resource name will be returned.

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

Completes with a GoogleAdsSearchads360V23ServicesListBatchJobResultsResponse.

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<GoogleAdsSearchads360V23ServicesListBatchJobResultsResponse>
listResults(
  core.String resourceName, {
  core.int? pageSize,
  core.String? pageToken,
  core.String? responseContentType,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    'pageSize': ?pageSize == null ? null : ['${pageSize}'],
    'pageToken': ?pageToken == null ? null : [pageToken],
    'responseContentType': ?responseContentType == null
        ? null
        : [responseContentType],
    'fields': ?$fields == null ? null : [$fields],
  };

  final url_ = 'v23/' + core.Uri.encodeFull('$resourceName') + ':listResults';

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