aws_sdk_lambda/operation/delete_function/
_delete_function_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#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DeleteFunctionInput {
6    /// <p>The name or ARN of the Lambda function or version.</p>
7    /// <p class="title"><b>Name formats</b></p>
8    /// <ul>
9    /// <li>
10    /// <p><b>Function name</b> – <code>my-function</code> (name-only), <code>my-function:1</code> (with version).</p></li>
11    /// <li>
12    /// <p><b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p></li>
13    /// <li>
14    /// <p><b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p></li>
15    /// </ul>
16    /// <p>You can append a version number or alias to any of the formats. 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>
17    pub function_name: ::std::option::Option<::std::string::String>,
18    /// <p>Specify a version to delete. You can't delete a version that an alias references.</p>
19    pub qualifier: ::std::option::Option<::std::string::String>,
20}
21impl DeleteFunctionInput {
22    /// <p>The name or ARN of the Lambda function or version.</p>
23    /// <p class="title"><b>Name formats</b></p>
24    /// <ul>
25    /// <li>
26    /// <p><b>Function name</b> – <code>my-function</code> (name-only), <code>my-function:1</code> (with version).</p></li>
27    /// <li>
28    /// <p><b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p></li>
29    /// <li>
30    /// <p><b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p></li>
31    /// </ul>
32    /// <p>You can append a version number or alias to any of the formats. 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>
33    pub fn function_name(&self) -> ::std::option::Option<&str> {
34        self.function_name.as_deref()
35    }
36    /// <p>Specify a version to delete. You can't delete a version that an alias references.</p>
37    pub fn qualifier(&self) -> ::std::option::Option<&str> {
38        self.qualifier.as_deref()
39    }
40}
41impl DeleteFunctionInput {
42    /// Creates a new builder-style object to manufacture [`DeleteFunctionInput`](crate::operation::delete_function::DeleteFunctionInput).
43    pub fn builder() -> crate::operation::delete_function::builders::DeleteFunctionInputBuilder {
44        crate::operation::delete_function::builders::DeleteFunctionInputBuilder::default()
45    }
46}
47
48/// A builder for [`DeleteFunctionInput`](crate::operation::delete_function::DeleteFunctionInput).
49#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
50#[non_exhaustive]
51pub struct DeleteFunctionInputBuilder {
52    pub(crate) function_name: ::std::option::Option<::std::string::String>,
53    pub(crate) qualifier: ::std::option::Option<::std::string::String>,
54}
55impl DeleteFunctionInputBuilder {
56    /// <p>The name or ARN of the Lambda function or version.</p>
57    /// <p class="title"><b>Name formats</b></p>
58    /// <ul>
59    /// <li>
60    /// <p><b>Function name</b> – <code>my-function</code> (name-only), <code>my-function:1</code> (with version).</p></li>
61    /// <li>
62    /// <p><b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p></li>
63    /// <li>
64    /// <p><b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p></li>
65    /// </ul>
66    /// <p>You can append a version number or alias to any of the formats. 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>
67    /// This field is required.
68    pub fn function_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
69        self.function_name = ::std::option::Option::Some(input.into());
70        self
71    }
72    /// <p>The name or ARN of the Lambda function or version.</p>
73    /// <p class="title"><b>Name formats</b></p>
74    /// <ul>
75    /// <li>
76    /// <p><b>Function name</b> – <code>my-function</code> (name-only), <code>my-function:1</code> (with version).</p></li>
77    /// <li>
78    /// <p><b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p></li>
79    /// <li>
80    /// <p><b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p></li>
81    /// </ul>
82    /// <p>You can append a version number or alias to any of the formats. 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>
83    pub fn set_function_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
84        self.function_name = input;
85        self
86    }
87    /// <p>The name or ARN of the Lambda function or version.</p>
88    /// <p class="title"><b>Name formats</b></p>
89    /// <ul>
90    /// <li>
91    /// <p><b>Function name</b> – <code>my-function</code> (name-only), <code>my-function:1</code> (with version).</p></li>
92    /// <li>
93    /// <p><b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p></li>
94    /// <li>
95    /// <p><b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p></li>
96    /// </ul>
97    /// <p>You can append a version number or alias to any of the formats. 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>
98    pub fn get_function_name(&self) -> &::std::option::Option<::std::string::String> {
99        &self.function_name
100    }
101    /// <p>Specify a version to delete. You can't delete a version that an alias references.</p>
102    pub fn qualifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
103        self.qualifier = ::std::option::Option::Some(input.into());
104        self
105    }
106    /// <p>Specify a version to delete. You can't delete a version that an alias references.</p>
107    pub fn set_qualifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
108        self.qualifier = input;
109        self
110    }
111    /// <p>Specify a version to delete. You can't delete a version that an alias references.</p>
112    pub fn get_qualifier(&self) -> &::std::option::Option<::std::string::String> {
113        &self.qualifier
114    }
115    /// Consumes the builder and constructs a [`DeleteFunctionInput`](crate::operation::delete_function::DeleteFunctionInput).
116    pub fn build(
117        self,
118    ) -> ::std::result::Result<crate::operation::delete_function::DeleteFunctionInput, ::aws_smithy_types::error::operation::BuildError> {
119        ::std::result::Result::Ok(crate::operation::delete_function::DeleteFunctionInput {
120            function_name: self.function_name,
121            qualifier: self.qualifier,
122        })
123    }
124}