/*
 * This is an auto-generated file.
 * Any manual changes may be overwritten without notice!
 */

use derive_builder::Builder;
use serde::{Deserialize, Serialize};

/// VaultWorkloadIdentityUpgradeCheck is the result of verifying if the cluster
/// is ready to switch to workload identities for Vault.
///
/// This struct was generated based on the Go types of the official Nomad API.
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize, Builder)]
pub struct VaultWorkloadIdentityUpgradeCheck {
    /// OutdatedNodes is the list of nodes running a version of Nomad that does
    /// not support workload identities for Vault.
    #[serde(
        rename = "OutdatedNodes",
        deserialize_with = "crate::deserialize_null_as_default"
    )]
    pub outdated_nodes: Vec<super::NodeListStub>,

    /// VaultTokens is the list of Vault ACL token accessors that Nomad created
    /// and will no longer manage after the cluster is migrated to workload
    /// identities.
    #[serde(
        rename = "VaultTokens",
        deserialize_with = "crate::deserialize_null_as_default"
    )]
    pub vault_tokens: Vec<super::VaultAccessor>,

    /// JobsWithoutVaultIdentity is the list of jobs that have a `vault` block
    /// but do not have an `identity` for Vault.
    #[serde(
        rename = "JobsWithoutVaultIdentity",
        deserialize_with = "crate::deserialize_null_as_default"
    )]
    pub jobs_without_vault_identity: Vec<super::JobListStub>,
}
