#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct RefreshTokenRequestBody {
pub token: ::std::string::String,
pub client_id: ::std::option::Option<::std::string::String>,
}
impl RefreshTokenRequestBody {
pub fn token(&self) -> &str {
use std::ops::Deref;
self.token.deref()
}
pub fn client_id(&self) -> ::std::option::Option<&str> {
self.client_id.as_deref()
}
}
impl ::std::fmt::Debug for RefreshTokenRequestBody {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("RefreshTokenRequestBody");
formatter.field("token", &"*** Sensitive Data Redacted ***");
formatter.field("client_id", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
impl RefreshTokenRequestBody {
pub fn builder() -> crate::types::builders::RefreshTokenRequestBodyBuilder {
crate::types::builders::RefreshTokenRequestBodyBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
pub struct RefreshTokenRequestBodyBuilder {
pub(crate) token: ::std::option::Option<::std::string::String>,
pub(crate) client_id: ::std::option::Option<::std::string::String>,
}
impl RefreshTokenRequestBodyBuilder {
pub fn token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.token = ::std::option::Option::Some(input.into());
self
}
pub fn set_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.token = input;
self
}
pub fn get_token(&self) -> &::std::option::Option<::std::string::String> {
&self.token
}
pub fn client_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.client_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_client_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.client_id = input;
self
}
pub fn get_client_id(&self) -> &::std::option::Option<::std::string::String> {
&self.client_id
}
pub fn build(self) -> ::std::result::Result<crate::types::RefreshTokenRequestBody, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::types::RefreshTokenRequestBody {
token: self.token.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"token",
"token was not specified but it is required when building RefreshTokenRequestBody",
)
})?,
client_id: self.client_id,
})
}
}
impl ::std::fmt::Debug for RefreshTokenRequestBodyBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("RefreshTokenRequestBodyBuilder");
formatter.field("token", &"*** Sensitive Data Redacted ***");
formatter.field("client_id", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}