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 NewDatasetIngestDestination {
    #[builder(default, into)]
    #[serde(rename = "datasetName", skip_serializing_if = "Option::is_none", default)]
    dataset_name: Option<String>,
    #[builder(default, into)]
    #[serde(
        rename = "datasetDescription",
        skip_serializing_if = "Option::is_none",
        default
    )]
    dataset_description: Option<String>,
    #[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,
    >,
    #[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,
        custom(
            type = impl
            Into<Option<super::ChannelConfig>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(rename = "channelConfig", skip_serializing_if = "Option::is_none", default)]
    channel_config: Option<Box<super::ChannelConfig>>,
    #[builder(default, into)]
    #[serde(rename = "workspace", skip_serializing_if = "Option::is_none", default)]
    workspace: Option<super::super::super::api::rids::WorkspaceRid>,
    #[builder(
        default,
        set(item(type = super::super::super::scout::rids::api::MarkingRid))
    )]
    #[serde(
        rename = "markingRids",
        skip_serializing_if = "std::collections::BTreeSet::is_empty",
        default
    )]
    marking_rids: std::collections::BTreeSet<
        super::super::super::scout::rids::api::MarkingRid,
    >,
}
impl NewDatasetIngestDestination {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new() -> Self {
        Self::builder().build()
    }
    #[inline]
    pub fn dataset_name(&self) -> Option<&str> {
        self.dataset_name.as_ref().map(|o| &**o)
    }
    #[inline]
    pub fn dataset_description(&self) -> Option<&str> {
        self.dataset_description.as_ref().map(|o| &**o)
    }
    #[inline]
    pub fn properties(
        &self,
    ) -> &std::collections::BTreeMap<
        super::super::super::api::PropertyName,
        super::super::super::api::PropertyValue,
    > {
        &self.properties
    }
    #[inline]
    pub fn labels(
        &self,
    ) -> &std::collections::BTreeSet<super::super::super::api::Label> {
        &self.labels
    }
    #[inline]
    pub fn channel_config(&self) -> Option<&super::ChannelConfig> {
        self.channel_config.as_ref().map(|o| &**o)
    }
    /// The workspace in which to create the dataset. If not provided, the dataset will be created in the default workspace for
    /// the user's organization, if the default workspace for the organization is configured.
    #[inline]
    pub fn workspace(&self) -> Option<&super::super::super::api::rids::WorkspaceRid> {
        self.workspace.as_ref().map(|o| &*o)
    }
    /// The markings to apply to the created dataset.
    /// If not provided, the dataset will be visible to all users in the same workspace.
    #[inline]
    pub fn marking_rids(
        &self,
    ) -> &std::collections::BTreeSet<super::super::super::scout::rids::api::MarkingRid> {
        &self.marking_rids
    }
}