antimatter_api 2.0.13

Interact with the Antimatter Cloud API
Documentation
/*
 * Antimatter Public API
 *
 * Interact with the Antimatter Cloud API
 *
 * The version of the OpenAPI document: 2.0.13
 * Contact: support@antimatter.io
 * Generated by: https://openapi-generator.tech
 */

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

/// CapsuleInfo : A summary of the capsule 
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CapsuleInfo {
    /// A globally unique identifier for a capsule
    #[serde(rename = "id")]
    pub id: String,
    /// A globally unique identifier for a domain
    #[serde(rename = "domain")]
    pub domain: String,
    #[serde(rename = "capsuleTags")]
    pub capsule_tags: Vec<models::Tag>,
    #[serde(rename = "spanTags")]
    pub span_tags: Box<models::TagSummary>,
    /// how big this capsule is
    #[serde(rename = "size")]
    pub size: i64,
    /// when this capsule was sealed
    #[serde(rename = "created")]
    pub created: String,
    /// generated key used to order and paginate on
    #[serde(rename = "pageKey", skip_serializing_if = "Option::is_none")]
    pub page_key: Option<String>,
    /// how many rows this capsule has
    #[serde(rename = "rows")]
    pub rows: i64,
}

impl CapsuleInfo {
    /// A summary of the capsule 
    pub fn new(id: String, domain: String, capsule_tags: Vec<models::Tag>, span_tags: models::TagSummary, size: i64, created: String, rows: i64) -> CapsuleInfo {
        CapsuleInfo {
            id,
            domain,
            capsule_tags,
            span_tags: Box::new(span_tags),
            size,
            created,
            page_key: None,
            rows,
        }
    }
}