clientapi-pve 2026.5.24

Generated from apidoc.js. NOT an official Proxmox specification. See https://pve.proxmox.com/pve-docs/api-viewer/ for the upstream documentation.
Documentation
/*
 * Proxmox Virtual Environment API
 *
 * Generated from apidoc.js. NOT an official Proxmox specification. See https://pve.proxmox.com/pve-docs/api-viewer/ for the upstream documentation.
 *
 * The version of the OpenAPI document: 9.x
 * 
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ClusterHaReadGetResourcesResponseData {

    /// HA resource may be migrated during automatic rebalancing.
    #[serde(rename = "auto-rebalance", skip_serializing_if = "Option::is_none")]
    pub auto_rebalance: Option<models::PveBoolean>,

    /// Description.
    #[serde(rename = "comment", skip_serializing_if = "Option::is_none")]
    pub comment: Option<String>,

    /// Can be used to prevent concurrent modifications.
    #[serde(rename = "digest")]
    pub digest: String,

    /// The HA resource is automatically migrated to the node with the highest priority according to their node affinity rule, if a node with a higher priority than the current node comes online.
    #[serde(rename = "failback", skip_serializing_if = "Option::is_none")]
    pub failback: Option<models::PveBoolean>,

    /// The HA group identifier.
    #[serde(rename = "group", skip_serializing_if = "Option::is_none")]
    pub group: Option<String>,

    /// Maximal number of service relocate tries when a service fails to start.
    #[serde(rename = "max_relocate", skip_serializing_if = "Option::is_none")]
    pub max_relocate: Option<i64>,

    /// Maximal number of tries to restart the service on a node after its start failed.
    #[serde(rename = "max_restart", skip_serializing_if = "Option::is_none")]
    pub max_restart: Option<i64>,

    /// HA resource ID. This consists of a resource type followed by a resource specific name, separated with colon (example: vm:100 / ct:100). For virtual machines and containers, you can simply use the VM or CT id as a shortcut (example: 100).
    #[serde(rename = "sid")]
    pub sid: String,

    /// Requested resource state.
    #[serde(rename = "state", skip_serializing_if = "Option::is_none")]
    pub state: Option<models::PveStateEnum>,

    /// The type of the resources.
    #[serde(rename = "type")]
    pub r#type: String,


}

impl ClusterHaReadGetResourcesResponseData {
    pub fn new(digest: String, sid: String, r#type: String) -> ClusterHaReadGetResourcesResponseData {
        ClusterHaReadGetResourcesResponseData {
            
            auto_rebalance: None,
            
            comment: None,
            
            digest,
            
            failback: None,
            
            group: None,
            
            max_relocate: None,
            
            max_restart: None,
            
            sid,
            
            state: None,
            
            r#type,
            
        }
    }
}