// 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 edition capability. */
@Immutable
public final class StorageEditionCapability extends CapabilityBase {
    /*
     * Storage edition name
     */
    @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
    private String name;

    /*
     * Default storage size in MB for storage edition
     */
    @JsonProperty(value = "defaultStorageSizeMb", access = JsonProperty.Access.WRITE_ONLY)
    private Long defaultStorageSizeMb;

    /*
     * Flexible server supported storage range in MB
     */
    @JsonProperty(value = "supportedStorageMb", access = JsonProperty.Access.WRITE_ONLY)
    private List<StorageMbCapability> supportedStorageMb;

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

    /**
     * Get the name property: Storage edition name.
     *
     * @return the name value.
     */
    public String name() {
        return this.name;
    }

    /**
     * Get the defaultStorageSizeMb property: Default storage size in MB for storage edition.
     *
     * @return the defaultStorageSizeMb value.
     */
    public Long defaultStorageSizeMb() {
        return this.defaultStorageSizeMb;
    }

    /**
     * Get the supportedStorageMb property: Flexible server supported storage range in MB.
     *
     * @return the supportedStorageMb value.
     */
    public List<StorageMbCapability> supportedStorageMb() {
        return this.supportedStorageMb;
    }

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