// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.networkcloud.models;

import com.azure.core.annotation.Immutable;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** KubernetesClusterNode represents the details of a node in a Kubernetes cluster. */
@Immutable
public final class KubernetesClusterNode {
    /*
     * The resource ID of the agent pool that this node belongs to. This value is not represented on control plane
     * nodes.
     */
    @JsonProperty(value = "agentPoolId", access = JsonProperty.Access.WRITE_ONLY)
    private String agentPoolId;

    /*
     * The availability zone this node is running within.
     */
    @JsonProperty(value = "availabilityZone", access = JsonProperty.Access.WRITE_ONLY)
    private String availabilityZone;

    /*
     * The resource ID of the bare metal machine that hosts this node.
     */
    @JsonProperty(value = "bareMetalMachineId", access = JsonProperty.Access.WRITE_ONLY)
    private String bareMetalMachineId;

    /*
     * The number of CPU cores configured for this node, derived from the VM SKU specified.
     */
    @JsonProperty(value = "cpuCores", access = JsonProperty.Access.WRITE_ONLY)
    private Long cpuCores;

    /*
     * The detailed state of this node.
     */
    @JsonProperty(value = "detailedStatus", access = JsonProperty.Access.WRITE_ONLY)
    private KubernetesClusterNodeDetailedStatus detailedStatus;

    /*
     * The descriptive message about the current detailed status.
     */
    @JsonProperty(value = "detailedStatusMessage", access = JsonProperty.Access.WRITE_ONLY)
    private String detailedStatusMessage;

    /*
     * The size of the disk configured for this node.
     */
    @JsonProperty(value = "diskSizeGB", access = JsonProperty.Access.WRITE_ONLY)
    private Long diskSizeGB;

    /*
     * The machine image used to deploy this node.
     */
    @JsonProperty(value = "image", access = JsonProperty.Access.WRITE_ONLY)
    private String image;

    /*
     * The currently running version of Kubernetes and bundled features running on this node.
     */
    @JsonProperty(value = "kubernetesVersion", access = JsonProperty.Access.WRITE_ONLY)
    private String kubernetesVersion;

    /*
     * The list of labels on this node that have been assigned to the agent pool containing this node.
     */
    @JsonProperty(value = "labels", access = JsonProperty.Access.WRITE_ONLY)
    private List<KubernetesLabel> labels;

    /*
     * The amount of memory configured for this node, derived from the vm SKU specified.
     */
    @JsonProperty(value = "memorySizeGB", access = JsonProperty.Access.WRITE_ONLY)
    private Long memorySizeGB;

    /*
     * The mode of the agent pool containing this node. Not applicable for control plane nodes.
     */
    @JsonProperty(value = "mode", access = JsonProperty.Access.WRITE_ONLY)
    private AgentPoolMode mode;

    /*
     * The name of this node, as realized in the Kubernetes cluster.
     */
    @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
    private String name;

    /*
     * The NetworkAttachments made to this node.
     */
    @JsonProperty(value = "networkAttachments", access = JsonProperty.Access.WRITE_ONLY)
    private List<NetworkAttachment> networkAttachments;

    /*
     * The power state of this node.
     */
    @JsonProperty(value = "powerState", access = JsonProperty.Access.WRITE_ONLY)
    private KubernetesNodePowerState powerState;

    /*
     * The role of this node in the cluster.
     */
    @JsonProperty(value = "role", access = JsonProperty.Access.WRITE_ONLY)
    private KubernetesNodeRole role;

    /*
     * The list of taints that have been assigned to the agent pool containing this node.
     */
    @JsonProperty(value = "taints", access = JsonProperty.Access.WRITE_ONLY)
    private List<KubernetesLabel> taints;

    /*
     * The VM SKU name that was used to create this cluster node.
     */
    @JsonProperty(value = "vmSkuName", access = JsonProperty.Access.WRITE_ONLY)
    private String vmSkuName;

    /** Creates an instance of KubernetesClusterNode class. */
    public KubernetesClusterNode() {
    }

    /**
     * Get the agentPoolId property: The resource ID of the agent pool that this node belongs to. This value is not
     * represented on control plane nodes.
     *
     * @return the agentPoolId value.
     */
    public String agentPoolId() {
        return this.agentPoolId;
    }

    /**
     * Get the availabilityZone property: The availability zone this node is running within.
     *
     * @return the availabilityZone value.
     */
    public String availabilityZone() {
        return this.availabilityZone;
    }

    /**
     * Get the bareMetalMachineId property: The resource ID of the bare metal machine that hosts this node.
     *
     * @return the bareMetalMachineId value.
     */
    public String bareMetalMachineId() {
        return this.bareMetalMachineId;
    }

    /**
     * Get the cpuCores property: The number of CPU cores configured for this node, derived from the VM SKU specified.
     *
     * @return the cpuCores value.
     */
    public Long cpuCores() {
        return this.cpuCores;
    }

    /**
     * Get the detailedStatus property: The detailed state of this node.
     *
     * @return the detailedStatus value.
     */
    public KubernetesClusterNodeDetailedStatus detailedStatus() {
        return this.detailedStatus;
    }

    /**
     * Get the detailedStatusMessage property: The descriptive message about the current detailed status.
     *
     * @return the detailedStatusMessage value.
     */
    public String detailedStatusMessage() {
        return this.detailedStatusMessage;
    }

    /**
     * Get the diskSizeGB property: The size of the disk configured for this node.
     *
     * @return the diskSizeGB value.
     */
    public Long diskSizeGB() {
        return this.diskSizeGB;
    }

    /**
     * Get the image property: The machine image used to deploy this node.
     *
     * @return the image value.
     */
    public String image() {
        return this.image;
    }

    /**
     * Get the kubernetesVersion property: The currently running version of Kubernetes and bundled features running on
     * this node.
     *
     * @return the kubernetesVersion value.
     */
    public String kubernetesVersion() {
        return this.kubernetesVersion;
    }

    /**
     * Get the labels property: The list of labels on this node that have been assigned to the agent pool containing
     * this node.
     *
     * @return the labels value.
     */
    public List<KubernetesLabel> labels() {
        return this.labels;
    }

    /**
     * Get the memorySizeGB property: The amount of memory configured for this node, derived from the vm SKU specified.
     *
     * @return the memorySizeGB value.
     */
    public Long memorySizeGB() {
        return this.memorySizeGB;
    }

    /**
     * Get the mode property: The mode of the agent pool containing this node. Not applicable for control plane nodes.
     *
     * @return the mode value.
     */
    public AgentPoolMode mode() {
        return this.mode;
    }

    /**
     * Get the name property: The name of this node, as realized in the Kubernetes cluster.
     *
     * @return the name value.
     */
    public String name() {
        return this.name;
    }

    /**
     * Get the networkAttachments property: The NetworkAttachments made to this node.
     *
     * @return the networkAttachments value.
     */
    public List<NetworkAttachment> networkAttachments() {
        return this.networkAttachments;
    }

    /**
     * Get the powerState property: The power state of this node.
     *
     * @return the powerState value.
     */
    public KubernetesNodePowerState powerState() {
        return this.powerState;
    }

    /**
     * Get the role property: The role of this node in the cluster.
     *
     * @return the role value.
     */
    public KubernetesNodeRole role() {
        return this.role;
    }

    /**
     * Get the taints property: The list of taints that have been assigned to the agent pool containing this node.
     *
     * @return the taints value.
     */
    public List<KubernetesLabel> taints() {
        return this.taints;
    }

    /**
     * Get the vmSkuName property: The VM SKU name that was used to create this cluster node.
     *
     * @return the vmSkuName value.
     */
    public String vmSkuName() {
        return this.vmSkuName;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (labels() != null) {
            labels().forEach(e -> e.validate());
        }
        if (networkAttachments() != null) {
            networkAttachments().forEach(e -> e.validate());
        }
        if (taints() != null) {
            taints().forEach(e -> e.validate());
        }
    }
}
