pub struct ProjectUsers<'c, C: Config> {
pub project_id: String,
/* private fields */
}
Expand description
Manage users within a project, including adding, updating roles, and removing users. Users cannot be removed from the Default project, unless they are being removed from the organization.
Fields§
§project_id: String
Implementations§
Source§impl<'c, C: Config> ProjectUsers<'c, C>
impl<'c, C: Config> ProjectUsers<'c, C>
pub fn new(client: &'c Client<C>, project_id: &str) -> Self
Sourcepub async fn list<Q>(
&self,
query: &Q,
) -> Result<ProjectUserListResponse, OpenAIError>
pub async fn list<Q>( &self, query: &Q, ) -> Result<ProjectUserListResponse, OpenAIError>
Returns a list of users in the project. Returns a list of users in the project.
Sourcepub async fn list_byot<T0: Serialize, R: DeserializeOwned>(
&self,
query: T0,
) -> Result<R, OpenAIError>
pub async fn list_byot<T0: Serialize, R: DeserializeOwned>( &self, query: T0, ) -> Result<R, OpenAIError>
Returns a list of users in the project.
Sourcepub async fn create(
&self,
request: ProjectUserCreateRequest,
) -> Result<ProjectUser, OpenAIError>
pub async fn create( &self, request: ProjectUserCreateRequest, ) -> Result<ProjectUser, OpenAIError>
Adds a user to the project. Users must already be members of the organization to be added to a project. Adds a user to the project. Users must already be members of the organization to be added to a project.
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>
Adds a user to the project. Users must already be members of the organization to be added to a project.
Sourcepub async fn retrieve(&self, user_id: &str) -> Result<ProjectUser, OpenAIError>
pub async fn retrieve(&self, user_id: &str) -> Result<ProjectUser, OpenAIError>
Retrieves a user in the project. Retrieves a user in the project.
Sourcepub async fn retrieve_byot<T0: Display, R: DeserializeOwned>(
&self,
user_id: T0,
) -> Result<R, OpenAIError>
pub async fn retrieve_byot<T0: Display, R: DeserializeOwned>( &self, user_id: T0, ) -> Result<R, OpenAIError>
Retrieves a user in the project.
Sourcepub async fn modify(
&self,
user_id: &str,
request: ProjectUserUpdateRequest,
) -> Result<ProjectUser, OpenAIError>
pub async fn modify( &self, user_id: &str, request: ProjectUserUpdateRequest, ) -> Result<ProjectUser, OpenAIError>
Modifies a user’s role in the project. Modifies a user’s role in the project.
Sourcepub async fn modify_byot<T0: Display, T1: Serialize, R: DeserializeOwned>(
&self,
user_id: T0,
request: T1,
) -> Result<R, OpenAIError>
pub async fn modify_byot<T0: Display, T1: Serialize, R: DeserializeOwned>( &self, user_id: T0, request: T1, ) -> Result<R, OpenAIError>
Modifies a user’s role in the project.
Sourcepub async fn delete(
&self,
user_id: &str,
) -> Result<ProjectUserDeleteResponse, OpenAIError>
pub async fn delete( &self, user_id: &str, ) -> Result<ProjectUserDeleteResponse, OpenAIError>
Deletes a user from the project. Deletes a user from the project.
Sourcepub async fn delete_byot<T0: Display, R: DeserializeOwned>(
&self,
user_id: T0,
) -> Result<R, OpenAIError>
pub async fn delete_byot<T0: Display, R: DeserializeOwned>( &self, user_id: T0, ) -> Result<R, OpenAIError>
Deletes a user from the project.