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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Specifies one range of days or times to exclude from use for training an anomaly detection model.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Range {
/// <p>The start time of the range to exclude. The format is <code>yyyy-MM-dd'T'HH:mm:ss</code>. For example, <code>2019-07-01T23:59:59</code>.</p>
pub start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
/// <p>The end time of the range to exclude. The format is <code>yyyy-MM-dd'T'HH:mm:ss</code>. For example, <code>2019-07-01T23:59:59</code>.</p>
pub end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
}
impl Range {
/// <p>The start time of the range to exclude. The format is <code>yyyy-MM-dd'T'HH:mm:ss</code>. For example, <code>2019-07-01T23:59:59</code>.</p>
pub fn start_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.start_time.as_ref()
}
/// <p>The end time of the range to exclude. The format is <code>yyyy-MM-dd'T'HH:mm:ss</code>. For example, <code>2019-07-01T23:59:59</code>.</p>
pub fn end_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.end_time.as_ref()
}
}
impl Range {
/// Creates a new builder-style object to manufacture [`Range`](crate::types::Range).
pub fn builder() -> crate::types::builders::RangeBuilder {
crate::types::builders::RangeBuilder::default()
}
}
/// A builder for [`Range`](crate::types::Range).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct RangeBuilder {
pub(crate) start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
}
impl RangeBuilder {
/// <p>The start time of the range to exclude. The format is <code>yyyy-MM-dd'T'HH:mm:ss</code>. For example, <code>2019-07-01T23:59:59</code>.</p>
/// This field is required.
pub fn start_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.start_time = ::std::option::Option::Some(input);
self
}
/// <p>The start time of the range to exclude. The format is <code>yyyy-MM-dd'T'HH:mm:ss</code>. For example, <code>2019-07-01T23:59:59</code>.</p>
pub fn set_start_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.start_time = input;
self
}
/// <p>The start time of the range to exclude. The format is <code>yyyy-MM-dd'T'HH:mm:ss</code>. For example, <code>2019-07-01T23:59:59</code>.</p>
pub fn get_start_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.start_time
}
/// <p>The end time of the range to exclude. The format is <code>yyyy-MM-dd'T'HH:mm:ss</code>. For example, <code>2019-07-01T23:59:59</code>.</p>
/// This field is required.
pub fn end_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.end_time = ::std::option::Option::Some(input);
self
}
/// <p>The end time of the range to exclude. The format is <code>yyyy-MM-dd'T'HH:mm:ss</code>. For example, <code>2019-07-01T23:59:59</code>.</p>
pub fn set_end_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.end_time = input;
self
}
/// <p>The end time of the range to exclude. The format is <code>yyyy-MM-dd'T'HH:mm:ss</code>. For example, <code>2019-07-01T23:59:59</code>.</p>
pub fn get_end_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.end_time
}
/// Consumes the builder and constructs a [`Range`](crate::types::Range).
pub fn build(self) -> crate::types::Range {
crate::types::Range {
start_time: self.start_time,
end_time: self.end_time,
}
}
}