Struct gsuite_api::resources::Resources [−][src]
pub struct Resources { pub client: Client, }
Fields
client: Client
Implementations
This function performs a GET
to the /admin/directory/v1/customer/{customer}/resources/buildings
endpoint.
Retrieves a list of buildings for an account.
Parameters:
customer: &str
– The unique ID for the customer’s Google Workspace account. As an account administrator, you can also use themy_customer
alias to represent your account’s customer ID.max_results: i64
– Maximum number of results to return.page_token: &str
– Token to specify the next page in the list.
This function performs a GET
to the /admin/directory/v1/customer/{customer}/resources/buildings
endpoint.
As opposed to directory_buildings_list
, this function returns all the pages of the request at once.
Retrieves a list of buildings for an account.
pub async fn directory_buildings_insert(
&self,
customer: &str,
coordinates_source: CoordinatesSource,
body: &Building
) -> Result<Building>
pub async fn directory_buildings_insert(
&self,
customer: &str,
coordinates_source: CoordinatesSource,
body: &Building
) -> Result<Building>
This function performs a POST
to the /admin/directory/v1/customer/{customer}/resources/buildings
endpoint.
Inserts a building.
Parameters:
customer: &str
– The unique ID for the customer’s Google Workspace account. As an account administrator, you can also use themy_customer
alias to represent your account’s customer ID.coordinates_source: crate::types::CoordinatesSource
– Source from which Building.coordinates are derived.
This function performs a GET
to the /admin/directory/v1/customer/{customer}/resources/buildings/{buildingId}
endpoint.
Retrieves a building.
Parameters:
customer: &str
– The unique ID for the customer’s Google Workspace account. As an account administrator, you can also use themy_customer
alias to represent your account’s customer ID.building_id: &str
– The unique ID of the building to retrieve.
pub async fn directory_buildings_update(
&self,
customer: &str,
building_id: &str,
coordinates_source: CoordinatesSource,
body: &Building
) -> Result<Building>
pub async fn directory_buildings_update(
&self,
customer: &str,
building_id: &str,
coordinates_source: CoordinatesSource,
body: &Building
) -> Result<Building>
This function performs a PUT
to the /admin/directory/v1/customer/{customer}/resources/buildings/{buildingId}
endpoint.
Updates a building.
Parameters:
customer: &str
– The unique ID for the customer’s Google Workspace account. As an account administrator, you can also use themy_customer
alias to represent your account’s customer ID.building_id: &str
– The id of the building to update.coordinates_source: crate::types::CoordinatesSource
– Source from which Building.coordinates are derived.
This function performs a DELETE
to the /admin/directory/v1/customer/{customer}/resources/buildings/{buildingId}
endpoint.
Deletes a building.
Parameters:
customer: &str
– The unique ID for the customer’s Google Workspace account. As an account administrator, you can also use themy_customer
alias to represent your account’s customer ID.building_id: &str
– The id of the building to delete.
pub async fn directory_buildings_patch(
&self,
customer: &str,
building_id: &str,
coordinates_source: CoordinatesSource,
body: &Building
) -> Result<Building>
pub async fn directory_buildings_patch(
&self,
customer: &str,
building_id: &str,
coordinates_source: CoordinatesSource,
body: &Building
) -> Result<Building>
This function performs a PATCH
to the /admin/directory/v1/customer/{customer}/resources/buildings/{buildingId}
endpoint.
Patches a building.
Parameters:
customer: &str
– The unique ID for the customer’s Google Workspace account. As an account administrator, you can also use themy_customer
alias to represent your account’s customer ID.building_id: &str
– The id of the building to update.coordinates_source: crate::types::CoordinatesSource
– Source from which Building.coordinates are derived.
pub async fn directory_calendars_list(
&self,
customer: &str,
max_results: i64,
order_by: &str,
page_token: &str,
query: &str
) -> Result<Vec<CalendarResource>>
pub async fn directory_calendars_list(
&self,
customer: &str,
max_results: i64,
order_by: &str,
page_token: &str,
query: &str
) -> Result<Vec<CalendarResource>>
This function performs a GET
to the /admin/directory/v1/customer/{customer}/resources/calendars
endpoint.
Retrieves a list of calendar resources for an account.
Parameters:
customer: &str
– The unique ID for the customer’s Google Workspace account. As an account administrator, you can also use themy_customer
alias to represent your account’s customer ID.max_results: i64
– Maximum number of results to return.order_by: &str
– Field(s) to sort results by in either ascending or descending order. Supported fields includeresourceId
,resourceName
,capacity
,buildingId
, andfloorName
. If no order is specified, defaults to ascending. Should be of the form “field [asc|desc], field [asc|desc], …”. For examplebuildingId, capacity desc
would return results sorted first bybuildingId
in ascending order then bycapacity
in descending order.page_token: &str
– Token to specify the next page in the list.query: &str
– String query used to filter results. Should be of the form “field operator value” where 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 includegeneratedResourceName
,name
,buildingId
,floor_name
,capacity
,featureInstances.feature.name
,resourceEmail
,resourceCategory
. For examplebuildingId=US-NYC-9TH AND featureInstances.feature.name:Phone
.
pub async fn directory_calendars_list_resources(
&self,
customer: &str,
order_by: &str,
query: &str
) -> Result<Vec<CalendarResource>>
pub async fn directory_calendars_list_resources(
&self,
customer: &str,
order_by: &str,
query: &str
) -> Result<Vec<CalendarResource>>
This function performs a GET
to the /admin/directory/v1/customer/{customer}/resources/calendars
endpoint.
As opposed to directory_calendars_list
, this function returns all the pages of the request at once.
Retrieves a list of calendar resources for an account.
pub async fn directory_calendars_insert(
&self,
customer: &str,
body: &CalendarResource
) -> Result<CalendarResource>
pub async fn directory_calendars_insert(
&self,
customer: &str,
body: &CalendarResource
) -> Result<CalendarResource>
This function performs a POST
to the /admin/directory/v1/customer/{customer}/resources/calendars
endpoint.
Inserts a calendar resource.
Parameters:
customer: &str
– The unique ID for the customer’s Google Workspace account. As an account administrator, you can also use themy_customer
alias to represent your account’s customer ID.
pub async fn directory_calendars_get(
&self,
customer: &str,
calendar_resource_id: &str
) -> Result<CalendarResource>
pub async fn directory_calendars_get(
&self,
customer: &str,
calendar_resource_id: &str
) -> Result<CalendarResource>
This function performs a GET
to the /admin/directory/v1/customer/{customer}/resources/calendars/{calendarResourceId}
endpoint.
Retrieves a calendar resource.
Parameters:
customer: &str
– The unique ID for the customer’s Google Workspace account. As an account administrator, you can also use themy_customer
alias to represent your account’s customer ID.calendar_resource_id: &str
– The unique ID of the calendar resource to retrieve.
pub async fn directory_calendars_update(
&self,
customer: &str,
calendar_resource_id: &str,
body: &CalendarResource
) -> Result<CalendarResource>
pub async fn directory_calendars_update(
&self,
customer: &str,
calendar_resource_id: &str,
body: &CalendarResource
) -> Result<CalendarResource>
This function performs a PUT
to the /admin/directory/v1/customer/{customer}/resources/calendars/{calendarResourceId}
endpoint.
Updates a calendar resource. This method supports patch semantics, meaning you only need to include the fields you wish to update. Fields that are not present in the request will be preserved.
Parameters:
customer: &str
– The unique ID for the customer’s Google Workspace account. As an account administrator, you can also use themy_customer
alias to represent your account’s customer ID.calendar_resource_id: &str
– The unique ID of the calendar resource to update.
This function performs a DELETE
to the /admin/directory/v1/customer/{customer}/resources/calendars/{calendarResourceId}
endpoint.
Deletes a calendar resource.
Parameters:
customer: &str
– The unique ID for the customer’s Google Workspace account. As an account administrator, you can also use themy_customer
alias to represent your account’s customer ID.calendar_resource_id: &str
– The unique ID of the calendar resource to delete.
pub async fn directory_calendars_patch(
&self,
customer: &str,
calendar_resource_id: &str,
body: &CalendarResource
) -> Result<CalendarResource>
pub async fn directory_calendars_patch(
&self,
customer: &str,
calendar_resource_id: &str,
body: &CalendarResource
) -> Result<CalendarResource>
This function performs a PATCH
to the /admin/directory/v1/customer/{customer}/resources/calendars/{calendarResourceId}
endpoint.
Patches a calendar resource.
Parameters:
customer: &str
– The unique ID for the customer’s Google Workspace account. As an account administrator, you can also use themy_customer
alias to represent your account’s customer ID.calendar_resource_id: &str
– The unique ID of the calendar resource to update.
This function performs a GET
to the /admin/directory/v1/customer/{customer}/resources/features
endpoint.
Retrieves a list of features for an account.
Parameters:
customer: &str
– The unique ID for the customer’s Google Workspace account. As an account administrator, you can also use themy_customer
alias to represent your account’s customer ID.max_results: i64
– Maximum number of results to return.page_token: &str
– Token to specify the next page in the list.
This function performs a GET
to the /admin/directory/v1/customer/{customer}/resources/features
endpoint.
As opposed to directory_features_list
, this function returns all the pages of the request at once.
Retrieves a list of features for an account.
This function performs a POST
to the /admin/directory/v1/customer/{customer}/resources/features
endpoint.
Inserts a feature.
Parameters:
customer: &str
– The unique ID for the customer’s Google Workspace account. As an account administrator, you can also use themy_customer
alias to represent your account’s customer ID.
This function performs a GET
to the /admin/directory/v1/customer/{customer}/resources/features/{featureKey}
endpoint.
Retrieves a feature.
Parameters:
customer: &str
– The unique ID for the customer’s Google Workspace account. As an account administrator, you can also use themy_customer
alias to represent your account’s customer ID.feature_key: &str
– The unique ID of the feature to retrieve.
This function performs a PUT
to the /admin/directory/v1/customer/{customer}/resources/features/{featureKey}
endpoint.
Updates a feature.
Parameters:
customer: &str
– The unique ID for the customer’s Google Workspace account. As an account administrator, you can also use themy_customer
alias to represent your account’s customer ID.feature_key: &str
– The unique ID of the feature to update.
This function performs a DELETE
to the /admin/directory/v1/customer/{customer}/resources/features/{featureKey}
endpoint.
Deletes a feature.
Parameters:
customer: &str
– The unique ID for the customer’s Google Workspace account. As an account administrator, you can also use themy_customer
alias to represent your account’s customer ID.feature_key: &str
– The unique ID of the feature to delete.
This function performs a PATCH
to the /admin/directory/v1/customer/{customer}/resources/features/{featureKey}
endpoint.
Patches a feature.
Parameters:
customer: &str
– The unique ID for the customer’s Google Workspace account. As an account administrator, you can also use themy_customer
alias to represent your account’s customer ID.feature_key: &str
– The unique ID of the feature to update.
pub async fn directory_features_rename(
&self,
customer: &str,
old_name: &str,
body: &FeatureRename
) -> Result<()>
pub async fn directory_features_rename(
&self,
customer: &str,
old_name: &str,
body: &FeatureRename
) -> Result<()>
This function performs a POST
to the /admin/directory/v1/customer/{customer}/resources/features/{oldName}/rename
endpoint.
Renames a feature.
Parameters:
customer: &str
– The unique ID for the customer’s Google Workspace account. As an account administrator, you can also use themy_customer
alias to represent your account’s customer ID.old_name: &str
– The unique ID of the feature to rename.