#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetAccessTokenInput {
pub token: ::std::option::Option<::std::string::String>,
pub token_properties: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl GetAccessTokenInput {
pub fn token(&self) -> ::std::option::Option<&str> {
self.token.as_deref()
}
pub fn token_properties(&self) -> &[::std::string::String] {
self.token_properties.as_deref().unwrap_or_default()
}
}
impl GetAccessTokenInput {
pub fn builder() -> crate::operation::get_access_token::builders::GetAccessTokenInputBuilder {
crate::operation::get_access_token::builders::GetAccessTokenInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetAccessTokenInputBuilder {
pub(crate) token: ::std::option::Option<::std::string::String>,
pub(crate) token_properties: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl GetAccessTokenInputBuilder {
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 token_properties(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.token_properties.unwrap_or_default();
v.push(input.into());
self.token_properties = ::std::option::Option::Some(v);
self
}
pub fn set_token_properties(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.token_properties = input;
self
}
pub fn get_token_properties(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.token_properties
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::get_access_token::GetAccessTokenInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::get_access_token::GetAccessTokenInput {
token: self.token,
token_properties: self.token_properties,
})
}
}