#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetTokenOutput {
#[doc(hidden)]
pub app_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub challenge_code: std::option::Option<std::string::String>,
#[doc(hidden)]
pub session_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub ttl: std::option::Option<std::string::String>,
_request_id: Option<String>,
}
impl GetTokenOutput {
pub fn app_id(&self) -> std::option::Option<&str> {
self.app_id.as_deref()
}
pub fn challenge_code(&self) -> std::option::Option<&str> {
self.challenge_code.as_deref()
}
pub fn session_id(&self) -> std::option::Option<&str> {
self.session_id.as_deref()
}
pub fn ttl(&self) -> std::option::Option<&str> {
self.ttl.as_deref()
}
}
impl aws_http::request_id::RequestId for GetTokenOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl GetTokenOutput {
pub fn builder() -> crate::operation::get_token::builders::GetTokenOutputBuilder {
crate::operation::get_token::builders::GetTokenOutputBuilder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct GetTokenOutputBuilder {
pub(crate) app_id: std::option::Option<std::string::String>,
pub(crate) challenge_code: std::option::Option<std::string::String>,
pub(crate) session_id: std::option::Option<std::string::String>,
pub(crate) ttl: std::option::Option<std::string::String>,
_request_id: Option<String>,
}
impl GetTokenOutputBuilder {
pub fn app_id(mut self, input: impl Into<std::string::String>) -> Self {
self.app_id = Some(input.into());
self
}
pub fn set_app_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.app_id = input;
self
}
pub fn challenge_code(mut self, input: impl Into<std::string::String>) -> Self {
self.challenge_code = Some(input.into());
self
}
pub fn set_challenge_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.challenge_code = input;
self
}
pub fn session_id(mut self, input: impl Into<std::string::String>) -> Self {
self.session_id = Some(input.into());
self
}
pub fn set_session_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.session_id = input;
self
}
pub fn ttl(mut self, input: impl Into<std::string::String>) -> Self {
self.ttl = Some(input.into());
self
}
pub fn set_ttl(mut self, input: std::option::Option<std::string::String>) -> Self {
self.ttl = input;
self
}
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::get_token::GetTokenOutput {
crate::operation::get_token::GetTokenOutput {
app_id: self.app_id,
challenge_code: self.challenge_code,
session_id: self.session_id,
ttl: self.ttl,
_request_id: self._request_id,
}
}
}