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 CreateProjectResourceRequest {
    /// 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>,
    /// 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>>,
    #[serde(rename = "blockscoutConfig", skip_serializing_if = "Option::is_none")]
    pub blockscout_config: Option<Box<crate::models::BlockscoutResourceBaseBlockscoutConfig>>,
    #[serde(rename = "blockscoutStatus", skip_serializing_if = "Option::is_none")]
    pub blockscout_status: Option<Box<crate::models::BlockscoutResourceBaseBlockscoutStatus>>,
    /// IP address of Blockscout
    #[serde(rename = "blockscoutIp", skip_serializing_if = "Option::is_none")]
    pub blockscout_ip: Option<String>,
    /// ID (or name) of an AvalancheSubnet resource that will be indexed by Blockscout
    #[serde(rename = "subnetResourceId", skip_serializing_if = "Option::is_none")]
    pub subnet_resource_id: Option<String>,
}

impl CreateProjectResourceRequest {
    pub fn new(name: String, resource_type: crate::models::ResourceType, cloud_region_id: String) -> CreateProjectResourceRequest {
        CreateProjectResourceRequest {
            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,
            subnet_nodes_resource_ids: None,
            subnet_config: None,
            subnet_control_key_secret_id: None,
            subnet_status: None,
            blockscout_config: None,
            blockscout_status: None,
            blockscout_ip: None,
            subnet_resource_id: None,
        }
    }
}