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 _request_id: Option<String>,
17}
18impl InvokeOutput {
19 pub fn status_code(&self) -> i32 {
21 self.status_code
22 }
23 pub fn function_error(&self) -> ::std::option::Option<&str> {
25 self.function_error.as_deref()
26 }
27 pub fn log_result(&self) -> ::std::option::Option<&str> {
29 self.log_result.as_deref()
30 }
31 pub fn payload(&self) -> ::std::option::Option<&::aws_smithy_types::Blob> {
33 self.payload.as_ref()
34 }
35 pub fn executed_version(&self) -> ::std::option::Option<&str> {
37 self.executed_version.as_deref()
38 }
39}
40impl ::std::fmt::Debug for InvokeOutput {
41 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
42 let mut formatter = f.debug_struct("InvokeOutput");
43 formatter.field("status_code", &self.status_code);
44 formatter.field("function_error", &self.function_error);
45 formatter.field("log_result", &self.log_result);
46 formatter.field("payload", &"*** Sensitive Data Redacted ***");
47 formatter.field("executed_version", &self.executed_version);
48 formatter.field("_request_id", &self._request_id);
49 formatter.finish()
50 }
51}
52impl ::aws_types::request_id::RequestId for InvokeOutput {
53 fn request_id(&self) -> Option<&str> {
54 self._request_id.as_deref()
55 }
56}
57impl InvokeOutput {
58 pub fn builder() -> crate::operation::invoke::builders::InvokeOutputBuilder {
60 crate::operation::invoke::builders::InvokeOutputBuilder::default()
61 }
62}
63
64#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
66#[non_exhaustive]
67pub struct InvokeOutputBuilder {
68 pub(crate) status_code: ::std::option::Option<i32>,
69 pub(crate) function_error: ::std::option::Option<::std::string::String>,
70 pub(crate) log_result: ::std::option::Option<::std::string::String>,
71 pub(crate) payload: ::std::option::Option<::aws_smithy_types::Blob>,
72 pub(crate) executed_version: ::std::option::Option<::std::string::String>,
73 _request_id: Option<String>,
74}
75impl InvokeOutputBuilder {
76 pub fn status_code(mut self, input: i32) -> Self {
78 self.status_code = ::std::option::Option::Some(input);
79 self
80 }
81 pub fn set_status_code(mut self, input: ::std::option::Option<i32>) -> Self {
83 self.status_code = input;
84 self
85 }
86 pub fn get_status_code(&self) -> &::std::option::Option<i32> {
88 &self.status_code
89 }
90 pub fn function_error(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
92 self.function_error = ::std::option::Option::Some(input.into());
93 self
94 }
95 pub fn set_function_error(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
97 self.function_error = input;
98 self
99 }
100 pub fn get_function_error(&self) -> &::std::option::Option<::std::string::String> {
102 &self.function_error
103 }
104 pub fn log_result(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
106 self.log_result = ::std::option::Option::Some(input.into());
107 self
108 }
109 pub fn set_log_result(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
111 self.log_result = input;
112 self
113 }
114 pub fn get_log_result(&self) -> &::std::option::Option<::std::string::String> {
116 &self.log_result
117 }
118 pub fn payload(mut self, input: ::aws_smithy_types::Blob) -> Self {
120 self.payload = ::std::option::Option::Some(input);
121 self
122 }
123 pub fn set_payload(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
125 self.payload = input;
126 self
127 }
128 pub fn get_payload(&self) -> &::std::option::Option<::aws_smithy_types::Blob> {
130 &self.payload
131 }
132 pub fn executed_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
134 self.executed_version = ::std::option::Option::Some(input.into());
135 self
136 }
137 pub fn set_executed_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
139 self.executed_version = input;
140 self
141 }
142 pub fn get_executed_version(&self) -> &::std::option::Option<::std::string::String> {
144 &self.executed_version
145 }
146 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
147 self._request_id = Some(request_id.into());
148 self
149 }
150
151 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
152 self._request_id = request_id;
153 self
154 }
155 pub fn build(self) -> crate::operation::invoke::InvokeOutput {
157 crate::operation::invoke::InvokeOutput {
158 status_code: self.status_code.unwrap_or_default(),
159 function_error: self.function_error,
160 log_result: self.log_result,
161 payload: self.payload,
162 executed_version: self.executed_version,
163 _request_id: self._request_id,
164 }
165 }
166}
167impl ::std::fmt::Debug for InvokeOutputBuilder {
168 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
169 let mut formatter = f.debug_struct("InvokeOutputBuilder");
170 formatter.field("status_code", &self.status_code);
171 formatter.field("function_error", &self.function_error);
172 formatter.field("log_result", &self.log_result);
173 formatter.field("payload", &"*** Sensitive Data Redacted ***");
174 formatter.field("executed_version", &self.executed_version);
175 formatter.field("_request_id", &self._request_id);
176 formatter.finish()
177 }
178}