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

package com.azure.resourcemanager.recoveryservicesbackup.models;

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

/** The HourlySchedule model. */
@Fluent
public final class HourlySchedule {
    /*
     * Interval at which backup needs to be triggered. For hourly the value
     * can be 4/6/8/12
     */
    @JsonProperty(value = "interval")
    private Integer interval;

    /*
     * To specify start time of the backup window
     */
    @JsonProperty(value = "scheduleWindowStartTime")
    private OffsetDateTime scheduleWindowStartTime;

    /*
     * To specify duration of the backup window
     */
    @JsonProperty(value = "scheduleWindowDuration")
    private Integer scheduleWindowDuration;

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

    /**
     * Get the interval property: Interval at which backup needs to be triggered. For hourly the value can be 4/6/8/12.
     *
     * @return the interval value.
     */
    public Integer interval() {
        return this.interval;
    }

    /**
     * Set the interval property: Interval at which backup needs to be triggered. For hourly the value can be 4/6/8/12.
     *
     * @param interval the interval value to set.
     * @return the HourlySchedule object itself.
     */
    public HourlySchedule withInterval(Integer interval) {
        this.interval = interval;
        return this;
    }

    /**
     * Get the scheduleWindowStartTime property: To specify start time of the backup window.
     *
     * @return the scheduleWindowStartTime value.
     */
    public OffsetDateTime scheduleWindowStartTime() {
        return this.scheduleWindowStartTime;
    }

    /**
     * Set the scheduleWindowStartTime property: To specify start time of the backup window.
     *
     * @param scheduleWindowStartTime the scheduleWindowStartTime value to set.
     * @return the HourlySchedule object itself.
     */
    public HourlySchedule withScheduleWindowStartTime(OffsetDateTime scheduleWindowStartTime) {
        this.scheduleWindowStartTime = scheduleWindowStartTime;
        return this;
    }

    /**
     * Get the scheduleWindowDuration property: To specify duration of the backup window.
     *
     * @return the scheduleWindowDuration value.
     */
    public Integer scheduleWindowDuration() {
        return this.scheduleWindowDuration;
    }

    /**
     * Set the scheduleWindowDuration property: To specify duration of the backup window.
     *
     * @param scheduleWindowDuration the scheduleWindowDuration value to set.
     * @return the HourlySchedule object itself.
     */
    public HourlySchedule withScheduleWindowDuration(Integer scheduleWindowDuration) {
        this.scheduleWindowDuration = scheduleWindowDuration;
        return this;
    }

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