list method
Retrieves a list of calendar resources for an account.
Request parameters:
customer - The unique ID for the customer's Google Workspace account. As
an account administrator, you can also use the my_customer alias to
represent your account's customer ID.
maxResults - Maximum number of results to return.
Value must be between "1" and "500".
orderBy - Field(s) to sort results by in either ascending or descending
order. Supported fields include resourceId, resourceName, capacity,
buildingId, and floorName. If no order is specified, defaults to
ascending. Should be of the form "field [asc|desc], field [asc|desc],
...". For example buildingId, capacity desc would return results sorted
first by buildingId in ascending order then by capacity in descending
order.
pageToken - Token to specify the next page in the list.
query - String query used to filter results. Contains one or more search
clauses, each with a field, operator, and value. A field can be any of
supported fields and operators can be any of supported operations.
Operators include '=' for exact match, '!=' for mismatch and ':' for
prefix match or HAS match where applicable. For prefix match, the value
should always be followed by a *. Logical operators NOT and AND are
supported (in this order of precedence). Supported fields include
generatedResourceName, name, buildingId, floor_name, capacity,
featureInstances.feature.name, resourceEmail, resourceCategory. For
example buildingId=US-NYC-9TH AND featureInstances.feature.name:Phone.
$fields - Selector specifying which fields to include in a partial
response.
Completes with a CalendarResources.
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<CalendarResources> list(
core.String customer, {
core.int? maxResults,
core.String? orderBy,
core.String? pageToken,
core.String? query,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'maxResults': ?maxResults == null ? null : ['${maxResults}'],
'orderBy': ?orderBy == null ? null : [orderBy],
'pageToken': ?pageToken == null ? null : [pageToken],
'query': ?query == null ? null : [query],
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'admin/directory/v1/customer/' +
commons.escapeVariable('$customer') +
'/resources/calendars';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return CalendarResources.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}