pub struct Orgunits {
    pub client: Client,
}

Fields

client: Client

Implementations

This function performs a GET to the /admin/directory/v1/customer/{customerId}/orgunits endpoint.

Retrieves a list of all organizational units for an account.

Parameters:

  • customer_id: &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 customerId. The customerId is also returned as part of the Users resource.
  • org_unit_path: &str – The full path to the organizational unit or its unique ID. Returns the children of the specified organizational unit.
  • type_: crate::types::DirectoryOrgunitsListType – Whether to return all sub-organizations or just immediate children.

This function performs a POST to the /admin/directory/v1/customer/{customerId}/orgunits endpoint.

Adds an organizational unit.

Parameters:

  • customer_id: &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 customerId. The customerId is also returned as part of the Users resource.

This function performs a GET to the /admin/directory/v1/customer/{customerId}/orgunits/{orgUnitPath} endpoint.

Retrieves an organizational unit.

Parameters:

  • customer_id: &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 customerId. The customerId is also returned as part of the Users resource.
  • org_unit_path: &str – The full path of the organizational unit or its unique ID.

This function performs a PUT to the /admin/directory/v1/customer/{customerId}/orgunits/{orgUnitPath} endpoint.

Updates an organizational unit.

Parameters:

  • customer_id: &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 customerId. The customerId is also returned as part of the Users resource.
  • org_unit_path: &str – The full path of the organizational unit or its unique ID.

This function performs a DELETE to the /admin/directory/v1/customer/{customerId}/orgunits/{orgUnitPath} endpoint.

Removes an organizational unit.

Parameters:

  • customer_id: &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 customerId. The customerId is also returned as part of the Users resource.
  • org_unit_path: &str – The full path of the organizational unit or its unique ID.

This function performs a PATCH to the /admin/directory/v1/customer/{customerId}/orgunits/{orgUnitPath} endpoint.

Updates an organizational unit. This method supports patch semantics

Parameters:

  • customer_id: &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 customerId. The customerId is also returned as part of the Users resource.
  • org_unit_path: &str – The full path of the organizational unit or its unique ID.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Attaches the provided Context to this type, returning a WithContext wrapper. Read more

Attaches the current Context to this type, returning a WithContext wrapper. Read more

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

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

Calls U::from(self).

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

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