#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateTokenOutput {
pub token_id: ::std::option::Option<::std::string::String>,
pub token_type: ::std::option::Option<crate::types::TokenType>,
pub token: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl CreateTokenOutput {
pub fn token_id(&self) -> ::std::option::Option<&str> {
self.token_id.as_deref()
}
pub fn token_type(&self) -> ::std::option::Option<&crate::types::TokenType> {
self.token_type.as_ref()
}
pub fn token(&self) -> ::std::option::Option<&str> {
self.token.as_deref()
}
}
impl ::aws_http::request_id::RequestId for CreateTokenOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl CreateTokenOutput {
pub fn builder() -> crate::operation::create_token::builders::CreateTokenOutputBuilder {
crate::operation::create_token::builders::CreateTokenOutputBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct CreateTokenOutputBuilder {
pub(crate) token_id: ::std::option::Option<::std::string::String>,
pub(crate) token_type: ::std::option::Option<crate::types::TokenType>,
pub(crate) token: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl CreateTokenOutputBuilder {
pub fn token_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.token_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_token_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.token_id = input;
self
}
pub fn get_token_id(&self) -> &::std::option::Option<::std::string::String> {
&self.token_id
}
pub fn token_type(mut self, input: crate::types::TokenType) -> Self {
self.token_type = ::std::option::Option::Some(input);
self
}
pub fn set_token_type(mut self, input: ::std::option::Option<crate::types::TokenType>) -> Self {
self.token_type = input;
self
}
pub fn get_token_type(&self) -> &::std::option::Option<crate::types::TokenType> {
&self.token_type
}
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(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
self._request_id = Some(request_id.into());
self
}
pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
self._request_id = request_id;
self
}
pub fn build(self) -> crate::operation::create_token::CreateTokenOutput {
crate::operation::create_token::CreateTokenOutput {
token_id: self.token_id,
token_type: self.token_type,
token: self.token,
_request_id: self._request_id,
}
}
}