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 CreateSecretRequest {
    /// Secret name
    #[serde(rename = "name")]
    pub name: String,
    #[serde(rename = "secretType")]
    pub secret_type: Box<crate::models::SecretType>,
    /// 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 CreateSecretRequest {
    pub fn new(name: String, secret_type: crate::models::SecretType) -> CreateSecretRequest {
        CreateSecretRequest {
            name,
            secret_type: Box::new(secret_type),
            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
    }
}