#[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 VisualCrossingLocator {
#[serde(rename = "location")]
location: super::LocationName,
#[builder(default, into)]
#[serde(rename = "endpoint", skip_serializing_if = "Option::is_none", default)]
endpoint: Option<super::VisualCrossingEndpointUri>,
#[serde(rename = "field")]
field: super::FieldName,
#[serde(rename = "type")]
type_: super::VisualCrossingType,
}
impl VisualCrossingLocator {
#[inline]
pub fn new(
location: super::LocationName,
field: super::FieldName,
type_: super::VisualCrossingType,
) -> Self {
Self::builder().location(location).field(field).type_(type_).build()
}
#[inline]
pub fn location(&self) -> &super::LocationName {
&self.location
}
#[inline]
pub fn endpoint(&self) -> Option<&super::VisualCrossingEndpointUri> {
self.endpoint.as_ref().map(|o| &*o)
}
#[inline]
pub fn field(&self) -> &super::FieldName {
&self.field
}
#[inline]
pub fn type_(&self) -> &super::VisualCrossingType {
&self.type_
}
}