aws_sdk_lambda/operation/update_alias/
_update_alias_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Provides configuration information about a Lambda function <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html">alias</a>.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct UpdateAliasOutput {
7    /// <p>The Amazon Resource Name (ARN) of the alias.</p>
8    pub alias_arn: ::std::option::Option<::std::string::String>,
9    /// <p>The name of the alias.</p>
10    pub name: ::std::option::Option<::std::string::String>,
11    /// <p>The function version that the alias invokes.</p>
12    pub function_version: ::std::option::Option<::std::string::String>,
13    /// <p>A description of the alias.</p>
14    pub description: ::std::option::Option<::std::string::String>,
15    /// <p>The <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-traffic-shifting-using-aliases.html">routing configuration</a> of the alias.</p>
16    pub routing_config: ::std::option::Option<crate::types::AliasRoutingConfiguration>,
17    /// <p>A unique identifier that changes when you update the alias.</p>
18    pub revision_id: ::std::option::Option<::std::string::String>,
19    _request_id: Option<String>,
20}
21impl UpdateAliasOutput {
22    /// <p>The Amazon Resource Name (ARN) of the alias.</p>
23    pub fn alias_arn(&self) -> ::std::option::Option<&str> {
24        self.alias_arn.as_deref()
25    }
26    /// <p>The name of the alias.</p>
27    pub fn name(&self) -> ::std::option::Option<&str> {
28        self.name.as_deref()
29    }
30    /// <p>The function version that the alias invokes.</p>
31    pub fn function_version(&self) -> ::std::option::Option<&str> {
32        self.function_version.as_deref()
33    }
34    /// <p>A description of the alias.</p>
35    pub fn description(&self) -> ::std::option::Option<&str> {
36        self.description.as_deref()
37    }
38    /// <p>The <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-traffic-shifting-using-aliases.html">routing configuration</a> of the alias.</p>
39    pub fn routing_config(&self) -> ::std::option::Option<&crate::types::AliasRoutingConfiguration> {
40        self.routing_config.as_ref()
41    }
42    /// <p>A unique identifier that changes when you update the alias.</p>
43    pub fn revision_id(&self) -> ::std::option::Option<&str> {
44        self.revision_id.as_deref()
45    }
46}
47impl ::aws_types::request_id::RequestId for UpdateAliasOutput {
48    fn request_id(&self) -> Option<&str> {
49        self._request_id.as_deref()
50    }
51}
52impl UpdateAliasOutput {
53    /// Creates a new builder-style object to manufacture [`UpdateAliasOutput`](crate::operation::update_alias::UpdateAliasOutput).
54    pub fn builder() -> crate::operation::update_alias::builders::UpdateAliasOutputBuilder {
55        crate::operation::update_alias::builders::UpdateAliasOutputBuilder::default()
56    }
57}
58
59/// A builder for [`UpdateAliasOutput`](crate::operation::update_alias::UpdateAliasOutput).
60#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
61#[non_exhaustive]
62pub struct UpdateAliasOutputBuilder {
63    pub(crate) alias_arn: ::std::option::Option<::std::string::String>,
64    pub(crate) name: ::std::option::Option<::std::string::String>,
65    pub(crate) function_version: ::std::option::Option<::std::string::String>,
66    pub(crate) description: ::std::option::Option<::std::string::String>,
67    pub(crate) routing_config: ::std::option::Option<crate::types::AliasRoutingConfiguration>,
68    pub(crate) revision_id: ::std::option::Option<::std::string::String>,
69    _request_id: Option<String>,
70}
71impl UpdateAliasOutputBuilder {
72    /// <p>The Amazon Resource Name (ARN) of the alias.</p>
73    pub fn alias_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
74        self.alias_arn = ::std::option::Option::Some(input.into());
75        self
76    }
77    /// <p>The Amazon Resource Name (ARN) of the alias.</p>
78    pub fn set_alias_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
79        self.alias_arn = input;
80        self
81    }
82    /// <p>The Amazon Resource Name (ARN) of the alias.</p>
83    pub fn get_alias_arn(&self) -> &::std::option::Option<::std::string::String> {
84        &self.alias_arn
85    }
86    /// <p>The name of the alias.</p>
87    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
88        self.name = ::std::option::Option::Some(input.into());
89        self
90    }
91    /// <p>The name of the alias.</p>
92    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
93        self.name = input;
94        self
95    }
96    /// <p>The name of the alias.</p>
97    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
98        &self.name
99    }
100    /// <p>The function version that the alias invokes.</p>
101    pub fn function_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
102        self.function_version = ::std::option::Option::Some(input.into());
103        self
104    }
105    /// <p>The function version that the alias invokes.</p>
106    pub fn set_function_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
107        self.function_version = input;
108        self
109    }
110    /// <p>The function version that the alias invokes.</p>
111    pub fn get_function_version(&self) -> &::std::option::Option<::std::string::String> {
112        &self.function_version
113    }
114    /// <p>A description of the alias.</p>
115    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
116        self.description = ::std::option::Option::Some(input.into());
117        self
118    }
119    /// <p>A description of the alias.</p>
120    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
121        self.description = input;
122        self
123    }
124    /// <p>A description of the alias.</p>
125    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
126        &self.description
127    }
128    /// <p>The <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-traffic-shifting-using-aliases.html">routing configuration</a> of the alias.</p>
129    pub fn routing_config(mut self, input: crate::types::AliasRoutingConfiguration) -> Self {
130        self.routing_config = ::std::option::Option::Some(input);
131        self
132    }
133    /// <p>The <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-traffic-shifting-using-aliases.html">routing configuration</a> of the alias.</p>
134    pub fn set_routing_config(mut self, input: ::std::option::Option<crate::types::AliasRoutingConfiguration>) -> Self {
135        self.routing_config = input;
136        self
137    }
138    /// <p>The <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-traffic-shifting-using-aliases.html">routing configuration</a> of the alias.</p>
139    pub fn get_routing_config(&self) -> &::std::option::Option<crate::types::AliasRoutingConfiguration> {
140        &self.routing_config
141    }
142    /// <p>A unique identifier that changes when you update the alias.</p>
143    pub fn revision_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
144        self.revision_id = ::std::option::Option::Some(input.into());
145        self
146    }
147    /// <p>A unique identifier that changes when you update the alias.</p>
148    pub fn set_revision_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
149        self.revision_id = input;
150        self
151    }
152    /// <p>A unique identifier that changes when you update the alias.</p>
153    pub fn get_revision_id(&self) -> &::std::option::Option<::std::string::String> {
154        &self.revision_id
155    }
156    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
157        self._request_id = Some(request_id.into());
158        self
159    }
160
161    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
162        self._request_id = request_id;
163        self
164    }
165    /// Consumes the builder and constructs a [`UpdateAliasOutput`](crate::operation::update_alias::UpdateAliasOutput).
166    pub fn build(self) -> crate::operation::update_alias::UpdateAliasOutput {
167        crate::operation::update_alias::UpdateAliasOutput {
168            alias_arn: self.alias_arn,
169            name: self.name,
170            function_version: self.function_version,
171            description: self.description,
172            routing_config: self.routing_config,
173            revision_id: self.revision_id,
174            _request_id: self._request_id,
175        }
176    }
177}