getPortabilityArchiveState method

Future<PortabilityArchiveState> getPortabilityArchiveState(
  1. String name, {
  2. String? $fields,
})

Retrieves the state of an Archive job for the Portability API.

Request parameters:

name - Required. The archive job ID that is returned when you request the state of the job. The format is: archiveJobs/{archive_job}/portabilityArchiveState. archive_job is the job ID returned by the InitiatePortabilityArchiveResponse. Value must have pattern ^archiveJobs/\[^/\]+/portabilityArchiveState$.

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

Completes with a PortabilityArchiveState.

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<PortabilityArchiveState> getPortabilityArchiveState(
  core.String name, {
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if ($fields != null) 'fields': [$fields],
  };

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

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