aws_sdk_cloudformation/operation/list_stack_resources/
_list_stack_resources_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>The input for the <code>ListStackResource</code> action.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct ListStackResourcesInput {
7    /// <p>The name or the unique stack ID that is associated with the stack, which aren't always interchangeable:</p>
8    /// <ul>
9    /// <li>
10    /// <p>Running stacks: You can specify either the stack's name or its unique stack ID.</p></li>
11    /// <li>
12    /// <p>Deleted stacks: You must specify the unique stack ID.</p></li>
13    /// </ul>
14    pub stack_name: ::std::option::Option<::std::string::String>,
15    /// <p>A string that identifies the next page of stack resources that you want to retrieve.</p>
16    pub next_token: ::std::option::Option<::std::string::String>,
17}
18impl ListStackResourcesInput {
19    /// <p>The name or the unique stack ID that is associated with the stack, which aren't always interchangeable:</p>
20    /// <ul>
21    /// <li>
22    /// <p>Running stacks: You can specify either the stack's name or its unique stack ID.</p></li>
23    /// <li>
24    /// <p>Deleted stacks: You must specify the unique stack ID.</p></li>
25    /// </ul>
26    pub fn stack_name(&self) -> ::std::option::Option<&str> {
27        self.stack_name.as_deref()
28    }
29    /// <p>A string that identifies the next page of stack resources that you want to retrieve.</p>
30    pub fn next_token(&self) -> ::std::option::Option<&str> {
31        self.next_token.as_deref()
32    }
33}
34impl ListStackResourcesInput {
35    /// Creates a new builder-style object to manufacture [`ListStackResourcesInput`](crate::operation::list_stack_resources::ListStackResourcesInput).
36    pub fn builder() -> crate::operation::list_stack_resources::builders::ListStackResourcesInputBuilder {
37        crate::operation::list_stack_resources::builders::ListStackResourcesInputBuilder::default()
38    }
39}
40
41/// A builder for [`ListStackResourcesInput`](crate::operation::list_stack_resources::ListStackResourcesInput).
42#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
43#[non_exhaustive]
44pub struct ListStackResourcesInputBuilder {
45    pub(crate) stack_name: ::std::option::Option<::std::string::String>,
46    pub(crate) next_token: ::std::option::Option<::std::string::String>,
47}
48impl ListStackResourcesInputBuilder {
49    /// <p>The name or the unique stack ID that is associated with the stack, which aren't always interchangeable:</p>
50    /// <ul>
51    /// <li>
52    /// <p>Running stacks: You can specify either the stack's name or its unique stack ID.</p></li>
53    /// <li>
54    /// <p>Deleted stacks: You must specify the unique stack ID.</p></li>
55    /// </ul>
56    /// This field is required.
57    pub fn stack_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
58        self.stack_name = ::std::option::Option::Some(input.into());
59        self
60    }
61    /// <p>The name or the unique stack ID that is associated with the stack, which aren't always interchangeable:</p>
62    /// <ul>
63    /// <li>
64    /// <p>Running stacks: You can specify either the stack's name or its unique stack ID.</p></li>
65    /// <li>
66    /// <p>Deleted stacks: You must specify the unique stack ID.</p></li>
67    /// </ul>
68    pub fn set_stack_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
69        self.stack_name = input;
70        self
71    }
72    /// <p>The name or the unique stack ID that is associated with the stack, which aren't always interchangeable:</p>
73    /// <ul>
74    /// <li>
75    /// <p>Running stacks: You can specify either the stack's name or its unique stack ID.</p></li>
76    /// <li>
77    /// <p>Deleted stacks: You must specify the unique stack ID.</p></li>
78    /// </ul>
79    pub fn get_stack_name(&self) -> &::std::option::Option<::std::string::String> {
80        &self.stack_name
81    }
82    /// <p>A string that identifies the next page of stack resources that you want to retrieve.</p>
83    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
84        self.next_token = ::std::option::Option::Some(input.into());
85        self
86    }
87    /// <p>A string that identifies the next page of stack resources that you want to retrieve.</p>
88    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
89        self.next_token = input;
90        self
91    }
92    /// <p>A string that identifies the next page of stack resources that you want to retrieve.</p>
93    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
94        &self.next_token
95    }
96    /// Consumes the builder and constructs a [`ListStackResourcesInput`](crate::operation::list_stack_resources::ListStackResourcesInput).
97    pub fn build(
98        self,
99    ) -> ::std::result::Result<crate::operation::list_stack_resources::ListStackResourcesInput, ::aws_smithy_types::error::operation::BuildError>
100    {
101        ::std::result::Result::Ok(crate::operation::list_stack_resources::ListStackResourcesInput {
102            stack_name: self.stack_name,
103            next_token: self.next_token,
104        })
105    }
106}