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 AvalancheSubnetResource {
    /// Resource ID
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<uuid::Uuid>,
    /// ID of the user who owns the resource
    #[serde(rename = "ownerId", skip_serializing_if = "Option::is_none")]
    pub owner_id: Option<uuid::Uuid>,
    /// ID of the project that the cloud region belongs to
    #[serde(rename = "projectId", skip_serializing_if = "Option::is_none")]
    pub project_id: Option<uuid::Uuid>,
    /// ID (or name) of the cloud region that the resource belongs to
    #[serde(rename = "cloudRegionId", skip_serializing_if = "Option::is_none")]
    pub cloud_region_id: Option<String>,
    /// Resource name
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    #[serde(rename = "resourceType", skip_serializing_if = "Option::is_none")]
    pub resource_type: Option<Box<crate::models::ResourceType>>,
    /// Resource size
    #[serde(rename = "size", skip_serializing_if = "Option::is_none")]
    pub size: Option<Size>,
    /// Resource status
    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
    pub status: Option<Status>,
    /// Date/time when the project was created
    #[serde(rename = "created", skip_serializing_if = "Option::is_none")]
    pub created: Option<String>,
    /// IDs (or names) of node resources that are part of the Subnet
    #[serde(rename = "subnetNodesResourceIds", skip_serializing_if = "Option::is_none")]
    pub subnet_nodes_resource_ids: Option<Vec<String>>,
    #[serde(rename = "subnetConfig", skip_serializing_if = "Option::is_none")]
    pub subnet_config: Option<Box<crate::models::AvalancheSubnetResourceBaseSubnetConfig>>,
    /// ID (or name) of the secret containing the Subnet control key
    #[serde(rename = "subnetControlKeySecretId", skip_serializing_if = "Option::is_none")]
    pub subnet_control_key_secret_id: Option<String>,
    #[serde(rename = "subnetStatus", skip_serializing_if = "Option::is_none")]
    pub subnet_status: Option<Box<crate::models::AvalancheSubnetResourceBaseSubnetStatus>>,
}

impl AvalancheSubnetResource {
    pub fn new() -> AvalancheSubnetResource {
        AvalancheSubnetResource {
            id: None,
            owner_id: None,
            project_id: None,
            cloud_region_id: None,
            name: None,
            resource_type: None,
            size: None,
            status: None,
            created: None,
            subnet_nodes_resource_ids: None,
            subnet_config: None,
            subnet_control_key_secret_id: None,
            subnet_status: None,
        }
    }
}

/// Resource size
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Size {
    #[serde(rename = "small")]
    Small,
    #[serde(rename = "medium")]
    Medium,
    #[serde(rename = "large")]
    Large,
}

impl Default for Size {
    fn default() -> Size {
        Self::Small
    }
}
/// Resource status
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Status {
    #[serde(rename = "pending")]
    Pending,
    #[serde(rename = "running")]
    Running,
    #[serde(rename = "configuring")]
    Configuring,
    #[serde(rename = "stopped")]
    Stopped,
    #[serde(rename = "error")]
    Error,
    #[serde(rename = "destroying")]
    Destroying,
}

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