aws_sdk_lambda/operation/invoke_async/
_invoke_async_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[deprecated]
4#[non_exhaustive]
5#[derive(::std::fmt::Debug)]
6pub struct InvokeAsyncInput {
7    /// <p>The name or ARN of the Lambda function.</p>
8    /// <p class="title"><b>Name formats</b></p>
9    /// <ul>
10    /// <li>
11    /// <p><b>Function name</b> – <code>my-function</code>.</p></li>
12    /// <li>
13    /// <p><b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p></li>
14    /// <li>
15    /// <p><b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p></li>
16    /// </ul>
17    /// <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
18    pub function_name: ::std::option::Option<::std::string::String>,
19    /// <p>The JSON that you want to provide to your Lambda function as input.</p>
20    pub invoke_args: ::aws_smithy_types::byte_stream::ByteStream,
21}
22impl InvokeAsyncInput {
23    /// <p>The name or ARN of the Lambda function.</p>
24    /// <p class="title"><b>Name formats</b></p>
25    /// <ul>
26    /// <li>
27    /// <p><b>Function name</b> – <code>my-function</code>.</p></li>
28    /// <li>
29    /// <p><b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p></li>
30    /// <li>
31    /// <p><b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p></li>
32    /// </ul>
33    /// <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
34    pub fn function_name(&self) -> ::std::option::Option<&str> {
35        self.function_name.as_deref()
36    }
37    /// <p>The JSON that you want to provide to your Lambda function as input.</p>
38    pub fn invoke_args(&self) -> &::aws_smithy_types::byte_stream::ByteStream {
39        &self.invoke_args
40    }
41}
42impl InvokeAsyncInput {
43    /// Creates a new builder-style object to manufacture [`InvokeAsyncInput`](crate::operation::invoke_async::InvokeAsyncInput).
44    pub fn builder() -> crate::operation::invoke_async::builders::InvokeAsyncInputBuilder {
45        crate::operation::invoke_async::builders::InvokeAsyncInputBuilder::default()
46    }
47}
48
49/// A builder for [`InvokeAsyncInput`](crate::operation::invoke_async::InvokeAsyncInput).
50#[derive(::std::default::Default, ::std::fmt::Debug)]
51#[non_exhaustive]
52pub struct InvokeAsyncInputBuilder {
53    pub(crate) function_name: ::std::option::Option<::std::string::String>,
54    pub(crate) invoke_args: ::std::option::Option<::aws_smithy_types::byte_stream::ByteStream>,
55}
56impl InvokeAsyncInputBuilder {
57    /// <p>The name or ARN of the Lambda function.</p>
58    /// <p class="title"><b>Name formats</b></p>
59    /// <ul>
60    /// <li>
61    /// <p><b>Function name</b> – <code>my-function</code>.</p></li>
62    /// <li>
63    /// <p><b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p></li>
64    /// <li>
65    /// <p><b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p></li>
66    /// </ul>
67    /// <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
68    /// This field is required.
69    pub fn function_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
70        self.function_name = ::std::option::Option::Some(input.into());
71        self
72    }
73    /// <p>The name or ARN of the Lambda function.</p>
74    /// <p class="title"><b>Name formats</b></p>
75    /// <ul>
76    /// <li>
77    /// <p><b>Function name</b> – <code>my-function</code>.</p></li>
78    /// <li>
79    /// <p><b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p></li>
80    /// <li>
81    /// <p><b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p></li>
82    /// </ul>
83    /// <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
84    pub fn set_function_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
85        self.function_name = input;
86        self
87    }
88    /// <p>The name or ARN of the Lambda function.</p>
89    /// <p class="title"><b>Name formats</b></p>
90    /// <ul>
91    /// <li>
92    /// <p><b>Function name</b> – <code>my-function</code>.</p></li>
93    /// <li>
94    /// <p><b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p></li>
95    /// <li>
96    /// <p><b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p></li>
97    /// </ul>
98    /// <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
99    pub fn get_function_name(&self) -> &::std::option::Option<::std::string::String> {
100        &self.function_name
101    }
102    /// <p>The JSON that you want to provide to your Lambda function as input.</p>
103    /// This field is required.
104    pub fn invoke_args(mut self, input: ::aws_smithy_types::byte_stream::ByteStream) -> Self {
105        self.invoke_args = ::std::option::Option::Some(input);
106        self
107    }
108    /// <p>The JSON that you want to provide to your Lambda function as input.</p>
109    pub fn set_invoke_args(mut self, input: ::std::option::Option<::aws_smithy_types::byte_stream::ByteStream>) -> Self {
110        self.invoke_args = input;
111        self
112    }
113    /// <p>The JSON that you want to provide to your Lambda function as input.</p>
114    pub fn get_invoke_args(&self) -> &::std::option::Option<::aws_smithy_types::byte_stream::ByteStream> {
115        &self.invoke_args
116    }
117    /// Consumes the builder and constructs a [`InvokeAsyncInput`](crate::operation::invoke_async::InvokeAsyncInput).
118    pub fn build(self) -> ::std::result::Result<crate::operation::invoke_async::InvokeAsyncInput, ::aws_smithy_types::error::operation::BuildError> {
119        ::std::result::Result::Ok(crate::operation::invoke_async::InvokeAsyncInput {
120            function_name: self.function_name,
121            invoke_args: self.invoke_args.unwrap_or_default(),
122        })
123    }
124}