aws_sdk_elasticbeanstalk/operation/describe_applications/
_describe_applications_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Request to describe one or more applications.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct DescribeApplicationsInput {
7    /// <p>If specified, AWS Elastic Beanstalk restricts the returned descriptions to only include those with the specified names.</p>
8    pub application_names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
9}
10impl DescribeApplicationsInput {
11    /// <p>If specified, AWS Elastic Beanstalk restricts the returned descriptions to only include those with the specified names.</p>
12    ///
13    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.application_names.is_none()`.
14    pub fn application_names(&self) -> &[::std::string::String] {
15        self.application_names.as_deref().unwrap_or_default()
16    }
17}
18impl DescribeApplicationsInput {
19    /// Creates a new builder-style object to manufacture [`DescribeApplicationsInput`](crate::operation::describe_applications::DescribeApplicationsInput).
20    pub fn builder() -> crate::operation::describe_applications::builders::DescribeApplicationsInputBuilder {
21        crate::operation::describe_applications::builders::DescribeApplicationsInputBuilder::default()
22    }
23}
24
25/// A builder for [`DescribeApplicationsInput`](crate::operation::describe_applications::DescribeApplicationsInput).
26#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
27#[non_exhaustive]
28pub struct DescribeApplicationsInputBuilder {
29    pub(crate) application_names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
30}
31impl DescribeApplicationsInputBuilder {
32    /// Appends an item to `application_names`.
33    ///
34    /// To override the contents of this collection use [`set_application_names`](Self::set_application_names).
35    ///
36    /// <p>If specified, AWS Elastic Beanstalk restricts the returned descriptions to only include those with the specified names.</p>
37    pub fn application_names(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
38        let mut v = self.application_names.unwrap_or_default();
39        v.push(input.into());
40        self.application_names = ::std::option::Option::Some(v);
41        self
42    }
43    /// <p>If specified, AWS Elastic Beanstalk restricts the returned descriptions to only include those with the specified names.</p>
44    pub fn set_application_names(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
45        self.application_names = input;
46        self
47    }
48    /// <p>If specified, AWS Elastic Beanstalk restricts the returned descriptions to only include those with the specified names.</p>
49    pub fn get_application_names(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
50        &self.application_names
51    }
52    /// Consumes the builder and constructs a [`DescribeApplicationsInput`](crate::operation::describe_applications::DescribeApplicationsInput).
53    pub fn build(
54        self,
55    ) -> ::std::result::Result<crate::operation::describe_applications::DescribeApplicationsInput, ::aws_smithy_types::error::operation::BuildError>
56    {
57        ::std::result::Result::Ok(crate::operation::describe_applications::DescribeApplicationsInput {
58            application_names: self.application_names,
59        })
60    }
61}