get method

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

Retrieve an attachment associated with a support case.

EXAMPLES: cURL: shell attachment="projects/some-project/cases/23598314/attachments/0684M00000P3h1fQAB" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$attachment" Python:

supportApiService = googleapiclient.discovery.build(
serviceName="cloudsupport", version=api_version,
discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}",
) request = ( supportApiService.cases() .attachments()
.get(name="projects/some-project/cases/43595344/attachments/0684M00000P3h1fQAB")
) print(request.execute()) ```

Request parameters:

[name] - Required. The name of the attachment to get.
Value must have pattern
`^\[^/\]+/\[^/\]+/cases/\[^/\]+/attachments/\[^/\]+$`.

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

Completes with a [Attachment].

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

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

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