nominal-api 0.1239.0

API bindings for the Nominal platform
Documentation
#[derive(
    Debug,
    Clone,
    conjure_object::serde::Serialize,
    conjure_object::serde::Deserialize,
    conjure_object::private::DeriveWith
)]
#[serde(crate = "conjure_object::serde")]
#[derive_with(PartialEq, Eq, PartialOrd, Ord, Hash)]
#[conjure_object::private::staged_builder::staged_builder]
#[builder(crate = conjure_object::private::staged_builder, update, inline)]
pub struct WriteBatchesRequest {
    #[builder(default, list(item(type = super::RecordsBatch)))]
    #[serde(rename = "batches", skip_serializing_if = "Vec::is_empty", default)]
    batches: Vec<super::RecordsBatch>,
    #[serde(rename = "dataSourceRid")]
    data_source_rid: super::super::super::super::api::rids::NominalDataSourceOrDatasetRid,
    #[builder(default, into)]
    #[serde(
        rename = "asynchronousInsert",
        skip_serializing_if = "Option::is_none",
        default
    )]
    asynchronous_insert: Option<bool>,
}
impl WriteBatchesRequest {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(
        data_source_rid: super::super::super::super::api::rids::NominalDataSourceOrDatasetRid,
    ) -> Self {
        Self::builder().data_source_rid(data_source_rid).build()
    }
    #[inline]
    pub fn batches(&self) -> &[super::RecordsBatch] {
        &*self.batches
    }
    #[inline]
    pub fn data_source_rid(
        &self,
    ) -> &super::super::super::super::api::rids::NominalDataSourceOrDatasetRid {
        &self.data_source_rid
    }
    /// Is always true - setting this to false will do nothing.
    #[deprecated(note = "Should not be used.\n")]
    #[inline]
    pub fn asynchronous_insert(&self) -> Option<bool> {
        self.asynchronous_insert.as_ref().map(|o| *o)
    }
}