aws_sdk_s3control/types/_replication_time_value.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>A container that specifies the time value for S3 Replication Time Control (S3 RTC). This value is also used for the replication metrics <code>EventThreshold</code> element.</p><note>
4/// <p>This is not supported by Amazon S3 on Outposts buckets.</p>
5/// </note>
6#[non_exhaustive]
7#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
8pub struct ReplicationTimeValue {
9 /// <p>Contains an integer that specifies the time period in minutes.</p>
10 /// <p>Valid value: 15</p>
11 pub minutes: ::std::option::Option<i32>,
12}
13impl ReplicationTimeValue {
14 /// <p>Contains an integer that specifies the time period in minutes.</p>
15 /// <p>Valid value: 15</p>
16 pub fn minutes(&self) -> ::std::option::Option<i32> {
17 self.minutes
18 }
19}
20impl ReplicationTimeValue {
21 /// Creates a new builder-style object to manufacture [`ReplicationTimeValue`](crate::types::ReplicationTimeValue).
22 pub fn builder() -> crate::types::builders::ReplicationTimeValueBuilder {
23 crate::types::builders::ReplicationTimeValueBuilder::default()
24 }
25}
26
27/// A builder for [`ReplicationTimeValue`](crate::types::ReplicationTimeValue).
28#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
29#[non_exhaustive]
30pub struct ReplicationTimeValueBuilder {
31 pub(crate) minutes: ::std::option::Option<i32>,
32}
33impl ReplicationTimeValueBuilder {
34 /// <p>Contains an integer that specifies the time period in minutes.</p>
35 /// <p>Valid value: 15</p>
36 pub fn minutes(mut self, input: i32) -> Self {
37 self.minutes = ::std::option::Option::Some(input);
38 self
39 }
40 /// <p>Contains an integer that specifies the time period in minutes.</p>
41 /// <p>Valid value: 15</p>
42 pub fn set_minutes(mut self, input: ::std::option::Option<i32>) -> Self {
43 self.minutes = input;
44 self
45 }
46 /// <p>Contains an integer that specifies the time period in minutes.</p>
47 /// <p>Valid value: 15</p>
48 pub fn get_minutes(&self) -> &::std::option::Option<i32> {
49 &self.minutes
50 }
51 /// Consumes the builder and constructs a [`ReplicationTimeValue`](crate::types::ReplicationTimeValue).
52 pub fn build(self) -> crate::types::ReplicationTimeValue {
53 crate::types::ReplicationTimeValue { minutes: self.minutes }
54 }
55}