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
// 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 ModifyClusterSnapshotInput {
/// <p>The identifier of the snapshot whose setting you want to modify.</p>
pub snapshot_identifier: ::std::option::Option<::std::string::String>,
/// <p>The number of days that a manual snapshot is retained. If the value is -1, the manual snapshot is retained indefinitely.</p>
/// <p>If the manual snapshot falls outside of the new retention period, you can specify the force option to immediately delete the snapshot.</p>
/// <p>The value must be either -1 or an integer between 1 and 3,653.</p>
pub manual_snapshot_retention_period: ::std::option::Option<i32>,
/// <p>A Boolean option to override an exception if the retention period has already passed.</p>
pub force: ::std::option::Option<bool>,
}
impl ModifyClusterSnapshotInput {
/// <p>The identifier of the snapshot whose setting you want to modify.</p>
pub fn snapshot_identifier(&self) -> ::std::option::Option<&str> {
self.snapshot_identifier.as_deref()
}
/// <p>The number of days that a manual snapshot is retained. If the value is -1, the manual snapshot is retained indefinitely.</p>
/// <p>If the manual snapshot falls outside of the new retention period, you can specify the force option to immediately delete the snapshot.</p>
/// <p>The value must be either -1 or an integer between 1 and 3,653.</p>
pub fn manual_snapshot_retention_period(&self) -> ::std::option::Option<i32> {
self.manual_snapshot_retention_period
}
/// <p>A Boolean option to override an exception if the retention period has already passed.</p>
pub fn force(&self) -> ::std::option::Option<bool> {
self.force
}
}
impl ModifyClusterSnapshotInput {
/// Creates a new builder-style object to manufacture [`ModifyClusterSnapshotInput`](crate::operation::modify_cluster_snapshot::ModifyClusterSnapshotInput).
pub fn builder() -> crate::operation::modify_cluster_snapshot::builders::ModifyClusterSnapshotInputBuilder {
crate::operation::modify_cluster_snapshot::builders::ModifyClusterSnapshotInputBuilder::default()
}
}
/// A builder for [`ModifyClusterSnapshotInput`](crate::operation::modify_cluster_snapshot::ModifyClusterSnapshotInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ModifyClusterSnapshotInputBuilder {
pub(crate) snapshot_identifier: ::std::option::Option<::std::string::String>,
pub(crate) manual_snapshot_retention_period: ::std::option::Option<i32>,
pub(crate) force: ::std::option::Option<bool>,
}
impl ModifyClusterSnapshotInputBuilder {
/// <p>The identifier of the snapshot whose setting you want to modify.</p>
/// This field is required.
pub fn snapshot_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.snapshot_identifier = ::std::option::Option::Some(input.into());
self
}
/// <p>The identifier of the snapshot whose setting you want to modify.</p>
pub fn set_snapshot_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.snapshot_identifier = input;
self
}
/// <p>The identifier of the snapshot whose setting you want to modify.</p>
pub fn get_snapshot_identifier(&self) -> &::std::option::Option<::std::string::String> {
&self.snapshot_identifier
}
/// <p>The number of days that a manual snapshot is retained. If the value is -1, the manual snapshot is retained indefinitely.</p>
/// <p>If the manual snapshot falls outside of the new retention period, you can specify the force option to immediately delete the snapshot.</p>
/// <p>The value must be either -1 or an integer between 1 and 3,653.</p>
pub fn manual_snapshot_retention_period(mut self, input: i32) -> Self {
self.manual_snapshot_retention_period = ::std::option::Option::Some(input);
self
}
/// <p>The number of days that a manual snapshot is retained. If the value is -1, the manual snapshot is retained indefinitely.</p>
/// <p>If the manual snapshot falls outside of the new retention period, you can specify the force option to immediately delete the snapshot.</p>
/// <p>The value must be either -1 or an integer between 1 and 3,653.</p>
pub fn set_manual_snapshot_retention_period(mut self, input: ::std::option::Option<i32>) -> Self {
self.manual_snapshot_retention_period = input;
self
}
/// <p>The number of days that a manual snapshot is retained. If the value is -1, the manual snapshot is retained indefinitely.</p>
/// <p>If the manual snapshot falls outside of the new retention period, you can specify the force option to immediately delete the snapshot.</p>
/// <p>The value must be either -1 or an integer between 1 and 3,653.</p>
pub fn get_manual_snapshot_retention_period(&self) -> &::std::option::Option<i32> {
&self.manual_snapshot_retention_period
}
/// <p>A Boolean option to override an exception if the retention period has already passed.</p>
pub fn force(mut self, input: bool) -> Self {
self.force = ::std::option::Option::Some(input);
self
}
/// <p>A Boolean option to override an exception if the retention period has already passed.</p>
pub fn set_force(mut self, input: ::std::option::Option<bool>) -> Self {
self.force = input;
self
}
/// <p>A Boolean option to override an exception if the retention period has already passed.</p>
pub fn get_force(&self) -> &::std::option::Option<bool> {
&self.force
}
/// Consumes the builder and constructs a [`ModifyClusterSnapshotInput`](crate::operation::modify_cluster_snapshot::ModifyClusterSnapshotInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::modify_cluster_snapshot::ModifyClusterSnapshotInput, ::aws_smithy_types::error::operation::BuildError>
{
::std::result::Result::Ok(crate::operation::modify_cluster_snapshot::ModifyClusterSnapshotInput {
snapshot_identifier: self.snapshot_identifier,
manual_snapshot_retention_period: self.manual_snapshot_retention_period,
force: self.force,
})
}
}