aws_sdk_elasticbeanstalk/operation/update_application/
_update_application_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Request to update an application.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct UpdateApplicationInput {
7    /// <p>The name of the application to update. If no such application is found, <code>UpdateApplication</code> returns an <code>InvalidParameterValue</code> error.</p>
8    pub application_name: ::std::option::Option<::std::string::String>,
9    /// <p>A new description for the application.</p>
10    /// <p>Default: If not specified, AWS Elastic Beanstalk does not update the description.</p>
11    pub description: ::std::option::Option<::std::string::String>,
12}
13impl UpdateApplicationInput {
14    /// <p>The name of the application to update. If no such application is found, <code>UpdateApplication</code> returns an <code>InvalidParameterValue</code> error.</p>
15    pub fn application_name(&self) -> ::std::option::Option<&str> {
16        self.application_name.as_deref()
17    }
18    /// <p>A new description for the application.</p>
19    /// <p>Default: If not specified, AWS Elastic Beanstalk does not update the description.</p>
20    pub fn description(&self) -> ::std::option::Option<&str> {
21        self.description.as_deref()
22    }
23}
24impl UpdateApplicationInput {
25    /// Creates a new builder-style object to manufacture [`UpdateApplicationInput`](crate::operation::update_application::UpdateApplicationInput).
26    pub fn builder() -> crate::operation::update_application::builders::UpdateApplicationInputBuilder {
27        crate::operation::update_application::builders::UpdateApplicationInputBuilder::default()
28    }
29}
30
31/// A builder for [`UpdateApplicationInput`](crate::operation::update_application::UpdateApplicationInput).
32#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
33#[non_exhaustive]
34pub struct UpdateApplicationInputBuilder {
35    pub(crate) application_name: ::std::option::Option<::std::string::String>,
36    pub(crate) description: ::std::option::Option<::std::string::String>,
37}
38impl UpdateApplicationInputBuilder {
39    /// <p>The name of the application to update. If no such application is found, <code>UpdateApplication</code> returns an <code>InvalidParameterValue</code> error.</p>
40    /// This field is required.
41    pub fn application_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
42        self.application_name = ::std::option::Option::Some(input.into());
43        self
44    }
45    /// <p>The name of the application to update. If no such application is found, <code>UpdateApplication</code> returns an <code>InvalidParameterValue</code> error.</p>
46    pub fn set_application_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
47        self.application_name = input;
48        self
49    }
50    /// <p>The name of the application to update. If no such application is found, <code>UpdateApplication</code> returns an <code>InvalidParameterValue</code> error.</p>
51    pub fn get_application_name(&self) -> &::std::option::Option<::std::string::String> {
52        &self.application_name
53    }
54    /// <p>A new description for the application.</p>
55    /// <p>Default: If not specified, AWS Elastic Beanstalk does not update the description.</p>
56    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
57        self.description = ::std::option::Option::Some(input.into());
58        self
59    }
60    /// <p>A new description for the application.</p>
61    /// <p>Default: If not specified, AWS Elastic Beanstalk does not update the description.</p>
62    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
63        self.description = input;
64        self
65    }
66    /// <p>A new description for the application.</p>
67    /// <p>Default: If not specified, AWS Elastic Beanstalk does not update the description.</p>
68    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
69        &self.description
70    }
71    /// Consumes the builder and constructs a [`UpdateApplicationInput`](crate::operation::update_application::UpdateApplicationInput).
72    pub fn build(
73        self,
74    ) -> ::std::result::Result<crate::operation::update_application::UpdateApplicationInput, ::aws_smithy_types::error::operation::BuildError> {
75        ::std::result::Result::Ok(crate::operation::update_application::UpdateApplicationInput {
76            application_name: self.application_name,
77            description: self.description,
78        })
79    }
80}