pub struct ProjectGroups<'c, C: Config> {
pub project_id: String,
/* private fields */
}Expand description
Manage which groups have access to a project and the role they receive.
Fields§
§project_id: StringImplementations§
Source§impl<'c, C: Config> ProjectGroups<'c, C>
impl<'c, C: Config> ProjectGroups<'c, C>
pub fn new(client: &'c Client<C>, project_id: &str) -> Self
Sourcepub async fn list(&self) -> Result<ProjectGroupListResource, OpenAIError>
pub async fn list(&self) -> Result<ProjectGroupListResource, OpenAIError>
Lists all groups that have access to a project. Lists all groups that have access to a project.
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 that have access to a project.
Sourcepub async fn add(
&self,
request: InviteProjectGroupBody,
) -> Result<ProjectGroup, OpenAIError>
pub async fn add( &self, request: InviteProjectGroupBody, ) -> Result<ProjectGroup, OpenAIError>
Grants a group access to a project. Grants a group access to a project.
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>
Grants a group access to a project.
Sourcepub async fn remove(
&self,
group_id: &str,
) -> Result<ProjectGroupDeletedResource, OpenAIError>
pub async fn remove( &self, group_id: &str, ) -> Result<ProjectGroupDeletedResource, OpenAIError>
Removes a group from a project. Removes a group from a project.
Sourcepub async fn remove_byot<T0: Display, R: DeserializeOwned>(
&self,
group_id: T0,
) -> Result<R, OpenAIError>
pub async fn remove_byot<T0: Display, R: DeserializeOwned>( &self, group_id: T0, ) -> Result<R, OpenAIError>
Removes a group from a project.
Auto Trait Implementations§
impl<'c, C> Freeze for ProjectGroups<'c, C>
impl<'c, C> !RefUnwindSafe for ProjectGroups<'c, C>
impl<'c, C> Send for ProjectGroups<'c, C>
impl<'c, C> Sync for ProjectGroups<'c, C>
impl<'c, C> Unpin for ProjectGroups<'c, C>
impl<'c, C> !UnwindSafe for ProjectGroups<'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