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

package com.azure.resourcemanager.automation.models;

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

/** The properties of the create advanced schedule monthly occurrence. */
@Fluent
public final class AdvancedScheduleMonthlyOccurrence {
    /*
     * Occurrence of the week within the month. Must be between 1 and 5
     */
    @JsonProperty(value = "occurrence")
    private Integer occurrence;

    /*
     * Day of the occurrence. Must be one of monday, tuesday, wednesday, thursday, friday, saturday, sunday.
     */
    @JsonProperty(value = "day")
    private ScheduleDay day;

    /**
     * Get the occurrence property: Occurrence of the week within the month. Must be between 1 and 5.
     *
     * @return the occurrence value.
     */
    public Integer occurrence() {
        return this.occurrence;
    }

    /**
     * Set the occurrence property: Occurrence of the week within the month. Must be between 1 and 5.
     *
     * @param occurrence the occurrence value to set.
     * @return the AdvancedScheduleMonthlyOccurrence object itself.
     */
    public AdvancedScheduleMonthlyOccurrence withOccurrence(Integer occurrence) {
        this.occurrence = occurrence;
        return this;
    }

    /**
     * Get the day property: Day of the occurrence. Must be one of monday, tuesday, wednesday, thursday, friday,
     * saturday, sunday.
     *
     * @return the day value.
     */
    public ScheduleDay day() {
        return this.day;
    }

    /**
     * Set the day property: Day of the occurrence. Must be one of monday, tuesday, wednesday, thursday, friday,
     * saturday, sunday.
     *
     * @param day the day value to set.
     * @return the AdvancedScheduleMonthlyOccurrence object itself.
     */
    public AdvancedScheduleMonthlyOccurrence withDay(ScheduleDay day) {
        this.day = day;
        return this;
    }

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