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

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

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

/** Properties of a schedules applicable to a virtual machine. */
@Fluent
public final class ApplicableSchedulePropertiesInner {
    /*
     * The auto-shutdown schedule, if one has been set at the lab or lab resource level.
     */
    @JsonProperty(value = "labVmsShutdown")
    private ScheduleInner labVmsShutdown;

    /*
     * The auto-startup schedule, if one has been set at the lab or lab resource level.
     */
    @JsonProperty(value = "labVmsStartup")
    private ScheduleInner labVmsStartup;

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

    /**
     * Get the labVmsShutdown property: The auto-shutdown schedule, if one has been set at the lab or lab resource
     * level.
     *
     * @return the labVmsShutdown value.
     */
    public ScheduleInner labVmsShutdown() {
        return this.labVmsShutdown;
    }

    /**
     * Set the labVmsShutdown property: The auto-shutdown schedule, if one has been set at the lab or lab resource
     * level.
     *
     * @param labVmsShutdown the labVmsShutdown value to set.
     * @return the ApplicableSchedulePropertiesInner object itself.
     */
    public ApplicableSchedulePropertiesInner withLabVmsShutdown(ScheduleInner labVmsShutdown) {
        this.labVmsShutdown = labVmsShutdown;
        return this;
    }

    /**
     * Get the labVmsStartup property: The auto-startup schedule, if one has been set at the lab or lab resource level.
     *
     * @return the labVmsStartup value.
     */
    public ScheduleInner labVmsStartup() {
        return this.labVmsStartup;
    }

    /**
     * Set the labVmsStartup property: The auto-startup schedule, if one has been set at the lab or lab resource level.
     *
     * @param labVmsStartup the labVmsStartup value to set.
     * @return the ApplicableSchedulePropertiesInner object itself.
     */
    public ApplicableSchedulePropertiesInner withLabVmsStartup(ScheduleInner labVmsStartup) {
        this.labVmsStartup = labVmsStartup;
        return this;
    }

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