/// Deprecated and not used for anything anymore, see record VisualCrossingAvailableSeries instead.
#[derive(
    Debug,
    Clone,
    conjure_object::serde::Serialize,
    conjure_object::serde::Deserialize,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash
)]
#[serde(crate = "conjure_object::serde")]
#[conjure_object::private::staged_builder::staged_builder]
#[builder(crate = conjure_object::private::staged_builder, update, inline)]
pub struct VisualCrossingAvailableSeries {
    #[builder(into)]
    #[serde(rename = "channel")]
    channel: String,
    #[builder(default, into)]
    #[serde(rename = "unit", skip_serializing_if = "Option::is_none", default)]
    unit: Option<String>,
    #[builder(default, into)]
    #[serde(rename = "description", skip_serializing_if = "Option::is_none", default)]
    description: Option<String>,
    #[serde(rename = "type")]
    type_: super::VisualCrossingType,
}
impl VisualCrossingAvailableSeries {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(channel: impl Into<String>, type_: super::VisualCrossingType) -> Self {
        Self::builder().channel(channel).type_(type_).build()
    }
    #[inline]
    pub fn channel(&self) -> &str {
        &*self.channel
    }
    #[inline]
    pub fn unit(&self) -> Option<&str> {
        self.unit.as_ref().map(|o| &**o)
    }
    #[inline]
    pub fn description(&self) -> Option<&str> {
        self.description.as_ref().map(|o| &**o)
    }
    #[inline]
    pub fn type_(&self) -> &super::VisualCrossingType {
        &self.type_
    }
}
