aws_sdk_lambda/operation/invoke_async/
_invoke_async_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>A success response (<code>202 Accepted</code>) indicates that the request is queued for invocation.</p>
4#[deprecated]
5#[non_exhaustive]
6#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
7pub struct InvokeAsyncOutput {
8    /// <p>The status code.</p>
9    pub status: i32,
10    _request_id: Option<String>,
11}
12impl InvokeAsyncOutput {
13    /// <p>The status code.</p>
14    pub fn status(&self) -> i32 {
15        self.status
16    }
17}
18impl ::aws_types::request_id::RequestId for InvokeAsyncOutput {
19    fn request_id(&self) -> Option<&str> {
20        self._request_id.as_deref()
21    }
22}
23impl InvokeAsyncOutput {
24    /// Creates a new builder-style object to manufacture [`InvokeAsyncOutput`](crate::operation::invoke_async::InvokeAsyncOutput).
25    pub fn builder() -> crate::operation::invoke_async::builders::InvokeAsyncOutputBuilder {
26        crate::operation::invoke_async::builders::InvokeAsyncOutputBuilder::default()
27    }
28}
29
30/// A builder for [`InvokeAsyncOutput`](crate::operation::invoke_async::InvokeAsyncOutput).
31#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
32#[non_exhaustive]
33pub struct InvokeAsyncOutputBuilder {
34    pub(crate) status: ::std::option::Option<i32>,
35    _request_id: Option<String>,
36}
37impl InvokeAsyncOutputBuilder {
38    /// <p>The status code.</p>
39    pub fn status(mut self, input: i32) -> Self {
40        self.status = ::std::option::Option::Some(input);
41        self
42    }
43    /// <p>The status code.</p>
44    pub fn set_status(mut self, input: ::std::option::Option<i32>) -> Self {
45        self.status = input;
46        self
47    }
48    /// <p>The status code.</p>
49    pub fn get_status(&self) -> &::std::option::Option<i32> {
50        &self.status
51    }
52    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
53        self._request_id = Some(request_id.into());
54        self
55    }
56
57    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
58        self._request_id = request_id;
59        self
60    }
61    /// Consumes the builder and constructs a [`InvokeAsyncOutput`](crate::operation::invoke_async::InvokeAsyncOutput).
62    pub fn build(self) -> crate::operation::invoke_async::InvokeAsyncOutput {
63        crate::operation::invoke_async::InvokeAsyncOutput {
64            status: self.status.unwrap_or_default(),
65            _request_id: self._request_id,
66        }
67    }
68}