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

package com.azure.resourcemanager.hybridcontainerservice.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;

/** HybridAKSNodePoolStatus defines the observed state of HybridAKSNodePool. */
@Fluent
public final class AgentPoolProvisioningStatusStatus {
    /*
     * ErrorMessage - Error messages during creation of cluster
     */
    @JsonProperty(value = "errorMessage")
    private String errorMessage;

    /*
     * Contains Provisioning errors
     */
    @JsonProperty(value = "provisioningStatus")
    private AgentPoolProvisioningStatusStatusProvisioningStatus provisioningStatus;

    /*
     * Total number of ready machines targeted by this deployment.
     */
    @JsonProperty(value = "readyReplicas")
    private Integer readyReplicas;

    /*
     * Total number of non-terminated machines targeted by this deployment
     */
    @JsonProperty(value = "replicas")
    private Integer replicas;

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

    /**
     * Get the errorMessage property: ErrorMessage - Error messages during creation of cluster.
     *
     * @return the errorMessage value.
     */
    public String errorMessage() {
        return this.errorMessage;
    }

    /**
     * Set the errorMessage property: ErrorMessage - Error messages during creation of cluster.
     *
     * @param errorMessage the errorMessage value to set.
     * @return the AgentPoolProvisioningStatusStatus object itself.
     */
    public AgentPoolProvisioningStatusStatus withErrorMessage(String errorMessage) {
        this.errorMessage = errorMessage;
        return this;
    }

    /**
     * Get the provisioningStatus property: Contains Provisioning errors.
     *
     * @return the provisioningStatus value.
     */
    public AgentPoolProvisioningStatusStatusProvisioningStatus provisioningStatus() {
        return this.provisioningStatus;
    }

    /**
     * Set the provisioningStatus property: Contains Provisioning errors.
     *
     * @param provisioningStatus the provisioningStatus value to set.
     * @return the AgentPoolProvisioningStatusStatus object itself.
     */
    public AgentPoolProvisioningStatusStatus withProvisioningStatus(
        AgentPoolProvisioningStatusStatusProvisioningStatus provisioningStatus) {
        this.provisioningStatus = provisioningStatus;
        return this;
    }

    /**
     * Get the readyReplicas property: Total number of ready machines targeted by this deployment.
     *
     * @return the readyReplicas value.
     */
    public Integer readyReplicas() {
        return this.readyReplicas;
    }

    /**
     * Set the readyReplicas property: Total number of ready machines targeted by this deployment.
     *
     * @param readyReplicas the readyReplicas value to set.
     * @return the AgentPoolProvisioningStatusStatus object itself.
     */
    public AgentPoolProvisioningStatusStatus withReadyReplicas(Integer readyReplicas) {
        this.readyReplicas = readyReplicas;
        return this;
    }

    /**
     * Get the replicas property: Total number of non-terminated machines targeted by this deployment.
     *
     * @return the replicas value.
     */
    public Integer replicas() {
        return this.replicas;
    }

    /**
     * Set the replicas property: Total number of non-terminated machines targeted by this deployment.
     *
     * @param replicas the replicas value to set.
     * @return the AgentPoolProvisioningStatusStatus object itself.
     */
    public AgentPoolProvisioningStatusStatus withReplicas(Integer replicas) {
        this.replicas = replicas;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (provisioningStatus() != null) {
            provisioningStatus().validate();
        }
    }
}
