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