aws-sdk-groundstation 1.65.0

AWS SDK for AWS Ground Station
Documentation
// 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).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
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",
                )
            })?,
        })
    }
}