/* Code generated by Azure.Iot.Operations.ProtocolCompilerLib v1.0.0.0; DO NOT EDIT. */

#nullable enable

using System;
using System.Collections.Generic;
using System.Text.Json.Serialization;
using Azure.Iot.Operations.Services.EdgeRegistry.Host.Generated.Common;

namespace Azure.Iot.Operations.Services.EdgeRegistry.Host.Generated
{
    /// <summary>
    /// List of Version XIDs within the provided constraints with the specified label.
    /// </summary>
    [System.CodeDom.Compiler.GeneratedCode("Azure.Iot.Operations.ProtocolCompilerLib", "1.0.0.0")]
    public partial class VersionXidList : IJsonOnDeserialized, IJsonOnSerializing
    {
        /// <summary>
        /// List of Version XID components.
        /// </summary>
        [JsonPropertyName("versions")]
        [JsonIgnore(Condition = JsonIgnoreCondition.Never)]
        [JsonRequired]
        public List<VersionXid> Versions { get; set; } = default!;

        void IJsonOnDeserialized.OnDeserialized()
        {
            if (Versions is null)
            {
                throw new ArgumentNullException("versions field cannot be null");
            }
        }

        void IJsonOnSerializing.OnSerializing()
        {
            if (Versions is null)
            {
                throw new ArgumentNullException("versions field cannot be null");
            }
        }
    }
}
