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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Object that describes the frequency.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Frequency {
/// <p>Frequency value. Valid values are between 2200 to 2300 MHz and 7750 to 8400 MHz for downlink and 2025 to 2120 MHz for uplink.</p>
pub value: f64,
/// <p>Frequency units.</p>
pub units: crate::types::FrequencyUnits,
}
impl Frequency {
/// <p>Frequency value. Valid values are between 2200 to 2300 MHz and 7750 to 8400 MHz for downlink and 2025 to 2120 MHz for uplink.</p>
pub fn value(&self) -> f64 {
self.value
}
/// <p>Frequency units.</p>
pub fn units(&self) -> &crate::types::FrequencyUnits {
&self.units
}
}
impl Frequency {
/// Creates a new builder-style object to manufacture [`Frequency`](crate::types::Frequency).
pub fn builder() -> crate::types::builders::FrequencyBuilder {
crate::types::builders::FrequencyBuilder::default()
}
}
/// A builder for [`Frequency`](crate::types::Frequency).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct FrequencyBuilder {
pub(crate) value: ::std::option::Option<f64>,
pub(crate) units: ::std::option::Option<crate::types::FrequencyUnits>,
}
impl FrequencyBuilder {
/// <p>Frequency value. Valid values are between 2200 to 2300 MHz and 7750 to 8400 MHz for downlink and 2025 to 2120 MHz for uplink.</p>
/// This field is required.
pub fn value(mut self, input: f64) -> Self {
self.value = ::std::option::Option::Some(input);
self
}
/// <p>Frequency value. Valid values are between 2200 to 2300 MHz and 7750 to 8400 MHz for downlink and 2025 to 2120 MHz for uplink.</p>
pub fn set_value(mut self, input: ::std::option::Option<f64>) -> Self {
self.value = input;
self
}
/// <p>Frequency value. Valid values are between 2200 to 2300 MHz and 7750 to 8400 MHz for downlink and 2025 to 2120 MHz for uplink.</p>
pub fn get_value(&self) -> &::std::option::Option<f64> {
&self.value
}
/// <p>Frequency units.</p>
/// This field is required.
pub fn units(mut self, input: crate::types::FrequencyUnits) -> Self {
self.units = ::std::option::Option::Some(input);
self
}
/// <p>Frequency units.</p>
pub fn set_units(mut self, input: ::std::option::Option<crate::types::FrequencyUnits>) -> Self {
self.units = input;
self
}
/// <p>Frequency units.</p>
pub fn get_units(&self) -> &::std::option::Option<crate::types::FrequencyUnits> {
&self.units
}
/// Consumes the builder and constructs a [`Frequency`](crate::types::Frequency).
/// This method will fail if any of the following fields are not set:
/// - [`value`](crate::types::builders::FrequencyBuilder::value)
/// - [`units`](crate::types::builders::FrequencyBuilder::units)
pub fn build(self) -> ::std::result::Result<crate::types::Frequency, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::types::Frequency {
value: self.value.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"value",
"value was not specified but it is required when building Frequency",
)
})?,
units: self.units.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"units",
"units was not specified but it is required when building Frequency",
)
})?,
})
}
}