aws_sdk_appstream/operation/describe_stacks/
_describe_stacks_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 DescribeStacksInput {
6    /// <p>The names of the stacks to describe.</p>
7    pub names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
8    /// <p>The pagination token to use to retrieve the next page of results for this operation. If this value is null, it retrieves the first page.</p>
9    pub next_token: ::std::option::Option<::std::string::String>,
10}
11impl DescribeStacksInput {
12    /// <p>The names of the stacks to describe.</p>
13    ///
14    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.names.is_none()`.
15    pub fn names(&self) -> &[::std::string::String] {
16        self.names.as_deref().unwrap_or_default()
17    }
18    /// <p>The pagination token to use to retrieve the next page of results for this operation. If this value is null, it retrieves the first page.</p>
19    pub fn next_token(&self) -> ::std::option::Option<&str> {
20        self.next_token.as_deref()
21    }
22}
23impl DescribeStacksInput {
24    /// Creates a new builder-style object to manufacture [`DescribeStacksInput`](crate::operation::describe_stacks::DescribeStacksInput).
25    pub fn builder() -> crate::operation::describe_stacks::builders::DescribeStacksInputBuilder {
26        crate::operation::describe_stacks::builders::DescribeStacksInputBuilder::default()
27    }
28}
29
30/// A builder for [`DescribeStacksInput`](crate::operation::describe_stacks::DescribeStacksInput).
31#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
32#[non_exhaustive]
33pub struct DescribeStacksInputBuilder {
34    pub(crate) names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
35    pub(crate) next_token: ::std::option::Option<::std::string::String>,
36}
37impl DescribeStacksInputBuilder {
38    /// Appends an item to `names`.
39    ///
40    /// To override the contents of this collection use [`set_names`](Self::set_names).
41    ///
42    /// <p>The names of the stacks to describe.</p>
43    pub fn names(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
44        let mut v = self.names.unwrap_or_default();
45        v.push(input.into());
46        self.names = ::std::option::Option::Some(v);
47        self
48    }
49    /// <p>The names of the stacks to describe.</p>
50    pub fn set_names(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
51        self.names = input;
52        self
53    }
54    /// <p>The names of the stacks to describe.</p>
55    pub fn get_names(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
56        &self.names
57    }
58    /// <p>The pagination token to use to retrieve the next page of results for this operation. If this value is null, it retrieves the first page.</p>
59    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
60        self.next_token = ::std::option::Option::Some(input.into());
61        self
62    }
63    /// <p>The pagination token to use to retrieve the next page of results for this operation. If this value is null, it retrieves the first page.</p>
64    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
65        self.next_token = input;
66        self
67    }
68    /// <p>The pagination token to use to retrieve the next page of results for this operation. If this value is null, it retrieves the first page.</p>
69    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
70        &self.next_token
71    }
72    /// Consumes the builder and constructs a [`DescribeStacksInput`](crate::operation::describe_stacks::DescribeStacksInput).
73    pub fn build(
74        self,
75    ) -> ::std::result::Result<crate::operation::describe_stacks::DescribeStacksInput, ::aws_smithy_types::error::operation::BuildError> {
76        ::std::result::Result::Ok(crate::operation::describe_stacks::DescribeStacksInput {
77            names: self.names,
78            next_token: self.next_token,
79        })
80    }
81}