#[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 IngestDataflashResponse {
#[builder(default, map(key(type = String, into), value(type = String, into)))]
#[serde(
rename = "units",
skip_serializing_if = "std::collections::BTreeMap::is_empty",
default
)]
units: std::collections::BTreeMap<String, String>,
#[builder(default, list(item(type = super::ObjectLocator)))]
#[serde(
rename = "parquetObjectLocators",
skip_serializing_if = "Vec::is_empty",
default
)]
parquet_object_locators: Vec<super::ObjectLocator>,
#[builder(into)]
#[serde(rename = "timestampSeriesName")]
timestamp_series_name: String,
#[serde(rename = "timeUnit")]
time_unit: super::TimeUnitSeconds,
#[builder(
default,
custom(
type = impl
Into<Option<super::ObjectLocator>>,
convert = |v|v.into().map(Box::new)
)
)]
#[serde(rename = "avroLocator", skip_serializing_if = "Option::is_none", default)]
avro_locator: Option<Box<super::ObjectLocator>>,
}
impl IngestDataflashResponse {
#[inline]
pub fn new(
timestamp_series_name: impl Into<String>,
time_unit: super::TimeUnitSeconds,
) -> Self {
Self::builder()
.timestamp_series_name(timestamp_series_name)
.time_unit(time_unit)
.build()
}
#[inline]
pub fn units(&self) -> &std::collections::BTreeMap<String, String> {
&self.units
}
#[inline]
pub fn parquet_object_locators(&self) -> &[super::ObjectLocator] {
&*self.parquet_object_locators
}
#[inline]
pub fn timestamp_series_name(&self) -> &str {
&*self.timestamp_series_name
}
#[inline]
pub fn time_unit(&self) -> &super::TimeUnitSeconds {
&self.time_unit
}
#[inline]
pub fn avro_locator(&self) -> Option<&super::ObjectLocator> {
self.avro_locator.as_ref().map(|o| &**o)
}
}