aws_sdk_lambda/operation/invoke/
_invoke_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct InvokeOutput {
6 pub status_code: i32,
8 pub function_error: ::std::option::Option<::std::string::String>,
10 pub log_result: ::std::option::Option<::std::string::String>,
12 pub payload: ::std::option::Option<::aws_smithy_types::Blob>,
14 pub executed_version: ::std::option::Option<::std::string::String>,
16 pub durable_execution_arn: ::std::option::Option<::std::string::String>,
18 _request_id: Option<String>,
19}
20impl InvokeOutput {
21 pub fn status_code(&self) -> i32 {
23 self.status_code
24 }
25 pub fn function_error(&self) -> ::std::option::Option<&str> {
27 self.function_error.as_deref()
28 }
29 pub fn log_result(&self) -> ::std::option::Option<&str> {
31 self.log_result.as_deref()
32 }
33 pub fn payload(&self) -> ::std::option::Option<&::aws_smithy_types::Blob> {
35 self.payload.as_ref()
36 }
37 pub fn executed_version(&self) -> ::std::option::Option<&str> {
39 self.executed_version.as_deref()
40 }
41 pub fn durable_execution_arn(&self) -> ::std::option::Option<&str> {
43 self.durable_execution_arn.as_deref()
44 }
45}
46impl ::std::fmt::Debug for InvokeOutput {
47 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
48 let mut formatter = f.debug_struct("InvokeOutput");
49 formatter.field("status_code", &self.status_code);
50 formatter.field("function_error", &self.function_error);
51 formatter.field("log_result", &self.log_result);
52 formatter.field("payload", &"*** Sensitive Data Redacted ***");
53 formatter.field("executed_version", &self.executed_version);
54 formatter.field("durable_execution_arn", &self.durable_execution_arn);
55 formatter.field("_request_id", &self._request_id);
56 formatter.finish()
57 }
58}
59impl ::aws_types::request_id::RequestId for InvokeOutput {
60 fn request_id(&self) -> Option<&str> {
61 self._request_id.as_deref()
62 }
63}
64impl InvokeOutput {
65 pub fn builder() -> crate::operation::invoke::builders::InvokeOutputBuilder {
67 crate::operation::invoke::builders::InvokeOutputBuilder::default()
68 }
69}
70
71#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
73#[non_exhaustive]
74pub struct InvokeOutputBuilder {
75 pub(crate) status_code: ::std::option::Option<i32>,
76 pub(crate) function_error: ::std::option::Option<::std::string::String>,
77 pub(crate) log_result: ::std::option::Option<::std::string::String>,
78 pub(crate) payload: ::std::option::Option<::aws_smithy_types::Blob>,
79 pub(crate) executed_version: ::std::option::Option<::std::string::String>,
80 pub(crate) durable_execution_arn: ::std::option::Option<::std::string::String>,
81 _request_id: Option<String>,
82}
83impl InvokeOutputBuilder {
84 pub fn status_code(mut self, input: i32) -> Self {
86 self.status_code = ::std::option::Option::Some(input);
87 self
88 }
89 pub fn set_status_code(mut self, input: ::std::option::Option<i32>) -> Self {
91 self.status_code = input;
92 self
93 }
94 pub fn get_status_code(&self) -> &::std::option::Option<i32> {
96 &self.status_code
97 }
98 pub fn function_error(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
100 self.function_error = ::std::option::Option::Some(input.into());
101 self
102 }
103 pub fn set_function_error(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
105 self.function_error = input;
106 self
107 }
108 pub fn get_function_error(&self) -> &::std::option::Option<::std::string::String> {
110 &self.function_error
111 }
112 pub fn log_result(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
114 self.log_result = ::std::option::Option::Some(input.into());
115 self
116 }
117 pub fn set_log_result(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
119 self.log_result = input;
120 self
121 }
122 pub fn get_log_result(&self) -> &::std::option::Option<::std::string::String> {
124 &self.log_result
125 }
126 pub fn payload(mut self, input: ::aws_smithy_types::Blob) -> Self {
128 self.payload = ::std::option::Option::Some(input);
129 self
130 }
131 pub fn set_payload(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
133 self.payload = input;
134 self
135 }
136 pub fn get_payload(&self) -> &::std::option::Option<::aws_smithy_types::Blob> {
138 &self.payload
139 }
140 pub fn executed_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
142 self.executed_version = ::std::option::Option::Some(input.into());
143 self
144 }
145 pub fn set_executed_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
147 self.executed_version = input;
148 self
149 }
150 pub fn get_executed_version(&self) -> &::std::option::Option<::std::string::String> {
152 &self.executed_version
153 }
154 pub fn durable_execution_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
156 self.durable_execution_arn = ::std::option::Option::Some(input.into());
157 self
158 }
159 pub fn set_durable_execution_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
161 self.durable_execution_arn = input;
162 self
163 }
164 pub fn get_durable_execution_arn(&self) -> &::std::option::Option<::std::string::String> {
166 &self.durable_execution_arn
167 }
168 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
169 self._request_id = Some(request_id.into());
170 self
171 }
172
173 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
174 self._request_id = request_id;
175 self
176 }
177 pub fn build(self) -> crate::operation::invoke::InvokeOutput {
179 crate::operation::invoke::InvokeOutput {
180 status_code: self.status_code.unwrap_or_default(),
181 function_error: self.function_error,
182 log_result: self.log_result,
183 payload: self.payload,
184 executed_version: self.executed_version,
185 durable_execution_arn: self.durable_execution_arn,
186 _request_id: self._request_id,
187 }
188 }
189}
190impl ::std::fmt::Debug for InvokeOutputBuilder {
191 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
192 let mut formatter = f.debug_struct("InvokeOutputBuilder");
193 formatter.field("status_code", &self.status_code);
194 formatter.field("function_error", &self.function_error);
195 formatter.field("log_result", &self.log_result);
196 formatter.field("payload", &"*** Sensitive Data Redacted ***");
197 formatter.field("executed_version", &self.executed_version);
198 formatter.field("durable_execution_arn", &self.durable_execution_arn);
199 formatter.field("_request_id", &self._request_id);
200 formatter.finish()
201 }
202}