get method

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

Retrieve a case.

EXAMPLES: cURL: shell case="projects/some-project/cases/16033687" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$case" Python: ```python import googleapiclient.discovery api_version = "v2" supportApiService = googleapiclient.discovery.build( serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", ) request = supportApiService.cases().get( name="projects/some-project/cases/43595344", ) print(request.execute())


Request parameters:

[name] - Required. The full name of a case to be retrieved.
Value must have pattern `^\[^/\]+/\[^/\]+/cases/\[^/\]+$`.

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

Completes with a [Case].

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

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

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