/**
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Licensed under the MIT License. See License.txt in the project root for
 * license information.
 *
 * Code generated by Microsoft (R) AutoRest Code Generator.
 */

package com.microsoft.azure.batch.protocol.models;

import java.util.List;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * Specifies any dependencies of a Task. Any Task that is explicitly specified
 * or within a dependency range must complete before the dependant Task will be
 * scheduled.
 */
public class TaskDependencies {
    /**
     * The list of Task IDs that this Task depends on. All Tasks in this list
     * must complete successfully before the dependent Task can be scheduled.
     * The taskIds collection is limited to 64000 characters total (i.e. the
     * combined length of all Task IDs). If the taskIds collection exceeds the
     * maximum length, the Add Task request fails with error code
     * TaskDependencyListTooLong. In this case consider using Task ID ranges
     * instead.
     */
    @JsonProperty(value = "taskIds")
    private List<String> taskIds;

    /**
     * The list of Task ID ranges that this Task depends on. All Tasks in all
     * ranges must complete successfully before the dependent Task can be
     * scheduled.
     */
    @JsonProperty(value = "taskIdRanges")
    private List<TaskIdRange> taskIdRanges;

    /**
     * Get the taskIds collection is limited to 64000 characters total (i.e. the combined length of all Task IDs). If the taskIds collection exceeds the maximum length, the Add Task request fails with error code TaskDependencyListTooLong. In this case consider using Task ID ranges instead.
     *
     * @return the taskIds value
     */
    public List<String> taskIds() {
        return this.taskIds;
    }

    /**
     * Set the taskIds collection is limited to 64000 characters total (i.e. the combined length of all Task IDs). If the taskIds collection exceeds the maximum length, the Add Task request fails with error code TaskDependencyListTooLong. In this case consider using Task ID ranges instead.
     *
     * @param taskIds the taskIds value to set
     * @return the TaskDependencies object itself.
     */
    public TaskDependencies withTaskIds(List<String> taskIds) {
        this.taskIds = taskIds;
        return this;
    }

    /**
     * Get the taskIdRanges value.
     *
     * @return the taskIdRanges value
     */
    public List<TaskIdRange> taskIdRanges() {
        return this.taskIdRanges;
    }

    /**
     * Set the taskIdRanges value.
     *
     * @param taskIdRanges the taskIdRanges value to set
     * @return the TaskDependencies object itself.
     */
    public TaskDependencies withTaskIdRanges(List<TaskIdRange> taskIdRanges) {
        this.taskIdRanges = taskIdRanges;
        return this;
    }

}
