list method
List all the comments associated with a case.
EXAMPLES: cURL: shell case="projects/some-project/cases/43595344" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$case/comments"
Python:
supportApiService = googleapiclient.discovery.build(
serviceName="cloudsupport", version=api_version,
discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}",
) request = ( supportApiService.cases() .comments()
.list(parent="projects/some-project/cases/43595344") )
print(request.execute()) ```
Request parameters:
[parent] - Required. The name of the case for which to list comments.
Value must have pattern `^\[^/\]+/\[^/\]+/cases/\[^/\]+$`.
[pageSize] - The maximum number of comments to fetch. Defaults to 10.
[pageToken] - A token identifying the page of results to return. If
unspecified, the first page is returned.
[$fields] - Selector specifying which fields to include in a partial
response.
Completes with a [ListCommentsResponse].
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<ListCommentsResponse> list(
core.String parent, {
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (pageSize != null) 'pageSize': ['${pageSize}'],
if (pageToken != null) 'pageToken': [pageToken],
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v2beta/' + core.Uri.encodeFull('$parent') + '/comments';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListCommentsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}