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

package com.azure.resourcemanager.storagecache.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;

/** Cache Upgrade Settings. */
@Fluent
public final class CacheUpgradeSettings {
    /*
     * True if the user chooses to select an installation time between now and firmwareUpdateDeadline. Else the
     * firmware will automatically be installed after firmwareUpdateDeadline if not triggered earlier via the upgrade
     * operation.
     */
    @JsonProperty(value = "upgradeScheduleEnabled")
    private Boolean upgradeScheduleEnabled;

    /*
     * When upgradeScheduleEnabled is true, this field holds the user-chosen upgrade time. At the user-chosen time, the
     * firmware update will automatically be installed on the cache.
     */
    @JsonProperty(value = "scheduledTime")
    private OffsetDateTime scheduledTime;

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

    /**
     * Get the upgradeScheduleEnabled property: True if the user chooses to select an installation time between now and
     * firmwareUpdateDeadline. Else the firmware will automatically be installed after firmwareUpdateDeadline if not
     * triggered earlier via the upgrade operation.
     *
     * @return the upgradeScheduleEnabled value.
     */
    public Boolean upgradeScheduleEnabled() {
        return this.upgradeScheduleEnabled;
    }

    /**
     * Set the upgradeScheduleEnabled property: True if the user chooses to select an installation time between now and
     * firmwareUpdateDeadline. Else the firmware will automatically be installed after firmwareUpdateDeadline if not
     * triggered earlier via the upgrade operation.
     *
     * @param upgradeScheduleEnabled the upgradeScheduleEnabled value to set.
     * @return the CacheUpgradeSettings object itself.
     */
    public CacheUpgradeSettings withUpgradeScheduleEnabled(Boolean upgradeScheduleEnabled) {
        this.upgradeScheduleEnabled = upgradeScheduleEnabled;
        return this;
    }

    /**
     * Get the scheduledTime property: When upgradeScheduleEnabled is true, this field holds the user-chosen upgrade
     * time. At the user-chosen time, the firmware update will automatically be installed on the cache.
     *
     * @return the scheduledTime value.
     */
    public OffsetDateTime scheduledTime() {
        return this.scheduledTime;
    }

    /**
     * Set the scheduledTime property: When upgradeScheduleEnabled is true, this field holds the user-chosen upgrade
     * time. At the user-chosen time, the firmware update will automatically be installed on the cache.
     *
     * @param scheduledTime the scheduledTime value to set.
     * @return the CacheUpgradeSettings object itself.
     */
    public CacheUpgradeSettings withScheduledTime(OffsetDateTime scheduledTime) {
        this.scheduledTime = scheduledTime;
        return this;
    }

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