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 CreateChartThemeRequest {
    #[builder(into)]
    #[serde(rename = "name")]
    name: String,
    #[builder(custom(type = super::ChartThemeContent, convert = Box::new))]
    #[serde(rename = "content")]
    content: Box<super::ChartThemeContent>,
    #[builder(default, into)]
    #[serde(rename = "workspace", skip_serializing_if = "Option::is_none", default)]
    workspace: Option<super::super::super::api::rids::WorkspaceRid>,
}
impl CreateChartThemeRequest {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(name: impl Into<String>, content: super::ChartThemeContent) -> Self {
        Self::builder().name(name).content(content).build()
    }
    /// The name of the theme.
    #[inline]
    pub fn name(&self) -> &str {
        &*self.name
    }
    /// The theme fields.
    #[inline]
    pub fn content(&self) -> &super::ChartThemeContent {
        &*self.content
    }
    /// The workspace in which to create the theme. If not provided, the theme 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)
    }
}