nominal-api 0.1239.0

API bindings for the Nominal platform
Documentation
#[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 EnrichedDataset {
    #[serde(rename = "rid")]
    rid: conjure_object::ResourceIdentifier,
    #[serde(rename = "uuid")]
    uuid: conjure_object::Uuid,
    #[builder(into)]
    #[serde(rename = "name")]
    name: String,
    #[builder(default, into)]
    #[serde(rename = "description", skip_serializing_if = "Option::is_none", default)]
    description: Option<String>,
    #[builder(into)]
    #[serde(rename = "displayName")]
    display_name: String,
    #[builder(default, into)]
    #[serde(rename = "metadata", skip_serializing_if = "Option::is_none", default)]
    metadata: Option<std::collections::BTreeMap<String, String>>,
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::Handle>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(rename = "handle", skip_serializing_if = "Option::is_none", default)]
    handle: Option<Box<super::Handle>>,
    #[serde(rename = "ingestDate")]
    ingest_date: conjure_object::DateTime<conjure_object::Utc>,
    #[builder(default, into)]
    #[serde(rename = "ingestStatus", skip_serializing_if = "Option::is_none", default)]
    ingest_status: Option<super::IngestStatus>,
    #[builder(custom(type = super::DatasetOriginMetadata, convert = Box::new))]
    #[serde(rename = "originMetadata")]
    origin_metadata: Box<super::DatasetOriginMetadata>,
    #[builder(
        custom(type = super::super::super::api::IngestStatusV2, convert = Box::new)
    )]
    #[serde(rename = "lastIngestStatus")]
    last_ingest_status: Box<super::super::super::api::IngestStatusV2>,
    #[builder(custom(type = super::RetentionPolicy, convert = Box::new))]
    #[serde(rename = "retentionPolicy")]
    retention_policy: Box<super::RetentionPolicy>,
    #[builder(default, into)]
    #[serde(rename = "source", skip_serializing_if = "Option::is_none", default)]
    source: Option<String>,
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::Bounds>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(rename = "bounds", skip_serializing_if = "Option::is_none", default)]
    bounds: Option<Box<super::Bounds>>,
    #[serde(rename = "timestampType")]
    timestamp_type: super::WeakTimestampType,
    #[builder(default, set(item(type = super::super::super::api::Label)))]
    #[serde(
        rename = "labels",
        skip_serializing_if = "std::collections::BTreeSet::is_empty",
        default
    )]
    labels: std::collections::BTreeSet<super::super::super::api::Label>,
    #[builder(
        default,
        map(
            key(type = super::super::super::api::PropertyName),
            value(type = super::super::super::api::PropertyValue)
        )
    )]
    #[serde(
        rename = "properties",
        skip_serializing_if = "std::collections::BTreeMap::is_empty",
        default
    )]
    properties: std::collections::BTreeMap<
        super::super::super::api::PropertyName,
        super::super::super::api::PropertyValue,
    >,
    #[serde(rename = "granularity")]
    granularity: super::super::super::api::Granularity,
    #[serde(rename = "allowStreaming")]
    allow_streaming: bool,
    #[serde(rename = "isArchived")]
    is_archived: bool,
    #[builder(default, into)]
    #[serde(rename = "datasetType", skip_serializing_if = "Option::is_none", default)]
    dataset_type: Option<super::DatasetBackingType>,
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::ExternalConnectionMetadata>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(
        rename = "externalConnectionMetadata",
        skip_serializing_if = "Option::is_none",
        default
    )]
    external_connection_metadata: Option<Box<super::ExternalConnectionMetadata>>,
}
impl EnrichedDataset {
    #[inline]
    pub fn rid(&self) -> &conjure_object::ResourceIdentifier {
        &self.rid
    }
    #[inline]
    pub fn uuid(&self) -> conjure_object::Uuid {
        self.uuid
    }
    #[inline]
    pub fn name(&self) -> &str {
        &*self.name
    }
    #[inline]
    pub fn description(&self) -> Option<&str> {
        self.description.as_ref().map(|o| &**o)
    }
    #[inline]
    pub fn display_name(&self) -> &str {
        &*self.display_name
    }
    #[deprecated(note = "Deprecated in favor of properties.")]
    #[inline]
    pub fn metadata(&self) -> Option<&std::collections::BTreeMap<String, String>> {
        self.metadata.as_ref().map(|o| &*o)
    }
    #[deprecated(note = "Deprecated. Use DatasetFile#handle")]
    #[inline]
    pub fn handle(&self) -> Option<&super::Handle> {
        self.handle.as_ref().map(|o| &**o)
    }
    #[inline]
    pub fn ingest_date(&self) -> conjure_object::DateTime<conjure_object::Utc> {
        self.ingest_date
    }
    #[deprecated(note = "Deprecated. Use lastIngestStatus.")]
    #[inline]
    pub fn ingest_status(&self) -> Option<&super::IngestStatus> {
        self.ingest_status.as_ref().map(|o| &*o)
    }
    #[inline]
    pub fn origin_metadata(&self) -> &super::DatasetOriginMetadata {
        &*self.origin_metadata
    }
    #[inline]
    pub fn last_ingest_status(&self) -> &super::super::super::api::IngestStatusV2 {
        &*self.last_ingest_status
    }
    #[inline]
    pub fn retention_policy(&self) -> &super::RetentionPolicy {
        &*self.retention_policy
    }
    #[inline]
    pub fn source(&self) -> Option<&str> {
        self.source.as_ref().map(|o| &**o)
    }
    #[inline]
    pub fn bounds(&self) -> Option<&super::Bounds> {
        self.bounds.as_ref().map(|o| &**o)
    }
    #[inline]
    pub fn timestamp_type(&self) -> &super::WeakTimestampType {
        &self.timestamp_type
    }
    #[inline]
    pub fn labels(
        &self,
    ) -> &std::collections::BTreeSet<super::super::super::api::Label> {
        &self.labels
    }
    #[inline]
    pub fn properties(
        &self,
    ) -> &std::collections::BTreeMap<
        super::super::super::api::PropertyName,
        super::super::super::api::PropertyValue,
    > {
        &self.properties
    }
    #[inline]
    pub fn granularity(&self) -> &super::super::super::api::Granularity {
        &self.granularity
    }
    #[inline]
    pub fn allow_streaming(&self) -> bool {
        self.allow_streaming
    }
    #[inline]
    pub fn is_archived(&self) -> bool {
        self.is_archived
    }
    #[inline]
    pub fn dataset_type(&self) -> Option<&super::DatasetBackingType> {
        self.dataset_type.as_ref().map(|o| &*o)
    }
    #[inline]
    pub fn external_connection_metadata(
        &self,
    ) -> Option<&super::ExternalConnectionMetadata> {
        self.external_connection_metadata.as_ref().map(|o| &**o)
    }
}