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

package com.azure.resourcemanager.machinelearningservices.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;

/** The AksReplicaStatus model. */
@Fluent
public class AksReplicaStatus {
    @JsonIgnore private final ClientLogger logger = new ClientLogger(AksReplicaStatus.class);

    /*
     * The desired number of replicas.
     */
    @JsonProperty(value = "desiredReplicas")
    private Integer desiredReplicas;

    /*
     * The number of updated replicas.
     */
    @JsonProperty(value = "updatedReplicas")
    private Integer updatedReplicas;

    /*
     * The number of available replicas.
     */
    @JsonProperty(value = "availableReplicas")
    private Integer availableReplicas;

    /*
     * The error details.
     */
    @JsonProperty(value = "error")
    private AksReplicaStatusError error;

    /**
     * Get the desiredReplicas property: The desired number of replicas.
     *
     * @return the desiredReplicas value.
     */
    public Integer desiredReplicas() {
        return this.desiredReplicas;
    }

    /**
     * Set the desiredReplicas property: The desired number of replicas.
     *
     * @param desiredReplicas the desiredReplicas value to set.
     * @return the AksReplicaStatus object itself.
     */
    public AksReplicaStatus withDesiredReplicas(Integer desiredReplicas) {
        this.desiredReplicas = desiredReplicas;
        return this;
    }

    /**
     * Get the updatedReplicas property: The number of updated replicas.
     *
     * @return the updatedReplicas value.
     */
    public Integer updatedReplicas() {
        return this.updatedReplicas;
    }

    /**
     * Set the updatedReplicas property: The number of updated replicas.
     *
     * @param updatedReplicas the updatedReplicas value to set.
     * @return the AksReplicaStatus object itself.
     */
    public AksReplicaStatus withUpdatedReplicas(Integer updatedReplicas) {
        this.updatedReplicas = updatedReplicas;
        return this;
    }

    /**
     * Get the availableReplicas property: The number of available replicas.
     *
     * @return the availableReplicas value.
     */
    public Integer availableReplicas() {
        return this.availableReplicas;
    }

    /**
     * Set the availableReplicas property: The number of available replicas.
     *
     * @param availableReplicas the availableReplicas value to set.
     * @return the AksReplicaStatus object itself.
     */
    public AksReplicaStatus withAvailableReplicas(Integer availableReplicas) {
        this.availableReplicas = availableReplicas;
        return this;
    }

    /**
     * Get the error property: The error details.
     *
     * @return the error value.
     */
    public AksReplicaStatusError error() {
        return this.error;
    }

    /**
     * Set the error property: The error details.
     *
     * @param error the error value to set.
     * @return the AksReplicaStatus object itself.
     */
    public AksReplicaStatus withError(AksReplicaStatusError error) {
        this.error = error;
        return this;
    }

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