Struct gsuite_api::schemas::Schemas
source · pub struct Schemas {
pub client: Client,
}Fields
client: ClientImplementations
sourceimpl Schemas
impl Schemas
sourcepub async fn list(&self, customer_id: &str) -> Result<Schemas>
pub async fn list(&self, customer_id: &str) -> Result<Schemas>
This function performs a GET to the /admin/directory/v1/customer/{customerId}/schemas endpoint.
Retrieves all schemas for a customer.
Parameters:
customer_id: &str– Immutable ID of the Google Workspace account.
sourcepub async fn insert(&self, customer_id: &str, body: &Schema) -> Result<Schema>
pub async fn insert(&self, customer_id: &str, body: &Schema) -> Result<Schema>
This function performs a POST to the /admin/directory/v1/customer/{customerId}/schemas endpoint.
Creates a schema.
Parameters:
customer_id: &str– Immutable ID of the Google Workspace account.
sourcepub async fn get(&self, customer_id: &str, schema_key: &str) -> Result<Schema>
pub async fn get(&self, customer_id: &str, schema_key: &str) -> Result<Schema>
This function performs a GET to the /admin/directory/v1/customer/{customerId}/schemas/{schemaKey} endpoint.
Retrieves a schema.
Parameters:
customer_id: &str– Immutable ID of the Google Workspace account.schema_key: &str– Name or immutable ID of the schema.
sourcepub async fn update(
&self,
customer_id: &str,
schema_key: &str,
body: &Schema
) -> Result<Schema>
pub async fn update(
&self,
customer_id: &str,
schema_key: &str,
body: &Schema
) -> Result<Schema>
This function performs a PUT to the /admin/directory/v1/customer/{customerId}/schemas/{schemaKey} endpoint.
Updates a schema.
Parameters:
customer_id: &str– Immutable ID of the Google Workspace account.schema_key: &str– Name or immutable ID of the schema.
sourcepub async fn delete(&self, customer_id: &str, schema_key: &str) -> Result<()>
pub async fn delete(&self, customer_id: &str, schema_key: &str) -> Result<()>
This function performs a DELETE to the /admin/directory/v1/customer/{customerId}/schemas/{schemaKey} endpoint.
Deletes a schema.
Parameters:
customer_id: &str– Immutable ID of the Google Workspace account.schema_key: &str– Name or immutable ID of the schema.
sourcepub async fn patch(
&self,
customer_id: &str,
schema_key: &str,
body: &Schema
) -> Result<Schema>
pub async fn patch(
&self,
customer_id: &str,
schema_key: &str,
body: &Schema
) -> Result<Schema>
This function performs a PATCH to the /admin/directory/v1/customer/{customerId}/schemas/{schemaKey} endpoint.
Patches a schema.
Parameters:
customer_id: &str– Immutable ID of the Google Workspace account.schema_key: &str– Name or immutable ID of the schema.