/* Code generated by Azure.Iot.Operations.ProtocolCompilerLib v0.10.0.0; DO NOT EDIT. */

#nullable enable

namespace TestEnvoys.Memmon
{
    using System;
    using System.Collections.Generic;
    using Azure.Iot.Operations.Protocol;
    using Azure.Iot.Operations.Protocol.RPC;
    using Azure.Iot.Operations.Protocol.Models;
    using TestEnvoys;

    public static partial class Memmon
    {
        /// <summary>
        /// Specializes the <c>CommandInvoker</c> class for Command 'getRuntimeStats'.
        /// </summary>
        public class GetRuntimeStatsCommandInvoker : CommandInvoker<GetRuntimeStatsRequestPayload, GetRuntimeStatsResponsePayload>
        {
            /// <summary>
            /// Initializes a new instance of the <see cref="GetRuntimeStatsCommandInvoker"/> class.
            /// </summary>
            public GetRuntimeStatsCommandInvoker(ApplicationContext applicationContext, IMqttPubSubClient mqttClient)
                : base(applicationContext, mqttClient, "getRuntimeStats", new AvroSerializer<GetRuntimeStatsRequestPayload, GetRuntimeStatsResponsePayload>())
            {
                this.ResponseTopicPrefix = "clients/{invokerClientId}"; // default value, can be overwritten by user code

                TopicTokenMap["modelId"] = "dtmi:akri:samples:memmon;1";
                if (mqttClient.ClientId != null)
                {
                    TopicTokenMap["invokerClientId"] = mqttClient.ClientId;
                }
                TopicTokenMap["commandName"] = "getRuntimeStats";
            }
        }
    }
}
