hanzo-client 8.5.156

Generated client for the Hanzo API — every service, one crate.
Documentation
/*
 * Hanzo Cloud API
 *
 * The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
 *
 * The version of the OpenAPI document: v1
 * 
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ApiKey {
    /// CreatedAt is when the key last changed, as IAM records it.
    #[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")]
    pub created_at: Option<String>,
    /// Key is the FULL value, and is present for a publishable key only: it is public by construction and useless to its holder if it cannot be read back.
    #[serde(rename = "key", skip_serializing_if = "Option::is_none")]
    pub key: Option<String>,
    /// Limit is what this key may reach, as `kind:name` entries — `model:zen5`, `project:acme`, `product:commerce`. Absent means the key reaches whatever its holder does, which is what every key minted before limits existed does and must keep doing.
    #[serde(rename = "limit", skip_serializing_if = "Option::is_none")]
    pub limit: Option<Vec<String>>,
    /// Prefix is the recognizable, non-secret head of the key — enough to tell two keys apart, never enough to use one.
    #[serde(rename = "prefix", skip_serializing_if = "Option::is_none")]
    pub prefix: Option<String>,
    /// Type is the key class: secret (sk-) or publishable (pk-).
    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
    pub r#type: Option<String>,
}

impl ApiKey {
    pub fn new() -> ApiKey {
        ApiKey {
            created_at: None,
            key: None,
            limit: None,
            prefix: None,
            r#type: None,
        }
    }
}