aws_sdk_elasticbeanstalk/operation/delete_application/
_delete_application_input.rs

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