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

package com.azure.resourcemanager.machinelearning.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** The list of schedules to be applied on the computes. */
@Fluent
public final class ComputeSchedules {
    /*
     * The list of compute start stop schedules to be applied.
     */
    @JsonProperty(value = "computeStartStop")
    private List<ComputeStartStopSchedule> computeStartStop;

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

    /**
     * Get the computeStartStop property: The list of compute start stop schedules to be applied.
     *
     * @return the computeStartStop value.
     */
    public List<ComputeStartStopSchedule> computeStartStop() {
        return this.computeStartStop;
    }

    /**
     * Set the computeStartStop property: The list of compute start stop schedules to be applied.
     *
     * @param computeStartStop the computeStartStop value to set.
     * @return the ComputeSchedules object itself.
     */
    public ComputeSchedules withComputeStartStop(List<ComputeStartStopSchedule> computeStartStop) {
        this.computeStartStop = computeStartStop;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (computeStartStop() != null) {
            computeStartStop().forEach(e -> e.validate());
        }
    }
}
