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

package com.azure.resourcemanager.devcenter.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.devcenter.models.ScheduleEnableStatus;
import com.azure.resourcemanager.devcenter.models.ScheduledFrequency;
import com.azure.resourcemanager.devcenter.models.ScheduledType;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Updatable properties of a Schedule. */
@Fluent
public class ScheduleUpdateProperties {
    /*
     * Supported type this scheduled task represents.
     */
    @JsonProperty(value = "type")
    private ScheduledType type;

    /*
     * The frequency of this scheduled task.
     */
    @JsonProperty(value = "frequency")
    private ScheduledFrequency frequency;

    /*
     * The target time to trigger the action. The format is HH:MM.
     */
    @JsonProperty(value = "time")
    private String time;

    /*
     * The IANA timezone id at which the schedule should execute.
     */
    @JsonProperty(value = "timeZone")
    private String timeZone;

    /*
     * Indicates whether or not this scheduled task is enabled.
     */
    @JsonProperty(value = "state")
    private ScheduleEnableStatus state;

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

    /**
     * Get the type property: Supported type this scheduled task represents.
     *
     * @return the type value.
     */
    public ScheduledType type() {
        return this.type;
    }

    /**
     * Set the type property: Supported type this scheduled task represents.
     *
     * @param type the type value to set.
     * @return the ScheduleUpdateProperties object itself.
     */
    public ScheduleUpdateProperties withType(ScheduledType type) {
        this.type = type;
        return this;
    }

    /**
     * Get the frequency property: The frequency of this scheduled task.
     *
     * @return the frequency value.
     */
    public ScheduledFrequency frequency() {
        return this.frequency;
    }

    /**
     * Set the frequency property: The frequency of this scheduled task.
     *
     * @param frequency the frequency value to set.
     * @return the ScheduleUpdateProperties object itself.
     */
    public ScheduleUpdateProperties withFrequency(ScheduledFrequency frequency) {
        this.frequency = frequency;
        return this;
    }

    /**
     * Get the time property: The target time to trigger the action. The format is HH:MM.
     *
     * @return the time value.
     */
    public String time() {
        return this.time;
    }

    /**
     * Set the time property: The target time to trigger the action. The format is HH:MM.
     *
     * @param time the time value to set.
     * @return the ScheduleUpdateProperties object itself.
     */
    public ScheduleUpdateProperties withTime(String time) {
        this.time = time;
        return this;
    }

    /**
     * Get the timeZone property: The IANA timezone id at which the schedule should execute.
     *
     * @return the timeZone value.
     */
    public String timeZone() {
        return this.timeZone;
    }

    /**
     * Set the timeZone property: The IANA timezone id at which the schedule should execute.
     *
     * @param timeZone the timeZone value to set.
     * @return the ScheduleUpdateProperties object itself.
     */
    public ScheduleUpdateProperties withTimeZone(String timeZone) {
        this.timeZone = timeZone;
        return this;
    }

    /**
     * Get the state property: Indicates whether or not this scheduled task is enabled.
     *
     * @return the state value.
     */
    public ScheduleEnableStatus state() {
        return this.state;
    }

    /**
     * Set the state property: Indicates whether or not this scheduled task is enabled.
     *
     * @param state the state value to set.
     * @return the ScheduleUpdateProperties object itself.
     */
    public ScheduleUpdateProperties withState(ScheduleEnableStatus state) {
        this.state = state;
        return this;
    }

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