#[non_exhaustive]pub struct GenerateAccessTokenResponse {
pub access_token: String,
pub expire_time: Option<Timestamp>,
/* private fields */
}Expand description
Response message for GenerateAccessToken.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.access_token: StringThe generated bearer access token. To use this token, include it in an
Authorization header of an HTTP request sent to the associated
workstation’s hostname—for example, Authorization: Bearer <access_token>.
expire_time: Option<Timestamp>Time at which the generated token will expire.
Implementations§
Source§impl GenerateAccessTokenResponse
impl GenerateAccessTokenResponse
pub fn new() -> Self
Sourcepub fn set_access_token<T: Into<String>>(self, v: T) -> Self
pub fn set_access_token<T: Into<String>>(self, v: T) -> Self
Sets the value of access_token.
§Example
ⓘ
let x = GenerateAccessTokenResponse::new().set_access_token("example");Sourcepub fn set_expire_time<T>(self, v: T) -> Self
pub fn set_expire_time<T>(self, v: T) -> Self
Sets the value of expire_time.
§Example
ⓘ
use wkt::Timestamp;
let x = GenerateAccessTokenResponse::new().set_expire_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_expire_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_expire_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of expire_time.
§Example
ⓘ
use wkt::Timestamp;
let x = GenerateAccessTokenResponse::new().set_or_clear_expire_time(Some(Timestamp::default()/* use setters */));
let x = GenerateAccessTokenResponse::new().set_or_clear_expire_time(None::<Timestamp>);Trait Implementations§
Source§impl Clone for GenerateAccessTokenResponse
impl Clone for GenerateAccessTokenResponse
Source§fn clone(&self) -> GenerateAccessTokenResponse
fn clone(&self) -> GenerateAccessTokenResponse
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 GenerateAccessTokenResponse
impl Debug for GenerateAccessTokenResponse
Source§impl Default for GenerateAccessTokenResponse
impl Default for GenerateAccessTokenResponse
Source§fn default() -> GenerateAccessTokenResponse
fn default() -> GenerateAccessTokenResponse
Returns the “default value” for a type. Read more
impl StructuralPartialEq for GenerateAccessTokenResponse
Auto Trait Implementations§
impl Freeze for GenerateAccessTokenResponse
impl RefUnwindSafe for GenerateAccessTokenResponse
impl Send for GenerateAccessTokenResponse
impl Sync for GenerateAccessTokenResponse
impl Unpin for GenerateAccessTokenResponse
impl UnsafeUnpin for GenerateAccessTokenResponse
impl UnwindSafe for GenerateAccessTokenResponse
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