// <auto-generated>
//     Generated by the protocol buffer compiler.  DO NOT EDIT!
//     source: api/device_profile_template.proto
// </auto-generated>
#pragma warning disable 1591, 0612, 3021, 8981
#region Designer generated code

using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf.Collections;
using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
namespace Chirpstack.Api {

  /// <summary>Holder for reflection information generated from api/device_profile_template.proto</summary>
  public static partial class DeviceProfileTemplateReflection {

    #region Descriptor
    /// <summary>File descriptor for api/device_profile_template.proto</summary>
    public static pbr::FileDescriptor Descriptor {
      get { return descriptor; }
    }
    private static pbr::FileDescriptor descriptor;

    static DeviceProfileTemplateReflection() {
      byte[] descriptorData = global::System.Convert.FromBase64String(
          string.Concat(
            "CiFhcGkvZGV2aWNlX3Byb2ZpbGVfdGVtcGxhdGUucHJvdG8SA2FwaRocZ29v",
            "Z2xlL2FwaS9hbm5vdGF0aW9ucy5wcm90bxofZ29vZ2xlL3Byb3RvYnVmL3Rp",
            "bWVzdGFtcC5wcm90bxobZ29vZ2xlL3Byb3RvYnVmL2VtcHR5LnByb3RvGhNj",
            "b21tb24vY29tbW9uLnByb3RvGhhhcGkvZGV2aWNlX3Byb2ZpbGUucHJvdG8i",
            "9gcKFURldmljZVByb2ZpbGVUZW1wbGF0ZRIKCgJpZBgBIAEoCRIMCgRuYW1l",
            "GAIgASgJEhMKC2Rlc2NyaXB0aW9uGAMgASgJEg4KBnZlbmRvchgEIAEoCRIQ",
            "CghmaXJtd2FyZRgFIAEoCRIeCgZyZWdpb24YBiABKA4yDi5jb21tb24uUmVn",
            "aW9uEicKC21hY192ZXJzaW9uGAcgASgOMhIuY29tbW9uLk1hY1ZlcnNpb24S",
            "NgoTcmVnX3BhcmFtc19yZXZpc2lvbhgIIAEoDjIZLmNvbW1vbi5SZWdQYXJh",
            "bXNSZXZpc2lvbhIYChBhZHJfYWxnb3JpdGhtX2lkGAkgASgJEjAKFXBheWxv",
            "YWRfY29kZWNfcnVudGltZRgKIAEoDjIRLmFwaS5Db2RlY1J1bnRpbWUSHAoU",
            "cGF5bG9hZF9jb2RlY19zY3JpcHQYCyABKAkSHwoXZmx1c2hfcXVldWVfb25f",
            "YWN0aXZhdGUYDCABKAgSFwoPdXBsaW5rX2ludGVydmFsGA0gASgNEiIKGmRl",
            "dmljZV9zdGF0dXNfcmVxX2ludGVydmFsGA4gASgNEhUKDXN1cHBvcnRzX290",
            "YWEYDyABKAgSGAoQc3VwcG9ydHNfY2xhc3NfYhgQIAEoCBIYChBzdXBwb3J0",
            "c19jbGFzc19jGBEgASgIEhcKD2NsYXNzX2JfdGltZW91dBgSIAEoDRIeChZj",
            "bGFzc19iX3Bpbmdfc2xvdF9uYl9rGBMgASgNEhwKFGNsYXNzX2JfcGluZ19z",
            "bG90X2RyGBQgASgNEh4KFmNsYXNzX2JfcGluZ19zbG90X2ZyZXEYFSABKA0S",
            "FwoPY2xhc3NfY190aW1lb3V0GBYgASgNEhUKDWFicF9yeDFfZGVsYXkYFyAB",
            "KA0SGQoRYWJwX3J4MV9kcl9vZmZzZXQYGCABKA0SEgoKYWJwX3J4Ml9kchgZ",
            "IAEoDRIUCgxhYnBfcngyX2ZyZXEYGiABKA0SMgoEdGFncxgbIAMoCzIkLmFw",
            "aS5EZXZpY2VQcm9maWxlVGVtcGxhdGUuVGFnc0VudHJ5EkIKDG1lYXN1cmVt",
            "ZW50cxgcIAMoCzIsLmFwaS5EZXZpY2VQcm9maWxlVGVtcGxhdGUuTWVhc3Vy",
            "ZW1lbnRzRW50cnkSIAoYYXV0b19kZXRlY3RfbWVhc3VyZW1lbnRzGB0gASgI",
            "GisKCVRhZ3NFbnRyeRILCgNrZXkYASABKAkSDQoFdmFsdWUYAiABKAk6AjgB",
            "GkUKEU1lYXN1cmVtZW50c0VudHJ5EgsKA2tleRgBIAEoCRIfCgV2YWx1ZRgC",
            "IAEoCzIQLmFwaS5NZWFzdXJlbWVudDoCOAEihwMKHURldmljZVByb2ZpbGVU",
            "ZW1wbGF0ZUxpc3RJdGVtEgoKAmlkGAEgASgJEi4KCmNyZWF0ZWRfYXQYAiAB",
            "KAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEi4KCnVwZGF0ZWRfYXQY",
            "AyABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEgwKBG5hbWUYBCAB",
            "KAkSDgoGdmVuZG9yGAUgASgJEhAKCGZpcm13YXJlGAYgASgJEh4KBnJlZ2lv",
            "bhgHIAEoDjIOLmNvbW1vbi5SZWdpb24SJwoLbWFjX3ZlcnNpb24YCCABKA4y",
            "Ei5jb21tb24uTWFjVmVyc2lvbhI2ChNyZWdfcGFyYW1zX3JldmlzaW9uGAkg",
            "ASgOMhkuY29tbW9uLlJlZ1BhcmFtc1JldmlzaW9uEhUKDXN1cHBvcnRzX290",
            "YWEYCiABKAgSGAoQc3VwcG9ydHNfY2xhc3NfYhgLIAEoCBIYChBzdXBwb3J0",
            "c19jbGFzc19jGAwgASgIImEKIkNyZWF0ZURldmljZVByb2ZpbGVUZW1wbGF0",
            "ZVJlcXVlc3QSOwoXZGV2aWNlX3Byb2ZpbGVfdGVtcGxhdGUYASABKAsyGi5h",
            "cGkuRGV2aWNlUHJvZmlsZVRlbXBsYXRlIi0KH0dldERldmljZVByb2ZpbGVU",
            "ZW1wbGF0ZVJlcXVlc3QSCgoCaWQYASABKAkivwEKIEdldERldmljZVByb2Zp",
            "bGVUZW1wbGF0ZVJlc3BvbnNlEjsKF2RldmljZV9wcm9maWxlX3RlbXBsYXRl",
            "GAEgASgLMhouYXBpLkRldmljZVByb2ZpbGVUZW1wbGF0ZRIuCgpjcmVhdGVk",
            "X2F0GAIgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcBIuCgp1cGRh",
            "dGVkX2F0GAMgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcCJhCiJV",
            "cGRhdGVEZXZpY2VQcm9maWxlVGVtcGxhdGVSZXF1ZXN0EjsKF2RldmljZV9w",
            "cm9maWxlX3RlbXBsYXRlGAEgASgLMhouYXBpLkRldmljZVByb2ZpbGVUZW1w",
            "bGF0ZSIwCiJEZWxldGVEZXZpY2VQcm9maWxlVGVtcGxhdGVSZXF1ZXN0EgoK",
            "AmlkGAEgASgJIkIKIUxpc3REZXZpY2VQcm9maWxlVGVtcGxhdGVzUmVxdWVz",
            "dBINCgVsaW1pdBgBIAEoDRIOCgZvZmZzZXQYAiABKA0ibQoiTGlzdERldmlj",
            "ZVByb2ZpbGVUZW1wbGF0ZXNSZXNwb25zZRITCgt0b3RhbF9jb3VudBgBIAEo",
            "DRIyCgZyZXN1bHQYAiADKAsyIi5hcGkuRGV2aWNlUHJvZmlsZVRlbXBsYXRl",
            "TGlzdEl0ZW0ynQUKHERldmljZVByb2ZpbGVUZW1wbGF0ZVNlcnZpY2UScwoG",
            "Q3JlYXRlEicuYXBpLkNyZWF0ZURldmljZVByb2ZpbGVUZW1wbGF0ZVJlcXVl",
            "c3QaFi5nb29nbGUucHJvdG9idWYuRW1wdHkiKILT5JMCIiIdL2FwaS9kZXZp",
            "Y2UtcHJvZmlsZS10ZW1wbGF0ZXM6ASoSfgoDR2V0EiQuYXBpLkdldERldmlj",
            "ZVByb2ZpbGVUZW1wbGF0ZVJlcXVlc3QaJS5hcGkuR2V0RGV2aWNlUHJvZmls",
            "ZVRlbXBsYXRlUmVzcG9uc2UiKoLT5JMCJBIiL2FwaS9kZXZpY2UtcHJvZmls",
            "ZS10ZW1wbGF0ZXMve2lkfRKQAQoGVXBkYXRlEicuYXBpLlVwZGF0ZURldmlj",
            "ZVByb2ZpbGVUZW1wbGF0ZVJlcXVlc3QaFi5nb29nbGUucHJvdG9idWYuRW1w",
            "dHkiRYLT5JMCPxo6L2FwaS9kZXZpY2UtcHJvZmlsZS10ZW1wbGF0ZXMve2Rl",
            "dmljZV9wcm9maWxlX3RlbXBsYXRlLmlkfToBKhJ1CgZEZWxldGUSJy5hcGku",
            "RGVsZXRlRGV2aWNlUHJvZmlsZVRlbXBsYXRlUmVxdWVzdBoWLmdvb2dsZS5w",
            "cm90b2J1Zi5FbXB0eSIqgtPkkwIkKiIvYXBpL2RldmljZS1wcm9maWxlLXRl",
            "bXBsYXRlcy97aWR9En4KBExpc3QSJi5hcGkuTGlzdERldmljZVByb2ZpbGVU",
            "ZW1wbGF0ZXNSZXF1ZXN0GicuYXBpLkxpc3REZXZpY2VQcm9maWxlVGVtcGxh",
            "dGVzUmVzcG9uc2UiJYLT5JMCHxIdL2FwaS9kZXZpY2UtcHJvZmlsZS10ZW1w",
            "bGF0ZXNCcgoRaW8uY2hpcnBzdGFjay5hcGlCGkRldmljZVByb2ZpbGVUZW1w",
            "bGF0ZVByb3RvUAFaLmdpdGh1Yi5jb20vY2hpcnBzdGFjay9jaGlycHN0YWNr",
            "L2FwaS9nby92NC9hcGmqAg5DaGlycHN0YWNrLkFwaWIGcHJvdG8z"));
      descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
          new pbr::FileDescriptor[] { global::Google.Api.AnnotationsReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.TimestampReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.EmptyReflection.Descriptor, global::Chirpstack.Common.CommonReflection.Descriptor, global::Chirpstack.Api.DeviceProfileReflection.Descriptor, },
          new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
            new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Api.DeviceProfileTemplate), global::Chirpstack.Api.DeviceProfileTemplate.Parser, new[]{ "Id", "Name", "Description", "Vendor", "Firmware", "Region", "MacVersion", "RegParamsRevision", "AdrAlgorithmId", "PayloadCodecRuntime", "PayloadCodecScript", "FlushQueueOnActivate", "UplinkInterval", "DeviceStatusReqInterval", "SupportsOtaa", "SupportsClassB", "SupportsClassC", "ClassBTimeout", "ClassBPingSlotNbK", "ClassBPingSlotDr", "ClassBPingSlotFreq", "ClassCTimeout", "AbpRx1Delay", "AbpRx1DrOffset", "AbpRx2Dr", "AbpRx2Freq", "Tags", "Measurements", "AutoDetectMeasurements" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, null, }),
            new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Api.DeviceProfileTemplateListItem), global::Chirpstack.Api.DeviceProfileTemplateListItem.Parser, new[]{ "Id", "CreatedAt", "UpdatedAt", "Name", "Vendor", "Firmware", "Region", "MacVersion", "RegParamsRevision", "SupportsOtaa", "SupportsClassB", "SupportsClassC" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Api.CreateDeviceProfileTemplateRequest), global::Chirpstack.Api.CreateDeviceProfileTemplateRequest.Parser, new[]{ "DeviceProfileTemplate" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Api.GetDeviceProfileTemplateRequest), global::Chirpstack.Api.GetDeviceProfileTemplateRequest.Parser, new[]{ "Id" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Api.GetDeviceProfileTemplateResponse), global::Chirpstack.Api.GetDeviceProfileTemplateResponse.Parser, new[]{ "DeviceProfileTemplate", "CreatedAt", "UpdatedAt" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Api.UpdateDeviceProfileTemplateRequest), global::Chirpstack.Api.UpdateDeviceProfileTemplateRequest.Parser, new[]{ "DeviceProfileTemplate" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Api.DeleteDeviceProfileTemplateRequest), global::Chirpstack.Api.DeleteDeviceProfileTemplateRequest.Parser, new[]{ "Id" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Api.ListDeviceProfileTemplatesRequest), global::Chirpstack.Api.ListDeviceProfileTemplatesRequest.Parser, new[]{ "Limit", "Offset" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Api.ListDeviceProfileTemplatesResponse), global::Chirpstack.Api.ListDeviceProfileTemplatesResponse.Parser, new[]{ "TotalCount", "Result" }, null, null, null, null)
          }));
    }
    #endregion

  }
  #region Messages
  public sealed partial class DeviceProfileTemplate : pb::IMessage<DeviceProfileTemplate>
  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      , pb::IBufferMessage
  #endif
  {
    private static readonly pb::MessageParser<DeviceProfileTemplate> _parser = new pb::MessageParser<DeviceProfileTemplate>(() => new DeviceProfileTemplate());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pb::MessageParser<DeviceProfileTemplate> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::Chirpstack.Api.DeviceProfileTemplateReflection.Descriptor.MessageTypes[0]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public DeviceProfileTemplate() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public DeviceProfileTemplate(DeviceProfileTemplate other) : this() {
      id_ = other.id_;
      name_ = other.name_;
      description_ = other.description_;
      vendor_ = other.vendor_;
      firmware_ = other.firmware_;
      region_ = other.region_;
      macVersion_ = other.macVersion_;
      regParamsRevision_ = other.regParamsRevision_;
      adrAlgorithmId_ = other.adrAlgorithmId_;
      payloadCodecRuntime_ = other.payloadCodecRuntime_;
      payloadCodecScript_ = other.payloadCodecScript_;
      flushQueueOnActivate_ = other.flushQueueOnActivate_;
      uplinkInterval_ = other.uplinkInterval_;
      deviceStatusReqInterval_ = other.deviceStatusReqInterval_;
      supportsOtaa_ = other.supportsOtaa_;
      supportsClassB_ = other.supportsClassB_;
      supportsClassC_ = other.supportsClassC_;
      classBTimeout_ = other.classBTimeout_;
      classBPingSlotNbK_ = other.classBPingSlotNbK_;
      classBPingSlotDr_ = other.classBPingSlotDr_;
      classBPingSlotFreq_ = other.classBPingSlotFreq_;
      classCTimeout_ = other.classCTimeout_;
      abpRx1Delay_ = other.abpRx1Delay_;
      abpRx1DrOffset_ = other.abpRx1DrOffset_;
      abpRx2Dr_ = other.abpRx2Dr_;
      abpRx2Freq_ = other.abpRx2Freq_;
      tags_ = other.tags_.Clone();
      measurements_ = other.measurements_.Clone();
      autoDetectMeasurements_ = other.autoDetectMeasurements_;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public DeviceProfileTemplate Clone() {
      return new DeviceProfileTemplate(this);
    }

    /// <summary>Field number for the "id" field.</summary>
    public const int IdFieldNumber = 1;
    private string id_ = "";
    /// <summary>
    /// Device-profile template ID.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string Id {
      get { return id_; }
      set {
        id_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "name" field.</summary>
    public const int NameFieldNumber = 2;
    private string name_ = "";
    /// <summary>
    /// Name.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string Name {
      get { return name_; }
      set {
        name_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "description" field.</summary>
    public const int DescriptionFieldNumber = 3;
    private string description_ = "";
    /// <summary>
    /// Description.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string Description {
      get { return description_; }
      set {
        description_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "vendor" field.</summary>
    public const int VendorFieldNumber = 4;
    private string vendor_ = "";
    /// <summary>
    /// Vendor.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string Vendor {
      get { return vendor_; }
      set {
        vendor_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "firmware" field.</summary>
    public const int FirmwareFieldNumber = 5;
    private string firmware_ = "";
    /// <summary>
    /// Firmware.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string Firmware {
      get { return firmware_; }
      set {
        firmware_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "region" field.</summary>
    public const int RegionFieldNumber = 6;
    private global::Chirpstack.Common.Region region_ = global::Chirpstack.Common.Region.Eu868;
    /// <summary>
    /// Region.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Common.Region Region {
      get { return region_; }
      set {
        region_ = value;
      }
    }

    /// <summary>Field number for the "mac_version" field.</summary>
    public const int MacVersionFieldNumber = 7;
    private global::Chirpstack.Common.MacVersion macVersion_ = global::Chirpstack.Common.MacVersion.Lorawan100;
    /// <summary>
    /// LoRaWAN mac-version.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Common.MacVersion MacVersion {
      get { return macVersion_; }
      set {
        macVersion_ = value;
      }
    }

    /// <summary>Field number for the "reg_params_revision" field.</summary>
    public const int RegParamsRevisionFieldNumber = 8;
    private global::Chirpstack.Common.RegParamsRevision regParamsRevision_ = global::Chirpstack.Common.RegParamsRevision.A;
    /// <summary>
    /// Regional parameters revision.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Common.RegParamsRevision RegParamsRevision {
      get { return regParamsRevision_; }
      set {
        regParamsRevision_ = value;
      }
    }

    /// <summary>Field number for the "adr_algorithm_id" field.</summary>
    public const int AdrAlgorithmIdFieldNumber = 9;
    private string adrAlgorithmId_ = "";
    /// <summary>
    /// ADR algorithm ID.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string AdrAlgorithmId {
      get { return adrAlgorithmId_; }
      set {
        adrAlgorithmId_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "payload_codec_runtime" field.</summary>
    public const int PayloadCodecRuntimeFieldNumber = 10;
    private global::Chirpstack.Api.CodecRuntime payloadCodecRuntime_ = global::Chirpstack.Api.CodecRuntime.None;
    /// <summary>
    /// Payload codec runtime.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Api.CodecRuntime PayloadCodecRuntime {
      get { return payloadCodecRuntime_; }
      set {
        payloadCodecRuntime_ = value;
      }
    }

    /// <summary>Field number for the "payload_codec_script" field.</summary>
    public const int PayloadCodecScriptFieldNumber = 11;
    private string payloadCodecScript_ = "";
    /// <summary>
    /// Payload codec script.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string PayloadCodecScript {
      get { return payloadCodecScript_; }
      set {
        payloadCodecScript_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "flush_queue_on_activate" field.</summary>
    public const int FlushQueueOnActivateFieldNumber = 12;
    private bool flushQueueOnActivate_;
    /// <summary>
    /// Flush queue on device activation.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool FlushQueueOnActivate {
      get { return flushQueueOnActivate_; }
      set {
        flushQueueOnActivate_ = value;
      }
    }

    /// <summary>Field number for the "uplink_interval" field.</summary>
    public const int UplinkIntervalFieldNumber = 13;
    private uint uplinkInterval_;
    /// <summary>
    /// Uplink interval (seconds).
    /// This defines the expected uplink interval which the device uses for
    /// communication. When the uplink interval has expired and no uplink has
    /// been received, the device is considered inactive.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint UplinkInterval {
      get { return uplinkInterval_; }
      set {
        uplinkInterval_ = value;
      }
    }

    /// <summary>Field number for the "device_status_req_interval" field.</summary>
    public const int DeviceStatusReqIntervalFieldNumber = 14;
    private uint deviceStatusReqInterval_;
    /// <summary>
    /// Device-status request interval (times / day).
    /// This defines the times per day that ChirpStack will request the device-status
    /// from the device.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint DeviceStatusReqInterval {
      get { return deviceStatusReqInterval_; }
      set {
        deviceStatusReqInterval_ = value;
      }
    }

    /// <summary>Field number for the "supports_otaa" field.</summary>
    public const int SupportsOtaaFieldNumber = 15;
    private bool supportsOtaa_;
    /// <summary>
    /// Supports OTAA.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool SupportsOtaa {
      get { return supportsOtaa_; }
      set {
        supportsOtaa_ = value;
      }
    }

    /// <summary>Field number for the "supports_class_b" field.</summary>
    public const int SupportsClassBFieldNumber = 16;
    private bool supportsClassB_;
    /// <summary>
    /// Supports Class B.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool SupportsClassB {
      get { return supportsClassB_; }
      set {
        supportsClassB_ = value;
      }
    }

    /// <summary>Field number for the "supports_class_c" field.</summary>
    public const int SupportsClassCFieldNumber = 17;
    private bool supportsClassC_;
    /// <summary>
    /// Supports Class-C.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool SupportsClassC {
      get { return supportsClassC_; }
      set {
        supportsClassC_ = value;
      }
    }

    /// <summary>Field number for the "class_b_timeout" field.</summary>
    public const int ClassBTimeoutFieldNumber = 18;
    private uint classBTimeout_;
    /// <summary>
    /// Class-B timeout (seconds).
    /// This is the maximum time ChirpStack will wait to receive an acknowledgement from the device (if requested).
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint ClassBTimeout {
      get { return classBTimeout_; }
      set {
        classBTimeout_ = value;
      }
    }

    /// <summary>Field number for the "class_b_ping_slot_nb_k" field.</summary>
    public const int ClassBPingSlotNbKFieldNumber = 19;
    private uint classBPingSlotNbK_;
    /// <summary>
    /// Class-B ping-slots per beacon period.
    /// Valid options are: 0 - 7.
    ///
    /// The actual number of ping-slots per beacon period equals to 2^k.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint ClassBPingSlotNbK {
      get { return classBPingSlotNbK_; }
      set {
        classBPingSlotNbK_ = value;
      }
    }

    /// <summary>Field number for the "class_b_ping_slot_dr" field.</summary>
    public const int ClassBPingSlotDrFieldNumber = 20;
    private uint classBPingSlotDr_;
    /// <summary>
    /// Class-B ping-slot DR.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint ClassBPingSlotDr {
      get { return classBPingSlotDr_; }
      set {
        classBPingSlotDr_ = value;
      }
    }

    /// <summary>Field number for the "class_b_ping_slot_freq" field.</summary>
    public const int ClassBPingSlotFreqFieldNumber = 21;
    private uint classBPingSlotFreq_;
    /// <summary>
    /// Class-B ping-slot freq (Hz).
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint ClassBPingSlotFreq {
      get { return classBPingSlotFreq_; }
      set {
        classBPingSlotFreq_ = value;
      }
    }

    /// <summary>Field number for the "class_c_timeout" field.</summary>
    public const int ClassCTimeoutFieldNumber = 22;
    private uint classCTimeout_;
    /// <summary>
    /// Class-C timeout (seconds).
    /// This is the maximum time ChirpStack will wait to receive an acknowledgement from the device (if requested).
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint ClassCTimeout {
      get { return classCTimeout_; }
      set {
        classCTimeout_ = value;
      }
    }

    /// <summary>Field number for the "abp_rx1_delay" field.</summary>
    public const int AbpRx1DelayFieldNumber = 23;
    private uint abpRx1Delay_;
    /// <summary>
    /// RX1 delay (for ABP).
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint AbpRx1Delay {
      get { return abpRx1Delay_; }
      set {
        abpRx1Delay_ = value;
      }
    }

    /// <summary>Field number for the "abp_rx1_dr_offset" field.</summary>
    public const int AbpRx1DrOffsetFieldNumber = 24;
    private uint abpRx1DrOffset_;
    /// <summary>
    /// RX1 DR offset (for ABP).
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint AbpRx1DrOffset {
      get { return abpRx1DrOffset_; }
      set {
        abpRx1DrOffset_ = value;
      }
    }

    /// <summary>Field number for the "abp_rx2_dr" field.</summary>
    public const int AbpRx2DrFieldNumber = 25;
    private uint abpRx2Dr_;
    /// <summary>
    /// RX2 DR (for ABP).
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint AbpRx2Dr {
      get { return abpRx2Dr_; }
      set {
        abpRx2Dr_ = value;
      }
    }

    /// <summary>Field number for the "abp_rx2_freq" field.</summary>
    public const int AbpRx2FreqFieldNumber = 26;
    private uint abpRx2Freq_;
    /// <summary>
    /// RX2 frequency (for ABP, Hz).
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint AbpRx2Freq {
      get { return abpRx2Freq_; }
      set {
        abpRx2Freq_ = value;
      }
    }

    /// <summary>Field number for the "tags" field.</summary>
    public const int TagsFieldNumber = 27;
    private static readonly pbc::MapField<string, string>.Codec _map_tags_codec
        = new pbc::MapField<string, string>.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForString(18, ""), 218);
    private readonly pbc::MapField<string, string> tags_ = new pbc::MapField<string, string>();
    /// <summary>
    /// User defined tags.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pbc::MapField<string, string> Tags {
      get { return tags_; }
    }

    /// <summary>Field number for the "measurements" field.</summary>
    public const int MeasurementsFieldNumber = 28;
    private static readonly pbc::MapField<string, global::Chirpstack.Api.Measurement>.Codec _map_measurements_codec
        = new pbc::MapField<string, global::Chirpstack.Api.Measurement>.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForMessage(18, global::Chirpstack.Api.Measurement.Parser), 226);
    private readonly pbc::MapField<string, global::Chirpstack.Api.Measurement> measurements_ = new pbc::MapField<string, global::Chirpstack.Api.Measurement>();
    /// <summary>
    /// Measurements.
    /// If defined, ChirpStack will visualize these metrics in the web-interface.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pbc::MapField<string, global::Chirpstack.Api.Measurement> Measurements {
      get { return measurements_; }
    }

    /// <summary>Field number for the "auto_detect_measurements" field.</summary>
    public const int AutoDetectMeasurementsFieldNumber = 29;
    private bool autoDetectMeasurements_;
    /// <summary>
    /// Auto-detect measurements.
    /// If set to true, measurements will be automatically added based on the
    /// keys of the decoded payload. In cases where the decoded payload contains
    /// random keys in the data, you want to set this to false.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool AutoDetectMeasurements {
      get { return autoDetectMeasurements_; }
      set {
        autoDetectMeasurements_ = value;
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override bool Equals(object other) {
      return Equals(other as DeviceProfileTemplate);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(DeviceProfileTemplate other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (Id != other.Id) return false;
      if (Name != other.Name) return false;
      if (Description != other.Description) return false;
      if (Vendor != other.Vendor) return false;
      if (Firmware != other.Firmware) return false;
      if (Region != other.Region) return false;
      if (MacVersion != other.MacVersion) return false;
      if (RegParamsRevision != other.RegParamsRevision) return false;
      if (AdrAlgorithmId != other.AdrAlgorithmId) return false;
      if (PayloadCodecRuntime != other.PayloadCodecRuntime) return false;
      if (PayloadCodecScript != other.PayloadCodecScript) return false;
      if (FlushQueueOnActivate != other.FlushQueueOnActivate) return false;
      if (UplinkInterval != other.UplinkInterval) return false;
      if (DeviceStatusReqInterval != other.DeviceStatusReqInterval) return false;
      if (SupportsOtaa != other.SupportsOtaa) return false;
      if (SupportsClassB != other.SupportsClassB) return false;
      if (SupportsClassC != other.SupportsClassC) return false;
      if (ClassBTimeout != other.ClassBTimeout) return false;
      if (ClassBPingSlotNbK != other.ClassBPingSlotNbK) return false;
      if (ClassBPingSlotDr != other.ClassBPingSlotDr) return false;
      if (ClassBPingSlotFreq != other.ClassBPingSlotFreq) return false;
      if (ClassCTimeout != other.ClassCTimeout) return false;
      if (AbpRx1Delay != other.AbpRx1Delay) return false;
      if (AbpRx1DrOffset != other.AbpRx1DrOffset) return false;
      if (AbpRx2Dr != other.AbpRx2Dr) return false;
      if (AbpRx2Freq != other.AbpRx2Freq) return false;
      if (!Tags.Equals(other.Tags)) return false;
      if (!Measurements.Equals(other.Measurements)) return false;
      if (AutoDetectMeasurements != other.AutoDetectMeasurements) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override int GetHashCode() {
      int hash = 1;
      if (Id.Length != 0) hash ^= Id.GetHashCode();
      if (Name.Length != 0) hash ^= Name.GetHashCode();
      if (Description.Length != 0) hash ^= Description.GetHashCode();
      if (Vendor.Length != 0) hash ^= Vendor.GetHashCode();
      if (Firmware.Length != 0) hash ^= Firmware.GetHashCode();
      if (Region != global::Chirpstack.Common.Region.Eu868) hash ^= Region.GetHashCode();
      if (MacVersion != global::Chirpstack.Common.MacVersion.Lorawan100) hash ^= MacVersion.GetHashCode();
      if (RegParamsRevision != global::Chirpstack.Common.RegParamsRevision.A) hash ^= RegParamsRevision.GetHashCode();
      if (AdrAlgorithmId.Length != 0) hash ^= AdrAlgorithmId.GetHashCode();
      if (PayloadCodecRuntime != global::Chirpstack.Api.CodecRuntime.None) hash ^= PayloadCodecRuntime.GetHashCode();
      if (PayloadCodecScript.Length != 0) hash ^= PayloadCodecScript.GetHashCode();
      if (FlushQueueOnActivate != false) hash ^= FlushQueueOnActivate.GetHashCode();
      if (UplinkInterval != 0) hash ^= UplinkInterval.GetHashCode();
      if (DeviceStatusReqInterval != 0) hash ^= DeviceStatusReqInterval.GetHashCode();
      if (SupportsOtaa != false) hash ^= SupportsOtaa.GetHashCode();
      if (SupportsClassB != false) hash ^= SupportsClassB.GetHashCode();
      if (SupportsClassC != false) hash ^= SupportsClassC.GetHashCode();
      if (ClassBTimeout != 0) hash ^= ClassBTimeout.GetHashCode();
      if (ClassBPingSlotNbK != 0) hash ^= ClassBPingSlotNbK.GetHashCode();
      if (ClassBPingSlotDr != 0) hash ^= ClassBPingSlotDr.GetHashCode();
      if (ClassBPingSlotFreq != 0) hash ^= ClassBPingSlotFreq.GetHashCode();
      if (ClassCTimeout != 0) hash ^= ClassCTimeout.GetHashCode();
      if (AbpRx1Delay != 0) hash ^= AbpRx1Delay.GetHashCode();
      if (AbpRx1DrOffset != 0) hash ^= AbpRx1DrOffset.GetHashCode();
      if (AbpRx2Dr != 0) hash ^= AbpRx2Dr.GetHashCode();
      if (AbpRx2Freq != 0) hash ^= AbpRx2Freq.GetHashCode();
      hash ^= Tags.GetHashCode();
      hash ^= Measurements.GetHashCode();
      if (AutoDetectMeasurements != false) hash ^= AutoDetectMeasurements.GetHashCode();
      if (_unknownFields != null) {
        hash ^= _unknownFields.GetHashCode();
      }
      return hash;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override string ToString() {
      return pb::JsonFormatter.ToDiagnosticString(this);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void WriteTo(pb::CodedOutputStream output) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      output.WriteRawMessage(this);
    #else
      if (Id.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(Id);
      }
      if (Name.Length != 0) {
        output.WriteRawTag(18);
        output.WriteString(Name);
      }
      if (Description.Length != 0) {
        output.WriteRawTag(26);
        output.WriteString(Description);
      }
      if (Vendor.Length != 0) {
        output.WriteRawTag(34);
        output.WriteString(Vendor);
      }
      if (Firmware.Length != 0) {
        output.WriteRawTag(42);
        output.WriteString(Firmware);
      }
      if (Region != global::Chirpstack.Common.Region.Eu868) {
        output.WriteRawTag(48);
        output.WriteEnum((int) Region);
      }
      if (MacVersion != global::Chirpstack.Common.MacVersion.Lorawan100) {
        output.WriteRawTag(56);
        output.WriteEnum((int) MacVersion);
      }
      if (RegParamsRevision != global::Chirpstack.Common.RegParamsRevision.A) {
        output.WriteRawTag(64);
        output.WriteEnum((int) RegParamsRevision);
      }
      if (AdrAlgorithmId.Length != 0) {
        output.WriteRawTag(74);
        output.WriteString(AdrAlgorithmId);
      }
      if (PayloadCodecRuntime != global::Chirpstack.Api.CodecRuntime.None) {
        output.WriteRawTag(80);
        output.WriteEnum((int) PayloadCodecRuntime);
      }
      if (PayloadCodecScript.Length != 0) {
        output.WriteRawTag(90);
        output.WriteString(PayloadCodecScript);
      }
      if (FlushQueueOnActivate != false) {
        output.WriteRawTag(96);
        output.WriteBool(FlushQueueOnActivate);
      }
      if (UplinkInterval != 0) {
        output.WriteRawTag(104);
        output.WriteUInt32(UplinkInterval);
      }
      if (DeviceStatusReqInterval != 0) {
        output.WriteRawTag(112);
        output.WriteUInt32(DeviceStatusReqInterval);
      }
      if (SupportsOtaa != false) {
        output.WriteRawTag(120);
        output.WriteBool(SupportsOtaa);
      }
      if (SupportsClassB != false) {
        output.WriteRawTag(128, 1);
        output.WriteBool(SupportsClassB);
      }
      if (SupportsClassC != false) {
        output.WriteRawTag(136, 1);
        output.WriteBool(SupportsClassC);
      }
      if (ClassBTimeout != 0) {
        output.WriteRawTag(144, 1);
        output.WriteUInt32(ClassBTimeout);
      }
      if (ClassBPingSlotNbK != 0) {
        output.WriteRawTag(152, 1);
        output.WriteUInt32(ClassBPingSlotNbK);
      }
      if (ClassBPingSlotDr != 0) {
        output.WriteRawTag(160, 1);
        output.WriteUInt32(ClassBPingSlotDr);
      }
      if (ClassBPingSlotFreq != 0) {
        output.WriteRawTag(168, 1);
        output.WriteUInt32(ClassBPingSlotFreq);
      }
      if (ClassCTimeout != 0) {
        output.WriteRawTag(176, 1);
        output.WriteUInt32(ClassCTimeout);
      }
      if (AbpRx1Delay != 0) {
        output.WriteRawTag(184, 1);
        output.WriteUInt32(AbpRx1Delay);
      }
      if (AbpRx1DrOffset != 0) {
        output.WriteRawTag(192, 1);
        output.WriteUInt32(AbpRx1DrOffset);
      }
      if (AbpRx2Dr != 0) {
        output.WriteRawTag(200, 1);
        output.WriteUInt32(AbpRx2Dr);
      }
      if (AbpRx2Freq != 0) {
        output.WriteRawTag(208, 1);
        output.WriteUInt32(AbpRx2Freq);
      }
      tags_.WriteTo(output, _map_tags_codec);
      measurements_.WriteTo(output, _map_measurements_codec);
      if (AutoDetectMeasurements != false) {
        output.WriteRawTag(232, 1);
        output.WriteBool(AutoDetectMeasurements);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
      if (Id.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(Id);
      }
      if (Name.Length != 0) {
        output.WriteRawTag(18);
        output.WriteString(Name);
      }
      if (Description.Length != 0) {
        output.WriteRawTag(26);
        output.WriteString(Description);
      }
      if (Vendor.Length != 0) {
        output.WriteRawTag(34);
        output.WriteString(Vendor);
      }
      if (Firmware.Length != 0) {
        output.WriteRawTag(42);
        output.WriteString(Firmware);
      }
      if (Region != global::Chirpstack.Common.Region.Eu868) {
        output.WriteRawTag(48);
        output.WriteEnum((int) Region);
      }
      if (MacVersion != global::Chirpstack.Common.MacVersion.Lorawan100) {
        output.WriteRawTag(56);
        output.WriteEnum((int) MacVersion);
      }
      if (RegParamsRevision != global::Chirpstack.Common.RegParamsRevision.A) {
        output.WriteRawTag(64);
        output.WriteEnum((int) RegParamsRevision);
      }
      if (AdrAlgorithmId.Length != 0) {
        output.WriteRawTag(74);
        output.WriteString(AdrAlgorithmId);
      }
      if (PayloadCodecRuntime != global::Chirpstack.Api.CodecRuntime.None) {
        output.WriteRawTag(80);
        output.WriteEnum((int) PayloadCodecRuntime);
      }
      if (PayloadCodecScript.Length != 0) {
        output.WriteRawTag(90);
        output.WriteString(PayloadCodecScript);
      }
      if (FlushQueueOnActivate != false) {
        output.WriteRawTag(96);
        output.WriteBool(FlushQueueOnActivate);
      }
      if (UplinkInterval != 0) {
        output.WriteRawTag(104);
        output.WriteUInt32(UplinkInterval);
      }
      if (DeviceStatusReqInterval != 0) {
        output.WriteRawTag(112);
        output.WriteUInt32(DeviceStatusReqInterval);
      }
      if (SupportsOtaa != false) {
        output.WriteRawTag(120);
        output.WriteBool(SupportsOtaa);
      }
      if (SupportsClassB != false) {
        output.WriteRawTag(128, 1);
        output.WriteBool(SupportsClassB);
      }
      if (SupportsClassC != false) {
        output.WriteRawTag(136, 1);
        output.WriteBool(SupportsClassC);
      }
      if (ClassBTimeout != 0) {
        output.WriteRawTag(144, 1);
        output.WriteUInt32(ClassBTimeout);
      }
      if (ClassBPingSlotNbK != 0) {
        output.WriteRawTag(152, 1);
        output.WriteUInt32(ClassBPingSlotNbK);
      }
      if (ClassBPingSlotDr != 0) {
        output.WriteRawTag(160, 1);
        output.WriteUInt32(ClassBPingSlotDr);
      }
      if (ClassBPingSlotFreq != 0) {
        output.WriteRawTag(168, 1);
        output.WriteUInt32(ClassBPingSlotFreq);
      }
      if (ClassCTimeout != 0) {
        output.WriteRawTag(176, 1);
        output.WriteUInt32(ClassCTimeout);
      }
      if (AbpRx1Delay != 0) {
        output.WriteRawTag(184, 1);
        output.WriteUInt32(AbpRx1Delay);
      }
      if (AbpRx1DrOffset != 0) {
        output.WriteRawTag(192, 1);
        output.WriteUInt32(AbpRx1DrOffset);
      }
      if (AbpRx2Dr != 0) {
        output.WriteRawTag(200, 1);
        output.WriteUInt32(AbpRx2Dr);
      }
      if (AbpRx2Freq != 0) {
        output.WriteRawTag(208, 1);
        output.WriteUInt32(AbpRx2Freq);
      }
      tags_.WriteTo(ref output, _map_tags_codec);
      measurements_.WriteTo(ref output, _map_measurements_codec);
      if (AutoDetectMeasurements != false) {
        output.WriteRawTag(232, 1);
        output.WriteBool(AutoDetectMeasurements);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(ref output);
      }
    }
    #endif

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public int CalculateSize() {
      int size = 0;
      if (Id.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Id);
      }
      if (Name.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
      }
      if (Description.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Description);
      }
      if (Vendor.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Vendor);
      }
      if (Firmware.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Firmware);
      }
      if (Region != global::Chirpstack.Common.Region.Eu868) {
        size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Region);
      }
      if (MacVersion != global::Chirpstack.Common.MacVersion.Lorawan100) {
        size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) MacVersion);
      }
      if (RegParamsRevision != global::Chirpstack.Common.RegParamsRevision.A) {
        size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) RegParamsRevision);
      }
      if (AdrAlgorithmId.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(AdrAlgorithmId);
      }
      if (PayloadCodecRuntime != global::Chirpstack.Api.CodecRuntime.None) {
        size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) PayloadCodecRuntime);
      }
      if (PayloadCodecScript.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(PayloadCodecScript);
      }
      if (FlushQueueOnActivate != false) {
        size += 1 + 1;
      }
      if (UplinkInterval != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(UplinkInterval);
      }
      if (DeviceStatusReqInterval != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(DeviceStatusReqInterval);
      }
      if (SupportsOtaa != false) {
        size += 1 + 1;
      }
      if (SupportsClassB != false) {
        size += 2 + 1;
      }
      if (SupportsClassC != false) {
        size += 2 + 1;
      }
      if (ClassBTimeout != 0) {
        size += 2 + pb::CodedOutputStream.ComputeUInt32Size(ClassBTimeout);
      }
      if (ClassBPingSlotNbK != 0) {
        size += 2 + pb::CodedOutputStream.ComputeUInt32Size(ClassBPingSlotNbK);
      }
      if (ClassBPingSlotDr != 0) {
        size += 2 + pb::CodedOutputStream.ComputeUInt32Size(ClassBPingSlotDr);
      }
      if (ClassBPingSlotFreq != 0) {
        size += 2 + pb::CodedOutputStream.ComputeUInt32Size(ClassBPingSlotFreq);
      }
      if (ClassCTimeout != 0) {
        size += 2 + pb::CodedOutputStream.ComputeUInt32Size(ClassCTimeout);
      }
      if (AbpRx1Delay != 0) {
        size += 2 + pb::CodedOutputStream.ComputeUInt32Size(AbpRx1Delay);
      }
      if (AbpRx1DrOffset != 0) {
        size += 2 + pb::CodedOutputStream.ComputeUInt32Size(AbpRx1DrOffset);
      }
      if (AbpRx2Dr != 0) {
        size += 2 + pb::CodedOutputStream.ComputeUInt32Size(AbpRx2Dr);
      }
      if (AbpRx2Freq != 0) {
        size += 2 + pb::CodedOutputStream.ComputeUInt32Size(AbpRx2Freq);
      }
      size += tags_.CalculateSize(_map_tags_codec);
      size += measurements_.CalculateSize(_map_measurements_codec);
      if (AutoDetectMeasurements != false) {
        size += 2 + 1;
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(DeviceProfileTemplate other) {
      if (other == null) {
        return;
      }
      if (other.Id.Length != 0) {
        Id = other.Id;
      }
      if (other.Name.Length != 0) {
        Name = other.Name;
      }
      if (other.Description.Length != 0) {
        Description = other.Description;
      }
      if (other.Vendor.Length != 0) {
        Vendor = other.Vendor;
      }
      if (other.Firmware.Length != 0) {
        Firmware = other.Firmware;
      }
      if (other.Region != global::Chirpstack.Common.Region.Eu868) {
        Region = other.Region;
      }
      if (other.MacVersion != global::Chirpstack.Common.MacVersion.Lorawan100) {
        MacVersion = other.MacVersion;
      }
      if (other.RegParamsRevision != global::Chirpstack.Common.RegParamsRevision.A) {
        RegParamsRevision = other.RegParamsRevision;
      }
      if (other.AdrAlgorithmId.Length != 0) {
        AdrAlgorithmId = other.AdrAlgorithmId;
      }
      if (other.PayloadCodecRuntime != global::Chirpstack.Api.CodecRuntime.None) {
        PayloadCodecRuntime = other.PayloadCodecRuntime;
      }
      if (other.PayloadCodecScript.Length != 0) {
        PayloadCodecScript = other.PayloadCodecScript;
      }
      if (other.FlushQueueOnActivate != false) {
        FlushQueueOnActivate = other.FlushQueueOnActivate;
      }
      if (other.UplinkInterval != 0) {
        UplinkInterval = other.UplinkInterval;
      }
      if (other.DeviceStatusReqInterval != 0) {
        DeviceStatusReqInterval = other.DeviceStatusReqInterval;
      }
      if (other.SupportsOtaa != false) {
        SupportsOtaa = other.SupportsOtaa;
      }
      if (other.SupportsClassB != false) {
        SupportsClassB = other.SupportsClassB;
      }
      if (other.SupportsClassC != false) {
        SupportsClassC = other.SupportsClassC;
      }
      if (other.ClassBTimeout != 0) {
        ClassBTimeout = other.ClassBTimeout;
      }
      if (other.ClassBPingSlotNbK != 0) {
        ClassBPingSlotNbK = other.ClassBPingSlotNbK;
      }
      if (other.ClassBPingSlotDr != 0) {
        ClassBPingSlotDr = other.ClassBPingSlotDr;
      }
      if (other.ClassBPingSlotFreq != 0) {
        ClassBPingSlotFreq = other.ClassBPingSlotFreq;
      }
      if (other.ClassCTimeout != 0) {
        ClassCTimeout = other.ClassCTimeout;
      }
      if (other.AbpRx1Delay != 0) {
        AbpRx1Delay = other.AbpRx1Delay;
      }
      if (other.AbpRx1DrOffset != 0) {
        AbpRx1DrOffset = other.AbpRx1DrOffset;
      }
      if (other.AbpRx2Dr != 0) {
        AbpRx2Dr = other.AbpRx2Dr;
      }
      if (other.AbpRx2Freq != 0) {
        AbpRx2Freq = other.AbpRx2Freq;
      }
      tags_.Add(other.tags_);
      measurements_.Add(other.measurements_);
      if (other.AutoDetectMeasurements != false) {
        AutoDetectMeasurements = other.AutoDetectMeasurements;
      }
      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(pb::CodedInputStream input) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      input.ReadRawMessage(this);
    #else
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
            break;
          case 10: {
            Id = input.ReadString();
            break;
          }
          case 18: {
            Name = input.ReadString();
            break;
          }
          case 26: {
            Description = input.ReadString();
            break;
          }
          case 34: {
            Vendor = input.ReadString();
            break;
          }
          case 42: {
            Firmware = input.ReadString();
            break;
          }
          case 48: {
            Region = (global::Chirpstack.Common.Region) input.ReadEnum();
            break;
          }
          case 56: {
            MacVersion = (global::Chirpstack.Common.MacVersion) input.ReadEnum();
            break;
          }
          case 64: {
            RegParamsRevision = (global::Chirpstack.Common.RegParamsRevision) input.ReadEnum();
            break;
          }
          case 74: {
            AdrAlgorithmId = input.ReadString();
            break;
          }
          case 80: {
            PayloadCodecRuntime = (global::Chirpstack.Api.CodecRuntime) input.ReadEnum();
            break;
          }
          case 90: {
            PayloadCodecScript = input.ReadString();
            break;
          }
          case 96: {
            FlushQueueOnActivate = input.ReadBool();
            break;
          }
          case 104: {
            UplinkInterval = input.ReadUInt32();
            break;
          }
          case 112: {
            DeviceStatusReqInterval = input.ReadUInt32();
            break;
          }
          case 120: {
            SupportsOtaa = input.ReadBool();
            break;
          }
          case 128: {
            SupportsClassB = input.ReadBool();
            break;
          }
          case 136: {
            SupportsClassC = input.ReadBool();
            break;
          }
          case 144: {
            ClassBTimeout = input.ReadUInt32();
            break;
          }
          case 152: {
            ClassBPingSlotNbK = input.ReadUInt32();
            break;
          }
          case 160: {
            ClassBPingSlotDr = input.ReadUInt32();
            break;
          }
          case 168: {
            ClassBPingSlotFreq = input.ReadUInt32();
            break;
          }
          case 176: {
            ClassCTimeout = input.ReadUInt32();
            break;
          }
          case 184: {
            AbpRx1Delay = input.ReadUInt32();
            break;
          }
          case 192: {
            AbpRx1DrOffset = input.ReadUInt32();
            break;
          }
          case 200: {
            AbpRx2Dr = input.ReadUInt32();
            break;
          }
          case 208: {
            AbpRx2Freq = input.ReadUInt32();
            break;
          }
          case 218: {
            tags_.AddEntriesFrom(input, _map_tags_codec);
            break;
          }
          case 226: {
            measurements_.AddEntriesFrom(input, _map_measurements_codec);
            break;
          }
          case 232: {
            AutoDetectMeasurements = input.ReadBool();
            break;
          }
        }
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
            break;
          case 10: {
            Id = input.ReadString();
            break;
          }
          case 18: {
            Name = input.ReadString();
            break;
          }
          case 26: {
            Description = input.ReadString();
            break;
          }
          case 34: {
            Vendor = input.ReadString();
            break;
          }
          case 42: {
            Firmware = input.ReadString();
            break;
          }
          case 48: {
            Region = (global::Chirpstack.Common.Region) input.ReadEnum();
            break;
          }
          case 56: {
            MacVersion = (global::Chirpstack.Common.MacVersion) input.ReadEnum();
            break;
          }
          case 64: {
            RegParamsRevision = (global::Chirpstack.Common.RegParamsRevision) input.ReadEnum();
            break;
          }
          case 74: {
            AdrAlgorithmId = input.ReadString();
            break;
          }
          case 80: {
            PayloadCodecRuntime = (global::Chirpstack.Api.CodecRuntime) input.ReadEnum();
            break;
          }
          case 90: {
            PayloadCodecScript = input.ReadString();
            break;
          }
          case 96: {
            FlushQueueOnActivate = input.ReadBool();
            break;
          }
          case 104: {
            UplinkInterval = input.ReadUInt32();
            break;
          }
          case 112: {
            DeviceStatusReqInterval = input.ReadUInt32();
            break;
          }
          case 120: {
            SupportsOtaa = input.ReadBool();
            break;
          }
          case 128: {
            SupportsClassB = input.ReadBool();
            break;
          }
          case 136: {
            SupportsClassC = input.ReadBool();
            break;
          }
          case 144: {
            ClassBTimeout = input.ReadUInt32();
            break;
          }
          case 152: {
            ClassBPingSlotNbK = input.ReadUInt32();
            break;
          }
          case 160: {
            ClassBPingSlotDr = input.ReadUInt32();
            break;
          }
          case 168: {
            ClassBPingSlotFreq = input.ReadUInt32();
            break;
          }
          case 176: {
            ClassCTimeout = input.ReadUInt32();
            break;
          }
          case 184: {
            AbpRx1Delay = input.ReadUInt32();
            break;
          }
          case 192: {
            AbpRx1DrOffset = input.ReadUInt32();
            break;
          }
          case 200: {
            AbpRx2Dr = input.ReadUInt32();
            break;
          }
          case 208: {
            AbpRx2Freq = input.ReadUInt32();
            break;
          }
          case 218: {
            tags_.AddEntriesFrom(ref input, _map_tags_codec);
            break;
          }
          case 226: {
            measurements_.AddEntriesFrom(ref input, _map_measurements_codec);
            break;
          }
          case 232: {
            AutoDetectMeasurements = input.ReadBool();
            break;
          }
        }
      }
    }
    #endif

  }

  public sealed partial class DeviceProfileTemplateListItem : pb::IMessage<DeviceProfileTemplateListItem>
  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      , pb::IBufferMessage
  #endif
  {
    private static readonly pb::MessageParser<DeviceProfileTemplateListItem> _parser = new pb::MessageParser<DeviceProfileTemplateListItem>(() => new DeviceProfileTemplateListItem());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pb::MessageParser<DeviceProfileTemplateListItem> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::Chirpstack.Api.DeviceProfileTemplateReflection.Descriptor.MessageTypes[1]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public DeviceProfileTemplateListItem() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public DeviceProfileTemplateListItem(DeviceProfileTemplateListItem other) : this() {
      id_ = other.id_;
      createdAt_ = other.createdAt_ != null ? other.createdAt_.Clone() : null;
      updatedAt_ = other.updatedAt_ != null ? other.updatedAt_.Clone() : null;
      name_ = other.name_;
      vendor_ = other.vendor_;
      firmware_ = other.firmware_;
      region_ = other.region_;
      macVersion_ = other.macVersion_;
      regParamsRevision_ = other.regParamsRevision_;
      supportsOtaa_ = other.supportsOtaa_;
      supportsClassB_ = other.supportsClassB_;
      supportsClassC_ = other.supportsClassC_;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public DeviceProfileTemplateListItem Clone() {
      return new DeviceProfileTemplateListItem(this);
    }

    /// <summary>Field number for the "id" field.</summary>
    public const int IdFieldNumber = 1;
    private string id_ = "";
    /// <summary>
    /// Device-profile template ID.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string Id {
      get { return id_; }
      set {
        id_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "created_at" field.</summary>
    public const int CreatedAtFieldNumber = 2;
    private global::Google.Protobuf.WellKnownTypes.Timestamp createdAt_;
    /// <summary>
    /// Created at timestamp.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Google.Protobuf.WellKnownTypes.Timestamp CreatedAt {
      get { return createdAt_; }
      set {
        createdAt_ = value;
      }
    }

    /// <summary>Field number for the "updated_at" field.</summary>
    public const int UpdatedAtFieldNumber = 3;
    private global::Google.Protobuf.WellKnownTypes.Timestamp updatedAt_;
    /// <summary>
    /// Last update timestamp.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Google.Protobuf.WellKnownTypes.Timestamp UpdatedAt {
      get { return updatedAt_; }
      set {
        updatedAt_ = value;
      }
    }

    /// <summary>Field number for the "name" field.</summary>
    public const int NameFieldNumber = 4;
    private string name_ = "";
    /// <summary>
    /// Name.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string Name {
      get { return name_; }
      set {
        name_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "vendor" field.</summary>
    public const int VendorFieldNumber = 5;
    private string vendor_ = "";
    /// <summary>
    /// Vendor.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string Vendor {
      get { return vendor_; }
      set {
        vendor_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "firmware" field.</summary>
    public const int FirmwareFieldNumber = 6;
    private string firmware_ = "";
    /// <summary>
    /// Firmware.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string Firmware {
      get { return firmware_; }
      set {
        firmware_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "region" field.</summary>
    public const int RegionFieldNumber = 7;
    private global::Chirpstack.Common.Region region_ = global::Chirpstack.Common.Region.Eu868;
    /// <summary>
    /// Region.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Common.Region Region {
      get { return region_; }
      set {
        region_ = value;
      }
    }

    /// <summary>Field number for the "mac_version" field.</summary>
    public const int MacVersionFieldNumber = 8;
    private global::Chirpstack.Common.MacVersion macVersion_ = global::Chirpstack.Common.MacVersion.Lorawan100;
    /// <summary>
    /// LoRaWAN mac-version.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Common.MacVersion MacVersion {
      get { return macVersion_; }
      set {
        macVersion_ = value;
      }
    }

    /// <summary>Field number for the "reg_params_revision" field.</summary>
    public const int RegParamsRevisionFieldNumber = 9;
    private global::Chirpstack.Common.RegParamsRevision regParamsRevision_ = global::Chirpstack.Common.RegParamsRevision.A;
    /// <summary>
    /// Regional parameters revision.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Common.RegParamsRevision RegParamsRevision {
      get { return regParamsRevision_; }
      set {
        regParamsRevision_ = value;
      }
    }

    /// <summary>Field number for the "supports_otaa" field.</summary>
    public const int SupportsOtaaFieldNumber = 10;
    private bool supportsOtaa_;
    /// <summary>
    /// Supports OTAA.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool SupportsOtaa {
      get { return supportsOtaa_; }
      set {
        supportsOtaa_ = value;
      }
    }

    /// <summary>Field number for the "supports_class_b" field.</summary>
    public const int SupportsClassBFieldNumber = 11;
    private bool supportsClassB_;
    /// <summary>
    /// Supports Class-B.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool SupportsClassB {
      get { return supportsClassB_; }
      set {
        supportsClassB_ = value;
      }
    }

    /// <summary>Field number for the "supports_class_c" field.</summary>
    public const int SupportsClassCFieldNumber = 12;
    private bool supportsClassC_;
    /// <summary>
    /// Supports Class-C.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool SupportsClassC {
      get { return supportsClassC_; }
      set {
        supportsClassC_ = value;
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override bool Equals(object other) {
      return Equals(other as DeviceProfileTemplateListItem);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(DeviceProfileTemplateListItem other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (Id != other.Id) return false;
      if (!object.Equals(CreatedAt, other.CreatedAt)) return false;
      if (!object.Equals(UpdatedAt, other.UpdatedAt)) return false;
      if (Name != other.Name) return false;
      if (Vendor != other.Vendor) return false;
      if (Firmware != other.Firmware) return false;
      if (Region != other.Region) return false;
      if (MacVersion != other.MacVersion) return false;
      if (RegParamsRevision != other.RegParamsRevision) return false;
      if (SupportsOtaa != other.SupportsOtaa) return false;
      if (SupportsClassB != other.SupportsClassB) return false;
      if (SupportsClassC != other.SupportsClassC) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override int GetHashCode() {
      int hash = 1;
      if (Id.Length != 0) hash ^= Id.GetHashCode();
      if (createdAt_ != null) hash ^= CreatedAt.GetHashCode();
      if (updatedAt_ != null) hash ^= UpdatedAt.GetHashCode();
      if (Name.Length != 0) hash ^= Name.GetHashCode();
      if (Vendor.Length != 0) hash ^= Vendor.GetHashCode();
      if (Firmware.Length != 0) hash ^= Firmware.GetHashCode();
      if (Region != global::Chirpstack.Common.Region.Eu868) hash ^= Region.GetHashCode();
      if (MacVersion != global::Chirpstack.Common.MacVersion.Lorawan100) hash ^= MacVersion.GetHashCode();
      if (RegParamsRevision != global::Chirpstack.Common.RegParamsRevision.A) hash ^= RegParamsRevision.GetHashCode();
      if (SupportsOtaa != false) hash ^= SupportsOtaa.GetHashCode();
      if (SupportsClassB != false) hash ^= SupportsClassB.GetHashCode();
      if (SupportsClassC != false) hash ^= SupportsClassC.GetHashCode();
      if (_unknownFields != null) {
        hash ^= _unknownFields.GetHashCode();
      }
      return hash;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override string ToString() {
      return pb::JsonFormatter.ToDiagnosticString(this);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void WriteTo(pb::CodedOutputStream output) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      output.WriteRawMessage(this);
    #else
      if (Id.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(Id);
      }
      if (createdAt_ != null) {
        output.WriteRawTag(18);
        output.WriteMessage(CreatedAt);
      }
      if (updatedAt_ != null) {
        output.WriteRawTag(26);
        output.WriteMessage(UpdatedAt);
      }
      if (Name.Length != 0) {
        output.WriteRawTag(34);
        output.WriteString(Name);
      }
      if (Vendor.Length != 0) {
        output.WriteRawTag(42);
        output.WriteString(Vendor);
      }
      if (Firmware.Length != 0) {
        output.WriteRawTag(50);
        output.WriteString(Firmware);
      }
      if (Region != global::Chirpstack.Common.Region.Eu868) {
        output.WriteRawTag(56);
        output.WriteEnum((int) Region);
      }
      if (MacVersion != global::Chirpstack.Common.MacVersion.Lorawan100) {
        output.WriteRawTag(64);
        output.WriteEnum((int) MacVersion);
      }
      if (RegParamsRevision != global::Chirpstack.Common.RegParamsRevision.A) {
        output.WriteRawTag(72);
        output.WriteEnum((int) RegParamsRevision);
      }
      if (SupportsOtaa != false) {
        output.WriteRawTag(80);
        output.WriteBool(SupportsOtaa);
      }
      if (SupportsClassB != false) {
        output.WriteRawTag(88);
        output.WriteBool(SupportsClassB);
      }
      if (SupportsClassC != false) {
        output.WriteRawTag(96);
        output.WriteBool(SupportsClassC);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
      if (Id.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(Id);
      }
      if (createdAt_ != null) {
        output.WriteRawTag(18);
        output.WriteMessage(CreatedAt);
      }
      if (updatedAt_ != null) {
        output.WriteRawTag(26);
        output.WriteMessage(UpdatedAt);
      }
      if (Name.Length != 0) {
        output.WriteRawTag(34);
        output.WriteString(Name);
      }
      if (Vendor.Length != 0) {
        output.WriteRawTag(42);
        output.WriteString(Vendor);
      }
      if (Firmware.Length != 0) {
        output.WriteRawTag(50);
        output.WriteString(Firmware);
      }
      if (Region != global::Chirpstack.Common.Region.Eu868) {
        output.WriteRawTag(56);
        output.WriteEnum((int) Region);
      }
      if (MacVersion != global::Chirpstack.Common.MacVersion.Lorawan100) {
        output.WriteRawTag(64);
        output.WriteEnum((int) MacVersion);
      }
      if (RegParamsRevision != global::Chirpstack.Common.RegParamsRevision.A) {
        output.WriteRawTag(72);
        output.WriteEnum((int) RegParamsRevision);
      }
      if (SupportsOtaa != false) {
        output.WriteRawTag(80);
        output.WriteBool(SupportsOtaa);
      }
      if (SupportsClassB != false) {
        output.WriteRawTag(88);
        output.WriteBool(SupportsClassB);
      }
      if (SupportsClassC != false) {
        output.WriteRawTag(96);
        output.WriteBool(SupportsClassC);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(ref output);
      }
    }
    #endif

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public int CalculateSize() {
      int size = 0;
      if (Id.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Id);
      }
      if (createdAt_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(CreatedAt);
      }
      if (updatedAt_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(UpdatedAt);
      }
      if (Name.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
      }
      if (Vendor.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Vendor);
      }
      if (Firmware.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Firmware);
      }
      if (Region != global::Chirpstack.Common.Region.Eu868) {
        size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Region);
      }
      if (MacVersion != global::Chirpstack.Common.MacVersion.Lorawan100) {
        size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) MacVersion);
      }
      if (RegParamsRevision != global::Chirpstack.Common.RegParamsRevision.A) {
        size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) RegParamsRevision);
      }
      if (SupportsOtaa != false) {
        size += 1 + 1;
      }
      if (SupportsClassB != false) {
        size += 1 + 1;
      }
      if (SupportsClassC != false) {
        size += 1 + 1;
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(DeviceProfileTemplateListItem other) {
      if (other == null) {
        return;
      }
      if (other.Id.Length != 0) {
        Id = other.Id;
      }
      if (other.createdAt_ != null) {
        if (createdAt_ == null) {
          CreatedAt = new global::Google.Protobuf.WellKnownTypes.Timestamp();
        }
        CreatedAt.MergeFrom(other.CreatedAt);
      }
      if (other.updatedAt_ != null) {
        if (updatedAt_ == null) {
          UpdatedAt = new global::Google.Protobuf.WellKnownTypes.Timestamp();
        }
        UpdatedAt.MergeFrom(other.UpdatedAt);
      }
      if (other.Name.Length != 0) {
        Name = other.Name;
      }
      if (other.Vendor.Length != 0) {
        Vendor = other.Vendor;
      }
      if (other.Firmware.Length != 0) {
        Firmware = other.Firmware;
      }
      if (other.Region != global::Chirpstack.Common.Region.Eu868) {
        Region = other.Region;
      }
      if (other.MacVersion != global::Chirpstack.Common.MacVersion.Lorawan100) {
        MacVersion = other.MacVersion;
      }
      if (other.RegParamsRevision != global::Chirpstack.Common.RegParamsRevision.A) {
        RegParamsRevision = other.RegParamsRevision;
      }
      if (other.SupportsOtaa != false) {
        SupportsOtaa = other.SupportsOtaa;
      }
      if (other.SupportsClassB != false) {
        SupportsClassB = other.SupportsClassB;
      }
      if (other.SupportsClassC != false) {
        SupportsClassC = other.SupportsClassC;
      }
      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(pb::CodedInputStream input) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      input.ReadRawMessage(this);
    #else
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
            break;
          case 10: {
            Id = input.ReadString();
            break;
          }
          case 18: {
            if (createdAt_ == null) {
              CreatedAt = new global::Google.Protobuf.WellKnownTypes.Timestamp();
            }
            input.ReadMessage(CreatedAt);
            break;
          }
          case 26: {
            if (updatedAt_ == null) {
              UpdatedAt = new global::Google.Protobuf.WellKnownTypes.Timestamp();
            }
            input.ReadMessage(UpdatedAt);
            break;
          }
          case 34: {
            Name = input.ReadString();
            break;
          }
          case 42: {
            Vendor = input.ReadString();
            break;
          }
          case 50: {
            Firmware = input.ReadString();
            break;
          }
          case 56: {
            Region = (global::Chirpstack.Common.Region) input.ReadEnum();
            break;
          }
          case 64: {
            MacVersion = (global::Chirpstack.Common.MacVersion) input.ReadEnum();
            break;
          }
          case 72: {
            RegParamsRevision = (global::Chirpstack.Common.RegParamsRevision) input.ReadEnum();
            break;
          }
          case 80: {
            SupportsOtaa = input.ReadBool();
            break;
          }
          case 88: {
            SupportsClassB = input.ReadBool();
            break;
          }
          case 96: {
            SupportsClassC = input.ReadBool();
            break;
          }
        }
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
            break;
          case 10: {
            Id = input.ReadString();
            break;
          }
          case 18: {
            if (createdAt_ == null) {
              CreatedAt = new global::Google.Protobuf.WellKnownTypes.Timestamp();
            }
            input.ReadMessage(CreatedAt);
            break;
          }
          case 26: {
            if (updatedAt_ == null) {
              UpdatedAt = new global::Google.Protobuf.WellKnownTypes.Timestamp();
            }
            input.ReadMessage(UpdatedAt);
            break;
          }
          case 34: {
            Name = input.ReadString();
            break;
          }
          case 42: {
            Vendor = input.ReadString();
            break;
          }
          case 50: {
            Firmware = input.ReadString();
            break;
          }
          case 56: {
            Region = (global::Chirpstack.Common.Region) input.ReadEnum();
            break;
          }
          case 64: {
            MacVersion = (global::Chirpstack.Common.MacVersion) input.ReadEnum();
            break;
          }
          case 72: {
            RegParamsRevision = (global::Chirpstack.Common.RegParamsRevision) input.ReadEnum();
            break;
          }
          case 80: {
            SupportsOtaa = input.ReadBool();
            break;
          }
          case 88: {
            SupportsClassB = input.ReadBool();
            break;
          }
          case 96: {
            SupportsClassC = input.ReadBool();
            break;
          }
        }
      }
    }
    #endif

  }

  public sealed partial class CreateDeviceProfileTemplateRequest : pb::IMessage<CreateDeviceProfileTemplateRequest>
  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      , pb::IBufferMessage
  #endif
  {
    private static readonly pb::MessageParser<CreateDeviceProfileTemplateRequest> _parser = new pb::MessageParser<CreateDeviceProfileTemplateRequest>(() => new CreateDeviceProfileTemplateRequest());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pb::MessageParser<CreateDeviceProfileTemplateRequest> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::Chirpstack.Api.DeviceProfileTemplateReflection.Descriptor.MessageTypes[2]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public CreateDeviceProfileTemplateRequest() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public CreateDeviceProfileTemplateRequest(CreateDeviceProfileTemplateRequest other) : this() {
      deviceProfileTemplate_ = other.deviceProfileTemplate_ != null ? other.deviceProfileTemplate_.Clone() : null;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public CreateDeviceProfileTemplateRequest Clone() {
      return new CreateDeviceProfileTemplateRequest(this);
    }

    /// <summary>Field number for the "device_profile_template" field.</summary>
    public const int DeviceProfileTemplateFieldNumber = 1;
    private global::Chirpstack.Api.DeviceProfileTemplate deviceProfileTemplate_;
    /// <summary>
    /// Object to create.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Api.DeviceProfileTemplate DeviceProfileTemplate {
      get { return deviceProfileTemplate_; }
      set {
        deviceProfileTemplate_ = value;
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override bool Equals(object other) {
      return Equals(other as CreateDeviceProfileTemplateRequest);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(CreateDeviceProfileTemplateRequest other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (!object.Equals(DeviceProfileTemplate, other.DeviceProfileTemplate)) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override int GetHashCode() {
      int hash = 1;
      if (deviceProfileTemplate_ != null) hash ^= DeviceProfileTemplate.GetHashCode();
      if (_unknownFields != null) {
        hash ^= _unknownFields.GetHashCode();
      }
      return hash;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override string ToString() {
      return pb::JsonFormatter.ToDiagnosticString(this);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void WriteTo(pb::CodedOutputStream output) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      output.WriteRawMessage(this);
    #else
      if (deviceProfileTemplate_ != null) {
        output.WriteRawTag(10);
        output.WriteMessage(DeviceProfileTemplate);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
      if (deviceProfileTemplate_ != null) {
        output.WriteRawTag(10);
        output.WriteMessage(DeviceProfileTemplate);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(ref output);
      }
    }
    #endif

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public int CalculateSize() {
      int size = 0;
      if (deviceProfileTemplate_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(DeviceProfileTemplate);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(CreateDeviceProfileTemplateRequest other) {
      if (other == null) {
        return;
      }
      if (other.deviceProfileTemplate_ != null) {
        if (deviceProfileTemplate_ == null) {
          DeviceProfileTemplate = new global::Chirpstack.Api.DeviceProfileTemplate();
        }
        DeviceProfileTemplate.MergeFrom(other.DeviceProfileTemplate);
      }
      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(pb::CodedInputStream input) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      input.ReadRawMessage(this);
    #else
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
            break;
          case 10: {
            if (deviceProfileTemplate_ == null) {
              DeviceProfileTemplate = new global::Chirpstack.Api.DeviceProfileTemplate();
            }
            input.ReadMessage(DeviceProfileTemplate);
            break;
          }
        }
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
            break;
          case 10: {
            if (deviceProfileTemplate_ == null) {
              DeviceProfileTemplate = new global::Chirpstack.Api.DeviceProfileTemplate();
            }
            input.ReadMessage(DeviceProfileTemplate);
            break;
          }
        }
      }
    }
    #endif

  }

  public sealed partial class GetDeviceProfileTemplateRequest : pb::IMessage<GetDeviceProfileTemplateRequest>
  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      , pb::IBufferMessage
  #endif
  {
    private static readonly pb::MessageParser<GetDeviceProfileTemplateRequest> _parser = new pb::MessageParser<GetDeviceProfileTemplateRequest>(() => new GetDeviceProfileTemplateRequest());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pb::MessageParser<GetDeviceProfileTemplateRequest> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::Chirpstack.Api.DeviceProfileTemplateReflection.Descriptor.MessageTypes[3]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public GetDeviceProfileTemplateRequest() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public GetDeviceProfileTemplateRequest(GetDeviceProfileTemplateRequest other) : this() {
      id_ = other.id_;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public GetDeviceProfileTemplateRequest Clone() {
      return new GetDeviceProfileTemplateRequest(this);
    }

    /// <summary>Field number for the "id" field.</summary>
    public const int IdFieldNumber = 1;
    private string id_ = "";
    /// <summary>
    /// ID.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string Id {
      get { return id_; }
      set {
        id_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override bool Equals(object other) {
      return Equals(other as GetDeviceProfileTemplateRequest);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(GetDeviceProfileTemplateRequest other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (Id != other.Id) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override int GetHashCode() {
      int hash = 1;
      if (Id.Length != 0) hash ^= Id.GetHashCode();
      if (_unknownFields != null) {
        hash ^= _unknownFields.GetHashCode();
      }
      return hash;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override string ToString() {
      return pb::JsonFormatter.ToDiagnosticString(this);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void WriteTo(pb::CodedOutputStream output) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      output.WriteRawMessage(this);
    #else
      if (Id.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(Id);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
      if (Id.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(Id);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(ref output);
      }
    }
    #endif

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public int CalculateSize() {
      int size = 0;
      if (Id.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Id);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(GetDeviceProfileTemplateRequest other) {
      if (other == null) {
        return;
      }
      if (other.Id.Length != 0) {
        Id = other.Id;
      }
      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(pb::CodedInputStream input) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      input.ReadRawMessage(this);
    #else
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
            break;
          case 10: {
            Id = input.ReadString();
            break;
          }
        }
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
            break;
          case 10: {
            Id = input.ReadString();
            break;
          }
        }
      }
    }
    #endif

  }

  public sealed partial class GetDeviceProfileTemplateResponse : pb::IMessage<GetDeviceProfileTemplateResponse>
  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      , pb::IBufferMessage
  #endif
  {
    private static readonly pb::MessageParser<GetDeviceProfileTemplateResponse> _parser = new pb::MessageParser<GetDeviceProfileTemplateResponse>(() => new GetDeviceProfileTemplateResponse());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pb::MessageParser<GetDeviceProfileTemplateResponse> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::Chirpstack.Api.DeviceProfileTemplateReflection.Descriptor.MessageTypes[4]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public GetDeviceProfileTemplateResponse() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public GetDeviceProfileTemplateResponse(GetDeviceProfileTemplateResponse other) : this() {
      deviceProfileTemplate_ = other.deviceProfileTemplate_ != null ? other.deviceProfileTemplate_.Clone() : null;
      createdAt_ = other.createdAt_ != null ? other.createdAt_.Clone() : null;
      updatedAt_ = other.updatedAt_ != null ? other.updatedAt_.Clone() : null;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public GetDeviceProfileTemplateResponse Clone() {
      return new GetDeviceProfileTemplateResponse(this);
    }

    /// <summary>Field number for the "device_profile_template" field.</summary>
    public const int DeviceProfileTemplateFieldNumber = 1;
    private global::Chirpstack.Api.DeviceProfileTemplate deviceProfileTemplate_;
    /// <summary>
    /// Device-profile template object.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Api.DeviceProfileTemplate DeviceProfileTemplate {
      get { return deviceProfileTemplate_; }
      set {
        deviceProfileTemplate_ = value;
      }
    }

    /// <summary>Field number for the "created_at" field.</summary>
    public const int CreatedAtFieldNumber = 2;
    private global::Google.Protobuf.WellKnownTypes.Timestamp createdAt_;
    /// <summary>
    /// Created at timestamp.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Google.Protobuf.WellKnownTypes.Timestamp CreatedAt {
      get { return createdAt_; }
      set {
        createdAt_ = value;
      }
    }

    /// <summary>Field number for the "updated_at" field.</summary>
    public const int UpdatedAtFieldNumber = 3;
    private global::Google.Protobuf.WellKnownTypes.Timestamp updatedAt_;
    /// <summary>
    /// Last update timestamp.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Google.Protobuf.WellKnownTypes.Timestamp UpdatedAt {
      get { return updatedAt_; }
      set {
        updatedAt_ = value;
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override bool Equals(object other) {
      return Equals(other as GetDeviceProfileTemplateResponse);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(GetDeviceProfileTemplateResponse other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (!object.Equals(DeviceProfileTemplate, other.DeviceProfileTemplate)) return false;
      if (!object.Equals(CreatedAt, other.CreatedAt)) return false;
      if (!object.Equals(UpdatedAt, other.UpdatedAt)) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override int GetHashCode() {
      int hash = 1;
      if (deviceProfileTemplate_ != null) hash ^= DeviceProfileTemplate.GetHashCode();
      if (createdAt_ != null) hash ^= CreatedAt.GetHashCode();
      if (updatedAt_ != null) hash ^= UpdatedAt.GetHashCode();
      if (_unknownFields != null) {
        hash ^= _unknownFields.GetHashCode();
      }
      return hash;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override string ToString() {
      return pb::JsonFormatter.ToDiagnosticString(this);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void WriteTo(pb::CodedOutputStream output) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      output.WriteRawMessage(this);
    #else
      if (deviceProfileTemplate_ != null) {
        output.WriteRawTag(10);
        output.WriteMessage(DeviceProfileTemplate);
      }
      if (createdAt_ != null) {
        output.WriteRawTag(18);
        output.WriteMessage(CreatedAt);
      }
      if (updatedAt_ != null) {
        output.WriteRawTag(26);
        output.WriteMessage(UpdatedAt);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
      if (deviceProfileTemplate_ != null) {
        output.WriteRawTag(10);
        output.WriteMessage(DeviceProfileTemplate);
      }
      if (createdAt_ != null) {
        output.WriteRawTag(18);
        output.WriteMessage(CreatedAt);
      }
      if (updatedAt_ != null) {
        output.WriteRawTag(26);
        output.WriteMessage(UpdatedAt);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(ref output);
      }
    }
    #endif

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public int CalculateSize() {
      int size = 0;
      if (deviceProfileTemplate_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(DeviceProfileTemplate);
      }
      if (createdAt_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(CreatedAt);
      }
      if (updatedAt_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(UpdatedAt);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(GetDeviceProfileTemplateResponse other) {
      if (other == null) {
        return;
      }
      if (other.deviceProfileTemplate_ != null) {
        if (deviceProfileTemplate_ == null) {
          DeviceProfileTemplate = new global::Chirpstack.Api.DeviceProfileTemplate();
        }
        DeviceProfileTemplate.MergeFrom(other.DeviceProfileTemplate);
      }
      if (other.createdAt_ != null) {
        if (createdAt_ == null) {
          CreatedAt = new global::Google.Protobuf.WellKnownTypes.Timestamp();
        }
        CreatedAt.MergeFrom(other.CreatedAt);
      }
      if (other.updatedAt_ != null) {
        if (updatedAt_ == null) {
          UpdatedAt = new global::Google.Protobuf.WellKnownTypes.Timestamp();
        }
        UpdatedAt.MergeFrom(other.UpdatedAt);
      }
      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(pb::CodedInputStream input) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      input.ReadRawMessage(this);
    #else
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
            break;
          case 10: {
            if (deviceProfileTemplate_ == null) {
              DeviceProfileTemplate = new global::Chirpstack.Api.DeviceProfileTemplate();
            }
            input.ReadMessage(DeviceProfileTemplate);
            break;
          }
          case 18: {
            if (createdAt_ == null) {
              CreatedAt = new global::Google.Protobuf.WellKnownTypes.Timestamp();
            }
            input.ReadMessage(CreatedAt);
            break;
          }
          case 26: {
            if (updatedAt_ == null) {
              UpdatedAt = new global::Google.Protobuf.WellKnownTypes.Timestamp();
            }
            input.ReadMessage(UpdatedAt);
            break;
          }
        }
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
            break;
          case 10: {
            if (deviceProfileTemplate_ == null) {
              DeviceProfileTemplate = new global::Chirpstack.Api.DeviceProfileTemplate();
            }
            input.ReadMessage(DeviceProfileTemplate);
            break;
          }
          case 18: {
            if (createdAt_ == null) {
              CreatedAt = new global::Google.Protobuf.WellKnownTypes.Timestamp();
            }
            input.ReadMessage(CreatedAt);
            break;
          }
          case 26: {
            if (updatedAt_ == null) {
              UpdatedAt = new global::Google.Protobuf.WellKnownTypes.Timestamp();
            }
            input.ReadMessage(UpdatedAt);
            break;
          }
        }
      }
    }
    #endif

  }

  public sealed partial class UpdateDeviceProfileTemplateRequest : pb::IMessage<UpdateDeviceProfileTemplateRequest>
  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      , pb::IBufferMessage
  #endif
  {
    private static readonly pb::MessageParser<UpdateDeviceProfileTemplateRequest> _parser = new pb::MessageParser<UpdateDeviceProfileTemplateRequest>(() => new UpdateDeviceProfileTemplateRequest());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pb::MessageParser<UpdateDeviceProfileTemplateRequest> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::Chirpstack.Api.DeviceProfileTemplateReflection.Descriptor.MessageTypes[5]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public UpdateDeviceProfileTemplateRequest() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public UpdateDeviceProfileTemplateRequest(UpdateDeviceProfileTemplateRequest other) : this() {
      deviceProfileTemplate_ = other.deviceProfileTemplate_ != null ? other.deviceProfileTemplate_.Clone() : null;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public UpdateDeviceProfileTemplateRequest Clone() {
      return new UpdateDeviceProfileTemplateRequest(this);
    }

    /// <summary>Field number for the "device_profile_template" field.</summary>
    public const int DeviceProfileTemplateFieldNumber = 1;
    private global::Chirpstack.Api.DeviceProfileTemplate deviceProfileTemplate_;
    /// <summary>
    /// Object to update.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Api.DeviceProfileTemplate DeviceProfileTemplate {
      get { return deviceProfileTemplate_; }
      set {
        deviceProfileTemplate_ = value;
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override bool Equals(object other) {
      return Equals(other as UpdateDeviceProfileTemplateRequest);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(UpdateDeviceProfileTemplateRequest other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (!object.Equals(DeviceProfileTemplate, other.DeviceProfileTemplate)) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override int GetHashCode() {
      int hash = 1;
      if (deviceProfileTemplate_ != null) hash ^= DeviceProfileTemplate.GetHashCode();
      if (_unknownFields != null) {
        hash ^= _unknownFields.GetHashCode();
      }
      return hash;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override string ToString() {
      return pb::JsonFormatter.ToDiagnosticString(this);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void WriteTo(pb::CodedOutputStream output) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      output.WriteRawMessage(this);
    #else
      if (deviceProfileTemplate_ != null) {
        output.WriteRawTag(10);
        output.WriteMessage(DeviceProfileTemplate);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
      if (deviceProfileTemplate_ != null) {
        output.WriteRawTag(10);
        output.WriteMessage(DeviceProfileTemplate);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(ref output);
      }
    }
    #endif

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public int CalculateSize() {
      int size = 0;
      if (deviceProfileTemplate_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(DeviceProfileTemplate);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(UpdateDeviceProfileTemplateRequest other) {
      if (other == null) {
        return;
      }
      if (other.deviceProfileTemplate_ != null) {
        if (deviceProfileTemplate_ == null) {
          DeviceProfileTemplate = new global::Chirpstack.Api.DeviceProfileTemplate();
        }
        DeviceProfileTemplate.MergeFrom(other.DeviceProfileTemplate);
      }
      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(pb::CodedInputStream input) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      input.ReadRawMessage(this);
    #else
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
            break;
          case 10: {
            if (deviceProfileTemplate_ == null) {
              DeviceProfileTemplate = new global::Chirpstack.Api.DeviceProfileTemplate();
            }
            input.ReadMessage(DeviceProfileTemplate);
            break;
          }
        }
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
            break;
          case 10: {
            if (deviceProfileTemplate_ == null) {
              DeviceProfileTemplate = new global::Chirpstack.Api.DeviceProfileTemplate();
            }
            input.ReadMessage(DeviceProfileTemplate);
            break;
          }
        }
      }
    }
    #endif

  }

  public sealed partial class DeleteDeviceProfileTemplateRequest : pb::IMessage<DeleteDeviceProfileTemplateRequest>
  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      , pb::IBufferMessage
  #endif
  {
    private static readonly pb::MessageParser<DeleteDeviceProfileTemplateRequest> _parser = new pb::MessageParser<DeleteDeviceProfileTemplateRequest>(() => new DeleteDeviceProfileTemplateRequest());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pb::MessageParser<DeleteDeviceProfileTemplateRequest> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::Chirpstack.Api.DeviceProfileTemplateReflection.Descriptor.MessageTypes[6]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public DeleteDeviceProfileTemplateRequest() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public DeleteDeviceProfileTemplateRequest(DeleteDeviceProfileTemplateRequest other) : this() {
      id_ = other.id_;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public DeleteDeviceProfileTemplateRequest Clone() {
      return new DeleteDeviceProfileTemplateRequest(this);
    }

    /// <summary>Field number for the "id" field.</summary>
    public const int IdFieldNumber = 1;
    private string id_ = "";
    /// <summary>
    /// ID.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string Id {
      get { return id_; }
      set {
        id_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override bool Equals(object other) {
      return Equals(other as DeleteDeviceProfileTemplateRequest);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(DeleteDeviceProfileTemplateRequest other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (Id != other.Id) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override int GetHashCode() {
      int hash = 1;
      if (Id.Length != 0) hash ^= Id.GetHashCode();
      if (_unknownFields != null) {
        hash ^= _unknownFields.GetHashCode();
      }
      return hash;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override string ToString() {
      return pb::JsonFormatter.ToDiagnosticString(this);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void WriteTo(pb::CodedOutputStream output) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      output.WriteRawMessage(this);
    #else
      if (Id.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(Id);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
      if (Id.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(Id);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(ref output);
      }
    }
    #endif

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public int CalculateSize() {
      int size = 0;
      if (Id.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Id);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(DeleteDeviceProfileTemplateRequest other) {
      if (other == null) {
        return;
      }
      if (other.Id.Length != 0) {
        Id = other.Id;
      }
      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(pb::CodedInputStream input) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      input.ReadRawMessage(this);
    #else
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
            break;
          case 10: {
            Id = input.ReadString();
            break;
          }
        }
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
            break;
          case 10: {
            Id = input.ReadString();
            break;
          }
        }
      }
    }
    #endif

  }

  public sealed partial class ListDeviceProfileTemplatesRequest : pb::IMessage<ListDeviceProfileTemplatesRequest>
  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      , pb::IBufferMessage
  #endif
  {
    private static readonly pb::MessageParser<ListDeviceProfileTemplatesRequest> _parser = new pb::MessageParser<ListDeviceProfileTemplatesRequest>(() => new ListDeviceProfileTemplatesRequest());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pb::MessageParser<ListDeviceProfileTemplatesRequest> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::Chirpstack.Api.DeviceProfileTemplateReflection.Descriptor.MessageTypes[7]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public ListDeviceProfileTemplatesRequest() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public ListDeviceProfileTemplatesRequest(ListDeviceProfileTemplatesRequest other) : this() {
      limit_ = other.limit_;
      offset_ = other.offset_;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public ListDeviceProfileTemplatesRequest Clone() {
      return new ListDeviceProfileTemplatesRequest(this);
    }

    /// <summary>Field number for the "limit" field.</summary>
    public const int LimitFieldNumber = 1;
    private uint limit_;
    /// <summary>
    /// Max number of device-profile templates to return in the result-set.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint Limit {
      get { return limit_; }
      set {
        limit_ = value;
      }
    }

    /// <summary>Field number for the "offset" field.</summary>
    public const int OffsetFieldNumber = 2;
    private uint offset_;
    /// <summary>
    /// Offset in the result-set (for pagination).
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint Offset {
      get { return offset_; }
      set {
        offset_ = value;
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override bool Equals(object other) {
      return Equals(other as ListDeviceProfileTemplatesRequest);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(ListDeviceProfileTemplatesRequest other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (Limit != other.Limit) return false;
      if (Offset != other.Offset) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override int GetHashCode() {
      int hash = 1;
      if (Limit != 0) hash ^= Limit.GetHashCode();
      if (Offset != 0) hash ^= Offset.GetHashCode();
      if (_unknownFields != null) {
        hash ^= _unknownFields.GetHashCode();
      }
      return hash;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override string ToString() {
      return pb::JsonFormatter.ToDiagnosticString(this);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void WriteTo(pb::CodedOutputStream output) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      output.WriteRawMessage(this);
    #else
      if (Limit != 0) {
        output.WriteRawTag(8);
        output.WriteUInt32(Limit);
      }
      if (Offset != 0) {
        output.WriteRawTag(16);
        output.WriteUInt32(Offset);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
      if (Limit != 0) {
        output.WriteRawTag(8);
        output.WriteUInt32(Limit);
      }
      if (Offset != 0) {
        output.WriteRawTag(16);
        output.WriteUInt32(Offset);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(ref output);
      }
    }
    #endif

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public int CalculateSize() {
      int size = 0;
      if (Limit != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Limit);
      }
      if (Offset != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Offset);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(ListDeviceProfileTemplatesRequest other) {
      if (other == null) {
        return;
      }
      if (other.Limit != 0) {
        Limit = other.Limit;
      }
      if (other.Offset != 0) {
        Offset = other.Offset;
      }
      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(pb::CodedInputStream input) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      input.ReadRawMessage(this);
    #else
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
            break;
          case 8: {
            Limit = input.ReadUInt32();
            break;
          }
          case 16: {
            Offset = input.ReadUInt32();
            break;
          }
        }
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
            break;
          case 8: {
            Limit = input.ReadUInt32();
            break;
          }
          case 16: {
            Offset = input.ReadUInt32();
            break;
          }
        }
      }
    }
    #endif

  }

  public sealed partial class ListDeviceProfileTemplatesResponse : pb::IMessage<ListDeviceProfileTemplatesResponse>
  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      , pb::IBufferMessage
  #endif
  {
    private static readonly pb::MessageParser<ListDeviceProfileTemplatesResponse> _parser = new pb::MessageParser<ListDeviceProfileTemplatesResponse>(() => new ListDeviceProfileTemplatesResponse());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pb::MessageParser<ListDeviceProfileTemplatesResponse> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::Chirpstack.Api.DeviceProfileTemplateReflection.Descriptor.MessageTypes[8]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public ListDeviceProfileTemplatesResponse() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public ListDeviceProfileTemplatesResponse(ListDeviceProfileTemplatesResponse other) : this() {
      totalCount_ = other.totalCount_;
      result_ = other.result_.Clone();
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public ListDeviceProfileTemplatesResponse Clone() {
      return new ListDeviceProfileTemplatesResponse(this);
    }

    /// <summary>Field number for the "total_count" field.</summary>
    public const int TotalCountFieldNumber = 1;
    private uint totalCount_;
    /// <summary>
    /// Total number of device-profile templates.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint TotalCount {
      get { return totalCount_; }
      set {
        totalCount_ = value;
      }
    }

    /// <summary>Field number for the "result" field.</summary>
    public const int ResultFieldNumber = 2;
    private static readonly pb::FieldCodec<global::Chirpstack.Api.DeviceProfileTemplateListItem> _repeated_result_codec
        = pb::FieldCodec.ForMessage(18, global::Chirpstack.Api.DeviceProfileTemplateListItem.Parser);
    private readonly pbc::RepeatedField<global::Chirpstack.Api.DeviceProfileTemplateListItem> result_ = new pbc::RepeatedField<global::Chirpstack.Api.DeviceProfileTemplateListItem>();
    /// <summary>
    /// Result-set.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pbc::RepeatedField<global::Chirpstack.Api.DeviceProfileTemplateListItem> Result {
      get { return result_; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override bool Equals(object other) {
      return Equals(other as ListDeviceProfileTemplatesResponse);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(ListDeviceProfileTemplatesResponse other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (TotalCount != other.TotalCount) return false;
      if(!result_.Equals(other.result_)) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override int GetHashCode() {
      int hash = 1;
      if (TotalCount != 0) hash ^= TotalCount.GetHashCode();
      hash ^= result_.GetHashCode();
      if (_unknownFields != null) {
        hash ^= _unknownFields.GetHashCode();
      }
      return hash;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override string ToString() {
      return pb::JsonFormatter.ToDiagnosticString(this);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void WriteTo(pb::CodedOutputStream output) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      output.WriteRawMessage(this);
    #else
      if (TotalCount != 0) {
        output.WriteRawTag(8);
        output.WriteUInt32(TotalCount);
      }
      result_.WriteTo(output, _repeated_result_codec);
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
      if (TotalCount != 0) {
        output.WriteRawTag(8);
        output.WriteUInt32(TotalCount);
      }
      result_.WriteTo(ref output, _repeated_result_codec);
      if (_unknownFields != null) {
        _unknownFields.WriteTo(ref output);
      }
    }
    #endif

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public int CalculateSize() {
      int size = 0;
      if (TotalCount != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(TotalCount);
      }
      size += result_.CalculateSize(_repeated_result_codec);
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(ListDeviceProfileTemplatesResponse other) {
      if (other == null) {
        return;
      }
      if (other.TotalCount != 0) {
        TotalCount = other.TotalCount;
      }
      result_.Add(other.result_);
      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(pb::CodedInputStream input) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      input.ReadRawMessage(this);
    #else
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
            break;
          case 8: {
            TotalCount = input.ReadUInt32();
            break;
          }
          case 18: {
            result_.AddEntriesFrom(input, _repeated_result_codec);
            break;
          }
        }
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
            break;
          case 8: {
            TotalCount = input.ReadUInt32();
            break;
          }
          case 18: {
            result_.AddEntriesFrom(ref input, _repeated_result_codec);
            break;
          }
        }
      }
    }
    #endif

  }

  #endregion

}

#endregion Designer generated code
