pub struct ProjectCertificates<'c, C: Config> {
pub project_id: String,
/* private fields */
}Available on crate feature
administration only.Expand description
Manage certificates for a given project. Supports listing, activating, and deactivating certificates.
Fields§
§project_id: StringImplementations§
Source§impl<'c, C: Config> ProjectCertificates<'c, C>
impl<'c, C: Config> ProjectCertificates<'c, C>
pub fn new(client: &'c Client<C>, project_id: &str) -> Self
Sourcepub async fn list(&self) -> Result<ListCertificatesResponse, OpenAIError>
pub async fn list(&self) -> Result<ListCertificatesResponse, OpenAIError>
List all certificates for this project.
Sourcepub async fn activate(
&self,
request: ToggleCertificatesRequest,
) -> Result<ListCertificatesResponse, OpenAIError>
pub async fn activate( &self, request: ToggleCertificatesRequest, ) -> Result<ListCertificatesResponse, OpenAIError>
Activate certificates for this project. You can atomically and idempotently activate up to 10 certificates at a time.
Sourcepub async fn deactivate(
&self,
request: ToggleCertificatesRequest,
) -> Result<ListCertificatesResponse, OpenAIError>
pub async fn deactivate( &self, request: ToggleCertificatesRequest, ) -> Result<ListCertificatesResponse, OpenAIError>
Deactivate certificates for this project. You can atomically and idempotently deactivate up to 10 certificates at a time.
Trait Implementations§
Source§impl<'c, C: Config> RequestOptionsBuilder for ProjectCertificates<'c, C>
Available on crate feature _api only.
impl<'c, C: Config> RequestOptionsBuilder for ProjectCertificates<'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 ProjectCertificates<'c, C>
impl<'c, C> !RefUnwindSafe for ProjectCertificates<'c, C>
impl<'c, C> Send for ProjectCertificates<'c, C>
impl<'c, C> Sync for ProjectCertificates<'c, C>
impl<'c, C> Unpin for ProjectCertificates<'c, C>
impl<'c, C> !UnwindSafe for ProjectCertificates<'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