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

use serde_with::serde_as;

/// CapsuleOpenResponseReadContextConfiguration : the material required for enacting read context configuration (e.g. wasm stuff)
#[serde_as]
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CapsuleOpenResponseReadContextConfiguration {
    /// If true, skip creation of audit log events on read
    #[serde(rename = "disableReadLogging")]
    pub disable_read_logging: bool,
    /// Number of seconds for which cached encryption keys will be considered valid by the client 
    #[serde(rename = "keyCacheTTL")]
    pub key_cache_ttl: i32,
    /// a bundled version of the Rego policy associated with this open event.
    #[serde_as(as = "serde_with::base64::Base64")]
    #[serde(rename = "policyAssembly")]
    pub policy_assembly: Vec<u8>,
}

impl CapsuleOpenResponseReadContextConfiguration {
    /// the material required for enacting read context configuration (e.g. wasm stuff)
    pub fn new(disable_read_logging: bool, key_cache_ttl: i32, policy_assembly: Vec<u8>) -> CapsuleOpenResponseReadContextConfiguration {
        CapsuleOpenResponseReadContextConfiguration {
            disable_read_logging,
            key_cache_ttl,
            policy_assembly,
        }
    }
}