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 UpdateAssetRequest {
    #[builder(default, into)]
    #[serde(rename = "title", skip_serializing_if = "Option::is_none", default)]
    title: Option<String>,
    #[builder(default, into)]
    #[serde(rename = "description", skip_serializing_if = "Option::is_none", default)]
    description: Option<String>,
    #[builder(default, into)]
    #[serde(rename = "properties", skip_serializing_if = "Option::is_none", default)]
    properties: Option<
        std::collections::BTreeMap<
            super::super::super::super::api::PropertyName,
            super::super::super::super::api::PropertyValue,
        >,
    >,
    #[builder(default, into)]
    #[serde(rename = "labels", skip_serializing_if = "Option::is_none", default)]
    labels: Option<std::collections::BTreeSet<super::super::super::super::api::Label>>,
    #[builder(default, into)]
    #[serde(rename = "links", skip_serializing_if = "Option::is_none", default)]
    links: Option<Vec<super::super::super::run::api::Link>>,
    #[builder(default, into)]
    #[serde(rename = "dataScopes", skip_serializing_if = "Option::is_none", default)]
    data_scopes: Option<std::collections::BTreeSet<super::CreateAssetDataScope>>,
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::UpdateOrRemoveAssetType>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(rename = "type", skip_serializing_if = "Option::is_none", default)]
    type_: Option<Box<super::UpdateOrRemoveAssetType>>,
    #[builder(default, into)]
    #[serde(rename = "isStaged", skip_serializing_if = "Option::is_none", default)]
    is_staged: Option<bool>,
}
impl UpdateAssetRequest {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new() -> Self {
        Self::builder().build()
    }
    #[inline]
    pub fn title(&self) -> Option<&str> {
        self.title.as_ref().map(|o| &**o)
    }
    #[inline]
    pub fn description(&self) -> Option<&str> {
        self.description.as_ref().map(|o| &**o)
    }
    #[inline]
    pub fn properties(
        &self,
    ) -> Option<
        &std::collections::BTreeMap<
            super::super::super::super::api::PropertyName,
            super::super::super::super::api::PropertyValue,
        >,
    > {
        self.properties.as_ref().map(|o| &*o)
    }
    #[inline]
    pub fn labels(
        &self,
    ) -> Option<&std::collections::BTreeSet<super::super::super::super::api::Label>> {
        self.labels.as_ref().map(|o| &*o)
    }
    #[inline]
    pub fn links(&self) -> Option<&[super::super::super::run::api::Link]> {
        self.links.as_ref().map(|o| &**o)
    }
    /// The data scopes for the asset. This will replace all existing data scopes with the scopes specified.
    #[inline]
    pub fn data_scopes(
        &self,
    ) -> Option<&std::collections::BTreeSet<super::CreateAssetDataScope>> {
        self.data_scopes.as_ref().map(|o| &*o)
    }
    #[inline]
    pub fn type_(&self) -> Option<&super::UpdateOrRemoveAssetType> {
        self.type_.as_ref().map(|o| &**o)
    }
    #[inline]
    pub fn is_staged(&self) -> Option<bool> {
        self.is_staged.as_ref().map(|o| *o)
    }
}