get method
Gets a notification.
Request parameters:
name
- Required. A name of the notification to retrieve. Format:
organizations/{organization}/locations/{location}/notifications/{notification}
or projects/{projects}/locations/{location}/notifications/{notification}.
Value must have pattern
^organizations/\[^/\]+/locations/\[^/\]+/notifications/\[^/\]+$
.
languageCode
- ISO code for requested localization language. If unset,
will be interpereted as "en". If the requested language is valid, but not
supported for this notification, English will be returned with an "Not
applicable" LocalizationState. If the ISO code is invalid (i.e. not a real
language), this RPC will throw an error.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a GoogleCloudAdvisorynotificationsV1Notification.
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<GoogleCloudAdvisorynotificationsV1Notification> get(
core.String name, {
core.String? languageCode,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (languageCode != null) 'languageCode': [languageCode],
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return GoogleCloudAdvisorynotificationsV1Notification.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}