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
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct LockSnapshotOutput {
    /// <p>The ID of the snapshot</p>
    pub snapshot_id: ::std::option::Option<::std::string::String>,
    /// <p>The state of the snapshot lock. Valid states include:</p>
    /// <ul>
    /// <li>
    /// <p><code>compliance-cooloff</code> - The snapshot has been locked in compliance mode but it is still within the cooling-off period. The snapshot can't be deleted, but it can be unlocked and the lock settings can be modified by users with appropriate permissions.</p></li>
    /// <li>
    /// <p><code>governance</code> - The snapshot is locked in governance mode. The snapshot can't be deleted, but it can be unlocked and the lock settings can be modified by users with appropriate permissions.</p></li>
    /// <li>
    /// <p><code>compliance</code> - The snapshot is locked in compliance mode and the cooling-off period has expired. The snapshot can't be unlocked or deleted. The lock duration can only be increased by users with appropriate permissions.</p></li>
    /// <li>
    /// <p><code>expired</code> - The snapshot was locked in compliance or governance mode but the lock duration has expired. The snapshot is not locked and can be deleted.</p></li>
    /// </ul>
    pub lock_state: ::std::option::Option<crate::types::LockState>,
    /// <p>The period of time for which the snapshot is locked, in days.</p>
    pub lock_duration: ::std::option::Option<i32>,
    /// <p>The compliance mode cooling-off period, in hours.</p>
    pub cool_off_period: ::std::option::Option<i32>,
    /// <p>The date and time at which the compliance mode cooling-off period expires, in the UTC time zone (<code>YYYY-MM-DDThh:mm:ss.sssZ</code>).</p>
    pub cool_off_period_expires_on: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The date and time at which the snapshot was locked, in the UTC time zone (<code>YYYY-MM-DDThh:mm:ss.sssZ</code>).</p>
    pub lock_created_on: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The date and time at which the lock will expire, in the UTC time zone (<code>YYYY-MM-DDThh:mm:ss.sssZ</code>).</p>
    pub lock_expires_on: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The date and time at which the lock duration started, in the UTC time zone (<code>YYYY-MM-DDThh:mm:ss.sssZ</code>).</p>
    pub lock_duration_start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    _request_id: Option<String>,
}
impl LockSnapshotOutput {
    /// <p>The ID of the snapshot</p>
    pub fn snapshot_id(&self) -> ::std::option::Option<&str> {
        self.snapshot_id.as_deref()
    }
    /// <p>The state of the snapshot lock. Valid states include:</p>
    /// <ul>
    /// <li>
    /// <p><code>compliance-cooloff</code> - The snapshot has been locked in compliance mode but it is still within the cooling-off period. The snapshot can't be deleted, but it can be unlocked and the lock settings can be modified by users with appropriate permissions.</p></li>
    /// <li>
    /// <p><code>governance</code> - The snapshot is locked in governance mode. The snapshot can't be deleted, but it can be unlocked and the lock settings can be modified by users with appropriate permissions.</p></li>
    /// <li>
    /// <p><code>compliance</code> - The snapshot is locked in compliance mode and the cooling-off period has expired. The snapshot can't be unlocked or deleted. The lock duration can only be increased by users with appropriate permissions.</p></li>
    /// <li>
    /// <p><code>expired</code> - The snapshot was locked in compliance or governance mode but the lock duration has expired. The snapshot is not locked and can be deleted.</p></li>
    /// </ul>
    pub fn lock_state(&self) -> ::std::option::Option<&crate::types::LockState> {
        self.lock_state.as_ref()
    }
    /// <p>The period of time for which the snapshot is locked, in days.</p>
    pub fn lock_duration(&self) -> ::std::option::Option<i32> {
        self.lock_duration
    }
    /// <p>The compliance mode cooling-off period, in hours.</p>
    pub fn cool_off_period(&self) -> ::std::option::Option<i32> {
        self.cool_off_period
    }
    /// <p>The date and time at which the compliance mode cooling-off period expires, in the UTC time zone (<code>YYYY-MM-DDThh:mm:ss.sssZ</code>).</p>
    pub fn cool_off_period_expires_on(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.cool_off_period_expires_on.as_ref()
    }
    /// <p>The date and time at which the snapshot was locked, in the UTC time zone (<code>YYYY-MM-DDThh:mm:ss.sssZ</code>).</p>
    pub fn lock_created_on(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.lock_created_on.as_ref()
    }
    /// <p>The date and time at which the lock will expire, in the UTC time zone (<code>YYYY-MM-DDThh:mm:ss.sssZ</code>).</p>
    pub fn lock_expires_on(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.lock_expires_on.as_ref()
    }
    /// <p>The date and time at which the lock duration started, in the UTC time zone (<code>YYYY-MM-DDThh:mm:ss.sssZ</code>).</p>
    pub fn lock_duration_start_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.lock_duration_start_time.as_ref()
    }
}
impl ::aws_types::request_id::RequestId for LockSnapshotOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl LockSnapshotOutput {
    /// Creates a new builder-style object to manufacture [`LockSnapshotOutput`](crate::operation::lock_snapshot::LockSnapshotOutput).
    pub fn builder() -> crate::operation::lock_snapshot::builders::LockSnapshotOutputBuilder {
        crate::operation::lock_snapshot::builders::LockSnapshotOutputBuilder::default()
    }
}

/// A builder for [`LockSnapshotOutput`](crate::operation::lock_snapshot::LockSnapshotOutput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct LockSnapshotOutputBuilder {
    pub(crate) snapshot_id: ::std::option::Option<::std::string::String>,
    pub(crate) lock_state: ::std::option::Option<crate::types::LockState>,
    pub(crate) lock_duration: ::std::option::Option<i32>,
    pub(crate) cool_off_period: ::std::option::Option<i32>,
    pub(crate) cool_off_period_expires_on: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) lock_created_on: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) lock_expires_on: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) lock_duration_start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    _request_id: Option<String>,
}
impl LockSnapshotOutputBuilder {
    /// <p>The ID of the snapshot</p>
    pub fn snapshot_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.snapshot_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the snapshot</p>
    pub fn set_snapshot_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.snapshot_id = input;
        self
    }
    /// <p>The ID of the snapshot</p>
    pub fn get_snapshot_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.snapshot_id
    }
    /// <p>The state of the snapshot lock. Valid states include:</p>
    /// <ul>
    /// <li>
    /// <p><code>compliance-cooloff</code> - The snapshot has been locked in compliance mode but it is still within the cooling-off period. The snapshot can't be deleted, but it can be unlocked and the lock settings can be modified by users with appropriate permissions.</p></li>
    /// <li>
    /// <p><code>governance</code> - The snapshot is locked in governance mode. The snapshot can't be deleted, but it can be unlocked and the lock settings can be modified by users with appropriate permissions.</p></li>
    /// <li>
    /// <p><code>compliance</code> - The snapshot is locked in compliance mode and the cooling-off period has expired. The snapshot can't be unlocked or deleted. The lock duration can only be increased by users with appropriate permissions.</p></li>
    /// <li>
    /// <p><code>expired</code> - The snapshot was locked in compliance or governance mode but the lock duration has expired. The snapshot is not locked and can be deleted.</p></li>
    /// </ul>
    pub fn lock_state(mut self, input: crate::types::LockState) -> Self {
        self.lock_state = ::std::option::Option::Some(input);
        self
    }
    /// <p>The state of the snapshot lock. Valid states include:</p>
    /// <ul>
    /// <li>
    /// <p><code>compliance-cooloff</code> - The snapshot has been locked in compliance mode but it is still within the cooling-off period. The snapshot can't be deleted, but it can be unlocked and the lock settings can be modified by users with appropriate permissions.</p></li>
    /// <li>
    /// <p><code>governance</code> - The snapshot is locked in governance mode. The snapshot can't be deleted, but it can be unlocked and the lock settings can be modified by users with appropriate permissions.</p></li>
    /// <li>
    /// <p><code>compliance</code> - The snapshot is locked in compliance mode and the cooling-off period has expired. The snapshot can't be unlocked or deleted. The lock duration can only be increased by users with appropriate permissions.</p></li>
    /// <li>
    /// <p><code>expired</code> - The snapshot was locked in compliance or governance mode but the lock duration has expired. The snapshot is not locked and can be deleted.</p></li>
    /// </ul>
    pub fn set_lock_state(mut self, input: ::std::option::Option<crate::types::LockState>) -> Self {
        self.lock_state = input;
        self
    }
    /// <p>The state of the snapshot lock. Valid states include:</p>
    /// <ul>
    /// <li>
    /// <p><code>compliance-cooloff</code> - The snapshot has been locked in compliance mode but it is still within the cooling-off period. The snapshot can't be deleted, but it can be unlocked and the lock settings can be modified by users with appropriate permissions.</p></li>
    /// <li>
    /// <p><code>governance</code> - The snapshot is locked in governance mode. The snapshot can't be deleted, but it can be unlocked and the lock settings can be modified by users with appropriate permissions.</p></li>
    /// <li>
    /// <p><code>compliance</code> - The snapshot is locked in compliance mode and the cooling-off period has expired. The snapshot can't be unlocked or deleted. The lock duration can only be increased by users with appropriate permissions.</p></li>
    /// <li>
    /// <p><code>expired</code> - The snapshot was locked in compliance or governance mode but the lock duration has expired. The snapshot is not locked and can be deleted.</p></li>
    /// </ul>
    pub fn get_lock_state(&self) -> &::std::option::Option<crate::types::LockState> {
        &self.lock_state
    }
    /// <p>The period of time for which the snapshot is locked, in days.</p>
    pub fn lock_duration(mut self, input: i32) -> Self {
        self.lock_duration = ::std::option::Option::Some(input);
        self
    }
    /// <p>The period of time for which the snapshot is locked, in days.</p>
    pub fn set_lock_duration(mut self, input: ::std::option::Option<i32>) -> Self {
        self.lock_duration = input;
        self
    }
    /// <p>The period of time for which the snapshot is locked, in days.</p>
    pub fn get_lock_duration(&self) -> &::std::option::Option<i32> {
        &self.lock_duration
    }
    /// <p>The compliance mode cooling-off period, in hours.</p>
    pub fn cool_off_period(mut self, input: i32) -> Self {
        self.cool_off_period = ::std::option::Option::Some(input);
        self
    }
    /// <p>The compliance mode cooling-off period, in hours.</p>
    pub fn set_cool_off_period(mut self, input: ::std::option::Option<i32>) -> Self {
        self.cool_off_period = input;
        self
    }
    /// <p>The compliance mode cooling-off period, in hours.</p>
    pub fn get_cool_off_period(&self) -> &::std::option::Option<i32> {
        &self.cool_off_period
    }
    /// <p>The date and time at which the compliance mode cooling-off period expires, in the UTC time zone (<code>YYYY-MM-DDThh:mm:ss.sssZ</code>).</p>
    pub fn cool_off_period_expires_on(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.cool_off_period_expires_on = ::std::option::Option::Some(input);
        self
    }
    /// <p>The date and time at which the compliance mode cooling-off period expires, in the UTC time zone (<code>YYYY-MM-DDThh:mm:ss.sssZ</code>).</p>
    pub fn set_cool_off_period_expires_on(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.cool_off_period_expires_on = input;
        self
    }
    /// <p>The date and time at which the compliance mode cooling-off period expires, in the UTC time zone (<code>YYYY-MM-DDThh:mm:ss.sssZ</code>).</p>
    pub fn get_cool_off_period_expires_on(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.cool_off_period_expires_on
    }
    /// <p>The date and time at which the snapshot was locked, in the UTC time zone (<code>YYYY-MM-DDThh:mm:ss.sssZ</code>).</p>
    pub fn lock_created_on(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.lock_created_on = ::std::option::Option::Some(input);
        self
    }
    /// <p>The date and time at which the snapshot was locked, in the UTC time zone (<code>YYYY-MM-DDThh:mm:ss.sssZ</code>).</p>
    pub fn set_lock_created_on(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.lock_created_on = input;
        self
    }
    /// <p>The date and time at which the snapshot was locked, in the UTC time zone (<code>YYYY-MM-DDThh:mm:ss.sssZ</code>).</p>
    pub fn get_lock_created_on(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.lock_created_on
    }
    /// <p>The date and time at which the lock will expire, in the UTC time zone (<code>YYYY-MM-DDThh:mm:ss.sssZ</code>).</p>
    pub fn lock_expires_on(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.lock_expires_on = ::std::option::Option::Some(input);
        self
    }
    /// <p>The date and time at which the lock will expire, in the UTC time zone (<code>YYYY-MM-DDThh:mm:ss.sssZ</code>).</p>
    pub fn set_lock_expires_on(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.lock_expires_on = input;
        self
    }
    /// <p>The date and time at which the lock will expire, in the UTC time zone (<code>YYYY-MM-DDThh:mm:ss.sssZ</code>).</p>
    pub fn get_lock_expires_on(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.lock_expires_on
    }
    /// <p>The date and time at which the lock duration started, in the UTC time zone (<code>YYYY-MM-DDThh:mm:ss.sssZ</code>).</p>
    pub fn lock_duration_start_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.lock_duration_start_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>The date and time at which the lock duration started, in the UTC time zone (<code>YYYY-MM-DDThh:mm:ss.sssZ</code>).</p>
    pub fn set_lock_duration_start_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.lock_duration_start_time = input;
        self
    }
    /// <p>The date and time at which the lock duration started, in the UTC time zone (<code>YYYY-MM-DDThh:mm:ss.sssZ</code>).</p>
    pub fn get_lock_duration_start_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.lock_duration_start_time
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`LockSnapshotOutput`](crate::operation::lock_snapshot::LockSnapshotOutput).
    pub fn build(self) -> crate::operation::lock_snapshot::LockSnapshotOutput {
        crate::operation::lock_snapshot::LockSnapshotOutput {
            snapshot_id: self.snapshot_id,
            lock_state: self.lock_state,
            lock_duration: self.lock_duration,
            cool_off_period: self.cool_off_period,
            cool_off_period_expires_on: self.cool_off_period_expires_on,
            lock_created_on: self.lock_created_on,
            lock_expires_on: self.lock_expires_on,
            lock_duration_start_time: self.lock_duration_start_time,
            _request_id: self._request_id,
        }
    }
}