#[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 IngestRunDataSource {
#[builder(custom(type = super::IngestDataSource, convert = Box::new))]
#[serde(rename = "dataSource")]
data_source: Box<super::IngestDataSource>,
#[builder(
default,
custom(
type = impl
Into<Option<super::TimeOffsetSpec>>,
convert = |v|v.into().map(Box::new)
)
)]
#[serde(rename = "timeOffsetSpec", skip_serializing_if = "Option::is_none", default)]
time_offset_spec: Option<Box<super::TimeOffsetSpec>>,
}
impl IngestRunDataSource {
#[inline]
pub fn new(data_source: super::IngestDataSource) -> Self {
Self::builder().data_source(data_source).build()
}
#[inline]
pub fn data_source(&self) -> &super::IngestDataSource {
&*self.data_source
}
#[inline]
pub fn time_offset_spec(&self) -> Option<&super::TimeOffsetSpec> {
self.time_offset_spec.as_ref().map(|o| &**o)
}
}