aws-sdk-groundstation 1.82.0

AWS SDK for AWS Ground Station
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Elevation angle of the satellite in the sky during a contact.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Elevation {
    /// <p>Elevation angle value.</p>
    pub value: f64,
    /// <p>Elevation angle units.</p>
    pub unit: crate::types::AngleUnits,
}
impl Elevation {
    /// <p>Elevation angle value.</p>
    pub fn value(&self) -> f64 {
        self.value
    }
    /// <p>Elevation angle units.</p>
    pub fn unit(&self) -> &crate::types::AngleUnits {
        &self.unit
    }
}
impl Elevation {
    /// Creates a new builder-style object to manufacture [`Elevation`](crate::types::Elevation).
    pub fn builder() -> crate::types::builders::ElevationBuilder {
        crate::types::builders::ElevationBuilder::default()
    }
}

/// A builder for [`Elevation`](crate::types::Elevation).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ElevationBuilder {
    pub(crate) value: ::std::option::Option<f64>,
    pub(crate) unit: ::std::option::Option<crate::types::AngleUnits>,
}
impl ElevationBuilder {
    /// <p>Elevation angle value.</p>
    /// This field is required.
    pub fn value(mut self, input: f64) -> Self {
        self.value = ::std::option::Option::Some(input);
        self
    }
    /// <p>Elevation angle value.</p>
    pub fn set_value(mut self, input: ::std::option::Option<f64>) -> Self {
        self.value = input;
        self
    }
    /// <p>Elevation angle value.</p>
    pub fn get_value(&self) -> &::std::option::Option<f64> {
        &self.value
    }
    /// <p>Elevation angle units.</p>
    /// This field is required.
    pub fn unit(mut self, input: crate::types::AngleUnits) -> Self {
        self.unit = ::std::option::Option::Some(input);
        self
    }
    /// <p>Elevation angle units.</p>
    pub fn set_unit(mut self, input: ::std::option::Option<crate::types::AngleUnits>) -> Self {
        self.unit = input;
        self
    }
    /// <p>Elevation angle units.</p>
    pub fn get_unit(&self) -> &::std::option::Option<crate::types::AngleUnits> {
        &self.unit
    }
    /// Consumes the builder and constructs a [`Elevation`](crate::types::Elevation).
    /// This method will fail if any of the following fields are not set:
    /// - [`value`](crate::types::builders::ElevationBuilder::value)
    /// - [`unit`](crate::types::builders::ElevationBuilder::unit)
    pub fn build(self) -> ::std::result::Result<crate::types::Elevation, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::types::Elevation {
            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 Elevation",
                )
            })?,
            unit: self.unit.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "unit",
                    "unit was not specified but it is required when building Elevation",
                )
            })?,
        })
    }
}