get method

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

Retrieve a comment.

EXAMPLES: cURL: shell comment="projects/some-project/cases/43595344/comments/234567890" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$comment" 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().comments().get( name="projects/some-project/cases/43595344/comments/234567890", ) print(request.execute())

Request parameters:

name - Required. The name of the comment to retrieve. Value must have pattern ^\[^/\]+/\[^/\]+/cases/\[^/\]+/comments/\[^/\]+$.

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

Completes with a Comment.

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<Comment> 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 Comment.fromJson(response_ as core.Map<core.String, core.dynamic>);
}