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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Information about a constraint.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ConstraintDetail {
    /// <p>The identifier of the constraint.</p>
    pub constraint_id: ::std::option::Option<::std::string::String>,
    /// <p>The type of constraint.</p>
    /// <ul>
    /// <li> <p> <code>LAUNCH</code> </p> </li>
    /// <li> <p> <code>NOTIFICATION</code> </p> </li>
    /// <li> <p>STACKSET</p> </li>
    /// <li> <p> <code>TEMPLATE</code> </p> </li>
    /// </ul>
    pub r#type: ::std::option::Option<::std::string::String>,
    /// <p>The description of the constraint.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>The owner of the constraint.</p>
    pub owner: ::std::option::Option<::std::string::String>,
    /// <p>The identifier of the product the constraint applies to. Note that a constraint applies to a specific instance of a product within a certain portfolio.</p>
    pub product_id: ::std::option::Option<::std::string::String>,
    /// <p>The identifier of the portfolio the product resides in. The constraint applies only to the instance of the product that lives within this portfolio.</p>
    pub portfolio_id: ::std::option::Option<::std::string::String>,
}
impl ConstraintDetail {
    /// <p>The identifier of the constraint.</p>
    pub fn constraint_id(&self) -> ::std::option::Option<&str> {
        self.constraint_id.as_deref()
    }
    /// <p>The type of constraint.</p>
    /// <ul>
    /// <li> <p> <code>LAUNCH</code> </p> </li>
    /// <li> <p> <code>NOTIFICATION</code> </p> </li>
    /// <li> <p>STACKSET</p> </li>
    /// <li> <p> <code>TEMPLATE</code> </p> </li>
    /// </ul>
    pub fn r#type(&self) -> ::std::option::Option<&str> {
        self.r#type.as_deref()
    }
    /// <p>The description of the constraint.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The owner of the constraint.</p>
    pub fn owner(&self) -> ::std::option::Option<&str> {
        self.owner.as_deref()
    }
    /// <p>The identifier of the product the constraint applies to. Note that a constraint applies to a specific instance of a product within a certain portfolio.</p>
    pub fn product_id(&self) -> ::std::option::Option<&str> {
        self.product_id.as_deref()
    }
    /// <p>The identifier of the portfolio the product resides in. The constraint applies only to the instance of the product that lives within this portfolio.</p>
    pub fn portfolio_id(&self) -> ::std::option::Option<&str> {
        self.portfolio_id.as_deref()
    }
}
impl ConstraintDetail {
    /// Creates a new builder-style object to manufacture [`ConstraintDetail`](crate::types::ConstraintDetail).
    pub fn builder() -> crate::types::builders::ConstraintDetailBuilder {
        crate::types::builders::ConstraintDetailBuilder::default()
    }
}

/// A builder for [`ConstraintDetail`](crate::types::ConstraintDetail).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct ConstraintDetailBuilder {
    pub(crate) constraint_id: ::std::option::Option<::std::string::String>,
    pub(crate) r#type: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) owner: ::std::option::Option<::std::string::String>,
    pub(crate) product_id: ::std::option::Option<::std::string::String>,
    pub(crate) portfolio_id: ::std::option::Option<::std::string::String>,
}
impl ConstraintDetailBuilder {
    /// <p>The identifier of the constraint.</p>
    pub fn constraint_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.constraint_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier of the constraint.</p>
    pub fn set_constraint_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.constraint_id = input;
        self
    }
    /// <p>The identifier of the constraint.</p>
    pub fn get_constraint_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.constraint_id
    }
    /// <p>The type of constraint.</p>
    /// <ul>
    /// <li> <p> <code>LAUNCH</code> </p> </li>
    /// <li> <p> <code>NOTIFICATION</code> </p> </li>
    /// <li> <p>STACKSET</p> </li>
    /// <li> <p> <code>TEMPLATE</code> </p> </li>
    /// </ul>
    pub fn r#type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.r#type = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The type of constraint.</p>
    /// <ul>
    /// <li> <p> <code>LAUNCH</code> </p> </li>
    /// <li> <p> <code>NOTIFICATION</code> </p> </li>
    /// <li> <p>STACKSET</p> </li>
    /// <li> <p> <code>TEMPLATE</code> </p> </li>
    /// </ul>
    pub fn set_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.r#type = input;
        self
    }
    /// <p>The type of constraint.</p>
    /// <ul>
    /// <li> <p> <code>LAUNCH</code> </p> </li>
    /// <li> <p> <code>NOTIFICATION</code> </p> </li>
    /// <li> <p>STACKSET</p> </li>
    /// <li> <p> <code>TEMPLATE</code> </p> </li>
    /// </ul>
    pub fn get_type(&self) -> &::std::option::Option<::std::string::String> {
        &self.r#type
    }
    /// <p>The description of the constraint.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The description of the constraint.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>The description of the constraint.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>The owner of the constraint.</p>
    pub fn owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.owner = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The owner of the constraint.</p>
    pub fn set_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.owner = input;
        self
    }
    /// <p>The owner of the constraint.</p>
    pub fn get_owner(&self) -> &::std::option::Option<::std::string::String> {
        &self.owner
    }
    /// <p>The identifier of the product the constraint applies to. Note that a constraint applies to a specific instance of a product within a certain portfolio.</p>
    pub fn product_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.product_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier of the product the constraint applies to. Note that a constraint applies to a specific instance of a product within a certain portfolio.</p>
    pub fn set_product_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.product_id = input;
        self
    }
    /// <p>The identifier of the product the constraint applies to. Note that a constraint applies to a specific instance of a product within a certain portfolio.</p>
    pub fn get_product_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.product_id
    }
    /// <p>The identifier of the portfolio the product resides in. The constraint applies only to the instance of the product that lives within this portfolio.</p>
    pub fn portfolio_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.portfolio_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier of the portfolio the product resides in. The constraint applies only to the instance of the product that lives within this portfolio.</p>
    pub fn set_portfolio_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.portfolio_id = input;
        self
    }
    /// <p>The identifier of the portfolio the product resides in. The constraint applies only to the instance of the product that lives within this portfolio.</p>
    pub fn get_portfolio_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.portfolio_id
    }
    /// Consumes the builder and constructs a [`ConstraintDetail`](crate::types::ConstraintDetail).
    pub fn build(self) -> crate::types::ConstraintDetail {
        crate::types::ConstraintDetail {
            constraint_id: self.constraint_id,
            r#type: self.r#type,
            description: self.description,
            owner: self.owner,
            product_id: self.product_id,
            portfolio_id: self.portfolio_id,
        }
    }
}