/// The request to update a type. The request will replace all existing properties with the properties
/// specified in the request.
#[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 UpdateTypeRequest {
    #[builder(default, into)]
    #[serde(rename = "name", skip_serializing_if = "Option::is_none", default)]
    name: Option<String>,
    #[builder(default, into)]
    #[serde(
        rename = "propertyConfigs",
        skip_serializing_if = "Option::is_none",
        default
    )]
    property_configs: Option<std::collections::BTreeMap<String, super::PropertyConfig>>,
    #[builder(default, into)]
    #[serde(rename = "description", skip_serializing_if = "Option::is_none", default)]
    description: Option<String>,
    #[builder(default, into)]
    #[serde(rename = "iconName", skip_serializing_if = "Option::is_none", default)]
    icon_name: Option<String>,
    #[builder(default, into)]
    #[serde(
        rename = "datasourceConfigs",
        skip_serializing_if = "Option::is_none",
        default
    )]
    datasource_configs: Option<
        std::collections::BTreeMap<
            conjure_object::ResourceIdentifier,
            super::AssetTypeDataScopeConfig,
        >,
    >,
}
impl UpdateTypeRequest {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new() -> Self {
        Self::builder().build()
    }
    #[inline]
    pub fn name(&self) -> Option<&str> {
        self.name.as_ref().map(|o| &**o)
    }
    #[inline]
    pub fn property_configs(
        &self,
    ) -> Option<&std::collections::BTreeMap<String, super::PropertyConfig>> {
        self.property_configs.as_ref().map(|o| &*o)
    }
    #[inline]
    pub fn description(&self) -> Option<&str> {
        self.description.as_ref().map(|o| &**o)
    }
    #[inline]
    pub fn icon_name(&self) -> Option<&str> {
        self.icon_name.as_ref().map(|o| &**o)
    }
    /// The configuration outlines what a data scope should provide when added to an asset of this type. It is
    /// referenced at data scope creation time, but does not actively modify existing data scopes.
    #[inline]
    pub fn datasource_configs(
        &self,
    ) -> Option<
        &std::collections::BTreeMap<
            conjure_object::ResourceIdentifier,
            super::AssetTypeDataScopeConfig,
        >,
    > {
        self.datasource_configs.as_ref().map(|o| &*o)
    }
}
