/* 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 Resource 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 ResourceXidList : IJsonOnDeserialized, IJsonOnSerializing
    {
        /// <summary>
        /// List of Resource XID components.
        /// </summary>
        [JsonPropertyName("resources")]
        [JsonIgnore(Condition = JsonIgnoreCondition.Never)]
        [JsonRequired]
        public List<ResourceXid> Resources { get; set; } = default!;

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

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