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

#nullable enable

using System;
using System.Collections.Generic;
using Azure.Iot.Operations.Protocol;
using Azure.Iot.Operations.Protocol.RPC;
using Azure.Iot.Operations.Protocol.Models;
using Azure.Iot.Operations.Services.EdgeRegistry.Generated.Common;

namespace Azure.Iot.Operations.Services.EdgeRegistry.Generated
{
    public static partial class EdgeRegistrySchemaExtensions
    {
        /// <summary>
        /// Specializes the <c>CommandInvoker</c> class for Command 'deleteSchemaVersion'.
        /// </summary>
        [CommandTopic("aio/registry/schemaExtension/delete/schemagroups/schemas/{ex:schemaId}/versions/{ex:versionId}")]
        public class DeleteSchemaVersionActionInvoker : CommandInvoker<DeleteSchemaVersionInputArguments, DeleteSchemaVersionResponseSchema>
        {
            /// <summary>
            /// Initializes a new instance of the <see cref="DeleteSchemaVersionActionInvoker"/> class.
            /// </summary>
            public DeleteSchemaVersionActionInvoker(ApplicationContext applicationContext, IMqttPubSubClient mqttClient)
                : base(applicationContext, mqttClient, "deleteSchemaVersion", new Utf8JsonSerializer())
            {
                this.ResponseTopicPrefix = "clients/{invokerClientId}"; // default value, can be overwritten by user code

                if (mqttClient.ClientId != null)
                {
                    TopicTokenMap["invokerClientId"] = mqttClient.ClientId;
                }
            }
        }
    }
}
