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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p></p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DeleteClusterSnapshotInput {
/// <p>The unique identifier of the manual snapshot to be deleted.</p>
/// <p>Constraints: Must be the name of an existing snapshot that is in the <code>available</code>, <code>failed</code>, or <code>cancelled</code> state.</p>
pub snapshot_identifier: ::std::option::Option<::std::string::String>,
/// <p>The unique identifier of the cluster the snapshot was created from. This parameter is required if your IAM user has a policy containing a snapshot resource element that specifies anything other than * for the cluster name.</p>
/// <p>Constraints: Must be the name of valid cluster.</p>
pub snapshot_cluster_identifier: ::std::option::Option<::std::string::String>,
}
impl DeleteClusterSnapshotInput {
/// <p>The unique identifier of the manual snapshot to be deleted.</p>
/// <p>Constraints: Must be the name of an existing snapshot that is in the <code>available</code>, <code>failed</code>, or <code>cancelled</code> state.</p>
pub fn snapshot_identifier(&self) -> ::std::option::Option<&str> {
self.snapshot_identifier.as_deref()
}
/// <p>The unique identifier of the cluster the snapshot was created from. This parameter is required if your IAM user has a policy containing a snapshot resource element that specifies anything other than * for the cluster name.</p>
/// <p>Constraints: Must be the name of valid cluster.</p>
pub fn snapshot_cluster_identifier(&self) -> ::std::option::Option<&str> {
self.snapshot_cluster_identifier.as_deref()
}
}
impl DeleteClusterSnapshotInput {
/// Creates a new builder-style object to manufacture [`DeleteClusterSnapshotInput`](crate::operation::delete_cluster_snapshot::DeleteClusterSnapshotInput).
pub fn builder() -> crate::operation::delete_cluster_snapshot::builders::DeleteClusterSnapshotInputBuilder {
crate::operation::delete_cluster_snapshot::builders::DeleteClusterSnapshotInputBuilder::default()
}
}
/// A builder for [`DeleteClusterSnapshotInput`](crate::operation::delete_cluster_snapshot::DeleteClusterSnapshotInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DeleteClusterSnapshotInputBuilder {
pub(crate) snapshot_identifier: ::std::option::Option<::std::string::String>,
pub(crate) snapshot_cluster_identifier: ::std::option::Option<::std::string::String>,
}
impl DeleteClusterSnapshotInputBuilder {
/// <p>The unique identifier of the manual snapshot to be deleted.</p>
/// <p>Constraints: Must be the name of an existing snapshot that is in the <code>available</code>, <code>failed</code>, or <code>cancelled</code> state.</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 unique identifier of the manual snapshot to be deleted.</p>
/// <p>Constraints: Must be the name of an existing snapshot that is in the <code>available</code>, <code>failed</code>, or <code>cancelled</code> state.</p>
pub fn set_snapshot_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.snapshot_identifier = input;
self
}
/// <p>The unique identifier of the manual snapshot to be deleted.</p>
/// <p>Constraints: Must be the name of an existing snapshot that is in the <code>available</code>, <code>failed</code>, or <code>cancelled</code> state.</p>
pub fn get_snapshot_identifier(&self) -> &::std::option::Option<::std::string::String> {
&self.snapshot_identifier
}
/// <p>The unique identifier of the cluster the snapshot was created from. This parameter is required if your IAM user has a policy containing a snapshot resource element that specifies anything other than * for the cluster name.</p>
/// <p>Constraints: Must be the name of valid cluster.</p>
pub fn snapshot_cluster_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.snapshot_cluster_identifier = ::std::option::Option::Some(input.into());
self
}
/// <p>The unique identifier of the cluster the snapshot was created from. This parameter is required if your IAM user has a policy containing a snapshot resource element that specifies anything other than * for the cluster name.</p>
/// <p>Constraints: Must be the name of valid cluster.</p>
pub fn set_snapshot_cluster_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.snapshot_cluster_identifier = input;
self
}
/// <p>The unique identifier of the cluster the snapshot was created from. This parameter is required if your IAM user has a policy containing a snapshot resource element that specifies anything other than * for the cluster name.</p>
/// <p>Constraints: Must be the name of valid cluster.</p>
pub fn get_snapshot_cluster_identifier(&self) -> &::std::option::Option<::std::string::String> {
&self.snapshot_cluster_identifier
}
/// Consumes the builder and constructs a [`DeleteClusterSnapshotInput`](crate::operation::delete_cluster_snapshot::DeleteClusterSnapshotInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::delete_cluster_snapshot::DeleteClusterSnapshotInput, ::aws_smithy_types::error::operation::BuildError>
{
::std::result::Result::Ok(crate::operation::delete_cluster_snapshot::DeleteClusterSnapshotInput {
snapshot_identifier: self.snapshot_identifier,
snapshot_cluster_identifier: self.snapshot_cluster_identifier,
})
}
}