Skip to main content

nominal_api/conjure/objects/themes/api/
update_chart_theme_request.rs

1#[derive(
2    Debug,
3    Clone,
4    conjure_object::serde::Serialize,
5    conjure_object::serde::Deserialize,
6    PartialEq,
7    Eq,
8    PartialOrd,
9    Ord,
10    Hash
11)]
12#[serde(crate = "conjure_object::serde")]
13#[conjure_object::private::staged_builder::staged_builder]
14#[builder(crate = conjure_object::private::staged_builder, update, inline)]
15pub struct UpdateChartThemeRequest {
16    #[builder(into)]
17    #[serde(rename = "name")]
18    name: String,
19    #[builder(custom(type = super::ChartThemeContent, convert = Box::new))]
20    #[serde(rename = "content")]
21    content: Box<super::ChartThemeContent>,
22}
23impl UpdateChartThemeRequest {
24    /// Constructs a new instance of the type.
25    #[inline]
26    pub fn new(name: impl Into<String>, content: super::ChartThemeContent) -> Self {
27        Self::builder().name(name).content(content).build()
28    }
29    /// The name of the theme.
30    #[inline]
31    pub fn name(&self) -> &str {
32        &*self.name
33    }
34    /// The theme fields.
35    #[inline]
36    pub fn content(&self) -> &super::ChartThemeContent {
37        &*self.content
38    }
39}