/// Specification of a page for a series. Returns full resolution points beginning nearest to the given page
/// token, advancing pageSize points in the time direction specified by the sign of the page size. Throws if the
/// absolute pageSize is greater than 5,000.
/// Paging cursors are not guaranteed to distinguish exact duplicate non-log points with the same timestamp,
/// tags, and value. If those duplicates straddle a page boundary, later duplicates may be skipped.
#[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 PageInfo {
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::PageToken>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(rename = "pageToken", skip_serializing_if = "Option::is_none", default)]
    page_token: Option<Box<super::PageToken>>,
    #[serde(rename = "pageSize")]
    page_size: i32,
}
impl PageInfo {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(page_size: i32) -> Self {
        Self::builder().page_size(page_size).build()
    }
    #[inline]
    pub fn page_token(&self) -> Option<&super::PageToken> {
        self.page_token.as_ref().map(|o| &**o)
    }
    #[inline]
    pub fn page_size(&self) -> i32 {
        self.page_size
    }
}
