Struct gsuite_api::resources::Resources
source · [−]pub struct Resources {
pub client: Client,
}
Fields
client: Client
Implementations
sourceimpl Resources
impl Resources
sourcepub async fn buildings_list(
&self,
customer: &str,
max_results: i64,
page_token: &str
) -> Result<Vec<Building>>
pub async fn buildings_list(
&self,
customer: &str,
max_results: i64,
page_token: &str
) -> Result<Vec<Building>>
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.
sourcepub async fn buildings_list_all(&self, customer: &str) -> Result<Vec<Building>>
pub async fn buildings_list_all(&self, customer: &str) -> Result<Vec<Building>>
This function performs a GET
to the /admin/directory/v1/customer/{customer}/resources/buildings
endpoint.
As opposed to buildings_list
, this function returns all the pages of the request at once.
Retrieves a list of buildings for an account.
sourcepub async fn buildings_insert(
&self,
customer: &str,
coordinates_source: CoordinatesSource,
body: &Building
) -> Result<Building>
pub async fn 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.
sourcepub async fn buildings_get(
&self,
customer: &str,
building_id: &str
) -> Result<Building>
pub async fn buildings_get(
&self,
customer: &str,
building_id: &str
) -> Result<Building>
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.
sourcepub async fn buildings_update(
&self,
customer: &str,
building_id: &str,
coordinates_source: CoordinatesSource,
body: &Building
) -> Result<Building>
pub async fn 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.
sourcepub async fn buildings_delete(
&self,
customer: &str,
building_id: &str
) -> Result<()>
pub async fn buildings_delete(
&self,
customer: &str,
building_id: &str
) -> Result<()>
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.
sourcepub async fn buildings_patch(
&self,
customer: &str,
building_id: &str,
coordinates_source: CoordinatesSource,
body: &Building
) -> Result<Building>
pub async fn 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.
sourcepub async fn calendars_list(
&self,
customer: &str,
max_results: i64,
order_by: &str,
page_token: &str,
query: &str
) -> Result<Vec<CalendarResource>>
pub async fn 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
.
sourcepub async fn calendars_list_all(
&self,
customer: &str,
order_by: &str,
query: &str
) -> Result<Vec<CalendarResource>>
pub async fn calendars_list_all(
&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 calendars_list
, this function returns all the pages of the request at once.
Retrieves a list of calendar resources for an account.
sourcepub async fn calendars_insert(
&self,
customer: &str,
body: &CalendarResource
) -> Result<CalendarResource>
pub async fn 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.
sourcepub async fn calendars_get(
&self,
customer: &str,
calendar_resource_id: &str
) -> Result<CalendarResource>
pub async fn 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.
sourcepub async fn calendars_update(
&self,
customer: &str,
calendar_resource_id: &str,
body: &CalendarResource
) -> Result<CalendarResource>
pub async fn 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.
sourcepub async fn calendars_delete(
&self,
customer: &str,
calendar_resource_id: &str
) -> Result<()>
pub async fn calendars_delete(
&self,
customer: &str,
calendar_resource_id: &str
) -> Result<()>
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.
sourcepub async fn calendars_patch(
&self,
customer: &str,
calendar_resource_id: &str,
body: &CalendarResource
) -> Result<CalendarResource>
pub async fn 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.
sourcepub async fn features_list(
&self,
customer: &str,
max_results: i64,
page_token: &str
) -> Result<Vec<Feature>>
pub async fn features_list(
&self,
customer: &str,
max_results: i64,
page_token: &str
) -> Result<Vec<Feature>>
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.
sourcepub async fn features_list_all(&self, customer: &str) -> Result<Vec<Feature>>
pub async fn features_list_all(&self, customer: &str) -> Result<Vec<Feature>>
This function performs a GET
to the /admin/directory/v1/customer/{customer}/resources/features
endpoint.
As opposed to features_list
, this function returns all the pages of the request at once.
Retrieves a list of features for an account.
sourcepub async fn features_insert(
&self,
customer: &str,
body: &Feature
) -> Result<Feature>
pub async fn features_insert(
&self,
customer: &str,
body: &Feature
) -> Result<Feature>
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.
sourcepub async fn features_get(
&self,
customer: &str,
feature_key: &str
) -> Result<Feature>
pub async fn features_get(
&self,
customer: &str,
feature_key: &str
) -> Result<Feature>
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.
sourcepub async fn features_update(
&self,
customer: &str,
feature_key: &str,
body: &Feature
) -> Result<Feature>
pub async fn features_update(
&self,
customer: &str,
feature_key: &str,
body: &Feature
) -> Result<Feature>
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.
sourcepub async fn features_delete(
&self,
customer: &str,
feature_key: &str
) -> Result<()>
pub async fn features_delete(
&self,
customer: &str,
feature_key: &str
) -> Result<()>
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.
sourcepub async fn features_patch(
&self,
customer: &str,
feature_key: &str,
body: &Feature
) -> Result<Feature>
pub async fn features_patch(
&self,
customer: &str,
feature_key: &str,
body: &Feature
) -> Result<Feature>
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.
sourcepub async fn features_rename(
&self,
customer: &str,
old_name: &str,
body: &FeatureRename
) -> Result<()>
pub async fn 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.
Auto Trait Implementations
impl !RefUnwindSafe for Resources
impl Send for Resources
impl Sync for Resources
impl Unpin for Resources
impl !UnwindSafe for Resources
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> FutureExt for T
impl<T> FutureExt for T
fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more