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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>A replication object consisting of a <code>RegionReplicationStatus</code> object and includes a Region, KMSKeyId, status, and status message.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ReplicationStatusType {
    /// <p>The Region where replication occurs.</p>
    pub region: ::std::option::Option<::std::string::String>,
    /// <p>Can be an <code>ARN</code>, <code>Key ID</code>, or <code>Alias</code>.</p>
    pub kms_key_id: ::std::option::Option<::std::string::String>,
    /// <p>The status can be <code>InProgress</code>, <code>Failed</code>, or <code>InSync</code>.</p>
    pub status: ::std::option::Option<crate::types::StatusType>,
    /// <p>Status message such as "<i>Secret with this name already exists in this region</i>".</p>
    pub status_message: ::std::option::Option<::std::string::String>,
    /// <p>The date that the secret was last accessed in the Region. This field is omitted if the secret has never been retrieved in the Region.</p>
    pub last_accessed_date: ::std::option::Option<::aws_smithy_types::DateTime>,
}
impl ReplicationStatusType {
    /// <p>The Region where replication occurs.</p>
    pub fn region(&self) -> ::std::option::Option<&str> {
        self.region.as_deref()
    }
    /// <p>Can be an <code>ARN</code>, <code>Key ID</code>, or <code>Alias</code>.</p>
    pub fn kms_key_id(&self) -> ::std::option::Option<&str> {
        self.kms_key_id.as_deref()
    }
    /// <p>The status can be <code>InProgress</code>, <code>Failed</code>, or <code>InSync</code>.</p>
    pub fn status(&self) -> ::std::option::Option<&crate::types::StatusType> {
        self.status.as_ref()
    }
    /// <p>Status message such as "<i>Secret with this name already exists in this region</i>".</p>
    pub fn status_message(&self) -> ::std::option::Option<&str> {
        self.status_message.as_deref()
    }
    /// <p>The date that the secret was last accessed in the Region. This field is omitted if the secret has never been retrieved in the Region.</p>
    pub fn last_accessed_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.last_accessed_date.as_ref()
    }
}
impl ReplicationStatusType {
    /// Creates a new builder-style object to manufacture [`ReplicationStatusType`](crate::types::ReplicationStatusType).
    pub fn builder() -> crate::types::builders::ReplicationStatusTypeBuilder {
        crate::types::builders::ReplicationStatusTypeBuilder::default()
    }
}

/// A builder for [`ReplicationStatusType`](crate::types::ReplicationStatusType).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct ReplicationStatusTypeBuilder {
    pub(crate) region: ::std::option::Option<::std::string::String>,
    pub(crate) kms_key_id: ::std::option::Option<::std::string::String>,
    pub(crate) status: ::std::option::Option<crate::types::StatusType>,
    pub(crate) status_message: ::std::option::Option<::std::string::String>,
    pub(crate) last_accessed_date: ::std::option::Option<::aws_smithy_types::DateTime>,
}
impl ReplicationStatusTypeBuilder {
    /// <p>The Region where replication occurs.</p>
    pub fn region(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.region = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Region where replication occurs.</p>
    pub fn set_region(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.region = input;
        self
    }
    /// <p>The Region where replication occurs.</p>
    pub fn get_region(&self) -> &::std::option::Option<::std::string::String> {
        &self.region
    }
    /// <p>Can be an <code>ARN</code>, <code>Key ID</code>, or <code>Alias</code>.</p>
    pub fn kms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.kms_key_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Can be an <code>ARN</code>, <code>Key ID</code>, or <code>Alias</code>.</p>
    pub fn set_kms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.kms_key_id = input;
        self
    }
    /// <p>Can be an <code>ARN</code>, <code>Key ID</code>, or <code>Alias</code>.</p>
    pub fn get_kms_key_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.kms_key_id
    }
    /// <p>The status can be <code>InProgress</code>, <code>Failed</code>, or <code>InSync</code>.</p>
    pub fn status(mut self, input: crate::types::StatusType) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The status can be <code>InProgress</code>, <code>Failed</code>, or <code>InSync</code>.</p>
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::StatusType>) -> Self {
        self.status = input;
        self
    }
    /// <p>The status can be <code>InProgress</code>, <code>Failed</code>, or <code>InSync</code>.</p>
    pub fn get_status(&self) -> &::std::option::Option<crate::types::StatusType> {
        &self.status
    }
    /// <p>Status message such as "<i>Secret with this name already exists in this region</i>".</p>
    pub fn status_message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.status_message = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Status message such as "<i>Secret with this name already exists in this region</i>".</p>
    pub fn set_status_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.status_message = input;
        self
    }
    /// <p>Status message such as "<i>Secret with this name already exists in this region</i>".</p>
    pub fn get_status_message(&self) -> &::std::option::Option<::std::string::String> {
        &self.status_message
    }
    /// <p>The date that the secret was last accessed in the Region. This field is omitted if the secret has never been retrieved in the Region.</p>
    pub fn last_accessed_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.last_accessed_date = ::std::option::Option::Some(input);
        self
    }
    /// <p>The date that the secret was last accessed in the Region. This field is omitted if the secret has never been retrieved in the Region.</p>
    pub fn set_last_accessed_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.last_accessed_date = input;
        self
    }
    /// <p>The date that the secret was last accessed in the Region. This field is omitted if the secret has never been retrieved in the Region.</p>
    pub fn get_last_accessed_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.last_accessed_date
    }
    /// Consumes the builder and constructs a [`ReplicationStatusType`](crate::types::ReplicationStatusType).
    pub fn build(self) -> crate::types::ReplicationStatusType {
        crate::types::ReplicationStatusType {
            region: self.region,
            kms_key_id: self.kms_key_id,
            status: self.status,
            status_message: self.status_message,
            last_accessed_date: self.last_accessed_date,
        }
    }
}