ash_api 0.1.7

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
Documentation
/*
 * Hai (Ash API) specifications.
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 0.1.7
 * Contact: E36 Knots
 * Generated by: https://openapi-generator.tech
 */




#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct GetAllSecrets200ResponseInner {
    /// Secret ID
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<uuid::Uuid>,
    /// ID of the user who owns the secret
    #[serde(rename = "ownerId", skip_serializing_if = "Option::is_none")]
    pub owner_id: Option<uuid::Uuid>,
    /// Secret name
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    #[serde(rename = "secretType", skip_serializing_if = "Option::is_none")]
    pub secret_type: Option<Box<crate::models::SecretType>>,
    /// Date/time when the secret was created
    #[serde(rename = "created", skip_serializing_if = "Option::is_none")]
    pub created: Option<String>,
    /// Map of resources that use this secret (ID => type)
    #[serde(rename = "usedBy", skip_serializing_if = "Option::is_none")]
    pub used_by: Option<serde_json::Value>,
    /// Content of the secret
    #[serde(rename = "content", skip_serializing_if = "Option::is_none")]
    pub content: Option<String>,
    /// Node ID
    #[serde(rename = "nodeId", skip_serializing_if = "Option::is_none")]
    pub node_id: Option<String>,
    /// Base-64 encoded node TLS key
    #[serde(rename = "nodeKey", skip_serializing_if = "Option::is_none")]
    pub node_key: Option<String>,
    /// Base-64 encoded node TLS certificate
    #[serde(rename = "nodeCert", skip_serializing_if = "Option::is_none")]
    pub node_cert: Option<String>,
    /// Base-64 encoded node BLS key
    #[serde(rename = "nodeBlsKey", skip_serializing_if = "Option::is_none")]
    pub node_bls_key: Option<String>,
    /// P Chain address of the wallet
    #[serde(rename = "pChainAddress", skip_serializing_if = "Option::is_none")]
    pub p_chain_address: Option<String>,
    /// Base-64 encoded Google Cloud private key
    #[serde(rename = "privateKey", skip_serializing_if = "Option::is_none")]
    pub private_key: Option<String>,
    /// Format of the wallet private key
    #[serde(rename = "privateKeyFormat", skip_serializing_if = "Option::is_none")]
    pub private_key_format: Option<PrivateKeyFormat>,
    /// AWS access key
    #[serde(rename = "accessKey", skip_serializing_if = "Option::is_none")]
    pub access_key: Option<String>,
    /// AWS secret key
    #[serde(rename = "secretKey", skip_serializing_if = "Option::is_none")]
    pub secret_key: Option<String>,
    /// Azure subscription ID
    #[serde(rename = "subscriptionId", skip_serializing_if = "Option::is_none")]
    pub subscription_id: Option<uuid::Uuid>,
    /// Azure application ID
    #[serde(rename = "applicationId", skip_serializing_if = "Option::is_none")]
    pub application_id: Option<uuid::Uuid>,
    /// Azure application password
    #[serde(rename = "applicationPassword", skip_serializing_if = "Option::is_none")]
    pub application_password: Option<String>,
    /// Google Cloud project ID
    #[serde(rename = "projectId", skip_serializing_if = "Option::is_none")]
    pub project_id: Option<String>,
    /// Google Cloud client email
    #[serde(rename = "clientEmail", skip_serializing_if = "Option::is_none")]
    pub client_email: Option<String>,
    /// Google Cloud client ID
    #[serde(rename = "clientId", skip_serializing_if = "Option::is_none")]
    pub client_id: Option<String>,
}

impl GetAllSecrets200ResponseInner {
    pub fn new() -> GetAllSecrets200ResponseInner {
        GetAllSecrets200ResponseInner {
            id: None,
            owner_id: None,
            name: None,
            secret_type: None,
            created: None,
            used_by: None,
            content: None,
            node_id: None,
            node_key: None,
            node_cert: None,
            node_bls_key: None,
            p_chain_address: None,
            private_key: None,
            private_key_format: None,
            access_key: None,
            secret_key: None,
            subscription_id: None,
            application_id: None,
            application_password: None,
            project_id: None,
            client_email: None,
            client_id: None,
        }
    }
}

/// Format of the wallet private key
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum PrivateKeyFormat {
    #[serde(rename = "cb58")]
    Cb58,
    #[serde(rename = "hex")]
    Hex,
}

impl Default for PrivateKeyFormat {
    fn default() -> PrivateKeyFormat {
        Self::Cb58
    }
}