pub struct ApiKeyUpdateBuilder { /* private fields */ }
Expand description
Builder for ApiKeyUpdateRequest
.
Implementations§
Source§impl ApiKeyUpdateBuilder
impl ApiKeyUpdateBuilder
Sourcepub fn api_key_id<VALUE: Into<String>>(self, value: VALUE) -> Self
pub fn api_key_id<VALUE: Into<String>>(self, value: VALUE) -> Self
API key identifier (not serialized)
Sourcepub fn status<VALUE: Into<ApiKeyStatus>>(self, value: VALUE) -> Self
pub fn status<VALUE: Into<ApiKeyStatus>>(self, value: VALUE) -> Self
New status for the API key
Sourcepub fn credentials<VALUE: Into<Credentials>>(self, value: VALUE) -> Self
pub fn credentials<VALUE: Into<Credentials>>(self, value: VALUE) -> Self
Credentials for authentication (not serialized)
Sourcepub fn build(self) -> Result<ApiKeyUpdateRequest, ApiKeyUpdateBuilderError>
pub fn build(self) -> Result<ApiKeyUpdateRequest, ApiKeyUpdateBuilderError>
Source§impl ApiKeyUpdateBuilder
impl ApiKeyUpdateBuilder
Sourcepub async fn create(self) -> ApiResponseOrError<ApiKey>
pub async fn create(self) -> ApiResponseOrError<ApiKey>
Creates a new API key update request and returns the response.
This is a convenience method that builds the request from the builder and sends it to the API Keys API.
§Example
let credentials = Credentials::from_env();
let updated_api_key = ApiKey::update_builder("api_key_123456789")
.credentials(credentials)
.name("New API Key Name")
.status(ApiKeyStatus::Inactive)
.create()
.await?;
Trait Implementations§
Source§impl Clone for ApiKeyUpdateBuilder
impl Clone for ApiKeyUpdateBuilder
Source§fn clone(&self) -> ApiKeyUpdateBuilder
fn clone(&self) -> ApiKeyUpdateBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ApiKeyUpdateBuilder
impl Debug for ApiKeyUpdateBuilder
Source§impl Default for ApiKeyUpdateBuilder
impl Default for ApiKeyUpdateBuilder
Source§impl PartialEq for ApiKeyUpdateBuilder
impl PartialEq for ApiKeyUpdateBuilder
impl StructuralPartialEq for ApiKeyUpdateBuilder
Auto Trait Implementations§
impl Freeze for ApiKeyUpdateBuilder
impl RefUnwindSafe for ApiKeyUpdateBuilder
impl Send for ApiKeyUpdateBuilder
impl Sync for ApiKeyUpdateBuilder
impl Unpin for ApiKeyUpdateBuilder
impl UnwindSafe for ApiKeyUpdateBuilder
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