aws_sdk_amplifybackend/operation/create_token/
_create_token_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct CreateTokenOutput {
6 pub app_id: ::std::option::Option<::std::string::String>,
8 pub challenge_code: ::std::option::Option<::std::string::String>,
10 pub session_id: ::std::option::Option<::std::string::String>,
12 pub ttl: ::std::option::Option<::std::string::String>,
14 _request_id: Option<String>,
15}
16impl CreateTokenOutput {
17 pub fn app_id(&self) -> ::std::option::Option<&str> {
19 self.app_id.as_deref()
20 }
21 pub fn challenge_code(&self) -> ::std::option::Option<&str> {
23 self.challenge_code.as_deref()
24 }
25 pub fn session_id(&self) -> ::std::option::Option<&str> {
27 self.session_id.as_deref()
28 }
29 pub fn ttl(&self) -> ::std::option::Option<&str> {
31 self.ttl.as_deref()
32 }
33}
34impl ::aws_types::request_id::RequestId for CreateTokenOutput {
35 fn request_id(&self) -> Option<&str> {
36 self._request_id.as_deref()
37 }
38}
39impl CreateTokenOutput {
40 pub fn builder() -> crate::operation::create_token::builders::CreateTokenOutputBuilder {
42 crate::operation::create_token::builders::CreateTokenOutputBuilder::default()
43 }
44}
45
46#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
48#[non_exhaustive]
49pub struct CreateTokenOutputBuilder {
50 pub(crate) app_id: ::std::option::Option<::std::string::String>,
51 pub(crate) challenge_code: ::std::option::Option<::std::string::String>,
52 pub(crate) session_id: ::std::option::Option<::std::string::String>,
53 pub(crate) ttl: ::std::option::Option<::std::string::String>,
54 _request_id: Option<String>,
55}
56impl CreateTokenOutputBuilder {
57 pub fn app_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
59 self.app_id = ::std::option::Option::Some(input.into());
60 self
61 }
62 pub fn set_app_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
64 self.app_id = input;
65 self
66 }
67 pub fn get_app_id(&self) -> &::std::option::Option<::std::string::String> {
69 &self.app_id
70 }
71 pub fn challenge_code(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
73 self.challenge_code = ::std::option::Option::Some(input.into());
74 self
75 }
76 pub fn set_challenge_code(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
78 self.challenge_code = input;
79 self
80 }
81 pub fn get_challenge_code(&self) -> &::std::option::Option<::std::string::String> {
83 &self.challenge_code
84 }
85 pub fn session_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
87 self.session_id = ::std::option::Option::Some(input.into());
88 self
89 }
90 pub fn set_session_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
92 self.session_id = input;
93 self
94 }
95 pub fn get_session_id(&self) -> &::std::option::Option<::std::string::String> {
97 &self.session_id
98 }
99 pub fn ttl(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
101 self.ttl = ::std::option::Option::Some(input.into());
102 self
103 }
104 pub fn set_ttl(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
106 self.ttl = input;
107 self
108 }
109 pub fn get_ttl(&self) -> &::std::option::Option<::std::string::String> {
111 &self.ttl
112 }
113 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
114 self._request_id = Some(request_id.into());
115 self
116 }
117
118 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
119 self._request_id = request_id;
120 self
121 }
122 pub fn build(self) -> crate::operation::create_token::CreateTokenOutput {
124 crate::operation::create_token::CreateTokenOutput {
125 app_id: self.app_id,
126 challenge_code: self.challenge_code,
127 session_id: self.session_id,
128 ttl: self.ttl,
129 _request_id: self._request_id,
130 }
131 }
132}