search method
Retrieve valid classifications to be used when creating a support case.
The classications are hierarchical, with each classification containing all levels of the hierarchy, separated by " > ". For example "Technical Issue > Compute > Compute Engine".
Request parameters:
pageSize
- The maximum number of cases fetched with each request.
pageToken
- A token identifying the page of results to return. If
unspecified, the first page is retrieved.
query
- An expression written in the Cloud filter language. If
non-empty, then only cases whose fields match the filter are returned. If
empty, then no messages are filtered out.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a SearchCaseClassificationsResponse
.
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<SearchCaseClassificationsResponse> search({
core.int? pageSize,
core.String? pageToken,
core.String? query,
core.String? $fields,
}) async {
final _queryParams = <core.String, core.List<core.String>>{
if (pageSize != null) 'pageSize': ['${pageSize}'],
if (pageToken != null) 'pageToken': [pageToken],
if (query != null) 'query': [query],
if ($fields != null) 'fields': [$fields],
};
const _url = 'v2beta/caseClassifications:search';
final _response = await _requester.request(
_url,
'GET',
queryParams: _queryParams,
);
return SearchCaseClassificationsResponse.fromJson(
_response as core.Map<core.String, core.dynamic>);
}