#[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 VisualCrossingLocatorTemplate {
    #[serde(rename = "field")]
    field: super::super::super::logicalseries::api::FieldName,
    #[builder(default, into)]
    #[serde(rename = "endpoint", skip_serializing_if = "Option::is_none", default)]
    endpoint: Option<super::super::super::logicalseries::api::VisualCrossingEndpointUri>,
    #[serde(rename = "type")]
    type_: super::super::super::logicalseries::api::VisualCrossingType,
}
impl VisualCrossingLocatorTemplate {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(
        field: super::super::super::logicalseries::api::FieldName,
        type_: super::super::super::logicalseries::api::VisualCrossingType,
    ) -> Self {
        Self::builder().field(field).type_(type_).build()
    }
    #[inline]
    pub fn field(&self) -> &super::super::super::logicalseries::api::FieldName {
        &self.field
    }
    /// Defaults to HISTORY.
    #[inline]
    pub fn endpoint(
        &self,
    ) -> Option<&super::super::super::logicalseries::api::VisualCrossingEndpointUri> {
        self.endpoint.as_ref().map(|o| &*o)
    }
    #[inline]
    pub fn type_(&self) -> &super::super::super::logicalseries::api::VisualCrossingType {
        &self.type_
    }
}
