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

#nullable enable

namespace TestEnvoys.Math
{
    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 Math
    {
        /// <summary>
        /// Specializes the <c>CommandInvoker</c> class for Command 'getRandom'.
        /// </summary>
        public class GetRandomCommandInvoker : CommandInvoker<Google.Protobuf.WellKnownTypes.Empty, GetRandomResponsePayload>
        {
            /// <summary>
            /// Initializes a new instance of the <see cref="GetRandomCommandInvoker"/> class.
            /// </summary>
            public GetRandomCommandInvoker(ApplicationContext applicationContext, IMqttPubSubClient mqttClient)
                : base(applicationContext, mqttClient, "getRandom", new ProtobufSerializer<Google.Protobuf.WellKnownTypes.Empty, GetRandomResponsePayload>())
            {
                this.ResponseTopicPrefix = "clients/{invokerClientId}"; // default value, can be overwritten by user code

                TopicTokenMap["modelId"] = "dtmi:rpc:samples:math;1";
                if (mqttClient.ClientId != null)
                {
                    TopicTokenMap["invokerClientId"] = mqttClient.ClientId;
                }
                TopicTokenMap["commandName"] = "getRandom";
            }
        }
    }
}
