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

package com.azure.resourcemanager.sqlvirtualmachine.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Set the server/instance-level settings for SQL Server. */
@Fluent
public final class SqlInstanceSettings {
    /*
     * SQL Server Collation.
     */
    @JsonProperty(value = "collation")
    private String collation;

    /*
     * SQL Server MAXDOP.
     */
    @JsonProperty(value = "maxDop")
    private Integer maxDop;

    /*
     * SQL Server Optimize for Adhoc workloads.
     */
    @JsonProperty(value = "isOptimizeForAdHocWorkloadsEnabled")
    private Boolean isOptimizeForAdHocWorkloadsEnabled;

    /*
     * SQL Server minimum memory.
     */
    @JsonProperty(value = "minServerMemoryMB")
    private Integer minServerMemoryMB;

    /*
     * SQL Server maximum memory.
     */
    @JsonProperty(value = "maxServerMemoryMB")
    private Integer maxServerMemoryMB;

    /*
     * SQL Server LPIM.
     */
    @JsonProperty(value = "isLpimEnabled")
    private Boolean isLpimEnabled;

    /*
     * SQL Server IFI.
     */
    @JsonProperty(value = "isIfiEnabled")
    private Boolean isIfiEnabled;

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

    /**
     * Get the collation property: SQL Server Collation.
     *
     * @return the collation value.
     */
    public String collation() {
        return this.collation;
    }

    /**
     * Set the collation property: SQL Server Collation.
     *
     * @param collation the collation value to set.
     * @return the SqlInstanceSettings object itself.
     */
    public SqlInstanceSettings withCollation(String collation) {
        this.collation = collation;
        return this;
    }

    /**
     * Get the maxDop property: SQL Server MAXDOP.
     *
     * @return the maxDop value.
     */
    public Integer maxDop() {
        return this.maxDop;
    }

    /**
     * Set the maxDop property: SQL Server MAXDOP.
     *
     * @param maxDop the maxDop value to set.
     * @return the SqlInstanceSettings object itself.
     */
    public SqlInstanceSettings withMaxDop(Integer maxDop) {
        this.maxDop = maxDop;
        return this;
    }

    /**
     * Get the isOptimizeForAdHocWorkloadsEnabled property: SQL Server Optimize for Adhoc workloads.
     *
     * @return the isOptimizeForAdHocWorkloadsEnabled value.
     */
    public Boolean isOptimizeForAdHocWorkloadsEnabled() {
        return this.isOptimizeForAdHocWorkloadsEnabled;
    }

    /**
     * Set the isOptimizeForAdHocWorkloadsEnabled property: SQL Server Optimize for Adhoc workloads.
     *
     * @param isOptimizeForAdHocWorkloadsEnabled the isOptimizeForAdHocWorkloadsEnabled value to set.
     * @return the SqlInstanceSettings object itself.
     */
    public SqlInstanceSettings withIsOptimizeForAdHocWorkloadsEnabled(Boolean isOptimizeForAdHocWorkloadsEnabled) {
        this.isOptimizeForAdHocWorkloadsEnabled = isOptimizeForAdHocWorkloadsEnabled;
        return this;
    }

    /**
     * Get the minServerMemoryMB property: SQL Server minimum memory.
     *
     * @return the minServerMemoryMB value.
     */
    public Integer minServerMemoryMB() {
        return this.minServerMemoryMB;
    }

    /**
     * Set the minServerMemoryMB property: SQL Server minimum memory.
     *
     * @param minServerMemoryMB the minServerMemoryMB value to set.
     * @return the SqlInstanceSettings object itself.
     */
    public SqlInstanceSettings withMinServerMemoryMB(Integer minServerMemoryMB) {
        this.minServerMemoryMB = minServerMemoryMB;
        return this;
    }

    /**
     * Get the maxServerMemoryMB property: SQL Server maximum memory.
     *
     * @return the maxServerMemoryMB value.
     */
    public Integer maxServerMemoryMB() {
        return this.maxServerMemoryMB;
    }

    /**
     * Set the maxServerMemoryMB property: SQL Server maximum memory.
     *
     * @param maxServerMemoryMB the maxServerMemoryMB value to set.
     * @return the SqlInstanceSettings object itself.
     */
    public SqlInstanceSettings withMaxServerMemoryMB(Integer maxServerMemoryMB) {
        this.maxServerMemoryMB = maxServerMemoryMB;
        return this;
    }

    /**
     * Get the isLpimEnabled property: SQL Server LPIM.
     *
     * @return the isLpimEnabled value.
     */
    public Boolean isLpimEnabled() {
        return this.isLpimEnabled;
    }

    /**
     * Set the isLpimEnabled property: SQL Server LPIM.
     *
     * @param isLpimEnabled the isLpimEnabled value to set.
     * @return the SqlInstanceSettings object itself.
     */
    public SqlInstanceSettings withIsLpimEnabled(Boolean isLpimEnabled) {
        this.isLpimEnabled = isLpimEnabled;
        return this;
    }

    /**
     * Get the isIfiEnabled property: SQL Server IFI.
     *
     * @return the isIfiEnabled value.
     */
    public Boolean isIfiEnabled() {
        return this.isIfiEnabled;
    }

    /**
     * Set the isIfiEnabled property: SQL Server IFI.
     *
     * @param isIfiEnabled the isIfiEnabled value to set.
     * @return the SqlInstanceSettings object itself.
     */
    public SqlInstanceSettings withIsIfiEnabled(Boolean isIfiEnabled) {
        this.isIfiEnabled = isIfiEnabled;
        return this;
    }

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