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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>A range of integer values.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Range {
/// <p>The minimum value in the range.</p>
pub from: ::std::option::Option<i32>,
/// <p>The maximum value in the range.</p>
pub to: ::std::option::Option<i32>,
/// <p>The step value for the range. For example, if you have a range of 5,000 to 10,000, with a step value of 1,000, the valid values start at 5,000 and step up by 1,000. Even though 7,500 is within the range, it isn't a valid value for the range. The valid values are 5,000, 6,000, 7,000, 8,000...</p>
pub step: ::std::option::Option<i32>,
}
impl Range {
/// <p>The minimum value in the range.</p>
pub fn from(&self) -> ::std::option::Option<i32> {
self.from
}
/// <p>The maximum value in the range.</p>
pub fn to(&self) -> ::std::option::Option<i32> {
self.to
}
/// <p>The step value for the range. For example, if you have a range of 5,000 to 10,000, with a step value of 1,000, the valid values start at 5,000 and step up by 1,000. Even though 7,500 is within the range, it isn't a valid value for the range. The valid values are 5,000, 6,000, 7,000, 8,000...</p>
pub fn step(&self) -> ::std::option::Option<i32> {
self.step
}
}
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) from: ::std::option::Option<i32>,
pub(crate) to: ::std::option::Option<i32>,
pub(crate) step: ::std::option::Option<i32>,
}
impl RangeBuilder {
/// <p>The minimum value in the range.</p>
pub fn from(mut self, input: i32) -> Self {
self.from = ::std::option::Option::Some(input);
self
}
/// <p>The minimum value in the range.</p>
pub fn set_from(mut self, input: ::std::option::Option<i32>) -> Self {
self.from = input;
self
}
/// <p>The minimum value in the range.</p>
pub fn get_from(&self) -> &::std::option::Option<i32> {
&self.from
}
/// <p>The maximum value in the range.</p>
pub fn to(mut self, input: i32) -> Self {
self.to = ::std::option::Option::Some(input);
self
}
/// <p>The maximum value in the range.</p>
pub fn set_to(mut self, input: ::std::option::Option<i32>) -> Self {
self.to = input;
self
}
/// <p>The maximum value in the range.</p>
pub fn get_to(&self) -> &::std::option::Option<i32> {
&self.to
}
/// <p>The step value for the range. For example, if you have a range of 5,000 to 10,000, with a step value of 1,000, the valid values start at 5,000 and step up by 1,000. Even though 7,500 is within the range, it isn't a valid value for the range. The valid values are 5,000, 6,000, 7,000, 8,000...</p>
pub fn step(mut self, input: i32) -> Self {
self.step = ::std::option::Option::Some(input);
self
}
/// <p>The step value for the range. For example, if you have a range of 5,000 to 10,000, with a step value of 1,000, the valid values start at 5,000 and step up by 1,000. Even though 7,500 is within the range, it isn't a valid value for the range. The valid values are 5,000, 6,000, 7,000, 8,000...</p>
pub fn set_step(mut self, input: ::std::option::Option<i32>) -> Self {
self.step = input;
self
}
/// <p>The step value for the range. For example, if you have a range of 5,000 to 10,000, with a step value of 1,000, the valid values start at 5,000 and step up by 1,000. Even though 7,500 is within the range, it isn't a valid value for the range. The valid values are 5,000, 6,000, 7,000, 8,000...</p>
pub fn get_step(&self) -> &::std::option::Option<i32> {
&self.step
}
/// Consumes the builder and constructs a [`Range`](crate::types::Range).
pub fn build(self) -> crate::types::Range {
crate::types::Range {
from: self.from,
to: self.to,
step: self.step,
}
}
}