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 NewAvalancheNodeResource {
    /// Resource name
    #[serde(rename = "name")]
    pub name: String,
    #[serde(rename = "resourceType")]
    pub resource_type: Box<crate::models::ResourceType>,
    #[serde(rename = "size", skip_serializing_if = "Option::is_none")]
    pub size: Option<crate::models::Size>,
    /// ID (or name) of the cloud region that the resource belongs to
    #[serde(rename = "cloudRegionId")]
    pub cloud_region_id: String,
    /// ID (or name) of the secret containing the node ID TLS certificate and key
    #[serde(rename = "nodeIdSecretId", skip_serializing_if = "Option::is_none")]
    pub node_id_secret_id: Option<String>,
    #[serde(rename = "nodeConfig", skip_serializing_if = "Option::is_none")]
    pub node_config: Option<Box<crate::models::AvalancheNodeResourceBaseNodeConfig>>,
    #[serde(rename = "nodeStatus", skip_serializing_if = "Option::is_none")]
    pub node_status: Option<Box<crate::models::AvalancheNodeResourceBaseNodeStatus>>,
    /// IP address of the node
    #[serde(rename = "nodeIp", skip_serializing_if = "Option::is_none")]
    pub node_ip: Option<String>,
    /// ID (or name) of another AvalancheNode resource that this node will use to bootstrap
    #[serde(rename = "nodeBootstrapResourceId", skip_serializing_if = "Option::is_none")]
    pub node_bootstrap_resource_id: Option<String>,
}

impl NewAvalancheNodeResource {
    pub fn new(name: String, resource_type: crate::models::ResourceType, cloud_region_id: String) -> NewAvalancheNodeResource {
        NewAvalancheNodeResource {
            name,
            resource_type: Box::new(resource_type),
            size: None,
            cloud_region_id,
            node_id_secret_id: None,
            node_config: None,
            node_status: None,
            node_ip: None,
            node_bootstrap_resource_id: None,
        }
    }
}