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