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 Project {
    /// Project ID
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<uuid::Uuid>,
    /// ID of the user who owns the project
    #[serde(rename = "ownerId", skip_serializing_if = "Option::is_none")]
    pub owner_id: Option<uuid::Uuid>,
    /// Project name
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// Project network
    #[serde(rename = "network", skip_serializing_if = "Option::is_none")]
    pub network: Option<Network>,
    #[serde(rename = "sharedResourceConfig", skip_serializing_if = "Option::is_none")]
    pub shared_resource_config: Option<Box<crate::models::ProjectSharedResourceConfig>>,
    /// Date/time when the project was created
    #[serde(rename = "created", skip_serializing_if = "Option::is_none")]
    pub created: Option<String>,
    /// Map of the project cloud regions (name => ID)
    #[serde(rename = "cloudRegionsIds", skip_serializing_if = "Option::is_none")]
    pub cloud_regions_ids: Option<serde_json::Value>,
    /// Map of the project resources (ID => type)
    #[serde(rename = "resourcesIds", skip_serializing_if = "Option::is_none")]
    pub resources_ids: Option<serde_json::Value>,
}

impl Project {
    pub fn new() -> Project {
        Project {
            id: None,
            owner_id: None,
            name: None,
            network: None,
            shared_resource_config: None,
            created: None,
            cloud_regions_ids: None,
            resources_ids: None,
        }
    }
}

/// Project network
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Network {
    #[serde(rename = "local")]
    Local,
    #[serde(rename = "mainnet")]
    Mainnet,
    #[serde(rename = "testnet")]
    Testnet,
}

impl Default for Network {
    fn default() -> Network {
        Self::Local
    }
}