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};

/// NewAccessLogEntry : An individual capsule data-plane log entry, in the form required when inserting a  new record 
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct NewAccessLogEntry {
    #[serde(rename = "operation")]
    pub operation: Operation,
    /// the location URL that this capsule resided in during the operation, if known 
    #[serde(rename = "location", skip_serializing_if = "Option::is_none")]
    pub location: Option<String>,
    #[serde(rename = "readInfo")]
    pub read_info: Box<models::NewAccessLogEntryReadInfo>,
}

impl NewAccessLogEntry {
    /// An individual capsule data-plane log entry, in the form required when inserting a  new record 
    pub fn new(operation: Operation, read_info: models::NewAccessLogEntryReadInfo) -> NewAccessLogEntry {
        NewAccessLogEntry {
            operation,
            location: None,
            read_info: Box::new(read_info),
        }
    }
}
/// 
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Operation {
    #[serde(rename = "read")]
    Read,
}

impl Default for Operation {
    fn default() -> Operation {
        Self::Read
    }
}