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 CloudRegion {
    /// Cloud region ID
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<uuid::Uuid>,
    /// ID of the user who owns the cloud region
    #[serde(rename = "ownerId", skip_serializing_if = "Option::is_none")]
    pub owner_id: Option<uuid::Uuid>,
    /// ID (or name) of the project that the cloud region belongs to
    #[serde(rename = "projectId", skip_serializing_if = "Option::is_none")]
    pub project_id: Option<String>,
    /// Cloud provider
    #[serde(rename = "cloudProvider", skip_serializing_if = "Option::is_none")]
    pub cloud_provider: Option<CloudProvider>,
    /// Cloud region
    #[serde(rename = "region", skip_serializing_if = "Option::is_none")]
    pub region: Option<String>,
    /// CloudRegion name (unique within a project)
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// ID (or name) of the secret that contains the cloud credentials
    #[serde(rename = "cloudCredentialsSecretId", skip_serializing_if = "Option::is_none")]
    pub cloud_credentials_secret_id: Option<String>,
    /// Date/time when the project was created
    #[serde(rename = "created", skip_serializing_if = "Option::is_none")]
    pub created: Option<String>,
    /// Cloud region status
    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
    pub status: Option<Status>,
}

impl CloudRegion {
    pub fn new() -> CloudRegion {
        CloudRegion {
            id: None,
            owner_id: None,
            project_id: None,
            cloud_provider: None,
            region: None,
            name: None,
            cloud_credentials_secret_id: None,
            created: None,
            status: None,
        }
    }
}

/// Cloud provider
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum CloudProvider {
    #[serde(rename = "aws")]
    Aws,
    #[serde(rename = "azure")]
    Azure,
    #[serde(rename = "google")]
    Google,
    #[serde(rename = "localhost")]
    Localhost,
}

impl Default for CloudProvider {
    fn default() -> CloudProvider {
        Self::Aws
    }
}
/// Cloud region status
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Status {
    #[serde(rename = "available")]
    Available,
    #[serde(rename = "destroying")]
    Destroying,
    #[serde(rename = "suspended")]
    Suspended,
}

impl Default for Status {
    fn default() -> Status {
        Self::Available
    }
}