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

/// AddReadContext : A request to add read contexts
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct AddReadContext {
    /// A short, single sentence description of this read context
    #[serde(rename = "summary")]
    pub summary: String,
    /// A longer form description of this read context
    #[serde(rename = "description")]
    pub description: String,
    /// If true, skip creation of audit log events on read
    #[serde(rename = "disableReadLogging", skip_serializing_if = "Option::is_none")]
    pub disable_read_logging: Option<bool>,
    /// Number of seconds for which cached encryption keys will be considered valid by the client 
    #[serde(rename = "keyCacheTTL", skip_serializing_if = "Option::is_none")]
    pub key_cache_ttl: Option<i32>,
    #[serde(rename = "requiredHooks", skip_serializing_if = "Option::is_none")]
    pub required_hooks: Option<Vec<models::ReadContextRequiredHook>>,
    #[serde(rename = "readParameters", skip_serializing_if = "Option::is_none")]
    pub read_parameters: Option<Vec<models::ReadContextParameter>>,
}

impl AddReadContext {
    /// A request to add read contexts
    pub fn new(summary: String, description: String) -> AddReadContext {
        AddReadContext {
            summary,
            description,
            disable_read_logging: None,
            key_cache_ttl: None,
            required_hooks: None,
            read_parameters: None,
        }
    }
}