#[non_exhaustive]pub struct ServiceAccountTokenSummaryBuilder { /* private fields */ }
Expand description
A builder for ServiceAccountTokenSummary
.
Implementations§
source§impl ServiceAccountTokenSummaryBuilder
impl ServiceAccountTokenSummaryBuilder
sourcepub fn id(self, input: impl Into<String>) -> Self
pub fn id(self, input: impl Into<String>) -> Self
The unique ID of the service account token.
This field is required.sourcepub fn name(self, input: impl Into<String>) -> Self
pub fn name(self, input: impl Into<String>) -> Self
The name of the service account token.
This field is required.sourcepub fn created_at(self, input: DateTime) -> Self
pub fn created_at(self, input: DateTime) -> Self
When the service account token was created.
This field is required.sourcepub fn set_created_at(self, input: Option<DateTime>) -> Self
pub fn set_created_at(self, input: Option<DateTime>) -> Self
When the service account token was created.
sourcepub fn get_created_at(&self) -> &Option<DateTime>
pub fn get_created_at(&self) -> &Option<DateTime>
When the service account token was created.
sourcepub fn expires_at(self, input: DateTime) -> Self
pub fn expires_at(self, input: DateTime) -> Self
When the service account token will expire.
This field is required.sourcepub fn set_expires_at(self, input: Option<DateTime>) -> Self
pub fn set_expires_at(self, input: Option<DateTime>) -> Self
When the service account token will expire.
sourcepub fn get_expires_at(&self) -> &Option<DateTime>
pub fn get_expires_at(&self) -> &Option<DateTime>
When the service account token will expire.
sourcepub fn last_used_at(self, input: DateTime) -> Self
pub fn last_used_at(self, input: DateTime) -> Self
The last time the token was used to authorize a Grafana HTTP API.
sourcepub fn set_last_used_at(self, input: Option<DateTime>) -> Self
pub fn set_last_used_at(self, input: Option<DateTime>) -> Self
The last time the token was used to authorize a Grafana HTTP API.
sourcepub fn get_last_used_at(&self) -> &Option<DateTime>
pub fn get_last_used_at(&self) -> &Option<DateTime>
The last time the token was used to authorize a Grafana HTTP API.
sourcepub fn build(self) -> Result<ServiceAccountTokenSummary, BuildError>
pub fn build(self) -> Result<ServiceAccountTokenSummary, BuildError>
Consumes the builder and constructs a ServiceAccountTokenSummary
.
This method will fail if any of the following fields are not set:
Trait Implementations§
source§impl Clone for ServiceAccountTokenSummaryBuilder
impl Clone for ServiceAccountTokenSummaryBuilder
source§fn clone(&self) -> ServiceAccountTokenSummaryBuilder
fn clone(&self) -> ServiceAccountTokenSummaryBuilder
Returns a copy 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 Default for ServiceAccountTokenSummaryBuilder
impl Default for ServiceAccountTokenSummaryBuilder
source§fn default() -> ServiceAccountTokenSummaryBuilder
fn default() -> ServiceAccountTokenSummaryBuilder
Returns the “default value” for a type. Read more
source§impl PartialEq for ServiceAccountTokenSummaryBuilder
impl PartialEq for ServiceAccountTokenSummaryBuilder
source§fn eq(&self, other: &ServiceAccountTokenSummaryBuilder) -> bool
fn eq(&self, other: &ServiceAccountTokenSummaryBuilder) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for ServiceAccountTokenSummaryBuilder
Auto Trait Implementations§
impl Freeze for ServiceAccountTokenSummaryBuilder
impl RefUnwindSafe for ServiceAccountTokenSummaryBuilder
impl Send for ServiceAccountTokenSummaryBuilder
impl Sync for ServiceAccountTokenSummaryBuilder
impl Unpin for ServiceAccountTokenSummaryBuilder
impl UnwindSafe for ServiceAccountTokenSummaryBuilder
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.