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

package com.azure.resourcemanager.postgresqlflexibleserver.models;

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

/** storage size in MB capability. */
@Immutable
public final class StorageMbCapability extends CapabilityBase {
    /*
     * Supported IOPS
     */
    @JsonProperty(value = "supportedIops", access = JsonProperty.Access.WRITE_ONLY)
    private Integer supportedIops;

    /*
     * Storage size in MB
     */
    @JsonProperty(value = "storageSizeMb", access = JsonProperty.Access.WRITE_ONLY)
    private Long storageSizeMb;

    /*
     * Default tier for IOPS
     */
    @JsonProperty(value = "defaultIopsTier", access = JsonProperty.Access.WRITE_ONLY)
    private String defaultIopsTier;

    /*
     * List of available options to upgrade the storage performance
     */
    @JsonProperty(value = "supportedIopsTiers", access = JsonProperty.Access.WRITE_ONLY)
    private List<StorageTierCapability> supportedIopsTiers;

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

    /**
     * Get the supportedIops property: Supported IOPS.
     *
     * @return the supportedIops value.
     */
    public Integer supportedIops() {
        return this.supportedIops;
    }

    /**
     * Get the storageSizeMb property: Storage size in MB.
     *
     * @return the storageSizeMb value.
     */
    public Long storageSizeMb() {
        return this.storageSizeMb;
    }

    /**
     * Get the defaultIopsTier property: Default tier for IOPS.
     *
     * @return the defaultIopsTier value.
     */
    public String defaultIopsTier() {
        return this.defaultIopsTier;
    }

    /**
     * Get the supportedIopsTiers property: List of available options to upgrade the storage performance.
     *
     * @return the supportedIopsTiers value.
     */
    public List<StorageTierCapability> supportedIopsTiers() {
        return this.supportedIopsTiers;
    }

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