artifact-keeper-client 1.1.2

Rust client for the Artifact Keeper REST API
Documentation
/*
 * Artifact Keeper API
 *
 * Enterprise artifact registry supporting 45+ package formats.
 *
 * The version of the OpenAPI document: 1.0.0-rc.3
 * 
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// Pagination : Pagination metadata for list responses.  Used consistently across all paginated API endpoints to provide standard pagination information to clients.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Pagination {
    /// Current page number (1-indexed)
    #[serde(rename = "page")]
    pub page: i32,
    /// Number of items per page
    #[serde(rename = "per_page")]
    pub per_page: i32,
    /// Total number of items across all pages
    #[serde(rename = "total")]
    pub total: i64,
    /// Total number of pages
    #[serde(rename = "total_pages")]
    pub total_pages: i32,
}

impl Pagination {
    /// Pagination metadata for list responses.  Used consistently across all paginated API endpoints to provide standard pagination information to clients.
    pub fn new(page: i32, per_page: i32, total: i64, total_pages: i32) -> Pagination {
        Pagination {
            page,
            per_page,
            total,
            total_pages,
        }
    }
}