santati 0.3.0

Official Rust SDK for the Santati audit-log API
Documentation
/*
 * Santati
 *
 * Santati's HTTP API. Operations under `/api/v0/` take a team API key in `Authorization: Api-Key <key>`; a missing, invalid or under-scoped key is answered with `403`, never `401`. Errors on `/api/v0/` use one of three bodies: `ErrorDetail` (`{\"detail\": ...}`), `FieldErrors` (messages keyed by request field) or `ErrorEnvelope` (`{\"error\": {\"code\", \"message\", \"field\"}}`, returned by event ingestion and log stream quota checks). Lists on `/api/v0/` are cursor-paginated: follow `next` until it is `null`.
 *
 * The version of the OpenAPI document: 0.3.0
 * 
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct PaginatedEventSchemaVersionList {
    /// URL of the next page of results, or null on the last page.
    #[serde(rename = "next", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub next: Option<Option<String>>,
    /// URL of the previous page of results, or null on the first page.
    #[serde(rename = "previous", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub previous: Option<Option<String>>,
    #[serde(rename = "results")]
    pub results: Vec<models::EventSchemaVersion>,
}

impl PaginatedEventSchemaVersionList {
    pub fn new(results: Vec<models::EventSchemaVersion>) -> PaginatedEventSchemaVersionList {
        PaginatedEventSchemaVersionList {
            next: None,
            previous: None,
            results,
        }
    }
}