/* 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.AssetAndDeviceRegistry.Generated.Common;

namespace Azure.Iot.Operations.Services.AssetAndDeviceRegistry.Generated.AdrBaseService
{
    /// <summary>
    /// Telemetry event emitted for reporting the runtime health of the specific inbound endpoint as specified in the topic.
    /// </summary>
    [System.CodeDom.Compiler.GeneratedCode("Azure.Iot.Operations.ProtocolCompilerLib", "1.0.0.0")]
    public partial class DeviceEndpointRuntimeHealthEventTelemetry : IJsonOnDeserialized, IJsonOnSerializing
    {
        /// <summary>
        /// Telemetry event emitted for reporting the runtime health of the specific inbound endpoint as specified in the topic.
        /// </summary>
        [JsonPropertyName("deviceEndpointRuntimeHealthEvent")]
        [JsonIgnore(Condition = JsonIgnoreCondition.Never)]
        [JsonRequired]
        public DeviceEndpointRuntimeHealthEventSchema DeviceEndpointRuntimeHealthEvent { get; set; } = default!;

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

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