#[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 SavedViewSortOptions {
    #[serde(rename = "isDescending")]
    is_descending: bool,
    #[builder(custom(type = super::SortKey, convert = Box::new))]
    #[serde(rename = "sortKey")]
    sort_key: Box<super::SortKey>,
}
impl SavedViewSortOptions {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(is_descending: bool, sort_key: super::SortKey) -> Self {
        Self::builder().is_descending(is_descending).sort_key(sort_key).build()
    }
    #[inline]
    pub fn is_descending(&self) -> bool {
        self.is_descending
    }
    /// Field to sort by.
    #[inline]
    pub fn sort_key(&self) -> &super::SortKey {
        &*self.sort_key
    }
}
