aws_sdk_codedeploy/operation/update_application/
_update_application_input.rs

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