#[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 GeoPlotFromOverlay {
#[builder(default, into)]
#[serde(rename = "id", skip_serializing_if = "Option::is_none", default)]
id: Option<conjure_object::Uuid>,
#[serde(rename = "attachmentRid")]
attachment_rid: conjure_object::ResourceIdentifier,
#[serde(rename = "sourceFormat")]
source_format: super::GeoOverlaySourceFormat,
#[builder(default, into)]
#[serde(rename = "enabled", skip_serializing_if = "Option::is_none", default)]
enabled: Option<bool>,
#[builder(default, into)]
#[serde(rename = "label", skip_serializing_if = "Option::is_none", default)]
label: Option<String>,
#[builder(custom(type = super::GeoPlotVisualizationOptions, convert = Box::new))]
#[serde(rename = "visualizationOptions")]
visualization_options: Box<super::GeoPlotVisualizationOptions>,
}
impl GeoPlotFromOverlay {
#[inline]
pub fn new(
attachment_rid: conjure_object::ResourceIdentifier,
source_format: super::GeoOverlaySourceFormat,
visualization_options: super::GeoPlotVisualizationOptions,
) -> Self {
Self::builder()
.attachment_rid(attachment_rid)
.source_format(source_format)
.visualization_options(visualization_options)
.build()
}
#[inline]
pub fn id(&self) -> Option<conjure_object::Uuid> {
self.id.as_ref().map(|o| *o)
}
#[inline]
pub fn attachment_rid(&self) -> &conjure_object::ResourceIdentifier {
&self.attachment_rid
}
#[inline]
pub fn source_format(&self) -> &super::GeoOverlaySourceFormat {
&self.source_format
}
#[inline]
pub fn enabled(&self) -> Option<bool> {
self.enabled.as_ref().map(|o| *o)
}
#[inline]
pub fn label(&self) -> Option<&str> {
self.label.as_ref().map(|o| &**o)
}
#[inline]
pub fn visualization_options(&self) -> &super::GeoPlotVisualizationOptions {
&*self.visualization_options
}
}