#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct GetSessionEndpointOutput {
pub application_id: ::std::string::String,
pub session_id: ::std::string::String,
pub endpoint: ::std::string::String,
pub auth_token: ::std::string::String,
pub auth_token_expires_at: ::aws_smithy_types::DateTime,
_request_id: Option<String>,
}
impl GetSessionEndpointOutput {
pub fn application_id(&self) -> &str {
use std::ops::Deref;
self.application_id.deref()
}
pub fn session_id(&self) -> &str {
use std::ops::Deref;
self.session_id.deref()
}
pub fn endpoint(&self) -> &str {
use std::ops::Deref;
self.endpoint.deref()
}
pub fn auth_token(&self) -> &str {
use std::ops::Deref;
self.auth_token.deref()
}
pub fn auth_token_expires_at(&self) -> &::aws_smithy_types::DateTime {
&self.auth_token_expires_at
}
}
impl ::std::fmt::Debug for GetSessionEndpointOutput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("GetSessionEndpointOutput");
formatter.field("application_id", &self.application_id);
formatter.field("session_id", &self.session_id);
formatter.field("endpoint", &self.endpoint);
formatter.field("auth_token", &"*** Sensitive Data Redacted ***");
formatter.field("auth_token_expires_at", &self.auth_token_expires_at);
formatter.field("_request_id", &self._request_id);
formatter.finish()
}
}
impl ::aws_types::request_id::RequestId for GetSessionEndpointOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl GetSessionEndpointOutput {
pub fn builder() -> crate::operation::get_session_endpoint::builders::GetSessionEndpointOutputBuilder {
crate::operation::get_session_endpoint::builders::GetSessionEndpointOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct GetSessionEndpointOutputBuilder {
pub(crate) application_id: ::std::option::Option<::std::string::String>,
pub(crate) session_id: ::std::option::Option<::std::string::String>,
pub(crate) endpoint: ::std::option::Option<::std::string::String>,
pub(crate) auth_token: ::std::option::Option<::std::string::String>,
pub(crate) auth_token_expires_at: ::std::option::Option<::aws_smithy_types::DateTime>,
_request_id: Option<String>,
}
impl GetSessionEndpointOutputBuilder {
pub fn application_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.application_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_application_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.application_id = input;
self
}
pub fn get_application_id(&self) -> &::std::option::Option<::std::string::String> {
&self.application_id
}
pub fn session_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.session_id = ::std::option::Option::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 get_session_id(&self) -> &::std::option::Option<::std::string::String> {
&self.session_id
}
pub fn endpoint(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.endpoint = ::std::option::Option::Some(input.into());
self
}
pub fn set_endpoint(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.endpoint = input;
self
}
pub fn get_endpoint(&self) -> &::std::option::Option<::std::string::String> {
&self.endpoint
}
pub fn auth_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.auth_token = ::std::option::Option::Some(input.into());
self
}
pub fn set_auth_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.auth_token = input;
self
}
pub fn get_auth_token(&self) -> &::std::option::Option<::std::string::String> {
&self.auth_token
}
pub fn auth_token_expires_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.auth_token_expires_at = ::std::option::Option::Some(input);
self
}
pub fn set_auth_token_expires_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.auth_token_expires_at = input;
self
}
pub fn get_auth_token_expires_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.auth_token_expires_at
}
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,
) -> ::std::result::Result<crate::operation::get_session_endpoint::GetSessionEndpointOutput, ::aws_smithy_types::error::operation::BuildError>
{
::std::result::Result::Ok(crate::operation::get_session_endpoint::GetSessionEndpointOutput {
application_id: self.application_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"application_id",
"application_id was not specified but it is required when building GetSessionEndpointOutput",
)
})?,
session_id: self.session_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"session_id",
"session_id was not specified but it is required when building GetSessionEndpointOutput",
)
})?,
endpoint: self.endpoint.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"endpoint",
"endpoint was not specified but it is required when building GetSessionEndpointOutput",
)
})?,
auth_token: self.auth_token.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"auth_token",
"auth_token was not specified but it is required when building GetSessionEndpointOutput",
)
})?,
auth_token_expires_at: self.auth_token_expires_at.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"auth_token_expires_at",
"auth_token_expires_at was not specified but it is required when building GetSessionEndpointOutput",
)
})?,
_request_id: self._request_id,
})
}
}
impl ::std::fmt::Debug for GetSessionEndpointOutputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("GetSessionEndpointOutputBuilder");
formatter.field("application_id", &self.application_id);
formatter.field("session_id", &self.session_id);
formatter.field("endpoint", &self.endpoint);
formatter.field("auth_token", &"*** Sensitive Data Redacted ***");
formatter.field("auth_token_expires_at", &self.auth_token_expires_at);
formatter.field("_request_id", &self._request_id);
formatter.finish()
}
}