pub struct GroupUsers<'c, C: Config> {
pub group_id: String,
/* private fields */
}Available on crate feature
administration only.Expand description
Manage users within a group, including adding and removing users.
Fields§
§group_id: StringImplementations§
Source§impl<'c, C: Config> GroupUsers<'c, C>
impl<'c, C: Config> GroupUsers<'c, C>
pub fn new(client: &'c Client<C>, group_id: &str) -> Self
Sourcepub async fn list(&self) -> Result<UserListResource, OpenAIError>
pub async fn list(&self) -> Result<UserListResource, OpenAIError>
Lists all users in a group. Lists all users in a group.
Sourcepub async fn list_byot<R: DeserializeOwned>(&self) -> Result<R, OpenAIError>
pub async fn list_byot<R: DeserializeOwned>(&self) -> Result<R, OpenAIError>
Lists all users in a group.
Sourcepub async fn add(
&self,
request: CreateGroupUserBody,
) -> Result<GroupUserAssignment, OpenAIError>
pub async fn add( &self, request: CreateGroupUserBody, ) -> Result<GroupUserAssignment, OpenAIError>
Adds a user to a group. Adds a user to a group.
Sourcepub async fn add_byot<T0: Serialize, R: DeserializeOwned>(
&self,
request: T0,
) -> Result<R, OpenAIError>
pub async fn add_byot<T0: Serialize, R: DeserializeOwned>( &self, request: T0, ) -> Result<R, OpenAIError>
Adds a user to a group.
Sourcepub async fn remove(
&self,
user_id: &str,
) -> Result<GroupUserDeletedResource, OpenAIError>
pub async fn remove( &self, user_id: &str, ) -> Result<GroupUserDeletedResource, OpenAIError>
Removes a user from a group. Removes a user from a group.
Sourcepub async fn remove_byot<T0: Display, R: DeserializeOwned>(
&self,
user_id: T0,
) -> Result<R, OpenAIError>
pub async fn remove_byot<T0: Display, R: DeserializeOwned>( &self, user_id: T0, ) -> Result<R, OpenAIError>
Removes a user from a group.
Trait Implementations§
Source§impl<'c, C: Config> RequestOptionsBuilder for GroupUsers<'c, C>
Available on crate feature _api only.
impl<'c, C: Config> RequestOptionsBuilder for GroupUsers<'c, C>
Available on crate feature
_api only.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 GroupUsers<'c, C>
impl<'c, C> !RefUnwindSafe for GroupUsers<'c, C>
impl<'c, C> Send for GroupUsers<'c, C>
impl<'c, C> Sync for GroupUsers<'c, C>
impl<'c, C> Unpin for GroupUsers<'c, C>
impl<'c, C> !UnwindSafe for GroupUsers<'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