Struct Resources

Source
pub struct Resources {
    pub client: Client,
}

Fields§

§client: Client

Implementations§

Source§

impl Resources

Source

pub async fn buildings_list( &self, customer: &str, max_results: i64, page_token: &str, ) -> Result<Response<Vec<Building>>, ClientError>

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 the my_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.
Source

pub async fn buildings_list_all( &self, customer: &str, ) -> Result<Response<Vec<Building>>, ClientError>

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.

Source

pub async fn buildings_insert( &self, customer: &str, coordinates_source: CoordinatesSource, body: &Building, ) -> Result<Response<Building>, ClientError>

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 the my_customer alias to represent your account’s customer ID.
  • coordinates_source: crate::types::CoordinatesSource – Source from which Building.coordinates are derived.
Source

pub async fn buildings_get( &self, customer: &str, building_id: &str, ) -> Result<Response<Building>, ClientError>

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 the my_customer alias to represent your account’s customer ID.
  • building_id: &str – The unique ID of the building to retrieve.
Source

pub async fn buildings_update( &self, customer: &str, building_id: &str, coordinates_source: CoordinatesSource, body: &Building, ) -> Result<Response<Building>, ClientError>

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 the my_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.
Source

pub async fn buildings_delete( &self, customer: &str, building_id: &str, ) -> Result<Response<()>, ClientError>

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 the my_customer alias to represent your account’s customer ID.
  • building_id: &str – The id of the building to delete.
Source

pub async fn buildings_patch( &self, customer: &str, building_id: &str, coordinates_source: CoordinatesSource, body: &Building, ) -> Result<Response<Building>, ClientError>

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 the my_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.
Source

pub async fn calendars_list( &self, customer: &str, max_results: i64, order_by: &str, page_token: &str, query: &str, ) -> Result<Response<Vec<CalendarResource>>, ClientError>

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 the my_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 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.
  • 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 include generatedResourceName, name, buildingId, floor_name, capacity, featureInstances.feature.name, resourceEmail, resourceCategory. For example buildingId=US-NYC-9TH AND featureInstances.feature.name:Phone.
Source

pub async fn calendars_list_all( &self, customer: &str, order_by: &str, query: &str, ) -> Result<Response<Vec<CalendarResource>>, ClientError>

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.

Source

pub async fn calendars_insert( &self, customer: &str, body: &CalendarResource, ) -> Result<Response<CalendarResource>, ClientError>

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 the my_customer alias to represent your account’s customer ID.
Source

pub async fn calendars_get( &self, customer: &str, calendar_resource_id: &str, ) -> Result<Response<CalendarResource>, ClientError>

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 the my_customer alias to represent your account’s customer ID.
  • calendar_resource_id: &str – The unique ID of the calendar resource to retrieve.
Source

pub async fn calendars_update( &self, customer: &str, calendar_resource_id: &str, body: &CalendarResource, ) -> Result<Response<CalendarResource>, ClientError>

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 the my_customer alias to represent your account’s customer ID.
  • calendar_resource_id: &str – The unique ID of the calendar resource to update.
Source

pub async fn calendars_delete( &self, customer: &str, calendar_resource_id: &str, ) -> Result<Response<()>, ClientError>

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 the my_customer alias to represent your account’s customer ID.
  • calendar_resource_id: &str – The unique ID of the calendar resource to delete.
Source

pub async fn calendars_patch( &self, customer: &str, calendar_resource_id: &str, body: &CalendarResource, ) -> Result<Response<CalendarResource>, ClientError>

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 the my_customer alias to represent your account’s customer ID.
  • calendar_resource_id: &str – The unique ID of the calendar resource to update.
Source

pub async fn features_list( &self, customer: &str, max_results: i64, page_token: &str, ) -> Result<Response<Vec<Feature>>, ClientError>

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 the my_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.
Source

pub async fn features_list_all( &self, customer: &str, ) -> Result<Response<Vec<Feature>>, ClientError>

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.

Source

pub async fn features_insert( &self, customer: &str, body: &Feature, ) -> Result<Response<Feature>, ClientError>

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 the my_customer alias to represent your account’s customer ID.
Source

pub async fn features_get( &self, customer: &str, feature_key: &str, ) -> Result<Response<Feature>, ClientError>

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 the my_customer alias to represent your account’s customer ID.
  • feature_key: &str – The unique ID of the feature to retrieve.
Source

pub async fn features_update( &self, customer: &str, feature_key: &str, body: &Feature, ) -> Result<Response<Feature>, ClientError>

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 the my_customer alias to represent your account’s customer ID.
  • feature_key: &str – The unique ID of the feature to update.
Source

pub async fn features_delete( &self, customer: &str, feature_key: &str, ) -> Result<Response<()>, ClientError>

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 the my_customer alias to represent your account’s customer ID.
  • feature_key: &str – The unique ID of the feature to delete.
Source

pub async fn features_patch( &self, customer: &str, feature_key: &str, body: &Feature, ) -> Result<Response<Feature>, ClientError>

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 the my_customer alias to represent your account’s customer ID.
  • feature_key: &str – The unique ID of the feature to update.
Source

pub async fn features_rename( &self, customer: &str, old_name: &str, body: &FeatureRename, ) -> Result<Response<()>, ClientError>

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 the my_customer alias to represent your account’s customer ID.
  • old_name: &str – The unique ID of the feature to rename.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

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
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,