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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Specifies <code>RESOURCE</code> type target details for activated hooks.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ChangeSetHookResourceTargetDetails {
    /// <p>The resource's logical ID, which is defined in the stack's template.</p>
    pub logical_resource_id: ::std::option::Option<::std::string::String>,
    /// <p>The type of CloudFormation resource, such as <code>AWS::S3::Bucket</code>.</p>
    pub resource_type: ::std::option::Option<::std::string::String>,
    /// <p>Specifies the action of the resource.</p>
    pub resource_action: ::std::option::Option<crate::types::ChangeAction>,
}
impl ChangeSetHookResourceTargetDetails {
    /// <p>The resource's logical ID, which is defined in the stack's template.</p>
    pub fn logical_resource_id(&self) -> ::std::option::Option<&str> {
        self.logical_resource_id.as_deref()
    }
    /// <p>The type of CloudFormation resource, such as <code>AWS::S3::Bucket</code>.</p>
    pub fn resource_type(&self) -> ::std::option::Option<&str> {
        self.resource_type.as_deref()
    }
    /// <p>Specifies the action of the resource.</p>
    pub fn resource_action(&self) -> ::std::option::Option<&crate::types::ChangeAction> {
        self.resource_action.as_ref()
    }
}
impl ChangeSetHookResourceTargetDetails {
    /// Creates a new builder-style object to manufacture [`ChangeSetHookResourceTargetDetails`](crate::types::ChangeSetHookResourceTargetDetails).
    pub fn builder() -> crate::types::builders::ChangeSetHookResourceTargetDetailsBuilder {
        crate::types::builders::ChangeSetHookResourceTargetDetailsBuilder::default()
    }
}

/// A builder for [`ChangeSetHookResourceTargetDetails`](crate::types::ChangeSetHookResourceTargetDetails).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct ChangeSetHookResourceTargetDetailsBuilder {
    pub(crate) logical_resource_id: ::std::option::Option<::std::string::String>,
    pub(crate) resource_type: ::std::option::Option<::std::string::String>,
    pub(crate) resource_action: ::std::option::Option<crate::types::ChangeAction>,
}
impl ChangeSetHookResourceTargetDetailsBuilder {
    /// <p>The resource's logical ID, which is defined in the stack's template.</p>
    pub fn logical_resource_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.logical_resource_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The resource's logical ID, which is defined in the stack's template.</p>
    pub fn set_logical_resource_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.logical_resource_id = input;
        self
    }
    /// <p>The resource's logical ID, which is defined in the stack's template.</p>
    pub fn get_logical_resource_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.logical_resource_id
    }
    /// <p>The type of CloudFormation resource, such as <code>AWS::S3::Bucket</code>.</p>
    pub fn resource_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.resource_type = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The type of CloudFormation resource, such as <code>AWS::S3::Bucket</code>.</p>
    pub fn set_resource_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.resource_type = input;
        self
    }
    /// <p>The type of CloudFormation resource, such as <code>AWS::S3::Bucket</code>.</p>
    pub fn get_resource_type(&self) -> &::std::option::Option<::std::string::String> {
        &self.resource_type
    }
    /// <p>Specifies the action of the resource.</p>
    pub fn resource_action(mut self, input: crate::types::ChangeAction) -> Self {
        self.resource_action = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies the action of the resource.</p>
    pub fn set_resource_action(mut self, input: ::std::option::Option<crate::types::ChangeAction>) -> Self {
        self.resource_action = input;
        self
    }
    /// <p>Specifies the action of the resource.</p>
    pub fn get_resource_action(&self) -> &::std::option::Option<crate::types::ChangeAction> {
        &self.resource_action
    }
    /// Consumes the builder and constructs a [`ChangeSetHookResourceTargetDetails`](crate::types::ChangeSetHookResourceTargetDetails).
    pub fn build(self) -> crate::types::ChangeSetHookResourceTargetDetails {
        crate::types::ChangeSetHookResourceTargetDetails {
            logical_resource_id: self.logical_resource_id,
            resource_type: self.resource_type,
            resource_action: self.resource_action,
        }
    }
}