#[derive(
    Debug,
    Clone,
    conjure_object::serde::Serialize,
    conjure_object::serde::Deserialize,
    conjure_object::private::DeriveWith
)]
#[serde(crate = "conjure_object::serde")]
#[derive_with(PartialEq, Eq, PartialOrd, Ord, Hash)]
#[conjure_object::private::staged_builder::staged_builder]
#[builder(crate = conjure_object::private::staged_builder, update, inline)]
pub struct UpdateSavedViewRequest {
    #[builder(default, into)]
    #[serde(rename = "title", skip_serializing_if = "Option::is_none", default)]
    title: Option<String>,
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::UpdateSymbol>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(rename = "symbol", skip_serializing_if = "Option::is_none", default)]
    symbol: Option<Box<super::UpdateSymbol>>,
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::UpdateColor>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(rename = "color", skip_serializing_if = "Option::is_none", default)]
    color: Option<Box<super::UpdateColor>>,
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::SearchState>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(rename = "searchState", skip_serializing_if = "Option::is_none", default)]
    search_state: Option<Box<super::SearchState>>,
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::DisplayState>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(rename = "displayState", skip_serializing_if = "Option::is_none", default)]
    display_state: Option<Box<super::DisplayState>>,
    #[builder(default, into)]
    #[serde(rename = "index", skip_serializing_if = "Option::is_none", default)]
    index: Option<i32>,
}
impl UpdateSavedViewRequest {
    /// 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 symbol(&self) -> Option<&super::UpdateSymbol> {
        self.symbol.as_ref().map(|o| &**o)
    }
    #[inline]
    pub fn color(&self) -> Option<&super::UpdateColor> {
        self.color.as_ref().map(|o| &**o)
    }
    #[inline]
    pub fn search_state(&self) -> Option<&super::SearchState> {
        self.search_state.as_ref().map(|o| &**o)
    }
    #[inline]
    pub fn display_state(&self) -> Option<&super::DisplayState> {
        self.display_state.as_ref().map(|o| &**o)
    }
    #[inline]
    pub fn index(&self) -> Option<i32> {
        self.index.as_ref().map(|o| *o)
    }
}
