/* 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>
    /// Response containing the updated device status or error details if the update failed.
    /// </summary>
    [System.CodeDom.Compiler.GeneratedCode("Azure.Iot.Operations.ProtocolCompilerLib", "1.0.0.0")]
    public partial class UpdateDeviceStatusResponsePayload : IJsonOnDeserialized, IJsonOnSerializing
    {
        /// <summary>
        /// The updated device status containing the specific inbound endpoint status as specified by the request.
        /// </summary>
        [JsonPropertyName("updatedDeviceStatus")]
        [JsonIgnore(Condition = JsonIgnoreCondition.Never)]
        [JsonRequired]
        public DeviceStatus UpdatedDeviceStatus { get; set; } = default!;

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

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