pub struct Groups<'c, C: Config> { /* private fields */ }Expand description
Manage reusable collections of users for organization-wide access control and maintain their membership.
Implementations§
Source§impl<'c, C: Config> Groups<'c, C>
impl<'c, C: Config> Groups<'c, C>
pub fn new(client: &'c Client<C>) -> Self
Sourcepub fn users(&self, group_id: &str) -> GroupUsers<'_, C>
pub fn users(&self, group_id: &str) -> GroupUsers<'_, C>
To call GroupUsers group related APIs using this client.
Sourcepub fn roles(&self, group_id: &str) -> GroupRoles<'_, C>
pub fn roles(&self, group_id: &str) -> GroupRoles<'_, C>
To call GroupRoles group related APIs using this client.
Sourcepub async fn list(&self) -> Result<GroupListResource, OpenAIError>
pub async fn list(&self) -> Result<GroupListResource, OpenAIError>
Lists all groups in the organization. Lists all groups in the organization.
Sourcepub async fn list_byot<R: DeserializeOwned>(&self) -> Result<R, OpenAIError>
pub async fn list_byot<R: DeserializeOwned>(&self) -> Result<R, OpenAIError>
Lists all groups in the organization.
Sourcepub async fn create(
&self,
request: CreateGroupBody,
) -> Result<GroupResponse, OpenAIError>
pub async fn create( &self, request: CreateGroupBody, ) -> Result<GroupResponse, OpenAIError>
Creates a new group in the organization. Creates a new group in the organization.
Sourcepub async fn create_byot<T0: Serialize, R: DeserializeOwned>(
&self,
request: T0,
) -> Result<R, OpenAIError>
pub async fn create_byot<T0: Serialize, R: DeserializeOwned>( &self, request: T0, ) -> Result<R, OpenAIError>
Creates a new group in the organization.
Sourcepub async fn update(
&self,
group_id: &str,
request: UpdateGroupBody,
) -> Result<GroupResourceWithSuccess, OpenAIError>
pub async fn update( &self, group_id: &str, request: UpdateGroupBody, ) -> Result<GroupResourceWithSuccess, OpenAIError>
Updates a group’s information. Updates a group’s information.
Sourcepub async fn update_byot<T0: Display, T1: Serialize, R: DeserializeOwned>(
&self,
group_id: T0,
request: T1,
) -> Result<R, OpenAIError>
pub async fn update_byot<T0: Display, T1: Serialize, R: DeserializeOwned>( &self, group_id: T0, request: T1, ) -> Result<R, OpenAIError>
Updates a group’s information.
Sourcepub async fn delete(
&self,
group_id: &str,
) -> Result<GroupDeletedResource, OpenAIError>
pub async fn delete( &self, group_id: &str, ) -> Result<GroupDeletedResource, OpenAIError>
Deletes a group from the organization. Deletes a group from the organization.
Sourcepub async fn delete_byot<T0: Display, R: DeserializeOwned>(
&self,
group_id: T0,
) -> Result<R, OpenAIError>
pub async fn delete_byot<T0: Display, R: DeserializeOwned>( &self, group_id: T0, ) -> Result<R, OpenAIError>
Deletes a group from the organization.
Trait Implementations§
Source§impl<'c, C: Config> RequestOptionsBuilder for Groups<'c, C>
impl<'c, C: Config> RequestOptionsBuilder for Groups<'c, C>
Source§fn options_mut(&mut self) -> &mut RequestOptions
fn options_mut(&mut self) -> &mut RequestOptions
Get mutable reference to RequestOptions (for building)
Source§fn options(&self) -> &RequestOptions
fn options(&self) -> &RequestOptions
Get reference to RequestOptions
Source§fn header<K, V>(self, key: K, value: V) -> Result<Self, OpenAIError>
fn header<K, V>(self, key: K, value: V) -> Result<Self, OpenAIError>
Add a single header to RequestOptions
Auto Trait Implementations§
impl<'c, C> Freeze for Groups<'c, C>
impl<'c, C> !RefUnwindSafe for Groups<'c, C>
impl<'c, C> Send for Groups<'c, C>
impl<'c, C> Sync for Groups<'c, C>
impl<'c, C> Unpin for Groups<'c, C>
impl<'c, C> !UnwindSafe for Groups<'c, C>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more