// 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.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Storage properties of a server. */
@Fluent
public final class Storage {
    /*
     * Max storage allowed for a server.
     */
    @JsonProperty(value = "storageSizeGB")
    private Integer storageSizeGB;

    /*
     * Flag to enable / disable Storage Auto grow for flexible server.
     */
    @JsonProperty(value = "autoGrow")
    private StorageAutoGrow autoGrow;

    /*
     * Name of storage tier for IOPS.
     */
    @JsonProperty(value = "tier")
    private AzureManagedDiskPerformanceTiers tier;

    /*
     * Storage tier IOPS quantity.
     */
    @JsonProperty(value = "iops", access = JsonProperty.Access.WRITE_ONLY)
    private Integer iops;

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

    /**
     * Get the storageSizeGB property: Max storage allowed for a server.
     *
     * @return the storageSizeGB value.
     */
    public Integer storageSizeGB() {
        return this.storageSizeGB;
    }

    /**
     * Set the storageSizeGB property: Max storage allowed for a server.
     *
     * @param storageSizeGB the storageSizeGB value to set.
     * @return the Storage object itself.
     */
    public Storage withStorageSizeGB(Integer storageSizeGB) {
        this.storageSizeGB = storageSizeGB;
        return this;
    }

    /**
     * Get the autoGrow property: Flag to enable / disable Storage Auto grow for flexible server.
     *
     * @return the autoGrow value.
     */
    public StorageAutoGrow autoGrow() {
        return this.autoGrow;
    }

    /**
     * Set the autoGrow property: Flag to enable / disable Storage Auto grow for flexible server.
     *
     * @param autoGrow the autoGrow value to set.
     * @return the Storage object itself.
     */
    public Storage withAutoGrow(StorageAutoGrow autoGrow) {
        this.autoGrow = autoGrow;
        return this;
    }

    /**
     * Get the tier property: Name of storage tier for IOPS.
     *
     * @return the tier value.
     */
    public AzureManagedDiskPerformanceTiers tier() {
        return this.tier;
    }

    /**
     * Set the tier property: Name of storage tier for IOPS.
     *
     * @param tier the tier value to set.
     * @return the Storage object itself.
     */
    public Storage withTier(AzureManagedDiskPerformanceTiers tier) {
        this.tier = tier;
        return this;
    }

    /**
     * Get the iops property: Storage tier IOPS quantity.
     *
     * @return the iops value.
     */
    public Integer iops() {
        return this.iops;
    }

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