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;

#[serde_as]
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ByokKeyInfo {
    /// The base64-encoded key material to use as the basis for an encryption key. It must be 256 bytes or longer 
    #[serde_as(as = "serde_with::base64::Base64")]
    #[serde(rename = "key")]
    pub key: Vec<u8>,
    #[serde(rename = "providerName", skip_serializing_if = "Option::is_none")]
    pub provider_name: Option<ProviderName>,
}

impl ByokKeyInfo {
    pub fn new(key: Vec<u8>) -> ByokKeyInfo {
        ByokKeyInfo {
            key,
            provider_name: None,
        }
    }
}
/// 
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum ProviderName {
    #[serde(rename = "byok")]
    Byok,
}

impl Default for ProviderName {
    fn default() -> ProviderName {
        Self::Byok
    }
}