aws_sdk_appstream/operation/describe_applications/
_describe_applications_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DescribeApplicationsInput {
6    /// <p>The ARNs for the applications.</p>
7    pub arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
8    /// <p>The pagination token used to retrieve the next page of results for this operation.</p>
9    pub next_token: ::std::option::Option<::std::string::String>,
10    /// <p>The maximum size of each page of results.</p>
11    pub max_results: ::std::option::Option<i32>,
12}
13impl DescribeApplicationsInput {
14    /// <p>The ARNs for the applications.</p>
15    ///
16    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.arns.is_none()`.
17    pub fn arns(&self) -> &[::std::string::String] {
18        self.arns.as_deref().unwrap_or_default()
19    }
20    /// <p>The pagination token used to retrieve the next page of results for this operation.</p>
21    pub fn next_token(&self) -> ::std::option::Option<&str> {
22        self.next_token.as_deref()
23    }
24    /// <p>The maximum size of each page of results.</p>
25    pub fn max_results(&self) -> ::std::option::Option<i32> {
26        self.max_results
27    }
28}
29impl DescribeApplicationsInput {
30    /// Creates a new builder-style object to manufacture [`DescribeApplicationsInput`](crate::operation::describe_applications::DescribeApplicationsInput).
31    pub fn builder() -> crate::operation::describe_applications::builders::DescribeApplicationsInputBuilder {
32        crate::operation::describe_applications::builders::DescribeApplicationsInputBuilder::default()
33    }
34}
35
36/// A builder for [`DescribeApplicationsInput`](crate::operation::describe_applications::DescribeApplicationsInput).
37#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
38#[non_exhaustive]
39pub struct DescribeApplicationsInputBuilder {
40    pub(crate) arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
41    pub(crate) next_token: ::std::option::Option<::std::string::String>,
42    pub(crate) max_results: ::std::option::Option<i32>,
43}
44impl DescribeApplicationsInputBuilder {
45    /// Appends an item to `arns`.
46    ///
47    /// To override the contents of this collection use [`set_arns`](Self::set_arns).
48    ///
49    /// <p>The ARNs for the applications.</p>
50    pub fn arns(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
51        let mut v = self.arns.unwrap_or_default();
52        v.push(input.into());
53        self.arns = ::std::option::Option::Some(v);
54        self
55    }
56    /// <p>The ARNs for the applications.</p>
57    pub fn set_arns(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
58        self.arns = input;
59        self
60    }
61    /// <p>The ARNs for the applications.</p>
62    pub fn get_arns(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
63        &self.arns
64    }
65    /// <p>The pagination token used to retrieve the next page of results for this operation.</p>
66    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
67        self.next_token = ::std::option::Option::Some(input.into());
68        self
69    }
70    /// <p>The pagination token used to retrieve the next page of results for this operation.</p>
71    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
72        self.next_token = input;
73        self
74    }
75    /// <p>The pagination token used to retrieve the next page of results for this operation.</p>
76    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
77        &self.next_token
78    }
79    /// <p>The maximum size of each page of results.</p>
80    pub fn max_results(mut self, input: i32) -> Self {
81        self.max_results = ::std::option::Option::Some(input);
82        self
83    }
84    /// <p>The maximum size of each page of results.</p>
85    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
86        self.max_results = input;
87        self
88    }
89    /// <p>The maximum size of each page of results.</p>
90    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
91        &self.max_results
92    }
93    /// Consumes the builder and constructs a [`DescribeApplicationsInput`](crate::operation::describe_applications::DescribeApplicationsInput).
94    pub fn build(
95        self,
96    ) -> ::std::result::Result<crate::operation::describe_applications::DescribeApplicationsInput, ::aws_smithy_types::error::operation::BuildError>
97    {
98        ::std::result::Result::Ok(crate::operation::describe_applications::DescribeApplicationsInput {
99            arns: self.arns,
100            next_token: self.next_token,
101            max_results: self.max_results,
102        })
103    }
104}