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

package com.azure.resourcemanager.devcenter.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.devcenter.models.HealthStatus;
import com.azure.resourcemanager.devcenter.models.HealthStatusDetail;
import com.azure.resourcemanager.devcenter.models.LicenseType;
import com.azure.resourcemanager.devcenter.models.LocalAdminStatus;
import com.azure.resourcemanager.devcenter.models.ProvisioningState;
import com.azure.resourcemanager.devcenter.models.StopOnDisconnectConfiguration;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** Properties of a Pool. */
@Fluent
public final class PoolProperties extends PoolUpdateProperties {
    /*
     * Overall health status of the Pool. Indicates whether or not the Pool is available to create Dev Boxes.
     */
    @JsonProperty(value = "healthStatus", access = JsonProperty.Access.WRITE_ONLY)
    private HealthStatus healthStatus;

    /*
     * Details on the Pool health status to help diagnose issues. This is only populated when the pool status indicates
     * the pool is in a non-healthy state
     */
    @JsonProperty(value = "healthStatusDetails", access = JsonProperty.Access.WRITE_ONLY)
    private List<HealthStatusDetail> healthStatusDetails;

    /*
     * The provisioning state of the resource.
     */
    @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
    private ProvisioningState provisioningState;

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

    /**
     * Get the healthStatus property: Overall health status of the Pool. Indicates whether or not the Pool is available
     * to create Dev Boxes.
     *
     * @return the healthStatus value.
     */
    public HealthStatus healthStatus() {
        return this.healthStatus;
    }

    /**
     * Get the healthStatusDetails property: Details on the Pool health status to help diagnose issues. This is only
     * populated when the pool status indicates the pool is in a non-healthy state.
     *
     * @return the healthStatusDetails value.
     */
    public List<HealthStatusDetail> healthStatusDetails() {
        return this.healthStatusDetails;
    }

    /**
     * Get the provisioningState property: The provisioning state of the resource.
     *
     * @return the provisioningState value.
     */
    public ProvisioningState provisioningState() {
        return this.provisioningState;
    }

    /** {@inheritDoc} */
    @Override
    public PoolProperties withDevBoxDefinitionName(String devBoxDefinitionName) {
        super.withDevBoxDefinitionName(devBoxDefinitionName);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public PoolProperties withNetworkConnectionName(String networkConnectionName) {
        super.withNetworkConnectionName(networkConnectionName);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public PoolProperties withLicenseType(LicenseType licenseType) {
        super.withLicenseType(licenseType);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public PoolProperties withLocalAdministrator(LocalAdminStatus localAdministrator) {
        super.withLocalAdministrator(localAdministrator);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public PoolProperties withStopOnDisconnect(StopOnDisconnectConfiguration stopOnDisconnect) {
        super.withStopOnDisconnect(stopOnDisconnect);
        return this;
    }

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