get method
Retrieves information about the specified reservation subBlock.
Request parameters:
project - Project ID for this request.
zone - Name of the zone for this request. Zone name should conform to
RFC1035.
parentName - The name of the parent reservation and parent block. In the
format of
reservations/{reservation_name}/reservationBlocks/{reservation_block_name}
reservationSubBlock - The name of the reservation subBlock.
Name should conform to RFC1035 or be a resource ID.
view - View of the subBlock.
Possible string values are:
- "SUB_BLOCK_VIEW_BASIC" : This view includes basic information about the reservation sub block
- "SUB_BLOCK_VIEW_FULL" : Includes detailed topology view.
- "SUB_BLOCK_VIEW_UNSPECIFIED" : The default / unset value. The API will default to the BASIC view.
$fields - Selector specifying which fields to include in a partial
response.
Completes with a ReservationSubBlocksGetResponse.
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<ReservationSubBlocksGetResponse> get(
core.String project,
core.String zone,
core.String parentName,
core.String reservationSubBlock, {
core.String? view,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'view': ?view == null ? null : [view],
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'projects/' +
commons.escapeVariable('$project') +
'/zones/' +
commons.escapeVariable('$zone') +
'/' +
commons.escapeVariable('$parentName') +
'/reservationSubBlocks/' +
commons.escapeVariable('$reservationSubBlock');
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ReservationSubBlocksGetResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}