get method

Future<TestEnvironmentCatalog> get(
  1. String environmentType, {
  2. String? projectId,
  3. String? $fields,
})

Gets the catalog of supported test environments.

May return any of the following canonical error codes: - INVALID_ARGUMENT

  • if the request is malformed - NOT_FOUND - if the environment type does not exist - INTERNAL - if an internal error occurred

Request parameters:

environmentType - Required. The type of environment that should be listed. Possible string values are:

  • "ENVIRONMENT_TYPE_UNSPECIFIED" : Do not use. For proto versioning only.
  • "ANDROID" : A device running a version of the Android OS.
  • "IOS" : A device running a version of iOS.
  • "NETWORK_CONFIGURATION" : A network configuration to use when running a test.
  • "PROVIDED_SOFTWARE" : The software environment provided by TestExecutionService.
  • "DEVICE_IP_BLOCKS" : The IP blocks used by devices in the test environment.

projectId - For authorization, the cloud project requesting the TestEnvironmentCatalog.

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

Completes with a TestEnvironmentCatalog.

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

  final url_ = 'v1/testEnvironmentCatalog/' +
      commons.escapeVariable('$environmentType');

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