using System;
using System.Collections.Generic;
using UnityEngine;
/// 
/// This class contains a collection of  objects.
/// 
[Serializable]
public class MaxSegmentCollection
{
    [SerializeField] private List segments;
    private MaxSegmentCollection(MaxSegmentCollectionBuilder maxSegmentCollectionBuilder)
    {
        segments = maxSegmentCollectionBuilder.segments;
    }
    /// The list of  in the 
    public List GetSegments()
    {
        return segments;
    }
    public static MaxSegmentCollectionBuilder Builder()
    {
        return new MaxSegmentCollectionBuilder();
    }
    /// 
    /// Builder class for MaxSegmentCollection.
    /// 
    public class MaxSegmentCollectionBuilder
    {
        internal readonly List segments = new List();
        internal MaxSegmentCollectionBuilder() { }
        /// 
        /// Adds a MaxSegment to the collection.
        /// 
        /// The MaxSegment to add.
        /// The MaxSegmentCollectionBuilder instance for chaining.
        public MaxSegmentCollectionBuilder AddSegment(MaxSegment segment)
        {
            segments.Add(segment);
            return this;
        }
        /// 
        /// Builds and returns the MaxSegmentCollection.
        /// 
        /// The constructed MaxSegmentCollection.
        public MaxSegmentCollection Build()
        {
            return new MaxSegmentCollection(this);
        }
    }
}
/// 
/// This class encapsulates a key-value pair, where the key is an int and the value is a List<int>.
/// 
[Serializable]
public class MaxSegment
{
    [SerializeField] private int key;
    [SerializeField] private List values;
    /// 
    /// Initializes a new  with the specified key and value(s).
    /// 
    /// The key of the segment. Must be a non-negative number in the range of [0, 32000].
    /// The values(s) associated with the key. Each value must be a non-negative number in the range of [0, 32000].
    public MaxSegment(int key, List values)
    {
        this.key = key;
        this.values = values;
    }
    /// The key of the segment. Must be a non-negative number in the range of [0, 32000].
    public int GetKey()
    {
        return key;
    }
    /// The value(s) associated with the key. Each value must be a non-negative number in the range of [0, 32000].
    public List GetValues()
    {
        return values;
    }
}