// 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;

/** Configure SQL best practices Assessment for databases in your SQL virtual machine. */
@Fluent
public final class AssessmentSettings {
    /*
     * Enable or disable SQL best practices Assessment feature on SQL virtual machine.
     */
    @JsonProperty(value = "enable")
    private Boolean enable;

    /*
     * Run SQL best practices Assessment immediately on SQL virtual machine.
     */
    @JsonProperty(value = "runImmediately")
    private Boolean runImmediately;

    /*
     * Schedule for SQL best practices Assessment.
     */
    @JsonProperty(value = "schedule")
    private Schedule schedule;

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

    /**
     * Get the enable property: Enable or disable SQL best practices Assessment feature on SQL virtual machine.
     *
     * @return the enable value.
     */
    public Boolean enable() {
        return this.enable;
    }

    /**
     * Set the enable property: Enable or disable SQL best practices Assessment feature on SQL virtual machine.
     *
     * @param enable the enable value to set.
     * @return the AssessmentSettings object itself.
     */
    public AssessmentSettings withEnable(Boolean enable) {
        this.enable = enable;
        return this;
    }

    /**
     * Get the runImmediately property: Run SQL best practices Assessment immediately on SQL virtual machine.
     *
     * @return the runImmediately value.
     */
    public Boolean runImmediately() {
        return this.runImmediately;
    }

    /**
     * Set the runImmediately property: Run SQL best practices Assessment immediately on SQL virtual machine.
     *
     * @param runImmediately the runImmediately value to set.
     * @return the AssessmentSettings object itself.
     */
    public AssessmentSettings withRunImmediately(Boolean runImmediately) {
        this.runImmediately = runImmediately;
        return this;
    }

    /**
     * Get the schedule property: Schedule for SQL best practices Assessment.
     *
     * @return the schedule value.
     */
    public Schedule schedule() {
        return this.schedule;
    }

    /**
     * Set the schedule property: Schedule for SQL best practices Assessment.
     *
     * @param schedule the schedule value to set.
     * @return the AssessmentSettings object itself.
     */
    public AssessmentSettings withSchedule(Schedule schedule) {
        this.schedule = schedule;
        return this;
    }

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