/* 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>
    /// The device status to update. Fields omitted in the request will be removed. The specified inbound endpoint status will be added or updated in the inbound endpoints map.
    /// </summary>
    [System.CodeDom.Compiler.GeneratedCode("Azure.Iot.Operations.ProtocolCompilerLib", "1.0.0.0")]
    public partial class UpdateDeviceStatusRequestPayload : IJsonOnDeserialized, IJsonOnSerializing
    {
        /// <summary>
        /// The 'deviceStatusUpdate' Field.
        /// </summary>
        [JsonPropertyName("deviceStatusUpdate")]
        [JsonIgnore(Condition = JsonIgnoreCondition.Never)]
        [JsonRequired]
        public DeviceStatus DeviceStatusUpdate { get; set; } = default!;

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

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