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

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

import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.elasticsan.models.ProvisioningStates;
import com.azure.resourcemanager.elasticsan.models.Sku;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** Elastic San response properties. */
@Fluent
public final class ElasticSanProperties {
    /*
     * resource sku
     */
    @JsonProperty(value = "sku", required = true)
    private Sku sku;

    /*
     * Logical zone for Elastic San resource; example: ["1"].
     */
    @JsonProperty(value = "availabilityZones")
    private List<String> availabilityZones;

    /*
     * State of the operation on the resource.
     */
    @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
    private ProvisioningStates provisioningState;

    /*
     * Base size of the Elastic San appliance in TiB.
     */
    @JsonProperty(value = "baseSizeTiB", required = true)
    private long baseSizeTiB;

    /*
     * Extended size of the Elastic San appliance in TiB.
     */
    @JsonProperty(value = "extendedCapacitySizeTiB", required = true)
    private long extendedCapacitySizeTiB;

    /*
     * Total size of the provisioned Volumes in GiB.
     */
    @JsonProperty(value = "totalVolumeSizeGiB", access = JsonProperty.Access.WRITE_ONLY)
    private Long totalVolumeSizeGiB;

    /*
     * Total number of volume groups in this Elastic San appliance.
     */
    @JsonProperty(value = "volumeGroupCount", access = JsonProperty.Access.WRITE_ONLY)
    private Long volumeGroupCount;

    /*
     * Total Provisioned IOPS of the Elastic San appliance.
     */
    @JsonProperty(value = "totalIops", access = JsonProperty.Access.WRITE_ONLY)
    private Long totalIops;

    /*
     * Total Provisioned MBps Elastic San appliance.
     */
    @JsonProperty(value = "totalMBps", access = JsonProperty.Access.WRITE_ONLY)
    private Long totalMBps;

    /*
     * Total size of the Elastic San appliance in TB.
     */
    @JsonProperty(value = "totalSizeTiB", access = JsonProperty.Access.WRITE_ONLY)
    private Long totalSizeTiB;

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

    /**
     * Get the sku property: resource sku.
     *
     * @return the sku value.
     */
    public Sku sku() {
        return this.sku;
    }

    /**
     * Set the sku property: resource sku.
     *
     * @param sku the sku value to set.
     * @return the ElasticSanProperties object itself.
     */
    public ElasticSanProperties withSku(Sku sku) {
        this.sku = sku;
        return this;
    }

    /**
     * Get the availabilityZones property: Logical zone for Elastic San resource; example: ["1"].
     *
     * @return the availabilityZones value.
     */
    public List<String> availabilityZones() {
        return this.availabilityZones;
    }

    /**
     * Set the availabilityZones property: Logical zone for Elastic San resource; example: ["1"].
     *
     * @param availabilityZones the availabilityZones value to set.
     * @return the ElasticSanProperties object itself.
     */
    public ElasticSanProperties withAvailabilityZones(List<String> availabilityZones) {
        this.availabilityZones = availabilityZones;
        return this;
    }

    /**
     * Get the provisioningState property: State of the operation on the resource.
     *
     * @return the provisioningState value.
     */
    public ProvisioningStates provisioningState() {
        return this.provisioningState;
    }

    /**
     * Get the baseSizeTiB property: Base size of the Elastic San appliance in TiB.
     *
     * @return the baseSizeTiB value.
     */
    public long baseSizeTiB() {
        return this.baseSizeTiB;
    }

    /**
     * Set the baseSizeTiB property: Base size of the Elastic San appliance in TiB.
     *
     * @param baseSizeTiB the baseSizeTiB value to set.
     * @return the ElasticSanProperties object itself.
     */
    public ElasticSanProperties withBaseSizeTiB(long baseSizeTiB) {
        this.baseSizeTiB = baseSizeTiB;
        return this;
    }

    /**
     * Get the extendedCapacitySizeTiB property: Extended size of the Elastic San appliance in TiB.
     *
     * @return the extendedCapacitySizeTiB value.
     */
    public long extendedCapacitySizeTiB() {
        return this.extendedCapacitySizeTiB;
    }

    /**
     * Set the extendedCapacitySizeTiB property: Extended size of the Elastic San appliance in TiB.
     *
     * @param extendedCapacitySizeTiB the extendedCapacitySizeTiB value to set.
     * @return the ElasticSanProperties object itself.
     */
    public ElasticSanProperties withExtendedCapacitySizeTiB(long extendedCapacitySizeTiB) {
        this.extendedCapacitySizeTiB = extendedCapacitySizeTiB;
        return this;
    }

    /**
     * Get the totalVolumeSizeGiB property: Total size of the provisioned Volumes in GiB.
     *
     * @return the totalVolumeSizeGiB value.
     */
    public Long totalVolumeSizeGiB() {
        return this.totalVolumeSizeGiB;
    }

    /**
     * Get the volumeGroupCount property: Total number of volume groups in this Elastic San appliance.
     *
     * @return the volumeGroupCount value.
     */
    public Long volumeGroupCount() {
        return this.volumeGroupCount;
    }

    /**
     * Get the totalIops property: Total Provisioned IOPS of the Elastic San appliance.
     *
     * @return the totalIops value.
     */
    public Long totalIops() {
        return this.totalIops;
    }

    /**
     * Get the totalMBps property: Total Provisioned MBps Elastic San appliance.
     *
     * @return the totalMBps value.
     */
    public Long totalMBps() {
        return this.totalMBps;
    }

    /**
     * Get the totalSizeTiB property: Total size of the Elastic San appliance in TB.
     *
     * @return the totalSizeTiB value.
     */
    public Long totalSizeTiB() {
        return this.totalSizeTiB;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (sku() == null) {
            throw LOGGER
                .logExceptionAsError(
                    new IllegalArgumentException("Missing required property sku in model ElasticSanProperties"));
        } else {
            sku().validate();
        }
    }

    private static final ClientLogger LOGGER = new ClientLogger(ElasticSanProperties.class);
}
