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 UpdateWalletSecret {
    /// 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>>,
    /// P Chain address of the wallet
    #[serde(rename = "pChainAddress", skip_serializing_if = "Option::is_none")]
    pub p_chain_address: Option<String>,
    /// Private key of the wallet
    #[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>,
}

impl UpdateWalletSecret {
    pub fn new() -> UpdateWalletSecret {
        UpdateWalletSecret {
            name: None,
            secret_type: None,
            p_chain_address: None,
            private_key: None,
            private_key_format: 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
    }
}