// 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.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.

namespace Microsoft.Azure.Batch.Protocol.Models
{
    using System.Linq;

    /// <summary>
    /// A range of task IDs that a task can depend on. All tasks with IDs in
    /// the range must complete successfully before the dependent task can be
    /// scheduled.
    /// </summary>
    /// <remarks>
    /// The start and end of the range are inclusive. For example, if a range
    /// has start 9 and end 12, then it represents tasks '9', '10', '11' and
    /// '12'.
    /// </remarks>
    public partial class TaskIdRange
    {
        /// <summary>
        /// Initializes a new instance of the TaskIdRange class.
        /// </summary>
        public TaskIdRange() { }

        /// <summary>
        /// Initializes a new instance of the TaskIdRange class.
        /// </summary>
        /// <param name="start">The first task ID in the range.</param>
        /// <param name="end">The last task ID in the range.</param>
        public TaskIdRange(int start, int end)
        {
            this.Start = start;
            this.End = end;
        }

        /// <summary>
        /// Gets or sets the first task ID in the range.
        /// </summary>
        [Newtonsoft.Json.JsonProperty(PropertyName = "start")]
        public int Start { get; set; }

        /// <summary>
        /// Gets or sets the last task ID in the range.
        /// </summary>
        [Newtonsoft.Json.JsonProperty(PropertyName = "end")]
        public int End { get; set; }

        /// <summary>
        /// Validate the object.
        /// </summary>
        /// <exception cref="Microsoft.Rest.ValidationException">
        /// Thrown if validation fails
        /// </exception>
        public virtual void Validate()
        {
            //Nothing to validate
        }
    }
}
