#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct TestInvokeAuthorizerOutput {
pub is_authenticated: ::std::option::Option<bool>,
pub principal_id: ::std::option::Option<::std::string::String>,
pub policy_documents: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub refresh_after_in_seconds: ::std::option::Option<i32>,
pub disconnect_after_in_seconds: ::std::option::Option<i32>,
_request_id: Option<String>,
}
impl TestInvokeAuthorizerOutput {
pub fn is_authenticated(&self) -> ::std::option::Option<bool> {
self.is_authenticated
}
pub fn principal_id(&self) -> ::std::option::Option<&str> {
self.principal_id.as_deref()
}
pub fn policy_documents(&self) -> &[::std::string::String] {
self.policy_documents.as_deref().unwrap_or_default()
}
pub fn refresh_after_in_seconds(&self) -> ::std::option::Option<i32> {
self.refresh_after_in_seconds
}
pub fn disconnect_after_in_seconds(&self) -> ::std::option::Option<i32> {
self.disconnect_after_in_seconds
}
}
impl ::aws_types::request_id::RequestId for TestInvokeAuthorizerOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl TestInvokeAuthorizerOutput {
pub fn builder() -> crate::operation::test_invoke_authorizer::builders::TestInvokeAuthorizerOutputBuilder {
crate::operation::test_invoke_authorizer::builders::TestInvokeAuthorizerOutputBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct TestInvokeAuthorizerOutputBuilder {
pub(crate) is_authenticated: ::std::option::Option<bool>,
pub(crate) principal_id: ::std::option::Option<::std::string::String>,
pub(crate) policy_documents: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) refresh_after_in_seconds: ::std::option::Option<i32>,
pub(crate) disconnect_after_in_seconds: ::std::option::Option<i32>,
_request_id: Option<String>,
}
impl TestInvokeAuthorizerOutputBuilder {
pub fn is_authenticated(mut self, input: bool) -> Self {
self.is_authenticated = ::std::option::Option::Some(input);
self
}
pub fn set_is_authenticated(mut self, input: ::std::option::Option<bool>) -> Self {
self.is_authenticated = input;
self
}
pub fn get_is_authenticated(&self) -> &::std::option::Option<bool> {
&self.is_authenticated
}
pub fn principal_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.principal_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_principal_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.principal_id = input;
self
}
pub fn get_principal_id(&self) -> &::std::option::Option<::std::string::String> {
&self.principal_id
}
pub fn policy_documents(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.policy_documents.unwrap_or_default();
v.push(input.into());
self.policy_documents = ::std::option::Option::Some(v);
self
}
pub fn set_policy_documents(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.policy_documents = input;
self
}
pub fn get_policy_documents(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.policy_documents
}
pub fn refresh_after_in_seconds(mut self, input: i32) -> Self {
self.refresh_after_in_seconds = ::std::option::Option::Some(input);
self
}
pub fn set_refresh_after_in_seconds(mut self, input: ::std::option::Option<i32>) -> Self {
self.refresh_after_in_seconds = input;
self
}
pub fn get_refresh_after_in_seconds(&self) -> &::std::option::Option<i32> {
&self.refresh_after_in_seconds
}
pub fn disconnect_after_in_seconds(mut self, input: i32) -> Self {
self.disconnect_after_in_seconds = ::std::option::Option::Some(input);
self
}
pub fn set_disconnect_after_in_seconds(mut self, input: ::std::option::Option<i32>) -> Self {
self.disconnect_after_in_seconds = input;
self
}
pub fn get_disconnect_after_in_seconds(&self) -> &::std::option::Option<i32> {
&self.disconnect_after_in_seconds
}
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::test_invoke_authorizer::TestInvokeAuthorizerOutput {
crate::operation::test_invoke_authorizer::TestInvokeAuthorizerOutput {
is_authenticated: self.is_authenticated,
principal_id: self.principal_id,
policy_documents: self.policy_documents,
refresh_after_in_seconds: self.refresh_after_in_seconds,
disconnect_after_in_seconds: self.disconnect_after_in_seconds,
_request_id: self._request_id,
}
}
}