nominal-api 0.1240.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 IngestProgressV2 {
    #[serde(rename = "startTime")]
    start_time: conjure_object::DateTime<conjure_object::Utc>,
    #[builder(default, into)]
    #[serde(rename = "endTime", skip_serializing_if = "Option::is_none", default)]
    end_time: Option<conjure_object::DateTime<conjure_object::Utc>>,
    #[builder(
        custom(type = super::super::super::api::IngestStatusV2, convert = Box::new)
    )]
    #[serde(rename = "ingestStatus")]
    ingest_status: Box<super::super::super::api::IngestStatusV2>,
    #[builder(default, into)]
    #[serde(rename = "incalculable", skip_serializing_if = "Option::is_none", default)]
    incalculable: Option<bool>,
}
impl IngestProgressV2 {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(
        start_time: conjure_object::DateTime<conjure_object::Utc>,
        ingest_status: super::super::super::api::IngestStatusV2,
    ) -> Self {
        Self::builder().start_time(start_time).ingest_status(ingest_status).build()
    }
    /// Timestamp at start of ingest
    #[inline]
    pub fn start_time(&self) -> conjure_object::DateTime<conjure_object::Utc> {
        self.start_time
    }
    /// Timestamp at end of ingest, empty if still in progress
    #[inline]
    pub fn end_time(&self) -> Option<conjure_object::DateTime<conjure_object::Utc>> {
        self.end_time.as_ref().map(|o| *o)
    }
    /// Status of ingest, contains error if failed
    #[inline]
    pub fn ingest_status(&self) -> &super::super::super::api::IngestStatusV2 {
        &*self.ingest_status
    }
    /// Whether ingest duration can be reliably calculated
    #[inline]
    pub fn incalculable(&self) -> Option<bool> {
        self.incalculable.as_ref().map(|o| *o)
    }
}