pub struct ProjectUserRoles<'c, C: Config> {
pub project_id: String,
pub user_id: String,
/* private fields */
}Available on crate feature
administration only.Expand description
Manage role assignments for users in a project.
Fields§
§project_id: String§user_id: StringImplementations§
Source§impl<'c, C: Config> ProjectUserRoles<'c, C>
impl<'c, C: Config> ProjectUserRoles<'c, C>
pub fn new(client: &'c Client<C>, project_id: &str, user_id: &str) -> Self
Sourcepub async fn list(&self) -> Result<RoleListResource, OpenAIError>
pub async fn list(&self) -> Result<RoleListResource, OpenAIError>
Lists all role assignments for a user in the project. Lists all role assignments for a user in the 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 role assignments for a user in the project.
Sourcepub async fn assign(
&self,
request: PublicAssignOrganizationGroupRoleBody,
) -> Result<UserRoleAssignment, OpenAIError>
pub async fn assign( &self, request: PublicAssignOrganizationGroupRoleBody, ) -> Result<UserRoleAssignment, OpenAIError>
Assigns a role to a user in the project. Assigns a role to a user in the project.
Sourcepub async fn assign_byot<T0: Serialize, R: DeserializeOwned>(
&self,
request: T0,
) -> Result<R, OpenAIError>
pub async fn assign_byot<T0: Serialize, R: DeserializeOwned>( &self, request: T0, ) -> Result<R, OpenAIError>
Assigns a role to a user in the project.
Sourcepub async fn unassign(
&self,
role_id: &str,
) -> Result<DeletedRoleAssignmentResource, OpenAIError>
pub async fn unassign( &self, role_id: &str, ) -> Result<DeletedRoleAssignmentResource, OpenAIError>
Unassigns a role from a user in the project. Unassigns a role from a user in the project.
Sourcepub async fn unassign_byot<T0: Display, R: DeserializeOwned>(
&self,
role_id: T0,
) -> Result<R, OpenAIError>
pub async fn unassign_byot<T0: Display, R: DeserializeOwned>( &self, role_id: T0, ) -> Result<R, OpenAIError>
Unassigns a role from a user in the project.
Trait Implementations§
Source§impl<'c, C: Config> RequestOptionsBuilder for ProjectUserRoles<'c, C>
Available on crate feature _api only.
impl<'c, C: Config> RequestOptionsBuilder for ProjectUserRoles<'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 ProjectUserRoles<'c, C>
impl<'c, C> !RefUnwindSafe for ProjectUserRoles<'c, C>
impl<'c, C> Send for ProjectUserRoles<'c, C>
impl<'c, C> Sync for ProjectUserRoles<'c, C>
impl<'c, C> Unpin for ProjectUserRoles<'c, C>
impl<'c, C> !UnwindSafe for ProjectUserRoles<'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