1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>The input for the <code>GetStackPolicy</code> action.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetStackPolicyInput {
    /// <p>The name or unique stack ID that's associated with the stack whose policy you want to get.</p>
    pub stack_name: ::std::option::Option<::std::string::String>,
}
impl GetStackPolicyInput {
    /// <p>The name or unique stack ID that's associated with the stack whose policy you want to get.</p>
    pub fn stack_name(&self) -> ::std::option::Option<&str> {
        self.stack_name.as_deref()
    }
}
impl GetStackPolicyInput {
    /// Creates a new builder-style object to manufacture [`GetStackPolicyInput`](crate::operation::get_stack_policy::GetStackPolicyInput).
    pub fn builder() -> crate::operation::get_stack_policy::builders::GetStackPolicyInputBuilder {
        crate::operation::get_stack_policy::builders::GetStackPolicyInputBuilder::default()
    }
}

/// A builder for [`GetStackPolicyInput`](crate::operation::get_stack_policy::GetStackPolicyInput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct GetStackPolicyInputBuilder {
    pub(crate) stack_name: ::std::option::Option<::std::string::String>,
}
impl GetStackPolicyInputBuilder {
    /// <p>The name or unique stack ID that's associated with the stack whose policy you want to get.</p>
    /// This field is required.
    pub fn stack_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.stack_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name or unique stack ID that's associated with the stack whose policy you want to get.</p>
    pub fn set_stack_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.stack_name = input;
        self
    }
    /// <p>The name or unique stack ID that's associated with the stack whose policy you want to get.</p>
    pub fn get_stack_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.stack_name
    }
    /// Consumes the builder and constructs a [`GetStackPolicyInput`](crate::operation::get_stack_policy::GetStackPolicyInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::get_stack_policy::GetStackPolicyInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::get_stack_policy::GetStackPolicyInput { stack_name: self.stack_name })
    }
}