aws_sdk_cloudformation/operation/get_stack_policy/_get_stack_policy_output.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>The output for the <code>GetStackPolicy</code> action.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct GetStackPolicyOutput {
7 /// <p>Structure that contains the stack policy body. (For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/protect-stack-resources.html">Prevent updates to stack resources</a> in the <i>CloudFormation User Guide</i>.)</p>
8 pub stack_policy_body: ::std::option::Option<::std::string::String>,
9 _request_id: Option<String>,
10}
11impl GetStackPolicyOutput {
12 /// <p>Structure that contains the stack policy body. (For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/protect-stack-resources.html">Prevent updates to stack resources</a> in the <i>CloudFormation User Guide</i>.)</p>
13 pub fn stack_policy_body(&self) -> ::std::option::Option<&str> {
14 self.stack_policy_body.as_deref()
15 }
16}
17impl ::aws_types::request_id::RequestId for GetStackPolicyOutput {
18 fn request_id(&self) -> Option<&str> {
19 self._request_id.as_deref()
20 }
21}
22impl GetStackPolicyOutput {
23 /// Creates a new builder-style object to manufacture [`GetStackPolicyOutput`](crate::operation::get_stack_policy::GetStackPolicyOutput).
24 pub fn builder() -> crate::operation::get_stack_policy::builders::GetStackPolicyOutputBuilder {
25 crate::operation::get_stack_policy::builders::GetStackPolicyOutputBuilder::default()
26 }
27}
28
29/// A builder for [`GetStackPolicyOutput`](crate::operation::get_stack_policy::GetStackPolicyOutput).
30#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
31#[non_exhaustive]
32pub struct GetStackPolicyOutputBuilder {
33 pub(crate) stack_policy_body: ::std::option::Option<::std::string::String>,
34 _request_id: Option<String>,
35}
36impl GetStackPolicyOutputBuilder {
37 /// <p>Structure that contains the stack policy body. (For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/protect-stack-resources.html">Prevent updates to stack resources</a> in the <i>CloudFormation User Guide</i>.)</p>
38 pub fn stack_policy_body(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
39 self.stack_policy_body = ::std::option::Option::Some(input.into());
40 self
41 }
42 /// <p>Structure that contains the stack policy body. (For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/protect-stack-resources.html">Prevent updates to stack resources</a> in the <i>CloudFormation User Guide</i>.)</p>
43 pub fn set_stack_policy_body(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
44 self.stack_policy_body = input;
45 self
46 }
47 /// <p>Structure that contains the stack policy body. (For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/protect-stack-resources.html">Prevent updates to stack resources</a> in the <i>CloudFormation User Guide</i>.)</p>
48 pub fn get_stack_policy_body(&self) -> &::std::option::Option<::std::string::String> {
49 &self.stack_policy_body
50 }
51 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
52 self._request_id = Some(request_id.into());
53 self
54 }
55
56 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
57 self._request_id = request_id;
58 self
59 }
60 /// Consumes the builder and constructs a [`GetStackPolicyOutput`](crate::operation::get_stack_policy::GetStackPolicyOutput).
61 pub fn build(self) -> crate::operation::get_stack_policy::GetStackPolicyOutput {
62 crate::operation::get_stack_policy::GetStackPolicyOutput {
63 stack_policy_body: self.stack_policy_body,
64 _request_id: self._request_id,
65 }
66 }
67}