// <auto-generated>
//     Generated by the protocol buffer compiler.  DO NOT EDIT!
//     source: gw/gw.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.Gateway {

  /// <summary>Holder for reflection information generated from gw/gw.proto</summary>
  public static partial class GwReflection {

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

    static GwReflection() {
      byte[] descriptorData = global::System.Convert.FromBase64String(
          string.Concat(
            "Cgtndy9ndy5wcm90bxICZ3caE2NvbW1vbi9jb21tb24ucHJvdG8aH2dvb2ds",
            "ZS9wcm90b2J1Zi90aW1lc3RhbXAucHJvdG8aHmdvb2dsZS9wcm90b2J1Zi9k",
            "dXJhdGlvbi5wcm90bxocZ29vZ2xlL3Byb3RvYnVmL3N0cnVjdC5wcm90byKV",
            "AQoKTW9kdWxhdGlvbhImCgRsb3JhGAMgASgLMhYuZ3cuTG9yYU1vZHVsYXRp",
            "b25JbmZvSAASJAoDZnNrGAQgASgLMhUuZ3cuRnNrTW9kdWxhdGlvbkluZm9I",
            "ABIrCgdscl9maHNzGAUgASgLMhguZ3cuTHJGaHNzTW9kdWxhdGlvbkluZm9I",
            "AEIMCgpwYXJhbWV0ZXJzIo0CChJVcGxpbmtUeEluZm9MZWdhY3kSEQoJZnJl",
            "cXVlbmN5GAEgASgNEiYKCm1vZHVsYXRpb24YAiABKA4yEi5jb21tb24uTW9k",
            "dWxhdGlvbhI2ChRsb3JhX21vZHVsYXRpb25faW5mbxgDIAEoCzIWLmd3Lkxv",
            "cmFNb2R1bGF0aW9uSW5mb0gAEjQKE2Zza19tb2R1bGF0aW9uX2luZm8YBCAB",
            "KAsyFS5ndy5Gc2tNb2R1bGF0aW9uSW5mb0gAEjsKF2xyX2Zoc3NfbW9kdWxh",
            "dGlvbl9pbmZvGAUgASgLMhguZ3cuTHJGaHNzTW9kdWxhdGlvbkluZm9IAEIR",
            "Cg9tb2R1bGF0aW9uX2luZm8iRQoMVXBsaW5rVHhJbmZvEhEKCWZyZXF1ZW5j",
            "eRgBIAEoDRIiCgptb2R1bGF0aW9uGAIgASgLMg4uZ3cuTW9kdWxhdGlvbiKc",
            "AQoSTG9yYU1vZHVsYXRpb25JbmZvEhEKCWJhbmR3aWR0aBgBIAEoDRIYChBz",
            "cHJlYWRpbmdfZmFjdG9yGAIgASgNEhgKEGNvZGVfcmF0ZV9sZWdhY3kYAyAB",
            "KAkSHwoJY29kZV9yYXRlGAUgASgOMgwuZ3cuQ29kZVJhdGUSHgoWcG9sYXJp",
            "emF0aW9uX2ludmVyc2lvbhgEIAEoCCJCChFGc2tNb2R1bGF0aW9uSW5mbxIb",
            "ChNmcmVxdWVuY3lfZGV2aWF0aW9uGAEgASgNEhAKCGRhdGFyYXRlGAIgASgN",
            "IoYBChRMckZoc3NNb2R1bGF0aW9uSW5mbxIfChdvcGVyYXRpbmdfY2hhbm5l",
            "bF93aWR0aBgBIAEoDRIYChBjb2RlX3JhdGVfbGVnYWN5GAIgASgJEh8KCWNv",
            "ZGVfcmF0ZRgEIAEoDjIMLmd3LkNvZGVSYXRlEhIKCmdyaWRfc3RlcHMYAyAB",
            "KA0iVgoWRW5jcnlwdGVkRmluZVRpbWVzdGFtcBIVCg1hZXNfa2V5X2luZGV4",
            "GAEgASgNEhQKDGVuY3J5cHRlZF9ucxgCIAEoDBIPCgdmcGdhX2lkGAMgASgM",
            "Ij4KElBsYWluRmluZVRpbWVzdGFtcBIoCgR0aW1lGAEgASgLMhouZ29vZ2xl",
            "LnByb3RvYnVmLlRpbWVzdGFtcCKQBwoMR2F0ZXdheVN0YXRzEhkKEWdhdGV3",
            "YXlfaWRfbGVnYWN5GAEgASgMEhIKCmdhdGV3YXlfaWQYESABKAkSKAoEdGlt",
            "ZRgCIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXASIgoIbG9jYXRp",
            "b24YAyABKAsyEC5jb21tb24uTG9jYXRpb24SFgoOY29uZmlnX3ZlcnNpb24Y",
            "BCABKAkSGwoTcnhfcGFja2V0c19yZWNlaXZlZBgFIAEoDRIeChZyeF9wYWNr",
            "ZXRzX3JlY2VpdmVkX29rGAYgASgNEhsKE3R4X3BhY2tldHNfcmVjZWl2ZWQY",
            "ByABKA0SGgoSdHhfcGFja2V0c19lbWl0dGVkGAggASgNEjAKCG1ldGFkYXRh",
            "GAogAygLMh4uZ3cuR2F0ZXdheVN0YXRzLk1ldGFkYXRhRW50cnkSTQoYdHhf",
            "cGFja2V0c19wZXJfZnJlcXVlbmN5GAwgAygLMisuZ3cuR2F0ZXdheVN0YXRz",
            "LlR4UGFja2V0c1BlckZyZXF1ZW5jeUVudHJ5Ek0KGHJ4X3BhY2tldHNfcGVy",
            "X2ZyZXF1ZW5jeRgNIAMoCzIrLmd3LkdhdGV3YXlTdGF0cy5SeFBhY2tldHNQ",
            "ZXJGcmVxdWVuY3lFbnRyeRI5Chl0eF9wYWNrZXRzX3Blcl9tb2R1bGF0aW9u",
            "GA4gAygLMhYuZ3cuUGVyTW9kdWxhdGlvbkNvdW50EjkKGXJ4X3BhY2tldHNf",
            "cGVyX21vZHVsYXRpb24YDyADKAsyFi5ndy5QZXJNb2R1bGF0aW9uQ291bnQS",
            "RwoVdHhfcGFja2V0c19wZXJfc3RhdHVzGBAgAygLMiguZ3cuR2F0ZXdheVN0",
            "YXRzLlR4UGFja2V0c1BlclN0YXR1c0VudHJ5Gi8KDU1ldGFkYXRhRW50cnkS",
            "CwoDa2V5GAEgASgJEg0KBXZhbHVlGAIgASgJOgI4ARo8ChpUeFBhY2tldHNQ",
            "ZXJGcmVxdWVuY3lFbnRyeRILCgNrZXkYASABKA0SDQoFdmFsdWUYAiABKA06",
            "AjgBGjwKGlJ4UGFja2V0c1BlckZyZXF1ZW5jeUVudHJ5EgsKA2tleRgBIAEo",
            "DRINCgV2YWx1ZRgCIAEoDToCOAEaOQoXVHhQYWNrZXRzUGVyU3RhdHVzRW50",
            "cnkSCwoDa2V5GAEgASgJEg0KBXZhbHVlGAIgASgNOgI4ASJHChJQZXJNb2R1",
            "bGF0aW9uQ291bnQSIgoKbW9kdWxhdGlvbhgBIAEoCzIOLmd3Lk1vZHVsYXRp",
            "b24SDQoFY291bnQYAiABKA0igAUKElVwbGlua1J4SW5mb0xlZ2FjeRISCgpn",
            "YXRld2F5X2lkGAEgASgMEigKBHRpbWUYAiABKAsyGi5nb29nbGUucHJvdG9i",
            "dWYuVGltZXN0YW1wEjcKFHRpbWVfc2luY2VfZ3BzX2Vwb2NoGAMgASgLMhku",
            "Z29vZ2xlLnByb3RvYnVmLkR1cmF0aW9uEgwKBHJzc2kYBSABKAUSEAoIbG9y",
            "YV9zbnIYBiABKAESDwoHY2hhbm5lbBgHIAEoDRIQCghyZl9jaGFpbhgIIAEo",
            "DRINCgVib2FyZBgJIAEoDRIPCgdhbnRlbm5hGAogASgNEiIKCGxvY2F0aW9u",
            "GAsgASgLMhAuY29tbW9uLkxvY2F0aW9uEjIKE2ZpbmVfdGltZXN0YW1wX3R5",
            "cGUYDCABKA4yFS5ndy5GaW5lVGltZXN0YW1wVHlwZRI+ChhlbmNyeXB0ZWRf",
            "ZmluZV90aW1lc3RhbXAYDSABKAsyGi5ndy5FbmNyeXB0ZWRGaW5lVGltZXN0",
            "YW1wSAASNgoUcGxhaW5fZmluZV90aW1lc3RhbXAYDiABKAsyFi5ndy5QbGFp",
            "bkZpbmVUaW1lc3RhbXBIABIPCgdjb250ZXh0GA8gASgMEhEKCXVwbGlua19p",
            "ZBgQIAEoDBIhCgpjcmNfc3RhdHVzGBEgASgOMg0uZ3cuQ1JDU3RhdHVzEjYK",
            "CG1ldGFkYXRhGBIgAygLMiQuZ3cuVXBsaW5rUnhJbmZvTGVnYWN5Lk1ldGFk",
            "YXRhRW50cnkaLwoNTWV0YWRhdGFFbnRyeRILCgNrZXkYASABKAkSDQoFdmFs",
            "dWUYAiABKAk6AjgBQhAKDmZpbmVfdGltZXN0YW1wIu8DCgxVcGxpbmtSeElu",
            "Zm8SEgoKZ2F0ZXdheV9pZBgBIAEoCRIRCgl1cGxpbmtfaWQYAiABKA0SKAoE",
            "dGltZRgDIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXASNwoUdGlt",
            "ZV9zaW5jZV9ncHNfZXBvY2gYBCABKAsyGS5nb29nbGUucHJvdG9idWYuRHVy",
            "YXRpb24SPAoZZmluZV90aW1lX3NpbmNlX2dwc19lcG9jaBgFIAEoCzIZLmdv",
            "b2dsZS5wcm90b2J1Zi5EdXJhdGlvbhIMCgRyc3NpGAYgASgFEgsKA3NuchgH",
            "IAEoAhIPCgdjaGFubmVsGAggASgNEhAKCHJmX2NoYWluGAkgASgNEg0KBWJv",
            "YXJkGAogASgNEg8KB2FudGVubmEYCyABKA0SIgoIbG9jYXRpb24YDCABKAsy",
            "EC5jb21tb24uTG9jYXRpb24SDwoHY29udGV4dBgNIAEoDBIwCghtZXRhZGF0",
            "YRgPIAMoCzIeLmd3LlVwbGlua1J4SW5mby5NZXRhZGF0YUVudHJ5EiEKCmNy",
            "Y19zdGF0dXMYECABKA4yDS5ndy5DUkNTdGF0dXMaLwoNTWV0YWRhdGFFbnRy",
            "eRILCgNrZXkYASABKAkSDQoFdmFsdWUYAiABKAk6AjgBIoIEChREb3dubGlu",
            "a1R4SW5mb0xlZ2FjeRISCgpnYXRld2F5X2lkGAEgASgMEhEKCWZyZXF1ZW5j",
            "eRgFIAEoDRINCgVwb3dlchgGIAEoBRImCgptb2R1bGF0aW9uGAcgASgOMhIu",
            "Y29tbW9uLk1vZHVsYXRpb24SNgoUbG9yYV9tb2R1bGF0aW9uX2luZm8YCCAB",
            "KAsyFi5ndy5Mb3JhTW9kdWxhdGlvbkluZm9IABI0ChNmc2tfbW9kdWxhdGlv",
            "bl9pbmZvGAkgASgLMhUuZ3cuRnNrTW9kdWxhdGlvbkluZm9IABINCgVib2Fy",
            "ZBgKIAEoDRIPCgdhbnRlbm5hGAsgASgNEiIKBnRpbWluZxgMIAEoDjISLmd3",
            "LkRvd25saW5rVGltaW5nEjwKF2ltbWVkaWF0ZWx5X3RpbWluZ19pbmZvGA0g",
            "ASgLMhkuZ3cuSW1tZWRpYXRlbHlUaW1pbmdJbmZvSAESMAoRZGVsYXlfdGlt",
            "aW5nX2luZm8YDiABKAsyEy5ndy5EZWxheVRpbWluZ0luZm9IARI3ChVncHNf",
            "ZXBvY2hfdGltaW5nX2luZm8YDyABKAsyFi5ndy5HUFNFcG9jaFRpbWluZ0lu",
            "Zm9IARIPCgdjb250ZXh0GBAgASgMQhEKD21vZHVsYXRpb25faW5mb0INCgt0",
            "aW1pbmdfaW5mbyKjAQoORG93bmxpbmtUeEluZm8SEQoJZnJlcXVlbmN5GAEg",
            "ASgNEg0KBXBvd2VyGAIgASgFEiIKCm1vZHVsYXRpb24YAyABKAsyDi5ndy5N",
            "b2R1bGF0aW9uEg0KBWJvYXJkGAQgASgNEg8KB2FudGVubmEYBSABKA0SGgoG",
            "dGltaW5nGAYgASgLMgouZ3cuVGltaW5nEg8KB2NvbnRleHQYByABKAwimwEK",
            "BlRpbWluZxIwCgtpbW1lZGlhdGVseRgBIAEoCzIZLmd3LkltbWVkaWF0ZWx5",
            "VGltaW5nSW5mb0gAEiQKBWRlbGF5GAIgASgLMhMuZ3cuRGVsYXlUaW1pbmdJ",
            "bmZvSAASKwoJZ3BzX2Vwb2NoGAMgASgLMhYuZ3cuR1BTRXBvY2hUaW1pbmdJ",
            "bmZvSABCDAoKcGFyYW1ldGVycyIXChVJbW1lZGlhdGVseVRpbWluZ0luZm8i",
            "OwoPRGVsYXlUaW1pbmdJbmZvEigKBWRlbGF5GAEgASgLMhkuZ29vZ2xlLnBy",
            "b3RvYnVmLkR1cmF0aW9uIk0KEkdQU0Vwb2NoVGltaW5nSW5mbxI3ChR0aW1l",
            "X3NpbmNlX2dwc19lcG9jaBgBIAEoCzIZLmdvb2dsZS5wcm90b2J1Zi5EdXJh",
            "dGlvbiLIAQoLVXBsaW5rRnJhbWUSEwoLcGh5X3BheWxvYWQYASABKAwSLgoO",
            "dHhfaW5mb19sZWdhY3kYAiABKAsyFi5ndy5VcGxpbmtUeEluZm9MZWdhY3kS",
            "LgoOcnhfaW5mb19sZWdhY3kYAyABKAsyFi5ndy5VcGxpbmtSeEluZm9MZWdh",
            "Y3kSIQoHdHhfaW5mbxgEIAEoCzIQLmd3LlVwbGlua1R4SW5mbxIhCgdyeF9p",
            "bmZvGAUgASgLMhAuZ3cuVXBsaW5rUnhJbmZvImsKDlVwbGlua0ZyYW1lU2V0",
            "EhMKC3BoeV9wYXlsb2FkGAEgASgMEiEKB3R4X2luZm8YAiABKAsyEC5ndy5V",
            "cGxpbmtUeEluZm8SIQoHcnhfaW5mbxgDIAMoCzIQLmd3LlVwbGlua1J4SW5m",
            "byKVAQoNRG93bmxpbmtGcmFtZRITCgtkb3dubGlua19pZBgDIAEoDRIaChJk",
            "b3dubGlua19pZF9sZWdhY3kYBCABKAwSJAoFaXRlbXMYBSADKAsyFS5ndy5E",
            "b3dubGlua0ZyYW1lSXRlbRIZChFnYXRld2F5X2lkX2xlZ2FjeRgGIAEoDBIS",
            "CgpnYXRld2F5X2lkGAcgASgJIn8KEURvd25saW5rRnJhbWVJdGVtEhMKC3Bo",
            "eV9wYXlsb2FkGAEgASgMEjAKDnR4X2luZm9fbGVnYWN5GAIgASgLMhguZ3cu",
            "RG93bmxpbmtUeEluZm9MZWdhY3kSIwoHdHhfaW5mbxgDIAEoCzISLmd3LkRv",
            "d25saW5rVHhJbmZvIpUBCg1Eb3dubGlua1R4QWNrEhkKEWdhdGV3YXlfaWRf",
            "bGVnYWN5GAEgASgMEhIKCmdhdGV3YXlfaWQYBiABKAkSEwoLZG93bmxpbmtf",
            "aWQYAiABKA0SGgoSZG93bmxpbmtfaWRfbGVnYWN5GAQgASgMEiQKBWl0ZW1z",
            "GAUgAygLMhUuZ3cuRG93bmxpbmtUeEFja0l0ZW0iNAoRRG93bmxpbmtUeEFj",
            "a0l0ZW0SHwoGc3RhdHVzGAEgASgOMg8uZ3cuVHhBY2tTdGF0dXMitQEKFEdh",
            "dGV3YXlDb25maWd1cmF0aW9uEhkKEWdhdGV3YXlfaWRfbGVnYWN5GAEgASgM",
            "EhIKCmdhdGV3YXlfaWQYBSABKAkSDwoHdmVyc2lvbhgCIAEoCRIqCghjaGFu",
            "bmVscxgDIAMoCzIYLmd3LkNoYW5uZWxDb25maWd1cmF0aW9uEjEKDnN0YXRz",
            "X2ludGVydmFsGAQgASgLMhkuZ29vZ2xlLnByb3RvYnVmLkR1cmF0aW9uIocC",
            "ChRDaGFubmVsQ29uZmlndXJhdGlvbhIRCglmcmVxdWVuY3kYASABKA0SLQoR",
            "bW9kdWxhdGlvbl9sZWdhY3kYAiABKA4yEi5jb21tb24uTW9kdWxhdGlvbhI6",
            "ChZsb3JhX21vZHVsYXRpb25fY29uZmlnGAMgASgLMhguZ3cuTG9yYU1vZHVs",
            "YXRpb25Db25maWdIABI4ChVmc2tfbW9kdWxhdGlvbl9jb25maWcYBCABKAsy",
            "Fy5ndy5Gc2tNb2R1bGF0aW9uQ29uZmlnSAASDQoFYm9hcmQYBSABKA0SEwoL",
            "ZGVtb2R1bGF0b3IYBiABKA1CEwoRbW9kdWxhdGlvbl9jb25maWciXgoUTG9y",
            "YU1vZHVsYXRpb25Db25maWcSGAoQYmFuZHdpZHRoX2xlZ2FjeRgBIAEoDRIR",
            "CgliYW5kd2lkdGgYAyABKA0SGQoRc3ByZWFkaW5nX2ZhY3RvcnMYAiADKA0i",
            "UwoTRnNrTW9kdWxhdGlvbkNvbmZpZxIYChBiYW5kd2lkdGhfbGVnYWN5GAEg",
            "ASgNEhEKCWJhbmR3aWR0aBgDIAEoDRIPCgdiaXRyYXRlGAIgASgNIvQBChlH",
            "YXRld2F5Q29tbWFuZEV4ZWNSZXF1ZXN0EhkKEWdhdGV3YXlfaWRfbGVnYWN5",
            "GAEgASgMEhIKCmdhdGV3YXlfaWQYBiABKAkSDwoHY29tbWFuZBgCIAEoCRIP",
            "CgdleGVjX2lkGAcgASgNEg0KBXN0ZGluGAQgASgMEkMKC2Vudmlyb25tZW50",
            "GAUgAygLMi4uZ3cuR2F0ZXdheUNvbW1hbmRFeGVjUmVxdWVzdC5FbnZpcm9u",
            "bWVudEVudHJ5GjIKEEVudmlyb25tZW50RW50cnkSCwoDa2V5GAEgASgJEg0K",
            "BXZhbHVlGAIgASgJOgI4ASKLAQoaR2F0ZXdheUNvbW1hbmRFeGVjUmVzcG9u",
            "c2USGQoRZ2F0ZXdheV9pZF9sZWdhY3kYASABKAwSEgoKZ2F0ZXdheV9pZBgG",
            "IAEoCRIPCgdleGVjX2lkGAcgASgNEg4KBnN0ZG91dBgDIAEoDBIOCgZzdGRl",
            "cnIYBCABKAwSDQoFZXJyb3IYBSABKAkiWQoXUmF3UGFja2V0Rm9yd2FyZGVy",
            "RXZlbnQSGQoRZ2F0ZXdheV9pZF9sZWdhY3kYASABKAwSEgoKZ2F0ZXdheV9p",
            "ZBgEIAEoCRIPCgdwYXlsb2FkGAMgASgMIlsKGVJhd1BhY2tldEZvcndhcmRl",
            "ckNvbW1hbmQSGQoRZ2F0ZXdheV9pZF9sZWdhY3kYASABKAwSEgoKZ2F0ZXdh",
            "eV9pZBgEIAEoCRIPCgdwYXlsb2FkGAMgASgMIoABCglDb25uU3RhdGUSGQoR",
            "Z2F0ZXdheV9pZF9sZWdhY3kYASABKAwSEgoKZ2F0ZXdheV9pZBgDIAEoCRIi",
            "CgVzdGF0ZRgCIAEoDjITLmd3LkNvbm5TdGF0ZS5TdGF0ZSIgCgVTdGF0ZRIL",
            "CgdPRkZMSU5FEAASCgoGT05MSU5FEAEqtQEKCENvZGVSYXRlEhAKDENSX1VO",
            "REVGSU5FRBAAEgoKBkNSXzRfNRABEgoKBkNSXzRfNhACEgoKBkNSXzRfNxAD",
            "EgoKBkNSXzRfOBAEEgoKBkNSXzNfOBAFEgoKBkNSXzJfNhAGEgoKBkNSXzFf",
            "NBAHEgoKBkNSXzFfNhAIEgoKBkNSXzVfNhAJEg0KCUNSX0xJXzRfNRAKEg0K",
            "CUNSX0xJXzRfNhALEg0KCUNSX0xJXzRfOBAMKjsKDkRvd25saW5rVGltaW5n",
            "Eg8KC0lNTUVESUFURUxZEAASCQoFREVMQVkQARINCglHUFNfRVBPQ0gQAio3",
            "ChFGaW5lVGltZXN0YW1wVHlwZRIICgROT05FEAASDQoJRU5DUllQVEVEEAES",
            "CQoFUExBSU4QAiowCglDUkNTdGF0dXMSCgoGTk9fQ1JDEAASCwoHQkFEX0NS",
            "QxABEgoKBkNSQ19PSxACKrwBCgtUeEFja1N0YXR1cxILCgdJR05PUkVEEAAS",
            "BgoCT0sQARIMCghUT09fTEFURRACEg0KCVRPT19FQVJMWRADEhQKEENPTExJ",
            "U0lPTl9QQUNLRVQQBBIUChBDT0xMSVNJT05fQkVBQ09OEAUSCwoHVFhfRlJF",
            "URAGEgwKCFRYX1BPV0VSEAcSEAoMR1BTX1VOTE9DS0VEEAgSDgoKUVVFVUVf",
            "RlVMTBAJEhIKDklOVEVSTkFMX0VSUk9SEApCagoUaW8uY2hpcnBzdGFjay5h",
            "cGkuZ3dCDEdhdGV3YXlQcm90b1ABWi1naXRodWIuY29tL2NoaXJwc3RhY2sv",
            "Y2hpcnBzdGFjay9hcGkvZ28vdjQvZ3eqAhJDaGlycHN0YWNrLkdhdGV3YXli",
            "BnByb3RvMw=="));
      descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
          new pbr::FileDescriptor[] { global::Chirpstack.Common.CommonReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.TimestampReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.DurationReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.StructReflection.Descriptor, },
          new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Chirpstack.Gateway.CodeRate), typeof(global::Chirpstack.Gateway.DownlinkTiming), typeof(global::Chirpstack.Gateway.FineTimestampType), typeof(global::Chirpstack.Gateway.CRCStatus), typeof(global::Chirpstack.Gateway.TxAckStatus), }, null, new pbr::GeneratedClrTypeInfo[] {
            new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Gateway.Modulation), global::Chirpstack.Gateway.Modulation.Parser, new[]{ "Lora", "Fsk", "LrFhss" }, new[]{ "Parameters" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Gateway.UplinkTxInfoLegacy), global::Chirpstack.Gateway.UplinkTxInfoLegacy.Parser, new[]{ "Frequency", "Modulation", "LoraModulationInfo", "FskModulationInfo", "LrFhssModulationInfo" }, new[]{ "ModulationInfo" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Gateway.UplinkTxInfo), global::Chirpstack.Gateway.UplinkTxInfo.Parser, new[]{ "Frequency", "Modulation" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Gateway.LoraModulationInfo), global::Chirpstack.Gateway.LoraModulationInfo.Parser, new[]{ "Bandwidth", "SpreadingFactor", "CodeRateLegacy", "CodeRate", "PolarizationInversion" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Gateway.FskModulationInfo), global::Chirpstack.Gateway.FskModulationInfo.Parser, new[]{ "FrequencyDeviation", "Datarate" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Gateway.LrFhssModulationInfo), global::Chirpstack.Gateway.LrFhssModulationInfo.Parser, new[]{ "OperatingChannelWidth", "CodeRateLegacy", "CodeRate", "GridSteps" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Gateway.EncryptedFineTimestamp), global::Chirpstack.Gateway.EncryptedFineTimestamp.Parser, new[]{ "AesKeyIndex", "EncryptedNs", "FpgaId" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Gateway.PlainFineTimestamp), global::Chirpstack.Gateway.PlainFineTimestamp.Parser, new[]{ "Time" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Gateway.GatewayStats), global::Chirpstack.Gateway.GatewayStats.Parser, new[]{ "GatewayIdLegacy", "GatewayId", "Time", "Location", "ConfigVersion", "RxPacketsReceived", "RxPacketsReceivedOk", "TxPacketsReceived", "TxPacketsEmitted", "Metadata", "TxPacketsPerFrequency", "RxPacketsPerFrequency", "TxPacketsPerModulation", "RxPacketsPerModulation", "TxPacketsPerStatus" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, null, null, null, }),
            new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Gateway.PerModulationCount), global::Chirpstack.Gateway.PerModulationCount.Parser, new[]{ "Modulation", "Count" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Gateway.UplinkRxInfoLegacy), global::Chirpstack.Gateway.UplinkRxInfoLegacy.Parser, new[]{ "GatewayId", "Time", "TimeSinceGpsEpoch", "Rssi", "LoraSnr", "Channel", "RfChain", "Board", "Antenna", "Location", "FineTimestampType", "EncryptedFineTimestamp", "PlainFineTimestamp", "Context", "UplinkId", "CrcStatus", "Metadata" }, new[]{ "FineTimestamp" }, null, null, new pbr::GeneratedClrTypeInfo[] { null, }),
            new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Gateway.UplinkRxInfo), global::Chirpstack.Gateway.UplinkRxInfo.Parser, new[]{ "GatewayId", "UplinkId", "Time", "TimeSinceGpsEpoch", "FineTimeSinceGpsEpoch", "Rssi", "Snr", "Channel", "RfChain", "Board", "Antenna", "Location", "Context", "Metadata", "CrcStatus" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, }),
            new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Gateway.DownlinkTxInfoLegacy), global::Chirpstack.Gateway.DownlinkTxInfoLegacy.Parser, new[]{ "GatewayId", "Frequency", "Power", "Modulation", "LoraModulationInfo", "FskModulationInfo", "Board", "Antenna", "Timing", "ImmediatelyTimingInfo", "DelayTimingInfo", "GpsEpochTimingInfo", "Context" }, new[]{ "ModulationInfo", "TimingInfo" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Gateway.DownlinkTxInfo), global::Chirpstack.Gateway.DownlinkTxInfo.Parser, new[]{ "Frequency", "Power", "Modulation", "Board", "Antenna", "Timing", "Context" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Gateway.Timing), global::Chirpstack.Gateway.Timing.Parser, new[]{ "Immediately", "Delay", "GpsEpoch" }, new[]{ "Parameters" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Gateway.ImmediatelyTimingInfo), global::Chirpstack.Gateway.ImmediatelyTimingInfo.Parser, null, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Gateway.DelayTimingInfo), global::Chirpstack.Gateway.DelayTimingInfo.Parser, new[]{ "Delay" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Gateway.GPSEpochTimingInfo), global::Chirpstack.Gateway.GPSEpochTimingInfo.Parser, new[]{ "TimeSinceGpsEpoch" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Gateway.UplinkFrame), global::Chirpstack.Gateway.UplinkFrame.Parser, new[]{ "PhyPayload", "TxInfoLegacy", "RxInfoLegacy", "TxInfo", "RxInfo" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Gateway.UplinkFrameSet), global::Chirpstack.Gateway.UplinkFrameSet.Parser, new[]{ "PhyPayload", "TxInfo", "RxInfo" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Gateway.DownlinkFrame), global::Chirpstack.Gateway.DownlinkFrame.Parser, new[]{ "DownlinkId", "DownlinkIdLegacy", "Items", "GatewayIdLegacy", "GatewayId" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Gateway.DownlinkFrameItem), global::Chirpstack.Gateway.DownlinkFrameItem.Parser, new[]{ "PhyPayload", "TxInfoLegacy", "TxInfo" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Gateway.DownlinkTxAck), global::Chirpstack.Gateway.DownlinkTxAck.Parser, new[]{ "GatewayIdLegacy", "GatewayId", "DownlinkId", "DownlinkIdLegacy", "Items" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Gateway.DownlinkTxAckItem), global::Chirpstack.Gateway.DownlinkTxAckItem.Parser, new[]{ "Status" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Gateway.GatewayConfiguration), global::Chirpstack.Gateway.GatewayConfiguration.Parser, new[]{ "GatewayIdLegacy", "GatewayId", "Version", "Channels", "StatsInterval" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Gateway.ChannelConfiguration), global::Chirpstack.Gateway.ChannelConfiguration.Parser, new[]{ "Frequency", "ModulationLegacy", "LoraModulationConfig", "FskModulationConfig", "Board", "Demodulator" }, new[]{ "ModulationConfig" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Gateway.LoraModulationConfig), global::Chirpstack.Gateway.LoraModulationConfig.Parser, new[]{ "BandwidthLegacy", "Bandwidth", "SpreadingFactors" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Gateway.FskModulationConfig), global::Chirpstack.Gateway.FskModulationConfig.Parser, new[]{ "BandwidthLegacy", "Bandwidth", "Bitrate" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Gateway.GatewayCommandExecRequest), global::Chirpstack.Gateway.GatewayCommandExecRequest.Parser, new[]{ "GatewayIdLegacy", "GatewayId", "Command", "ExecId", "Stdin", "Environment" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, }),
            new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Gateway.GatewayCommandExecResponse), global::Chirpstack.Gateway.GatewayCommandExecResponse.Parser, new[]{ "GatewayIdLegacy", "GatewayId", "ExecId", "Stdout", "Stderr", "Error" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Gateway.RawPacketForwarderEvent), global::Chirpstack.Gateway.RawPacketForwarderEvent.Parser, new[]{ "GatewayIdLegacy", "GatewayId", "Payload" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Gateway.RawPacketForwarderCommand), global::Chirpstack.Gateway.RawPacketForwarderCommand.Parser, new[]{ "GatewayIdLegacy", "GatewayId", "Payload" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Gateway.ConnState), global::Chirpstack.Gateway.ConnState.Parser, new[]{ "GatewayIdLegacy", "GatewayId", "State" }, null, new[]{ typeof(global::Chirpstack.Gateway.ConnState.Types.State) }, null, null)
          }));
    }
    #endregion

  }
  #region Enums
  public enum CodeRate {
    [pbr::OriginalName("CR_UNDEFINED")] CrUndefined = 0,
    /// <summary>
    /// LoRa
    /// </summary>
    [pbr::OriginalName("CR_4_5")] Cr45 = 1,
    [pbr::OriginalName("CR_4_6")] Cr46 = 2,
    [pbr::OriginalName("CR_4_7")] Cr47 = 3,
    [pbr::OriginalName("CR_4_8")] Cr48 = 4,
    /// <summary>
    /// LR-FHSS
    /// </summary>
    [pbr::OriginalName("CR_3_8")] Cr38 = 5,
    [pbr::OriginalName("CR_2_6")] Cr26 = 6,
    [pbr::OriginalName("CR_1_4")] Cr14 = 7,
    [pbr::OriginalName("CR_1_6")] Cr16 = 8,
    [pbr::OriginalName("CR_5_6")] Cr56 = 9,
    /// <summary>
    /// LoRa 2.4 gHz
    /// </summary>
    [pbr::OriginalName("CR_LI_4_5")] CrLi45 = 10,
    [pbr::OriginalName("CR_LI_4_6")] CrLi46 = 11,
    [pbr::OriginalName("CR_LI_4_8")] CrLi48 = 12,
  }

  public enum DownlinkTiming {
    /// <summary>
    /// Send the downlink immediately.
    /// </summary>
    [pbr::OriginalName("IMMEDIATELY")] Immediately = 0,
    /// <summary>
    /// Send downlink at the given delay (based on provided context).
    /// </summary>
    [pbr::OriginalName("DELAY")] Delay = 1,
    /// <summary>
    /// Send at given GPS epoch value.
    /// </summary>
    [pbr::OriginalName("GPS_EPOCH")] GpsEpoch = 2,
  }

  public enum FineTimestampType {
    /// <summary>
    /// No fine-timestamp available.
    /// </summary>
    [pbr::OriginalName("NONE")] None = 0,
    /// <summary>
    /// Encrypted fine-timestamp.
    /// </summary>
    [pbr::OriginalName("ENCRYPTED")] Encrypted = 1,
    /// <summary>
    /// Plain fine-timestamp.
    /// </summary>
    [pbr::OriginalName("PLAIN")] Plain = 2,
  }

  public enum CRCStatus {
    /// <summary>
    /// No CRC.
    /// </summary>
    [pbr::OriginalName("NO_CRC")] NoCrc = 0,
    /// <summary>
    /// Bad CRC.
    /// </summary>
    [pbr::OriginalName("BAD_CRC")] BadCrc = 1,
    /// <summary>
    /// CRC OK.
    /// </summary>
    [pbr::OriginalName("CRC_OK")] CrcOk = 2,
  }

  public enum TxAckStatus {
    /// <summary>
    /// Ignored (when a previous item was already emitted).
    /// </summary>
    [pbr::OriginalName("IGNORED")] Ignored = 0,
    /// <summary>
    /// Packet has been programmed for downlink.
    /// </summary>
    [pbr::OriginalName("OK")] Ok = 1,
    /// <summary>
    /// Rejected because it was already too late to program this packet for downlink.
    /// </summary>
    [pbr::OriginalName("TOO_LATE")] TooLate = 2,
    /// <summary>
    /// Rejected because downlink packet timestamp is too much in advance.
    /// </summary>
    [pbr::OriginalName("TOO_EARLY")] TooEarly = 3,
    /// <summary>
    /// Rejected because there was already a packet programmed in requested timeframe.
    /// </summary>
    [pbr::OriginalName("COLLISION_PACKET")] CollisionPacket = 4,
    /// <summary>
    /// Rejected because there was already a beacon planned in requested timeframe.
    /// </summary>
    [pbr::OriginalName("COLLISION_BEACON")] CollisionBeacon = 5,
    /// <summary>
    /// Rejected because requested frequency is not supported by TX RF chain.
    /// </summary>
    [pbr::OriginalName("TX_FREQ")] TxFreq = 6,
    /// <summary>
    /// Rejected because requested power is not supported by gateway.
    /// </summary>
    [pbr::OriginalName("TX_POWER")] TxPower = 7,
    /// <summary>
    /// Rejected because GPS is unlocked, so GPS timestamp cannot be used.
    /// </summary>
    [pbr::OriginalName("GPS_UNLOCKED")] GpsUnlocked = 8,
    /// <summary>
    /// Downlink queue is full.
    /// </summary>
    [pbr::OriginalName("QUEUE_FULL")] QueueFull = 9,
    /// <summary>
    /// Internal error.
    /// </summary>
    [pbr::OriginalName("INTERNAL_ERROR")] InternalError = 10,
  }

  #endregion

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::Chirpstack.Gateway.GwReflection.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 Modulation() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public Modulation(Modulation other) : this() {
      switch (other.ParametersCase) {
        case ParametersOneofCase.Lora:
          Lora = other.Lora.Clone();
          break;
        case ParametersOneofCase.Fsk:
          Fsk = other.Fsk.Clone();
          break;
        case ParametersOneofCase.LrFhss:
          LrFhss = other.LrFhss.Clone();
          break;
      }

      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

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

    /// <summary>Field number for the "lora" field.</summary>
    public const int LoraFieldNumber = 3;
    /// <summary>
    /// LoRa modulation information.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Gateway.LoraModulationInfo Lora {
      get { return parametersCase_ == ParametersOneofCase.Lora ? (global::Chirpstack.Gateway.LoraModulationInfo) parameters_ : null; }
      set {
        parameters_ = value;
        parametersCase_ = value == null ? ParametersOneofCase.None : ParametersOneofCase.Lora;
      }
    }

    /// <summary>Field number for the "fsk" field.</summary>
    public const int FskFieldNumber = 4;
    /// <summary>
    /// FSK modulation information.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Gateway.FskModulationInfo Fsk {
      get { return parametersCase_ == ParametersOneofCase.Fsk ? (global::Chirpstack.Gateway.FskModulationInfo) parameters_ : null; }
      set {
        parameters_ = value;
        parametersCase_ = value == null ? ParametersOneofCase.None : ParametersOneofCase.Fsk;
      }
    }

    /// <summary>Field number for the "lr_fhss" field.</summary>
    public const int LrFhssFieldNumber = 5;
    /// <summary>
    /// LR-FHSS modulation information.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Gateway.LrFhssModulationInfo LrFhss {
      get { return parametersCase_ == ParametersOneofCase.LrFhss ? (global::Chirpstack.Gateway.LrFhssModulationInfo) parameters_ : null; }
      set {
        parameters_ = value;
        parametersCase_ = value == null ? ParametersOneofCase.None : ParametersOneofCase.LrFhss;
      }
    }

    private object parameters_;
    /// <summary>Enum of possible cases for the "parameters" oneof.</summary>
    public enum ParametersOneofCase {
      None = 0,
      Lora = 3,
      Fsk = 4,
      LrFhss = 5,
    }
    private ParametersOneofCase parametersCase_ = ParametersOneofCase.None;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public ParametersOneofCase ParametersCase {
      get { return parametersCase_; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void ClearParameters() {
      parametersCase_ = ParametersOneofCase.None;
      parameters_ = null;
    }

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(Modulation other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (!object.Equals(Lora, other.Lora)) return false;
      if (!object.Equals(Fsk, other.Fsk)) return false;
      if (!object.Equals(LrFhss, other.LrFhss)) return false;
      if (ParametersCase != other.ParametersCase) 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 (parametersCase_ == ParametersOneofCase.Lora) hash ^= Lora.GetHashCode();
      if (parametersCase_ == ParametersOneofCase.Fsk) hash ^= Fsk.GetHashCode();
      if (parametersCase_ == ParametersOneofCase.LrFhss) hash ^= LrFhss.GetHashCode();
      hash ^= (int) parametersCase_;
      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 (parametersCase_ == ParametersOneofCase.Lora) {
        output.WriteRawTag(26);
        output.WriteMessage(Lora);
      }
      if (parametersCase_ == ParametersOneofCase.Fsk) {
        output.WriteRawTag(34);
        output.WriteMessage(Fsk);
      }
      if (parametersCase_ == ParametersOneofCase.LrFhss) {
        output.WriteRawTag(42);
        output.WriteMessage(LrFhss);
      }
      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 (parametersCase_ == ParametersOneofCase.Lora) {
        output.WriteRawTag(26);
        output.WriteMessage(Lora);
      }
      if (parametersCase_ == ParametersOneofCase.Fsk) {
        output.WriteRawTag(34);
        output.WriteMessage(Fsk);
      }
      if (parametersCase_ == ParametersOneofCase.LrFhss) {
        output.WriteRawTag(42);
        output.WriteMessage(LrFhss);
      }
      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 (parametersCase_ == ParametersOneofCase.Lora) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Lora);
      }
      if (parametersCase_ == ParametersOneofCase.Fsk) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Fsk);
      }
      if (parametersCase_ == ParametersOneofCase.LrFhss) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(LrFhss);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(Modulation other) {
      if (other == null) {
        return;
      }
      switch (other.ParametersCase) {
        case ParametersOneofCase.Lora:
          if (Lora == null) {
            Lora = new global::Chirpstack.Gateway.LoraModulationInfo();
          }
          Lora.MergeFrom(other.Lora);
          break;
        case ParametersOneofCase.Fsk:
          if (Fsk == null) {
            Fsk = new global::Chirpstack.Gateway.FskModulationInfo();
          }
          Fsk.MergeFrom(other.Fsk);
          break;
        case ParametersOneofCase.LrFhss:
          if (LrFhss == null) {
            LrFhss = new global::Chirpstack.Gateway.LrFhssModulationInfo();
          }
          LrFhss.MergeFrom(other.LrFhss);
          break;
      }

      _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 26: {
            global::Chirpstack.Gateway.LoraModulationInfo subBuilder = new global::Chirpstack.Gateway.LoraModulationInfo();
            if (parametersCase_ == ParametersOneofCase.Lora) {
              subBuilder.MergeFrom(Lora);
            }
            input.ReadMessage(subBuilder);
            Lora = subBuilder;
            break;
          }
          case 34: {
            global::Chirpstack.Gateway.FskModulationInfo subBuilder = new global::Chirpstack.Gateway.FskModulationInfo();
            if (parametersCase_ == ParametersOneofCase.Fsk) {
              subBuilder.MergeFrom(Fsk);
            }
            input.ReadMessage(subBuilder);
            Fsk = subBuilder;
            break;
          }
          case 42: {
            global::Chirpstack.Gateway.LrFhssModulationInfo subBuilder = new global::Chirpstack.Gateway.LrFhssModulationInfo();
            if (parametersCase_ == ParametersOneofCase.LrFhss) {
              subBuilder.MergeFrom(LrFhss);
            }
            input.ReadMessage(subBuilder);
            LrFhss = subBuilder;
            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 26: {
            global::Chirpstack.Gateway.LoraModulationInfo subBuilder = new global::Chirpstack.Gateway.LoraModulationInfo();
            if (parametersCase_ == ParametersOneofCase.Lora) {
              subBuilder.MergeFrom(Lora);
            }
            input.ReadMessage(subBuilder);
            Lora = subBuilder;
            break;
          }
          case 34: {
            global::Chirpstack.Gateway.FskModulationInfo subBuilder = new global::Chirpstack.Gateway.FskModulationInfo();
            if (parametersCase_ == ParametersOneofCase.Fsk) {
              subBuilder.MergeFrom(Fsk);
            }
            input.ReadMessage(subBuilder);
            Fsk = subBuilder;
            break;
          }
          case 42: {
            global::Chirpstack.Gateway.LrFhssModulationInfo subBuilder = new global::Chirpstack.Gateway.LrFhssModulationInfo();
            if (parametersCase_ == ParametersOneofCase.LrFhss) {
              subBuilder.MergeFrom(LrFhss);
            }
            input.ReadMessage(subBuilder);
            LrFhss = subBuilder;
            break;
          }
        }
      }
    }
    #endif

  }

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::Chirpstack.Gateway.GwReflection.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 UplinkTxInfoLegacy() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public UplinkTxInfoLegacy(UplinkTxInfoLegacy other) : this() {
      frequency_ = other.frequency_;
      modulation_ = other.modulation_;
      switch (other.ModulationInfoCase) {
        case ModulationInfoOneofCase.LoraModulationInfo:
          LoraModulationInfo = other.LoraModulationInfo.Clone();
          break;
        case ModulationInfoOneofCase.FskModulationInfo:
          FskModulationInfo = other.FskModulationInfo.Clone();
          break;
        case ModulationInfoOneofCase.LrFhssModulationInfo:
          LrFhssModulationInfo = other.LrFhssModulationInfo.Clone();
          break;
      }

      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

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

    /// <summary>Field number for the "frequency" field.</summary>
    public const int FrequencyFieldNumber = 1;
    private uint frequency_;
    /// <summary>
    /// Frequency (Hz).
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint Frequency {
      get { return frequency_; }
      set {
        frequency_ = value;
      }
    }

    /// <summary>Field number for the "modulation" field.</summary>
    public const int ModulationFieldNumber = 2;
    private global::Chirpstack.Common.Modulation modulation_ = global::Chirpstack.Common.Modulation.Lora;
    /// <summary>
    /// Modulation.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Common.Modulation Modulation {
      get { return modulation_; }
      set {
        modulation_ = value;
      }
    }

    /// <summary>Field number for the "lora_modulation_info" field.</summary>
    public const int LoraModulationInfoFieldNumber = 3;
    /// <summary>
    /// LoRa modulation information.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Gateway.LoraModulationInfo LoraModulationInfo {
      get { return modulationInfoCase_ == ModulationInfoOneofCase.LoraModulationInfo ? (global::Chirpstack.Gateway.LoraModulationInfo) modulationInfo_ : null; }
      set {
        modulationInfo_ = value;
        modulationInfoCase_ = value == null ? ModulationInfoOneofCase.None : ModulationInfoOneofCase.LoraModulationInfo;
      }
    }

    /// <summary>Field number for the "fsk_modulation_info" field.</summary>
    public const int FskModulationInfoFieldNumber = 4;
    /// <summary>
    /// FSK modulation information.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Gateway.FskModulationInfo FskModulationInfo {
      get { return modulationInfoCase_ == ModulationInfoOneofCase.FskModulationInfo ? (global::Chirpstack.Gateway.FskModulationInfo) modulationInfo_ : null; }
      set {
        modulationInfo_ = value;
        modulationInfoCase_ = value == null ? ModulationInfoOneofCase.None : ModulationInfoOneofCase.FskModulationInfo;
      }
    }

    /// <summary>Field number for the "lr_fhss_modulation_info" field.</summary>
    public const int LrFhssModulationInfoFieldNumber = 5;
    /// <summary>
    /// LR-FHSS modulation information.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Gateway.LrFhssModulationInfo LrFhssModulationInfo {
      get { return modulationInfoCase_ == ModulationInfoOneofCase.LrFhssModulationInfo ? (global::Chirpstack.Gateway.LrFhssModulationInfo) modulationInfo_ : null; }
      set {
        modulationInfo_ = value;
        modulationInfoCase_ = value == null ? ModulationInfoOneofCase.None : ModulationInfoOneofCase.LrFhssModulationInfo;
      }
    }

    private object modulationInfo_;
    /// <summary>Enum of possible cases for the "modulation_info" oneof.</summary>
    public enum ModulationInfoOneofCase {
      None = 0,
      LoraModulationInfo = 3,
      FskModulationInfo = 4,
      LrFhssModulationInfo = 5,
    }
    private ModulationInfoOneofCase modulationInfoCase_ = ModulationInfoOneofCase.None;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public ModulationInfoOneofCase ModulationInfoCase {
      get { return modulationInfoCase_; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void ClearModulationInfo() {
      modulationInfoCase_ = ModulationInfoOneofCase.None;
      modulationInfo_ = null;
    }

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(UplinkTxInfoLegacy other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (Frequency != other.Frequency) return false;
      if (Modulation != other.Modulation) return false;
      if (!object.Equals(LoraModulationInfo, other.LoraModulationInfo)) return false;
      if (!object.Equals(FskModulationInfo, other.FskModulationInfo)) return false;
      if (!object.Equals(LrFhssModulationInfo, other.LrFhssModulationInfo)) return false;
      if (ModulationInfoCase != other.ModulationInfoCase) 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 (Frequency != 0) hash ^= Frequency.GetHashCode();
      if (Modulation != global::Chirpstack.Common.Modulation.Lora) hash ^= Modulation.GetHashCode();
      if (modulationInfoCase_ == ModulationInfoOneofCase.LoraModulationInfo) hash ^= LoraModulationInfo.GetHashCode();
      if (modulationInfoCase_ == ModulationInfoOneofCase.FskModulationInfo) hash ^= FskModulationInfo.GetHashCode();
      if (modulationInfoCase_ == ModulationInfoOneofCase.LrFhssModulationInfo) hash ^= LrFhssModulationInfo.GetHashCode();
      hash ^= (int) modulationInfoCase_;
      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 (Frequency != 0) {
        output.WriteRawTag(8);
        output.WriteUInt32(Frequency);
      }
      if (Modulation != global::Chirpstack.Common.Modulation.Lora) {
        output.WriteRawTag(16);
        output.WriteEnum((int) Modulation);
      }
      if (modulationInfoCase_ == ModulationInfoOneofCase.LoraModulationInfo) {
        output.WriteRawTag(26);
        output.WriteMessage(LoraModulationInfo);
      }
      if (modulationInfoCase_ == ModulationInfoOneofCase.FskModulationInfo) {
        output.WriteRawTag(34);
        output.WriteMessage(FskModulationInfo);
      }
      if (modulationInfoCase_ == ModulationInfoOneofCase.LrFhssModulationInfo) {
        output.WriteRawTag(42);
        output.WriteMessage(LrFhssModulationInfo);
      }
      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 (Frequency != 0) {
        output.WriteRawTag(8);
        output.WriteUInt32(Frequency);
      }
      if (Modulation != global::Chirpstack.Common.Modulation.Lora) {
        output.WriteRawTag(16);
        output.WriteEnum((int) Modulation);
      }
      if (modulationInfoCase_ == ModulationInfoOneofCase.LoraModulationInfo) {
        output.WriteRawTag(26);
        output.WriteMessage(LoraModulationInfo);
      }
      if (modulationInfoCase_ == ModulationInfoOneofCase.FskModulationInfo) {
        output.WriteRawTag(34);
        output.WriteMessage(FskModulationInfo);
      }
      if (modulationInfoCase_ == ModulationInfoOneofCase.LrFhssModulationInfo) {
        output.WriteRawTag(42);
        output.WriteMessage(LrFhssModulationInfo);
      }
      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 (Frequency != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Frequency);
      }
      if (Modulation != global::Chirpstack.Common.Modulation.Lora) {
        size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Modulation);
      }
      if (modulationInfoCase_ == ModulationInfoOneofCase.LoraModulationInfo) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(LoraModulationInfo);
      }
      if (modulationInfoCase_ == ModulationInfoOneofCase.FskModulationInfo) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(FskModulationInfo);
      }
      if (modulationInfoCase_ == ModulationInfoOneofCase.LrFhssModulationInfo) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(LrFhssModulationInfo);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(UplinkTxInfoLegacy other) {
      if (other == null) {
        return;
      }
      if (other.Frequency != 0) {
        Frequency = other.Frequency;
      }
      if (other.Modulation != global::Chirpstack.Common.Modulation.Lora) {
        Modulation = other.Modulation;
      }
      switch (other.ModulationInfoCase) {
        case ModulationInfoOneofCase.LoraModulationInfo:
          if (LoraModulationInfo == null) {
            LoraModulationInfo = new global::Chirpstack.Gateway.LoraModulationInfo();
          }
          LoraModulationInfo.MergeFrom(other.LoraModulationInfo);
          break;
        case ModulationInfoOneofCase.FskModulationInfo:
          if (FskModulationInfo == null) {
            FskModulationInfo = new global::Chirpstack.Gateway.FskModulationInfo();
          }
          FskModulationInfo.MergeFrom(other.FskModulationInfo);
          break;
        case ModulationInfoOneofCase.LrFhssModulationInfo:
          if (LrFhssModulationInfo == null) {
            LrFhssModulationInfo = new global::Chirpstack.Gateway.LrFhssModulationInfo();
          }
          LrFhssModulationInfo.MergeFrom(other.LrFhssModulationInfo);
          break;
      }

      _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: {
            Frequency = input.ReadUInt32();
            break;
          }
          case 16: {
            Modulation = (global::Chirpstack.Common.Modulation) input.ReadEnum();
            break;
          }
          case 26: {
            global::Chirpstack.Gateway.LoraModulationInfo subBuilder = new global::Chirpstack.Gateway.LoraModulationInfo();
            if (modulationInfoCase_ == ModulationInfoOneofCase.LoraModulationInfo) {
              subBuilder.MergeFrom(LoraModulationInfo);
            }
            input.ReadMessage(subBuilder);
            LoraModulationInfo = subBuilder;
            break;
          }
          case 34: {
            global::Chirpstack.Gateway.FskModulationInfo subBuilder = new global::Chirpstack.Gateway.FskModulationInfo();
            if (modulationInfoCase_ == ModulationInfoOneofCase.FskModulationInfo) {
              subBuilder.MergeFrom(FskModulationInfo);
            }
            input.ReadMessage(subBuilder);
            FskModulationInfo = subBuilder;
            break;
          }
          case 42: {
            global::Chirpstack.Gateway.LrFhssModulationInfo subBuilder = new global::Chirpstack.Gateway.LrFhssModulationInfo();
            if (modulationInfoCase_ == ModulationInfoOneofCase.LrFhssModulationInfo) {
              subBuilder.MergeFrom(LrFhssModulationInfo);
            }
            input.ReadMessage(subBuilder);
            LrFhssModulationInfo = subBuilder;
            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: {
            Frequency = input.ReadUInt32();
            break;
          }
          case 16: {
            Modulation = (global::Chirpstack.Common.Modulation) input.ReadEnum();
            break;
          }
          case 26: {
            global::Chirpstack.Gateway.LoraModulationInfo subBuilder = new global::Chirpstack.Gateway.LoraModulationInfo();
            if (modulationInfoCase_ == ModulationInfoOneofCase.LoraModulationInfo) {
              subBuilder.MergeFrom(LoraModulationInfo);
            }
            input.ReadMessage(subBuilder);
            LoraModulationInfo = subBuilder;
            break;
          }
          case 34: {
            global::Chirpstack.Gateway.FskModulationInfo subBuilder = new global::Chirpstack.Gateway.FskModulationInfo();
            if (modulationInfoCase_ == ModulationInfoOneofCase.FskModulationInfo) {
              subBuilder.MergeFrom(FskModulationInfo);
            }
            input.ReadMessage(subBuilder);
            FskModulationInfo = subBuilder;
            break;
          }
          case 42: {
            global::Chirpstack.Gateway.LrFhssModulationInfo subBuilder = new global::Chirpstack.Gateway.LrFhssModulationInfo();
            if (modulationInfoCase_ == ModulationInfoOneofCase.LrFhssModulationInfo) {
              subBuilder.MergeFrom(LrFhssModulationInfo);
            }
            input.ReadMessage(subBuilder);
            LrFhssModulationInfo = subBuilder;
            break;
          }
        }
      }
    }
    #endif

  }

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::Chirpstack.Gateway.GwReflection.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 UplinkTxInfo() {
      OnConstruction();
    }

    partial void OnConstruction();

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

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

    /// <summary>Field number for the "frequency" field.</summary>
    public const int FrequencyFieldNumber = 1;
    private uint frequency_;
    /// <summary>
    /// Frequency (Hz).
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint Frequency {
      get { return frequency_; }
      set {
        frequency_ = value;
      }
    }

    /// <summary>Field number for the "modulation" field.</summary>
    public const int ModulationFieldNumber = 2;
    private global::Chirpstack.Gateway.Modulation modulation_;
    /// <summary>
    /// Modulation.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Gateway.Modulation Modulation {
      get { return modulation_; }
      set {
        modulation_ = value;
      }
    }

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(UplinkTxInfo other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (Frequency != other.Frequency) return false;
      if (!object.Equals(Modulation, other.Modulation)) 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 (Frequency != 0) hash ^= Frequency.GetHashCode();
      if (modulation_ != null) hash ^= Modulation.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 (Frequency != 0) {
        output.WriteRawTag(8);
        output.WriteUInt32(Frequency);
      }
      if (modulation_ != null) {
        output.WriteRawTag(18);
        output.WriteMessage(Modulation);
      }
      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 (Frequency != 0) {
        output.WriteRawTag(8);
        output.WriteUInt32(Frequency);
      }
      if (modulation_ != null) {
        output.WriteRawTag(18);
        output.WriteMessage(Modulation);
      }
      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 (Frequency != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Frequency);
      }
      if (modulation_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Modulation);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(UplinkTxInfo other) {
      if (other == null) {
        return;
      }
      if (other.Frequency != 0) {
        Frequency = other.Frequency;
      }
      if (other.modulation_ != null) {
        if (modulation_ == null) {
          Modulation = new global::Chirpstack.Gateway.Modulation();
        }
        Modulation.MergeFrom(other.Modulation);
      }
      _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: {
            Frequency = input.ReadUInt32();
            break;
          }
          case 18: {
            if (modulation_ == null) {
              Modulation = new global::Chirpstack.Gateway.Modulation();
            }
            input.ReadMessage(Modulation);
            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: {
            Frequency = input.ReadUInt32();
            break;
          }
          case 18: {
            if (modulation_ == null) {
              Modulation = new global::Chirpstack.Gateway.Modulation();
            }
            input.ReadMessage(Modulation);
            break;
          }
        }
      }
    }
    #endif

  }

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::Chirpstack.Gateway.GwReflection.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 LoraModulationInfo() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public LoraModulationInfo(LoraModulationInfo other) : this() {
      bandwidth_ = other.bandwidth_;
      spreadingFactor_ = other.spreadingFactor_;
      codeRateLegacy_ = other.codeRateLegacy_;
      codeRate_ = other.codeRate_;
      polarizationInversion_ = other.polarizationInversion_;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

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

    /// <summary>Field number for the "bandwidth" field.</summary>
    public const int BandwidthFieldNumber = 1;
    private uint bandwidth_;
    /// <summary>
    /// Bandwidth.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint Bandwidth {
      get { return bandwidth_; }
      set {
        bandwidth_ = value;
      }
    }

    /// <summary>Field number for the "spreading_factor" field.</summary>
    public const int SpreadingFactorFieldNumber = 2;
    private uint spreadingFactor_;
    /// <summary>
    /// Speading-factor.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint SpreadingFactor {
      get { return spreadingFactor_; }
      set {
        spreadingFactor_ = value;
      }
    }

    /// <summary>Field number for the "code_rate_legacy" field.</summary>
    public const int CodeRateLegacyFieldNumber = 3;
    private string codeRateLegacy_ = "";
    /// <summary>
    /// Code-rate.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string CodeRateLegacy {
      get { return codeRateLegacy_; }
      set {
        codeRateLegacy_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "code_rate" field.</summary>
    public const int CodeRateFieldNumber = 5;
    private global::Chirpstack.Gateway.CodeRate codeRate_ = global::Chirpstack.Gateway.CodeRate.CrUndefined;
    /// <summary>
    /// Code-rate.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Gateway.CodeRate CodeRate {
      get { return codeRate_; }
      set {
        codeRate_ = value;
      }
    }

    /// <summary>Field number for the "polarization_inversion" field.</summary>
    public const int PolarizationInversionFieldNumber = 4;
    private bool polarizationInversion_;
    /// <summary>
    /// Polarization inversion.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool PolarizationInversion {
      get { return polarizationInversion_; }
      set {
        polarizationInversion_ = value;
      }
    }

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(LoraModulationInfo other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (Bandwidth != other.Bandwidth) return false;
      if (SpreadingFactor != other.SpreadingFactor) return false;
      if (CodeRateLegacy != other.CodeRateLegacy) return false;
      if (CodeRate != other.CodeRate) return false;
      if (PolarizationInversion != other.PolarizationInversion) 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 (Bandwidth != 0) hash ^= Bandwidth.GetHashCode();
      if (SpreadingFactor != 0) hash ^= SpreadingFactor.GetHashCode();
      if (CodeRateLegacy.Length != 0) hash ^= CodeRateLegacy.GetHashCode();
      if (CodeRate != global::Chirpstack.Gateway.CodeRate.CrUndefined) hash ^= CodeRate.GetHashCode();
      if (PolarizationInversion != false) hash ^= PolarizationInversion.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 (Bandwidth != 0) {
        output.WriteRawTag(8);
        output.WriteUInt32(Bandwidth);
      }
      if (SpreadingFactor != 0) {
        output.WriteRawTag(16);
        output.WriteUInt32(SpreadingFactor);
      }
      if (CodeRateLegacy.Length != 0) {
        output.WriteRawTag(26);
        output.WriteString(CodeRateLegacy);
      }
      if (PolarizationInversion != false) {
        output.WriteRawTag(32);
        output.WriteBool(PolarizationInversion);
      }
      if (CodeRate != global::Chirpstack.Gateway.CodeRate.CrUndefined) {
        output.WriteRawTag(40);
        output.WriteEnum((int) CodeRate);
      }
      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 (Bandwidth != 0) {
        output.WriteRawTag(8);
        output.WriteUInt32(Bandwidth);
      }
      if (SpreadingFactor != 0) {
        output.WriteRawTag(16);
        output.WriteUInt32(SpreadingFactor);
      }
      if (CodeRateLegacy.Length != 0) {
        output.WriteRawTag(26);
        output.WriteString(CodeRateLegacy);
      }
      if (PolarizationInversion != false) {
        output.WriteRawTag(32);
        output.WriteBool(PolarizationInversion);
      }
      if (CodeRate != global::Chirpstack.Gateway.CodeRate.CrUndefined) {
        output.WriteRawTag(40);
        output.WriteEnum((int) CodeRate);
      }
      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 (Bandwidth != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Bandwidth);
      }
      if (SpreadingFactor != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(SpreadingFactor);
      }
      if (CodeRateLegacy.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(CodeRateLegacy);
      }
      if (CodeRate != global::Chirpstack.Gateway.CodeRate.CrUndefined) {
        size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) CodeRate);
      }
      if (PolarizationInversion != 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(LoraModulationInfo other) {
      if (other == null) {
        return;
      }
      if (other.Bandwidth != 0) {
        Bandwidth = other.Bandwidth;
      }
      if (other.SpreadingFactor != 0) {
        SpreadingFactor = other.SpreadingFactor;
      }
      if (other.CodeRateLegacy.Length != 0) {
        CodeRateLegacy = other.CodeRateLegacy;
      }
      if (other.CodeRate != global::Chirpstack.Gateway.CodeRate.CrUndefined) {
        CodeRate = other.CodeRate;
      }
      if (other.PolarizationInversion != false) {
        PolarizationInversion = other.PolarizationInversion;
      }
      _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: {
            Bandwidth = input.ReadUInt32();
            break;
          }
          case 16: {
            SpreadingFactor = input.ReadUInt32();
            break;
          }
          case 26: {
            CodeRateLegacy = input.ReadString();
            break;
          }
          case 32: {
            PolarizationInversion = input.ReadBool();
            break;
          }
          case 40: {
            CodeRate = (global::Chirpstack.Gateway.CodeRate) input.ReadEnum();
            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: {
            Bandwidth = input.ReadUInt32();
            break;
          }
          case 16: {
            SpreadingFactor = input.ReadUInt32();
            break;
          }
          case 26: {
            CodeRateLegacy = input.ReadString();
            break;
          }
          case 32: {
            PolarizationInversion = input.ReadBool();
            break;
          }
          case 40: {
            CodeRate = (global::Chirpstack.Gateway.CodeRate) input.ReadEnum();
            break;
          }
        }
      }
    }
    #endif

  }

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::Chirpstack.Gateway.GwReflection.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 FskModulationInfo() {
      OnConstruction();
    }

    partial void OnConstruction();

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

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

    /// <summary>Field number for the "frequency_deviation" field.</summary>
    public const int FrequencyDeviationFieldNumber = 1;
    private uint frequencyDeviation_;
    /// <summary>
    /// Frequency deviation.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint FrequencyDeviation {
      get { return frequencyDeviation_; }
      set {
        frequencyDeviation_ = value;
      }
    }

    /// <summary>Field number for the "datarate" field.</summary>
    public const int DatarateFieldNumber = 2;
    private uint datarate_;
    /// <summary>
    /// FSK datarate (bits / sec).
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint Datarate {
      get { return datarate_; }
      set {
        datarate_ = value;
      }
    }

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(FskModulationInfo other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (FrequencyDeviation != other.FrequencyDeviation) return false;
      if (Datarate != other.Datarate) 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 (FrequencyDeviation != 0) hash ^= FrequencyDeviation.GetHashCode();
      if (Datarate != 0) hash ^= Datarate.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 (FrequencyDeviation != 0) {
        output.WriteRawTag(8);
        output.WriteUInt32(FrequencyDeviation);
      }
      if (Datarate != 0) {
        output.WriteRawTag(16);
        output.WriteUInt32(Datarate);
      }
      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 (FrequencyDeviation != 0) {
        output.WriteRawTag(8);
        output.WriteUInt32(FrequencyDeviation);
      }
      if (Datarate != 0) {
        output.WriteRawTag(16);
        output.WriteUInt32(Datarate);
      }
      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 (FrequencyDeviation != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(FrequencyDeviation);
      }
      if (Datarate != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Datarate);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(FskModulationInfo other) {
      if (other == null) {
        return;
      }
      if (other.FrequencyDeviation != 0) {
        FrequencyDeviation = other.FrequencyDeviation;
      }
      if (other.Datarate != 0) {
        Datarate = other.Datarate;
      }
      _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: {
            FrequencyDeviation = input.ReadUInt32();
            break;
          }
          case 16: {
            Datarate = 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: {
            FrequencyDeviation = input.ReadUInt32();
            break;
          }
          case 16: {
            Datarate = input.ReadUInt32();
            break;
          }
        }
      }
    }
    #endif

  }

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::Chirpstack.Gateway.GwReflection.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 LrFhssModulationInfo() {
      OnConstruction();
    }

    partial void OnConstruction();

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

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

    /// <summary>Field number for the "operating_channel_width" field.</summary>
    public const int OperatingChannelWidthFieldNumber = 1;
    private uint operatingChannelWidth_;
    /// <summary>
    /// Operating channel width (OCW) in Hz.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint OperatingChannelWidth {
      get { return operatingChannelWidth_; }
      set {
        operatingChannelWidth_ = value;
      }
    }

    /// <summary>Field number for the "code_rate_legacy" field.</summary>
    public const int CodeRateLegacyFieldNumber = 2;
    private string codeRateLegacy_ = "";
    /// <summary>
    /// Code-rate.
    /// Deprecated: use code_rate.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string CodeRateLegacy {
      get { return codeRateLegacy_; }
      set {
        codeRateLegacy_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "code_rate" field.</summary>
    public const int CodeRateFieldNumber = 4;
    private global::Chirpstack.Gateway.CodeRate codeRate_ = global::Chirpstack.Gateway.CodeRate.CrUndefined;
    /// <summary>
    /// Code-rate.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Gateway.CodeRate CodeRate {
      get { return codeRate_; }
      set {
        codeRate_ = value;
      }
    }

    /// <summary>Field number for the "grid_steps" field.</summary>
    public const int GridStepsFieldNumber = 3;
    private uint gridSteps_;
    /// <summary>
    /// Hopping grid number of steps.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint GridSteps {
      get { return gridSteps_; }
      set {
        gridSteps_ = value;
      }
    }

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(LrFhssModulationInfo other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (OperatingChannelWidth != other.OperatingChannelWidth) return false;
      if (CodeRateLegacy != other.CodeRateLegacy) return false;
      if (CodeRate != other.CodeRate) return false;
      if (GridSteps != other.GridSteps) 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 (OperatingChannelWidth != 0) hash ^= OperatingChannelWidth.GetHashCode();
      if (CodeRateLegacy.Length != 0) hash ^= CodeRateLegacy.GetHashCode();
      if (CodeRate != global::Chirpstack.Gateway.CodeRate.CrUndefined) hash ^= CodeRate.GetHashCode();
      if (GridSteps != 0) hash ^= GridSteps.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 (OperatingChannelWidth != 0) {
        output.WriteRawTag(8);
        output.WriteUInt32(OperatingChannelWidth);
      }
      if (CodeRateLegacy.Length != 0) {
        output.WriteRawTag(18);
        output.WriteString(CodeRateLegacy);
      }
      if (GridSteps != 0) {
        output.WriteRawTag(24);
        output.WriteUInt32(GridSteps);
      }
      if (CodeRate != global::Chirpstack.Gateway.CodeRate.CrUndefined) {
        output.WriteRawTag(32);
        output.WriteEnum((int) CodeRate);
      }
      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 (OperatingChannelWidth != 0) {
        output.WriteRawTag(8);
        output.WriteUInt32(OperatingChannelWidth);
      }
      if (CodeRateLegacy.Length != 0) {
        output.WriteRawTag(18);
        output.WriteString(CodeRateLegacy);
      }
      if (GridSteps != 0) {
        output.WriteRawTag(24);
        output.WriteUInt32(GridSteps);
      }
      if (CodeRate != global::Chirpstack.Gateway.CodeRate.CrUndefined) {
        output.WriteRawTag(32);
        output.WriteEnum((int) CodeRate);
      }
      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 (OperatingChannelWidth != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(OperatingChannelWidth);
      }
      if (CodeRateLegacy.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(CodeRateLegacy);
      }
      if (CodeRate != global::Chirpstack.Gateway.CodeRate.CrUndefined) {
        size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) CodeRate);
      }
      if (GridSteps != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(GridSteps);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(LrFhssModulationInfo other) {
      if (other == null) {
        return;
      }
      if (other.OperatingChannelWidth != 0) {
        OperatingChannelWidth = other.OperatingChannelWidth;
      }
      if (other.CodeRateLegacy.Length != 0) {
        CodeRateLegacy = other.CodeRateLegacy;
      }
      if (other.CodeRate != global::Chirpstack.Gateway.CodeRate.CrUndefined) {
        CodeRate = other.CodeRate;
      }
      if (other.GridSteps != 0) {
        GridSteps = other.GridSteps;
      }
      _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: {
            OperatingChannelWidth = input.ReadUInt32();
            break;
          }
          case 18: {
            CodeRateLegacy = input.ReadString();
            break;
          }
          case 24: {
            GridSteps = input.ReadUInt32();
            break;
          }
          case 32: {
            CodeRate = (global::Chirpstack.Gateway.CodeRate) input.ReadEnum();
            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: {
            OperatingChannelWidth = input.ReadUInt32();
            break;
          }
          case 18: {
            CodeRateLegacy = input.ReadString();
            break;
          }
          case 24: {
            GridSteps = input.ReadUInt32();
            break;
          }
          case 32: {
            CodeRate = (global::Chirpstack.Gateway.CodeRate) input.ReadEnum();
            break;
          }
        }
      }
    }
    #endif

  }

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::Chirpstack.Gateway.GwReflection.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 EncryptedFineTimestamp() {
      OnConstruction();
    }

    partial void OnConstruction();

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

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

    /// <summary>Field number for the "aes_key_index" field.</summary>
    public const int AesKeyIndexFieldNumber = 1;
    private uint aesKeyIndex_;
    /// <summary>
    /// AES key index used for encrypting the fine timestamp.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint AesKeyIndex {
      get { return aesKeyIndex_; }
      set {
        aesKeyIndex_ = value;
      }
    }

    /// <summary>Field number for the "encrypted_ns" field.</summary>
    public const int EncryptedNsFieldNumber = 2;
    private pb::ByteString encryptedNs_ = pb::ByteString.Empty;
    /// <summary>
    /// Encrypted 'main' fine-timestamp (ns precision part of the timestamp).
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pb::ByteString EncryptedNs {
      get { return encryptedNs_; }
      set {
        encryptedNs_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "fpga_id" field.</summary>
    public const int FpgaIdFieldNumber = 3;
    private pb::ByteString fpgaId_ = pb::ByteString.Empty;
    /// <summary>
    /// FPGA ID.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pb::ByteString FpgaId {
      get { return fpgaId_; }
      set {
        fpgaId_ = 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 EncryptedFineTimestamp);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(EncryptedFineTimestamp other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (AesKeyIndex != other.AesKeyIndex) return false;
      if (EncryptedNs != other.EncryptedNs) return false;
      if (FpgaId != other.FpgaId) 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 (AesKeyIndex != 0) hash ^= AesKeyIndex.GetHashCode();
      if (EncryptedNs.Length != 0) hash ^= EncryptedNs.GetHashCode();
      if (FpgaId.Length != 0) hash ^= FpgaId.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 (AesKeyIndex != 0) {
        output.WriteRawTag(8);
        output.WriteUInt32(AesKeyIndex);
      }
      if (EncryptedNs.Length != 0) {
        output.WriteRawTag(18);
        output.WriteBytes(EncryptedNs);
      }
      if (FpgaId.Length != 0) {
        output.WriteRawTag(26);
        output.WriteBytes(FpgaId);
      }
      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 (AesKeyIndex != 0) {
        output.WriteRawTag(8);
        output.WriteUInt32(AesKeyIndex);
      }
      if (EncryptedNs.Length != 0) {
        output.WriteRawTag(18);
        output.WriteBytes(EncryptedNs);
      }
      if (FpgaId.Length != 0) {
        output.WriteRawTag(26);
        output.WriteBytes(FpgaId);
      }
      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 (AesKeyIndex != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(AesKeyIndex);
      }
      if (EncryptedNs.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedNs);
      }
      if (FpgaId.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeBytesSize(FpgaId);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(EncryptedFineTimestamp other) {
      if (other == null) {
        return;
      }
      if (other.AesKeyIndex != 0) {
        AesKeyIndex = other.AesKeyIndex;
      }
      if (other.EncryptedNs.Length != 0) {
        EncryptedNs = other.EncryptedNs;
      }
      if (other.FpgaId.Length != 0) {
        FpgaId = other.FpgaId;
      }
      _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: {
            AesKeyIndex = input.ReadUInt32();
            break;
          }
          case 18: {
            EncryptedNs = input.ReadBytes();
            break;
          }
          case 26: {
            FpgaId = input.ReadBytes();
            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: {
            AesKeyIndex = input.ReadUInt32();
            break;
          }
          case 18: {
            EncryptedNs = input.ReadBytes();
            break;
          }
          case 26: {
            FpgaId = input.ReadBytes();
            break;
          }
        }
      }
    }
    #endif

  }

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::Chirpstack.Gateway.GwReflection.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 PlainFineTimestamp() {
      OnConstruction();
    }

    partial void OnConstruction();

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

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

    /// <summary>Field number for the "time" field.</summary>
    public const int TimeFieldNumber = 1;
    private global::Google.Protobuf.WellKnownTypes.Timestamp time_;
    /// <summary>
    /// Full timestamp.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Google.Protobuf.WellKnownTypes.Timestamp Time {
      get { return time_; }
      set {
        time_ = value;
      }
    }

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(PlainFineTimestamp other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (!object.Equals(Time, other.Time)) 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 (time_ != null) hash ^= Time.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 (time_ != null) {
        output.WriteRawTag(10);
        output.WriteMessage(Time);
      }
      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 (time_ != null) {
        output.WriteRawTag(10);
        output.WriteMessage(Time);
      }
      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 (time_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Time);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(PlainFineTimestamp other) {
      if (other == null) {
        return;
      }
      if (other.time_ != null) {
        if (time_ == null) {
          Time = new global::Google.Protobuf.WellKnownTypes.Timestamp();
        }
        Time.MergeFrom(other.Time);
      }
      _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 (time_ == null) {
              Time = new global::Google.Protobuf.WellKnownTypes.Timestamp();
            }
            input.ReadMessage(Time);
            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 (time_ == null) {
              Time = new global::Google.Protobuf.WellKnownTypes.Timestamp();
            }
            input.ReadMessage(Time);
            break;
          }
        }
      }
    }
    #endif

  }

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::Chirpstack.Gateway.GwReflection.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 GatewayStats() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public GatewayStats(GatewayStats other) : this() {
      gatewayIdLegacy_ = other.gatewayIdLegacy_;
      gatewayId_ = other.gatewayId_;
      time_ = other.time_ != null ? other.time_.Clone() : null;
      location_ = other.location_ != null ? other.location_.Clone() : null;
      configVersion_ = other.configVersion_;
      rxPacketsReceived_ = other.rxPacketsReceived_;
      rxPacketsReceivedOk_ = other.rxPacketsReceivedOk_;
      txPacketsReceived_ = other.txPacketsReceived_;
      txPacketsEmitted_ = other.txPacketsEmitted_;
      metadata_ = other.metadata_.Clone();
      txPacketsPerFrequency_ = other.txPacketsPerFrequency_.Clone();
      rxPacketsPerFrequency_ = other.rxPacketsPerFrequency_.Clone();
      txPacketsPerModulation_ = other.txPacketsPerModulation_.Clone();
      rxPacketsPerModulation_ = other.rxPacketsPerModulation_.Clone();
      txPacketsPerStatus_ = other.txPacketsPerStatus_.Clone();
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

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

    /// <summary>Field number for the "gateway_id_legacy" field.</summary>
    public const int GatewayIdLegacyFieldNumber = 1;
    private pb::ByteString gatewayIdLegacy_ = pb::ByteString.Empty;
    /// <summary>
    /// Gateway ID.
    /// Deprecated: use gateway_id.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pb::ByteString GatewayIdLegacy {
      get { return gatewayIdLegacy_; }
      set {
        gatewayIdLegacy_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "gateway_id" field.</summary>
    public const int GatewayIdFieldNumber = 17;
    private string gatewayId_ = "";
    /// <summary>
    /// Gateway ID.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string GatewayId {
      get { return gatewayId_; }
      set {
        gatewayId_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "time" field.</summary>
    public const int TimeFieldNumber = 2;
    private global::Google.Protobuf.WellKnownTypes.Timestamp time_;
    /// <summary>
    /// Gateway time.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Google.Protobuf.WellKnownTypes.Timestamp Time {
      get { return time_; }
      set {
        time_ = value;
      }
    }

    /// <summary>Field number for the "location" field.</summary>
    public const int LocationFieldNumber = 3;
    private global::Chirpstack.Common.Location location_;
    /// <summary>
    /// Gateway location.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Common.Location Location {
      get { return location_; }
      set {
        location_ = value;
      }
    }

    /// <summary>Field number for the "config_version" field.</summary>
    public const int ConfigVersionFieldNumber = 4;
    private string configVersion_ = "";
    /// <summary>
    /// Gateway configuration version (this maps to the config_version sent
    /// by ChirpStack to the gateway).
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string ConfigVersion {
      get { return configVersion_; }
      set {
        configVersion_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "rx_packets_received" field.</summary>
    public const int RxPacketsReceivedFieldNumber = 5;
    private uint rxPacketsReceived_;
    /// <summary>
    /// Number of radio packets received.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint RxPacketsReceived {
      get { return rxPacketsReceived_; }
      set {
        rxPacketsReceived_ = value;
      }
    }

    /// <summary>Field number for the "rx_packets_received_ok" field.</summary>
    public const int RxPacketsReceivedOkFieldNumber = 6;
    private uint rxPacketsReceivedOk_;
    /// <summary>
    /// Number of radio packets received with valid PHY CRC.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint RxPacketsReceivedOk {
      get { return rxPacketsReceivedOk_; }
      set {
        rxPacketsReceivedOk_ = value;
      }
    }

    /// <summary>Field number for the "tx_packets_received" field.</summary>
    public const int TxPacketsReceivedFieldNumber = 7;
    private uint txPacketsReceived_;
    /// <summary>
    /// Number of downlink packets received for transmission.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint TxPacketsReceived {
      get { return txPacketsReceived_; }
      set {
        txPacketsReceived_ = value;
      }
    }

    /// <summary>Field number for the "tx_packets_emitted" field.</summary>
    public const int TxPacketsEmittedFieldNumber = 8;
    private uint txPacketsEmitted_;
    /// <summary>
    /// Number of downlink packets emitted.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint TxPacketsEmitted {
      get { return txPacketsEmitted_; }
      set {
        txPacketsEmitted_ = value;
      }
    }

    /// <summary>Field number for the "metadata" field.</summary>
    public const int MetadataFieldNumber = 10;
    private static readonly pbc::MapField<string, string>.Codec _map_metadata_codec
        = new pbc::MapField<string, string>.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForString(18, ""), 82);
    private readonly pbc::MapField<string, string> metadata_ = new pbc::MapField<string, string>();
    /// <summary>
    /// Additional gateway meta-data.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pbc::MapField<string, string> Metadata {
      get { return metadata_; }
    }

    /// <summary>Field number for the "tx_packets_per_frequency" field.</summary>
    public const int TxPacketsPerFrequencyFieldNumber = 12;
    private static readonly pbc::MapField<uint, uint>.Codec _map_txPacketsPerFrequency_codec
        = new pbc::MapField<uint, uint>.Codec(pb::FieldCodec.ForUInt32(8, 0), pb::FieldCodec.ForUInt32(16, 0), 98);
    private readonly pbc::MapField<uint, uint> txPacketsPerFrequency_ = new pbc::MapField<uint, uint>();
    /// <summary>
    /// Tx packets per frequency.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pbc::MapField<uint, uint> TxPacketsPerFrequency {
      get { return txPacketsPerFrequency_; }
    }

    /// <summary>Field number for the "rx_packets_per_frequency" field.</summary>
    public const int RxPacketsPerFrequencyFieldNumber = 13;
    private static readonly pbc::MapField<uint, uint>.Codec _map_rxPacketsPerFrequency_codec
        = new pbc::MapField<uint, uint>.Codec(pb::FieldCodec.ForUInt32(8, 0), pb::FieldCodec.ForUInt32(16, 0), 106);
    private readonly pbc::MapField<uint, uint> rxPacketsPerFrequency_ = new pbc::MapField<uint, uint>();
    /// <summary>
    /// Rx packets per frequency.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pbc::MapField<uint, uint> RxPacketsPerFrequency {
      get { return rxPacketsPerFrequency_; }
    }

    /// <summary>Field number for the "tx_packets_per_modulation" field.</summary>
    public const int TxPacketsPerModulationFieldNumber = 14;
    private static readonly pb::FieldCodec<global::Chirpstack.Gateway.PerModulationCount> _repeated_txPacketsPerModulation_codec
        = pb::FieldCodec.ForMessage(114, global::Chirpstack.Gateway.PerModulationCount.Parser);
    private readonly pbc::RepeatedField<global::Chirpstack.Gateway.PerModulationCount> txPacketsPerModulation_ = new pbc::RepeatedField<global::Chirpstack.Gateway.PerModulationCount>();
    /// <summary>
    /// Tx packets per modulation parameters.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pbc::RepeatedField<global::Chirpstack.Gateway.PerModulationCount> TxPacketsPerModulation {
      get { return txPacketsPerModulation_; }
    }

    /// <summary>Field number for the "rx_packets_per_modulation" field.</summary>
    public const int RxPacketsPerModulationFieldNumber = 15;
    private static readonly pb::FieldCodec<global::Chirpstack.Gateway.PerModulationCount> _repeated_rxPacketsPerModulation_codec
        = pb::FieldCodec.ForMessage(122, global::Chirpstack.Gateway.PerModulationCount.Parser);
    private readonly pbc::RepeatedField<global::Chirpstack.Gateway.PerModulationCount> rxPacketsPerModulation_ = new pbc::RepeatedField<global::Chirpstack.Gateway.PerModulationCount>();
    /// <summary>
    /// Rx packets per modulation parameters.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pbc::RepeatedField<global::Chirpstack.Gateway.PerModulationCount> RxPacketsPerModulation {
      get { return rxPacketsPerModulation_; }
    }

    /// <summary>Field number for the "tx_packets_per_status" field.</summary>
    public const int TxPacketsPerStatusFieldNumber = 16;
    private static readonly pbc::MapField<string, uint>.Codec _map_txPacketsPerStatus_codec
        = new pbc::MapField<string, uint>.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForUInt32(16, 0), 130);
    private readonly pbc::MapField<string, uint> txPacketsPerStatus_ = new pbc::MapField<string, uint>();
    /// <summary>
    /// Tx packets per status.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pbc::MapField<string, uint> TxPacketsPerStatus {
      get { return txPacketsPerStatus_; }
    }

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(GatewayStats other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (GatewayIdLegacy != other.GatewayIdLegacy) return false;
      if (GatewayId != other.GatewayId) return false;
      if (!object.Equals(Time, other.Time)) return false;
      if (!object.Equals(Location, other.Location)) return false;
      if (ConfigVersion != other.ConfigVersion) return false;
      if (RxPacketsReceived != other.RxPacketsReceived) return false;
      if (RxPacketsReceivedOk != other.RxPacketsReceivedOk) return false;
      if (TxPacketsReceived != other.TxPacketsReceived) return false;
      if (TxPacketsEmitted != other.TxPacketsEmitted) return false;
      if (!Metadata.Equals(other.Metadata)) return false;
      if (!TxPacketsPerFrequency.Equals(other.TxPacketsPerFrequency)) return false;
      if (!RxPacketsPerFrequency.Equals(other.RxPacketsPerFrequency)) return false;
      if(!txPacketsPerModulation_.Equals(other.txPacketsPerModulation_)) return false;
      if(!rxPacketsPerModulation_.Equals(other.rxPacketsPerModulation_)) return false;
      if (!TxPacketsPerStatus.Equals(other.TxPacketsPerStatus)) 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 (GatewayIdLegacy.Length != 0) hash ^= GatewayIdLegacy.GetHashCode();
      if (GatewayId.Length != 0) hash ^= GatewayId.GetHashCode();
      if (time_ != null) hash ^= Time.GetHashCode();
      if (location_ != null) hash ^= Location.GetHashCode();
      if (ConfigVersion.Length != 0) hash ^= ConfigVersion.GetHashCode();
      if (RxPacketsReceived != 0) hash ^= RxPacketsReceived.GetHashCode();
      if (RxPacketsReceivedOk != 0) hash ^= RxPacketsReceivedOk.GetHashCode();
      if (TxPacketsReceived != 0) hash ^= TxPacketsReceived.GetHashCode();
      if (TxPacketsEmitted != 0) hash ^= TxPacketsEmitted.GetHashCode();
      hash ^= Metadata.GetHashCode();
      hash ^= TxPacketsPerFrequency.GetHashCode();
      hash ^= RxPacketsPerFrequency.GetHashCode();
      hash ^= txPacketsPerModulation_.GetHashCode();
      hash ^= rxPacketsPerModulation_.GetHashCode();
      hash ^= TxPacketsPerStatus.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 (GatewayIdLegacy.Length != 0) {
        output.WriteRawTag(10);
        output.WriteBytes(GatewayIdLegacy);
      }
      if (time_ != null) {
        output.WriteRawTag(18);
        output.WriteMessage(Time);
      }
      if (location_ != null) {
        output.WriteRawTag(26);
        output.WriteMessage(Location);
      }
      if (ConfigVersion.Length != 0) {
        output.WriteRawTag(34);
        output.WriteString(ConfigVersion);
      }
      if (RxPacketsReceived != 0) {
        output.WriteRawTag(40);
        output.WriteUInt32(RxPacketsReceived);
      }
      if (RxPacketsReceivedOk != 0) {
        output.WriteRawTag(48);
        output.WriteUInt32(RxPacketsReceivedOk);
      }
      if (TxPacketsReceived != 0) {
        output.WriteRawTag(56);
        output.WriteUInt32(TxPacketsReceived);
      }
      if (TxPacketsEmitted != 0) {
        output.WriteRawTag(64);
        output.WriteUInt32(TxPacketsEmitted);
      }
      metadata_.WriteTo(output, _map_metadata_codec);
      txPacketsPerFrequency_.WriteTo(output, _map_txPacketsPerFrequency_codec);
      rxPacketsPerFrequency_.WriteTo(output, _map_rxPacketsPerFrequency_codec);
      txPacketsPerModulation_.WriteTo(output, _repeated_txPacketsPerModulation_codec);
      rxPacketsPerModulation_.WriteTo(output, _repeated_rxPacketsPerModulation_codec);
      txPacketsPerStatus_.WriteTo(output, _map_txPacketsPerStatus_codec);
      if (GatewayId.Length != 0) {
        output.WriteRawTag(138, 1);
        output.WriteString(GatewayId);
      }
      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 (GatewayIdLegacy.Length != 0) {
        output.WriteRawTag(10);
        output.WriteBytes(GatewayIdLegacy);
      }
      if (time_ != null) {
        output.WriteRawTag(18);
        output.WriteMessage(Time);
      }
      if (location_ != null) {
        output.WriteRawTag(26);
        output.WriteMessage(Location);
      }
      if (ConfigVersion.Length != 0) {
        output.WriteRawTag(34);
        output.WriteString(ConfigVersion);
      }
      if (RxPacketsReceived != 0) {
        output.WriteRawTag(40);
        output.WriteUInt32(RxPacketsReceived);
      }
      if (RxPacketsReceivedOk != 0) {
        output.WriteRawTag(48);
        output.WriteUInt32(RxPacketsReceivedOk);
      }
      if (TxPacketsReceived != 0) {
        output.WriteRawTag(56);
        output.WriteUInt32(TxPacketsReceived);
      }
      if (TxPacketsEmitted != 0) {
        output.WriteRawTag(64);
        output.WriteUInt32(TxPacketsEmitted);
      }
      metadata_.WriteTo(ref output, _map_metadata_codec);
      txPacketsPerFrequency_.WriteTo(ref output, _map_txPacketsPerFrequency_codec);
      rxPacketsPerFrequency_.WriteTo(ref output, _map_rxPacketsPerFrequency_codec);
      txPacketsPerModulation_.WriteTo(ref output, _repeated_txPacketsPerModulation_codec);
      rxPacketsPerModulation_.WriteTo(ref output, _repeated_rxPacketsPerModulation_codec);
      txPacketsPerStatus_.WriteTo(ref output, _map_txPacketsPerStatus_codec);
      if (GatewayId.Length != 0) {
        output.WriteRawTag(138, 1);
        output.WriteString(GatewayId);
      }
      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 (GatewayIdLegacy.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeBytesSize(GatewayIdLegacy);
      }
      if (GatewayId.Length != 0) {
        size += 2 + pb::CodedOutputStream.ComputeStringSize(GatewayId);
      }
      if (time_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Time);
      }
      if (location_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Location);
      }
      if (ConfigVersion.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(ConfigVersion);
      }
      if (RxPacketsReceived != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(RxPacketsReceived);
      }
      if (RxPacketsReceivedOk != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(RxPacketsReceivedOk);
      }
      if (TxPacketsReceived != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(TxPacketsReceived);
      }
      if (TxPacketsEmitted != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(TxPacketsEmitted);
      }
      size += metadata_.CalculateSize(_map_metadata_codec);
      size += txPacketsPerFrequency_.CalculateSize(_map_txPacketsPerFrequency_codec);
      size += rxPacketsPerFrequency_.CalculateSize(_map_rxPacketsPerFrequency_codec);
      size += txPacketsPerModulation_.CalculateSize(_repeated_txPacketsPerModulation_codec);
      size += rxPacketsPerModulation_.CalculateSize(_repeated_rxPacketsPerModulation_codec);
      size += txPacketsPerStatus_.CalculateSize(_map_txPacketsPerStatus_codec);
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(GatewayStats other) {
      if (other == null) {
        return;
      }
      if (other.GatewayIdLegacy.Length != 0) {
        GatewayIdLegacy = other.GatewayIdLegacy;
      }
      if (other.GatewayId.Length != 0) {
        GatewayId = other.GatewayId;
      }
      if (other.time_ != null) {
        if (time_ == null) {
          Time = new global::Google.Protobuf.WellKnownTypes.Timestamp();
        }
        Time.MergeFrom(other.Time);
      }
      if (other.location_ != null) {
        if (location_ == null) {
          Location = new global::Chirpstack.Common.Location();
        }
        Location.MergeFrom(other.Location);
      }
      if (other.ConfigVersion.Length != 0) {
        ConfigVersion = other.ConfigVersion;
      }
      if (other.RxPacketsReceived != 0) {
        RxPacketsReceived = other.RxPacketsReceived;
      }
      if (other.RxPacketsReceivedOk != 0) {
        RxPacketsReceivedOk = other.RxPacketsReceivedOk;
      }
      if (other.TxPacketsReceived != 0) {
        TxPacketsReceived = other.TxPacketsReceived;
      }
      if (other.TxPacketsEmitted != 0) {
        TxPacketsEmitted = other.TxPacketsEmitted;
      }
      metadata_.Add(other.metadata_);
      txPacketsPerFrequency_.Add(other.txPacketsPerFrequency_);
      rxPacketsPerFrequency_.Add(other.rxPacketsPerFrequency_);
      txPacketsPerModulation_.Add(other.txPacketsPerModulation_);
      rxPacketsPerModulation_.Add(other.rxPacketsPerModulation_);
      txPacketsPerStatus_.Add(other.txPacketsPerStatus_);
      _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: {
            GatewayIdLegacy = input.ReadBytes();
            break;
          }
          case 18: {
            if (time_ == null) {
              Time = new global::Google.Protobuf.WellKnownTypes.Timestamp();
            }
            input.ReadMessage(Time);
            break;
          }
          case 26: {
            if (location_ == null) {
              Location = new global::Chirpstack.Common.Location();
            }
            input.ReadMessage(Location);
            break;
          }
          case 34: {
            ConfigVersion = input.ReadString();
            break;
          }
          case 40: {
            RxPacketsReceived = input.ReadUInt32();
            break;
          }
          case 48: {
            RxPacketsReceivedOk = input.ReadUInt32();
            break;
          }
          case 56: {
            TxPacketsReceived = input.ReadUInt32();
            break;
          }
          case 64: {
            TxPacketsEmitted = input.ReadUInt32();
            break;
          }
          case 82: {
            metadata_.AddEntriesFrom(input, _map_metadata_codec);
            break;
          }
          case 98: {
            txPacketsPerFrequency_.AddEntriesFrom(input, _map_txPacketsPerFrequency_codec);
            break;
          }
          case 106: {
            rxPacketsPerFrequency_.AddEntriesFrom(input, _map_rxPacketsPerFrequency_codec);
            break;
          }
          case 114: {
            txPacketsPerModulation_.AddEntriesFrom(input, _repeated_txPacketsPerModulation_codec);
            break;
          }
          case 122: {
            rxPacketsPerModulation_.AddEntriesFrom(input, _repeated_rxPacketsPerModulation_codec);
            break;
          }
          case 130: {
            txPacketsPerStatus_.AddEntriesFrom(input, _map_txPacketsPerStatus_codec);
            break;
          }
          case 138: {
            GatewayId = 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: {
            GatewayIdLegacy = input.ReadBytes();
            break;
          }
          case 18: {
            if (time_ == null) {
              Time = new global::Google.Protobuf.WellKnownTypes.Timestamp();
            }
            input.ReadMessage(Time);
            break;
          }
          case 26: {
            if (location_ == null) {
              Location = new global::Chirpstack.Common.Location();
            }
            input.ReadMessage(Location);
            break;
          }
          case 34: {
            ConfigVersion = input.ReadString();
            break;
          }
          case 40: {
            RxPacketsReceived = input.ReadUInt32();
            break;
          }
          case 48: {
            RxPacketsReceivedOk = input.ReadUInt32();
            break;
          }
          case 56: {
            TxPacketsReceived = input.ReadUInt32();
            break;
          }
          case 64: {
            TxPacketsEmitted = input.ReadUInt32();
            break;
          }
          case 82: {
            metadata_.AddEntriesFrom(ref input, _map_metadata_codec);
            break;
          }
          case 98: {
            txPacketsPerFrequency_.AddEntriesFrom(ref input, _map_txPacketsPerFrequency_codec);
            break;
          }
          case 106: {
            rxPacketsPerFrequency_.AddEntriesFrom(ref input, _map_rxPacketsPerFrequency_codec);
            break;
          }
          case 114: {
            txPacketsPerModulation_.AddEntriesFrom(ref input, _repeated_txPacketsPerModulation_codec);
            break;
          }
          case 122: {
            rxPacketsPerModulation_.AddEntriesFrom(ref input, _repeated_rxPacketsPerModulation_codec);
            break;
          }
          case 130: {
            txPacketsPerStatus_.AddEntriesFrom(ref input, _map_txPacketsPerStatus_codec);
            break;
          }
          case 138: {
            GatewayId = input.ReadString();
            break;
          }
        }
      }
    }
    #endif

  }

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

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

    [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 PerModulationCount() {
      OnConstruction();
    }

    partial void OnConstruction();

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

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

    /// <summary>Field number for the "modulation" field.</summary>
    public const int ModulationFieldNumber = 1;
    private global::Chirpstack.Gateway.Modulation modulation_;
    /// <summary>
    /// Modulation.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Gateway.Modulation Modulation {
      get { return modulation_; }
      set {
        modulation_ = value;
      }
    }

    /// <summary>Field number for the "count" field.</summary>
    public const int CountFieldNumber = 2;
    private uint count_;
    /// <summary>
    /// Count.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint Count {
      get { return count_; }
      set {
        count_ = value;
      }
    }

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(PerModulationCount other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (!object.Equals(Modulation, other.Modulation)) return false;
      if (Count != other.Count) 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 (modulation_ != null) hash ^= Modulation.GetHashCode();
      if (Count != 0) hash ^= Count.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 (modulation_ != null) {
        output.WriteRawTag(10);
        output.WriteMessage(Modulation);
      }
      if (Count != 0) {
        output.WriteRawTag(16);
        output.WriteUInt32(Count);
      }
      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 (modulation_ != null) {
        output.WriteRawTag(10);
        output.WriteMessage(Modulation);
      }
      if (Count != 0) {
        output.WriteRawTag(16);
        output.WriteUInt32(Count);
      }
      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 (modulation_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Modulation);
      }
      if (Count != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Count);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(PerModulationCount other) {
      if (other == null) {
        return;
      }
      if (other.modulation_ != null) {
        if (modulation_ == null) {
          Modulation = new global::Chirpstack.Gateway.Modulation();
        }
        Modulation.MergeFrom(other.Modulation);
      }
      if (other.Count != 0) {
        Count = other.Count;
      }
      _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 (modulation_ == null) {
              Modulation = new global::Chirpstack.Gateway.Modulation();
            }
            input.ReadMessage(Modulation);
            break;
          }
          case 16: {
            Count = 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 10: {
            if (modulation_ == null) {
              Modulation = new global::Chirpstack.Gateway.Modulation();
            }
            input.ReadMessage(Modulation);
            break;
          }
          case 16: {
            Count = input.ReadUInt32();
            break;
          }
        }
      }
    }
    #endif

  }

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

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

    [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 UplinkRxInfoLegacy() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public UplinkRxInfoLegacy(UplinkRxInfoLegacy other) : this() {
      gatewayId_ = other.gatewayId_;
      time_ = other.time_ != null ? other.time_.Clone() : null;
      timeSinceGpsEpoch_ = other.timeSinceGpsEpoch_ != null ? other.timeSinceGpsEpoch_.Clone() : null;
      rssi_ = other.rssi_;
      loraSnr_ = other.loraSnr_;
      channel_ = other.channel_;
      rfChain_ = other.rfChain_;
      board_ = other.board_;
      antenna_ = other.antenna_;
      location_ = other.location_ != null ? other.location_.Clone() : null;
      fineTimestampType_ = other.fineTimestampType_;
      context_ = other.context_;
      uplinkId_ = other.uplinkId_;
      crcStatus_ = other.crcStatus_;
      metadata_ = other.metadata_.Clone();
      switch (other.FineTimestampCase) {
        case FineTimestampOneofCase.EncryptedFineTimestamp:
          EncryptedFineTimestamp = other.EncryptedFineTimestamp.Clone();
          break;
        case FineTimestampOneofCase.PlainFineTimestamp:
          PlainFineTimestamp = other.PlainFineTimestamp.Clone();
          break;
      }

      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

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

    /// <summary>Field number for the "gateway_id" field.</summary>
    public const int GatewayIdFieldNumber = 1;
    private pb::ByteString gatewayId_ = pb::ByteString.Empty;
    /// <summary>
    /// Gateway ID.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pb::ByteString GatewayId {
      get { return gatewayId_; }
      set {
        gatewayId_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "time" field.</summary>
    public const int TimeFieldNumber = 2;
    private global::Google.Protobuf.WellKnownTypes.Timestamp time_;
    /// <summary>
    /// RX time (only set when the gateway has a GPS module).
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Google.Protobuf.WellKnownTypes.Timestamp Time {
      get { return time_; }
      set {
        time_ = value;
      }
    }

    /// <summary>Field number for the "time_since_gps_epoch" field.</summary>
    public const int TimeSinceGpsEpochFieldNumber = 3;
    private global::Google.Protobuf.WellKnownTypes.Duration timeSinceGpsEpoch_;
    /// <summary>
    /// RX time since GPS epoch (only set when the gateway has a GPS module).
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Google.Protobuf.WellKnownTypes.Duration TimeSinceGpsEpoch {
      get { return timeSinceGpsEpoch_; }
      set {
        timeSinceGpsEpoch_ = value;
      }
    }

    /// <summary>Field number for the "rssi" field.</summary>
    public const int RssiFieldNumber = 5;
    private int rssi_;
    /// <summary>
    /// RSSI.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public int Rssi {
      get { return rssi_; }
      set {
        rssi_ = value;
      }
    }

    /// <summary>Field number for the "lora_snr" field.</summary>
    public const int LoraSnrFieldNumber = 6;
    private double loraSnr_;
    /// <summary>
    /// LoRa SNR.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public double LoraSnr {
      get { return loraSnr_; }
      set {
        loraSnr_ = value;
      }
    }

    /// <summary>Field number for the "channel" field.</summary>
    public const int ChannelFieldNumber = 7;
    private uint channel_;
    /// <summary>
    /// Channel.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint Channel {
      get { return channel_; }
      set {
        channel_ = value;
      }
    }

    /// <summary>Field number for the "rf_chain" field.</summary>
    public const int RfChainFieldNumber = 8;
    private uint rfChain_;
    /// <summary>
    /// RF Chain.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint RfChain {
      get { return rfChain_; }
      set {
        rfChain_ = value;
      }
    }

    /// <summary>Field number for the "board" field.</summary>
    public const int BoardFieldNumber = 9;
    private uint board_;
    /// <summary>
    /// Board.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint Board {
      get { return board_; }
      set {
        board_ = value;
      }
    }

    /// <summary>Field number for the "antenna" field.</summary>
    public const int AntennaFieldNumber = 10;
    private uint antenna_;
    /// <summary>
    /// Antenna.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint Antenna {
      get { return antenna_; }
      set {
        antenna_ = value;
      }
    }

    /// <summary>Field number for the "location" field.</summary>
    public const int LocationFieldNumber = 11;
    private global::Chirpstack.Common.Location location_;
    /// <summary>
    /// Location.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Common.Location Location {
      get { return location_; }
      set {
        location_ = value;
      }
    }

    /// <summary>Field number for the "fine_timestamp_type" field.</summary>
    public const int FineTimestampTypeFieldNumber = 12;
    private global::Chirpstack.Gateway.FineTimestampType fineTimestampType_ = global::Chirpstack.Gateway.FineTimestampType.None;
    /// <summary>
    /// Fine-timestamp type.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Gateway.FineTimestampType FineTimestampType {
      get { return fineTimestampType_; }
      set {
        fineTimestampType_ = value;
      }
    }

    /// <summary>Field number for the "encrypted_fine_timestamp" field.</summary>
    public const int EncryptedFineTimestampFieldNumber = 13;
    /// <summary>
    /// Encrypted fine-timestamp data.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Gateway.EncryptedFineTimestamp EncryptedFineTimestamp {
      get { return fineTimestampCase_ == FineTimestampOneofCase.EncryptedFineTimestamp ? (global::Chirpstack.Gateway.EncryptedFineTimestamp) fineTimestamp_ : null; }
      set {
        fineTimestamp_ = value;
        fineTimestampCase_ = value == null ? FineTimestampOneofCase.None : FineTimestampOneofCase.EncryptedFineTimestamp;
      }
    }

    /// <summary>Field number for the "plain_fine_timestamp" field.</summary>
    public const int PlainFineTimestampFieldNumber = 14;
    /// <summary>
    /// Plain fine-timestamp data.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Gateway.PlainFineTimestamp PlainFineTimestamp {
      get { return fineTimestampCase_ == FineTimestampOneofCase.PlainFineTimestamp ? (global::Chirpstack.Gateway.PlainFineTimestamp) fineTimestamp_ : null; }
      set {
        fineTimestamp_ = value;
        fineTimestampCase_ = value == null ? FineTimestampOneofCase.None : FineTimestampOneofCase.PlainFineTimestamp;
      }
    }

    /// <summary>Field number for the "context" field.</summary>
    public const int ContextFieldNumber = 15;
    private pb::ByteString context_ = pb::ByteString.Empty;
    /// <summary>
    /// Gateway specific context.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pb::ByteString Context {
      get { return context_; }
      set {
        context_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "uplink_id" field.</summary>
    public const int UplinkIdFieldNumber = 16;
    private pb::ByteString uplinkId_ = pb::ByteString.Empty;
    /// <summary>
    /// Uplink ID (UUID bytes).
    /// Unique and random ID which can be used to correlate the uplink across multiple logs.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pb::ByteString UplinkId {
      get { return uplinkId_; }
      set {
        uplinkId_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "crc_status" field.</summary>
    public const int CrcStatusFieldNumber = 17;
    private global::Chirpstack.Gateway.CRCStatus crcStatus_ = global::Chirpstack.Gateway.CRCStatus.NoCrc;
    /// <summary>
    /// CRC status.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Gateway.CRCStatus CrcStatus {
      get { return crcStatus_; }
      set {
        crcStatus_ = value;
      }
    }

    /// <summary>Field number for the "metadata" field.</summary>
    public const int MetadataFieldNumber = 18;
    private static readonly pbc::MapField<string, string>.Codec _map_metadata_codec
        = new pbc::MapField<string, string>.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForString(18, ""), 146);
    private readonly pbc::MapField<string, string> metadata_ = new pbc::MapField<string, string>();
    /// <summary>
    /// Optional meta-data map.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pbc::MapField<string, string> Metadata {
      get { return metadata_; }
    }

    private object fineTimestamp_;
    /// <summary>Enum of possible cases for the "fine_timestamp" oneof.</summary>
    public enum FineTimestampOneofCase {
      None = 0,
      EncryptedFineTimestamp = 13,
      PlainFineTimestamp = 14,
    }
    private FineTimestampOneofCase fineTimestampCase_ = FineTimestampOneofCase.None;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public FineTimestampOneofCase FineTimestampCase {
      get { return fineTimestampCase_; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void ClearFineTimestamp() {
      fineTimestampCase_ = FineTimestampOneofCase.None;
      fineTimestamp_ = null;
    }

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(UplinkRxInfoLegacy other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (GatewayId != other.GatewayId) return false;
      if (!object.Equals(Time, other.Time)) return false;
      if (!object.Equals(TimeSinceGpsEpoch, other.TimeSinceGpsEpoch)) return false;
      if (Rssi != other.Rssi) return false;
      if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(LoraSnr, other.LoraSnr)) return false;
      if (Channel != other.Channel) return false;
      if (RfChain != other.RfChain) return false;
      if (Board != other.Board) return false;
      if (Antenna != other.Antenna) return false;
      if (!object.Equals(Location, other.Location)) return false;
      if (FineTimestampType != other.FineTimestampType) return false;
      if (!object.Equals(EncryptedFineTimestamp, other.EncryptedFineTimestamp)) return false;
      if (!object.Equals(PlainFineTimestamp, other.PlainFineTimestamp)) return false;
      if (Context != other.Context) return false;
      if (UplinkId != other.UplinkId) return false;
      if (CrcStatus != other.CrcStatus) return false;
      if (!Metadata.Equals(other.Metadata)) return false;
      if (FineTimestampCase != other.FineTimestampCase) 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 (GatewayId.Length != 0) hash ^= GatewayId.GetHashCode();
      if (time_ != null) hash ^= Time.GetHashCode();
      if (timeSinceGpsEpoch_ != null) hash ^= TimeSinceGpsEpoch.GetHashCode();
      if (Rssi != 0) hash ^= Rssi.GetHashCode();
      if (LoraSnr != 0D) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(LoraSnr);
      if (Channel != 0) hash ^= Channel.GetHashCode();
      if (RfChain != 0) hash ^= RfChain.GetHashCode();
      if (Board != 0) hash ^= Board.GetHashCode();
      if (Antenna != 0) hash ^= Antenna.GetHashCode();
      if (location_ != null) hash ^= Location.GetHashCode();
      if (FineTimestampType != global::Chirpstack.Gateway.FineTimestampType.None) hash ^= FineTimestampType.GetHashCode();
      if (fineTimestampCase_ == FineTimestampOneofCase.EncryptedFineTimestamp) hash ^= EncryptedFineTimestamp.GetHashCode();
      if (fineTimestampCase_ == FineTimestampOneofCase.PlainFineTimestamp) hash ^= PlainFineTimestamp.GetHashCode();
      if (Context.Length != 0) hash ^= Context.GetHashCode();
      if (UplinkId.Length != 0) hash ^= UplinkId.GetHashCode();
      if (CrcStatus != global::Chirpstack.Gateway.CRCStatus.NoCrc) hash ^= CrcStatus.GetHashCode();
      hash ^= Metadata.GetHashCode();
      hash ^= (int) fineTimestampCase_;
      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 (GatewayId.Length != 0) {
        output.WriteRawTag(10);
        output.WriteBytes(GatewayId);
      }
      if (time_ != null) {
        output.WriteRawTag(18);
        output.WriteMessage(Time);
      }
      if (timeSinceGpsEpoch_ != null) {
        output.WriteRawTag(26);
        output.WriteMessage(TimeSinceGpsEpoch);
      }
      if (Rssi != 0) {
        output.WriteRawTag(40);
        output.WriteInt32(Rssi);
      }
      if (LoraSnr != 0D) {
        output.WriteRawTag(49);
        output.WriteDouble(LoraSnr);
      }
      if (Channel != 0) {
        output.WriteRawTag(56);
        output.WriteUInt32(Channel);
      }
      if (RfChain != 0) {
        output.WriteRawTag(64);
        output.WriteUInt32(RfChain);
      }
      if (Board != 0) {
        output.WriteRawTag(72);
        output.WriteUInt32(Board);
      }
      if (Antenna != 0) {
        output.WriteRawTag(80);
        output.WriteUInt32(Antenna);
      }
      if (location_ != null) {
        output.WriteRawTag(90);
        output.WriteMessage(Location);
      }
      if (FineTimestampType != global::Chirpstack.Gateway.FineTimestampType.None) {
        output.WriteRawTag(96);
        output.WriteEnum((int) FineTimestampType);
      }
      if (fineTimestampCase_ == FineTimestampOneofCase.EncryptedFineTimestamp) {
        output.WriteRawTag(106);
        output.WriteMessage(EncryptedFineTimestamp);
      }
      if (fineTimestampCase_ == FineTimestampOneofCase.PlainFineTimestamp) {
        output.WriteRawTag(114);
        output.WriteMessage(PlainFineTimestamp);
      }
      if (Context.Length != 0) {
        output.WriteRawTag(122);
        output.WriteBytes(Context);
      }
      if (UplinkId.Length != 0) {
        output.WriteRawTag(130, 1);
        output.WriteBytes(UplinkId);
      }
      if (CrcStatus != global::Chirpstack.Gateway.CRCStatus.NoCrc) {
        output.WriteRawTag(136, 1);
        output.WriteEnum((int) CrcStatus);
      }
      metadata_.WriteTo(output, _map_metadata_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 (GatewayId.Length != 0) {
        output.WriteRawTag(10);
        output.WriteBytes(GatewayId);
      }
      if (time_ != null) {
        output.WriteRawTag(18);
        output.WriteMessage(Time);
      }
      if (timeSinceGpsEpoch_ != null) {
        output.WriteRawTag(26);
        output.WriteMessage(TimeSinceGpsEpoch);
      }
      if (Rssi != 0) {
        output.WriteRawTag(40);
        output.WriteInt32(Rssi);
      }
      if (LoraSnr != 0D) {
        output.WriteRawTag(49);
        output.WriteDouble(LoraSnr);
      }
      if (Channel != 0) {
        output.WriteRawTag(56);
        output.WriteUInt32(Channel);
      }
      if (RfChain != 0) {
        output.WriteRawTag(64);
        output.WriteUInt32(RfChain);
      }
      if (Board != 0) {
        output.WriteRawTag(72);
        output.WriteUInt32(Board);
      }
      if (Antenna != 0) {
        output.WriteRawTag(80);
        output.WriteUInt32(Antenna);
      }
      if (location_ != null) {
        output.WriteRawTag(90);
        output.WriteMessage(Location);
      }
      if (FineTimestampType != global::Chirpstack.Gateway.FineTimestampType.None) {
        output.WriteRawTag(96);
        output.WriteEnum((int) FineTimestampType);
      }
      if (fineTimestampCase_ == FineTimestampOneofCase.EncryptedFineTimestamp) {
        output.WriteRawTag(106);
        output.WriteMessage(EncryptedFineTimestamp);
      }
      if (fineTimestampCase_ == FineTimestampOneofCase.PlainFineTimestamp) {
        output.WriteRawTag(114);
        output.WriteMessage(PlainFineTimestamp);
      }
      if (Context.Length != 0) {
        output.WriteRawTag(122);
        output.WriteBytes(Context);
      }
      if (UplinkId.Length != 0) {
        output.WriteRawTag(130, 1);
        output.WriteBytes(UplinkId);
      }
      if (CrcStatus != global::Chirpstack.Gateway.CRCStatus.NoCrc) {
        output.WriteRawTag(136, 1);
        output.WriteEnum((int) CrcStatus);
      }
      metadata_.WriteTo(ref output, _map_metadata_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 (GatewayId.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeBytesSize(GatewayId);
      }
      if (time_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Time);
      }
      if (timeSinceGpsEpoch_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(TimeSinceGpsEpoch);
      }
      if (Rssi != 0) {
        size += 1 + pb::CodedOutputStream.ComputeInt32Size(Rssi);
      }
      if (LoraSnr != 0D) {
        size += 1 + 8;
      }
      if (Channel != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Channel);
      }
      if (RfChain != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(RfChain);
      }
      if (Board != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Board);
      }
      if (Antenna != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Antenna);
      }
      if (location_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Location);
      }
      if (FineTimestampType != global::Chirpstack.Gateway.FineTimestampType.None) {
        size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) FineTimestampType);
      }
      if (fineTimestampCase_ == FineTimestampOneofCase.EncryptedFineTimestamp) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(EncryptedFineTimestamp);
      }
      if (fineTimestampCase_ == FineTimestampOneofCase.PlainFineTimestamp) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(PlainFineTimestamp);
      }
      if (Context.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeBytesSize(Context);
      }
      if (UplinkId.Length != 0) {
        size += 2 + pb::CodedOutputStream.ComputeBytesSize(UplinkId);
      }
      if (CrcStatus != global::Chirpstack.Gateway.CRCStatus.NoCrc) {
        size += 2 + pb::CodedOutputStream.ComputeEnumSize((int) CrcStatus);
      }
      size += metadata_.CalculateSize(_map_metadata_codec);
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(UplinkRxInfoLegacy other) {
      if (other == null) {
        return;
      }
      if (other.GatewayId.Length != 0) {
        GatewayId = other.GatewayId;
      }
      if (other.time_ != null) {
        if (time_ == null) {
          Time = new global::Google.Protobuf.WellKnownTypes.Timestamp();
        }
        Time.MergeFrom(other.Time);
      }
      if (other.timeSinceGpsEpoch_ != null) {
        if (timeSinceGpsEpoch_ == null) {
          TimeSinceGpsEpoch = new global::Google.Protobuf.WellKnownTypes.Duration();
        }
        TimeSinceGpsEpoch.MergeFrom(other.TimeSinceGpsEpoch);
      }
      if (other.Rssi != 0) {
        Rssi = other.Rssi;
      }
      if (other.LoraSnr != 0D) {
        LoraSnr = other.LoraSnr;
      }
      if (other.Channel != 0) {
        Channel = other.Channel;
      }
      if (other.RfChain != 0) {
        RfChain = other.RfChain;
      }
      if (other.Board != 0) {
        Board = other.Board;
      }
      if (other.Antenna != 0) {
        Antenna = other.Antenna;
      }
      if (other.location_ != null) {
        if (location_ == null) {
          Location = new global::Chirpstack.Common.Location();
        }
        Location.MergeFrom(other.Location);
      }
      if (other.FineTimestampType != global::Chirpstack.Gateway.FineTimestampType.None) {
        FineTimestampType = other.FineTimestampType;
      }
      if (other.Context.Length != 0) {
        Context = other.Context;
      }
      if (other.UplinkId.Length != 0) {
        UplinkId = other.UplinkId;
      }
      if (other.CrcStatus != global::Chirpstack.Gateway.CRCStatus.NoCrc) {
        CrcStatus = other.CrcStatus;
      }
      metadata_.Add(other.metadata_);
      switch (other.FineTimestampCase) {
        case FineTimestampOneofCase.EncryptedFineTimestamp:
          if (EncryptedFineTimestamp == null) {
            EncryptedFineTimestamp = new global::Chirpstack.Gateway.EncryptedFineTimestamp();
          }
          EncryptedFineTimestamp.MergeFrom(other.EncryptedFineTimestamp);
          break;
        case FineTimestampOneofCase.PlainFineTimestamp:
          if (PlainFineTimestamp == null) {
            PlainFineTimestamp = new global::Chirpstack.Gateway.PlainFineTimestamp();
          }
          PlainFineTimestamp.MergeFrom(other.PlainFineTimestamp);
          break;
      }

      _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: {
            GatewayId = input.ReadBytes();
            break;
          }
          case 18: {
            if (time_ == null) {
              Time = new global::Google.Protobuf.WellKnownTypes.Timestamp();
            }
            input.ReadMessage(Time);
            break;
          }
          case 26: {
            if (timeSinceGpsEpoch_ == null) {
              TimeSinceGpsEpoch = new global::Google.Protobuf.WellKnownTypes.Duration();
            }
            input.ReadMessage(TimeSinceGpsEpoch);
            break;
          }
          case 40: {
            Rssi = input.ReadInt32();
            break;
          }
          case 49: {
            LoraSnr = input.ReadDouble();
            break;
          }
          case 56: {
            Channel = input.ReadUInt32();
            break;
          }
          case 64: {
            RfChain = input.ReadUInt32();
            break;
          }
          case 72: {
            Board = input.ReadUInt32();
            break;
          }
          case 80: {
            Antenna = input.ReadUInt32();
            break;
          }
          case 90: {
            if (location_ == null) {
              Location = new global::Chirpstack.Common.Location();
            }
            input.ReadMessage(Location);
            break;
          }
          case 96: {
            FineTimestampType = (global::Chirpstack.Gateway.FineTimestampType) input.ReadEnum();
            break;
          }
          case 106: {
            global::Chirpstack.Gateway.EncryptedFineTimestamp subBuilder = new global::Chirpstack.Gateway.EncryptedFineTimestamp();
            if (fineTimestampCase_ == FineTimestampOneofCase.EncryptedFineTimestamp) {
              subBuilder.MergeFrom(EncryptedFineTimestamp);
            }
            input.ReadMessage(subBuilder);
            EncryptedFineTimestamp = subBuilder;
            break;
          }
          case 114: {
            global::Chirpstack.Gateway.PlainFineTimestamp subBuilder = new global::Chirpstack.Gateway.PlainFineTimestamp();
            if (fineTimestampCase_ == FineTimestampOneofCase.PlainFineTimestamp) {
              subBuilder.MergeFrom(PlainFineTimestamp);
            }
            input.ReadMessage(subBuilder);
            PlainFineTimestamp = subBuilder;
            break;
          }
          case 122: {
            Context = input.ReadBytes();
            break;
          }
          case 130: {
            UplinkId = input.ReadBytes();
            break;
          }
          case 136: {
            CrcStatus = (global::Chirpstack.Gateway.CRCStatus) input.ReadEnum();
            break;
          }
          case 146: {
            metadata_.AddEntriesFrom(input, _map_metadata_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 10: {
            GatewayId = input.ReadBytes();
            break;
          }
          case 18: {
            if (time_ == null) {
              Time = new global::Google.Protobuf.WellKnownTypes.Timestamp();
            }
            input.ReadMessage(Time);
            break;
          }
          case 26: {
            if (timeSinceGpsEpoch_ == null) {
              TimeSinceGpsEpoch = new global::Google.Protobuf.WellKnownTypes.Duration();
            }
            input.ReadMessage(TimeSinceGpsEpoch);
            break;
          }
          case 40: {
            Rssi = input.ReadInt32();
            break;
          }
          case 49: {
            LoraSnr = input.ReadDouble();
            break;
          }
          case 56: {
            Channel = input.ReadUInt32();
            break;
          }
          case 64: {
            RfChain = input.ReadUInt32();
            break;
          }
          case 72: {
            Board = input.ReadUInt32();
            break;
          }
          case 80: {
            Antenna = input.ReadUInt32();
            break;
          }
          case 90: {
            if (location_ == null) {
              Location = new global::Chirpstack.Common.Location();
            }
            input.ReadMessage(Location);
            break;
          }
          case 96: {
            FineTimestampType = (global::Chirpstack.Gateway.FineTimestampType) input.ReadEnum();
            break;
          }
          case 106: {
            global::Chirpstack.Gateway.EncryptedFineTimestamp subBuilder = new global::Chirpstack.Gateway.EncryptedFineTimestamp();
            if (fineTimestampCase_ == FineTimestampOneofCase.EncryptedFineTimestamp) {
              subBuilder.MergeFrom(EncryptedFineTimestamp);
            }
            input.ReadMessage(subBuilder);
            EncryptedFineTimestamp = subBuilder;
            break;
          }
          case 114: {
            global::Chirpstack.Gateway.PlainFineTimestamp subBuilder = new global::Chirpstack.Gateway.PlainFineTimestamp();
            if (fineTimestampCase_ == FineTimestampOneofCase.PlainFineTimestamp) {
              subBuilder.MergeFrom(PlainFineTimestamp);
            }
            input.ReadMessage(subBuilder);
            PlainFineTimestamp = subBuilder;
            break;
          }
          case 122: {
            Context = input.ReadBytes();
            break;
          }
          case 130: {
            UplinkId = input.ReadBytes();
            break;
          }
          case 136: {
            CrcStatus = (global::Chirpstack.Gateway.CRCStatus) input.ReadEnum();
            break;
          }
          case 146: {
            metadata_.AddEntriesFrom(ref input, _map_metadata_codec);
            break;
          }
        }
      }
    }
    #endif

  }

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

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

    [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 UplinkRxInfo() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public UplinkRxInfo(UplinkRxInfo other) : this() {
      gatewayId_ = other.gatewayId_;
      uplinkId_ = other.uplinkId_;
      time_ = other.time_ != null ? other.time_.Clone() : null;
      timeSinceGpsEpoch_ = other.timeSinceGpsEpoch_ != null ? other.timeSinceGpsEpoch_.Clone() : null;
      fineTimeSinceGpsEpoch_ = other.fineTimeSinceGpsEpoch_ != null ? other.fineTimeSinceGpsEpoch_.Clone() : null;
      rssi_ = other.rssi_;
      snr_ = other.snr_;
      channel_ = other.channel_;
      rfChain_ = other.rfChain_;
      board_ = other.board_;
      antenna_ = other.antenna_;
      location_ = other.location_ != null ? other.location_.Clone() : null;
      context_ = other.context_;
      metadata_ = other.metadata_.Clone();
      crcStatus_ = other.crcStatus_;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

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

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

    /// <summary>Field number for the "uplink_id" field.</summary>
    public const int UplinkIdFieldNumber = 2;
    private uint uplinkId_;
    /// <summary>
    /// Uplink ID.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint UplinkId {
      get { return uplinkId_; }
      set {
        uplinkId_ = value;
      }
    }

    /// <summary>Field number for the "time" field.</summary>
    public const int TimeFieldNumber = 3;
    private global::Google.Protobuf.WellKnownTypes.Timestamp time_;
    /// <summary>
    /// RX time (only set when the gateway has a GPS module).
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Google.Protobuf.WellKnownTypes.Timestamp Time {
      get { return time_; }
      set {
        time_ = value;
      }
    }

    /// <summary>Field number for the "time_since_gps_epoch" field.</summary>
    public const int TimeSinceGpsEpochFieldNumber = 4;
    private global::Google.Protobuf.WellKnownTypes.Duration timeSinceGpsEpoch_;
    /// <summary>
    /// RX time since GPS epoch (only set when the gateway has a GPS module).
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Google.Protobuf.WellKnownTypes.Duration TimeSinceGpsEpoch {
      get { return timeSinceGpsEpoch_; }
      set {
        timeSinceGpsEpoch_ = value;
      }
    }

    /// <summary>Field number for the "fine_time_since_gps_epoch" field.</summary>
    public const int FineTimeSinceGpsEpochFieldNumber = 5;
    private global::Google.Protobuf.WellKnownTypes.Duration fineTimeSinceGpsEpoch_;
    /// <summary>
    /// Fine-timestamp.
    /// This timestamp can be used for TDOA based geolocation.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Google.Protobuf.WellKnownTypes.Duration FineTimeSinceGpsEpoch {
      get { return fineTimeSinceGpsEpoch_; }
      set {
        fineTimeSinceGpsEpoch_ = value;
      }
    }

    /// <summary>Field number for the "rssi" field.</summary>
    public const int RssiFieldNumber = 6;
    private int rssi_;
    /// <summary>
    /// RSSI.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public int Rssi {
      get { return rssi_; }
      set {
        rssi_ = value;
      }
    }

    /// <summary>Field number for the "snr" field.</summary>
    public const int SnrFieldNumber = 7;
    private float snr_;
    /// <summary>
    /// SNR.
    /// Note: only available for LoRa modulation.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public float Snr {
      get { return snr_; }
      set {
        snr_ = value;
      }
    }

    /// <summary>Field number for the "channel" field.</summary>
    public const int ChannelFieldNumber = 8;
    private uint channel_;
    /// <summary>
    /// Channel.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint Channel {
      get { return channel_; }
      set {
        channel_ = value;
      }
    }

    /// <summary>Field number for the "rf_chain" field.</summary>
    public const int RfChainFieldNumber = 9;
    private uint rfChain_;
    /// <summary>
    /// RF chain.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint RfChain {
      get { return rfChain_; }
      set {
        rfChain_ = value;
      }
    }

    /// <summary>Field number for the "board" field.</summary>
    public const int BoardFieldNumber = 10;
    private uint board_;
    /// <summary>
    /// Board.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint Board {
      get { return board_; }
      set {
        board_ = value;
      }
    }

    /// <summary>Field number for the "antenna" field.</summary>
    public const int AntennaFieldNumber = 11;
    private uint antenna_;
    /// <summary>
    /// Antenna.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint Antenna {
      get { return antenna_; }
      set {
        antenna_ = value;
      }
    }

    /// <summary>Field number for the "location" field.</summary>
    public const int LocationFieldNumber = 12;
    private global::Chirpstack.Common.Location location_;
    /// <summary>
    /// Location.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Common.Location Location {
      get { return location_; }
      set {
        location_ = value;
      }
    }

    /// <summary>Field number for the "context" field.</summary>
    public const int ContextFieldNumber = 13;
    private pb::ByteString context_ = pb::ByteString.Empty;
    /// <summary>
    /// Gateway specific context.
    /// This value must be returned to the gateway on (Class-A) downlink.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pb::ByteString Context {
      get { return context_; }
      set {
        context_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "metadata" field.</summary>
    public const int MetadataFieldNumber = 15;
    private static readonly pbc::MapField<string, string>.Codec _map_metadata_codec
        = new pbc::MapField<string, string>.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForString(18, ""), 122);
    private readonly pbc::MapField<string, string> metadata_ = new pbc::MapField<string, string>();
    /// <summary>
    /// Additional gateway meta-data.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pbc::MapField<string, string> Metadata {
      get { return metadata_; }
    }

    /// <summary>Field number for the "crc_status" field.</summary>
    public const int CrcStatusFieldNumber = 16;
    private global::Chirpstack.Gateway.CRCStatus crcStatus_ = global::Chirpstack.Gateway.CRCStatus.NoCrc;
    /// <summary>
    /// CRC status.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Gateway.CRCStatus CrcStatus {
      get { return crcStatus_; }
      set {
        crcStatus_ = value;
      }
    }

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(UplinkRxInfo other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (GatewayId != other.GatewayId) return false;
      if (UplinkId != other.UplinkId) return false;
      if (!object.Equals(Time, other.Time)) return false;
      if (!object.Equals(TimeSinceGpsEpoch, other.TimeSinceGpsEpoch)) return false;
      if (!object.Equals(FineTimeSinceGpsEpoch, other.FineTimeSinceGpsEpoch)) return false;
      if (Rssi != other.Rssi) return false;
      if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Snr, other.Snr)) return false;
      if (Channel != other.Channel) return false;
      if (RfChain != other.RfChain) return false;
      if (Board != other.Board) return false;
      if (Antenna != other.Antenna) return false;
      if (!object.Equals(Location, other.Location)) return false;
      if (Context != other.Context) return false;
      if (!Metadata.Equals(other.Metadata)) return false;
      if (CrcStatus != other.CrcStatus) 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 (GatewayId.Length != 0) hash ^= GatewayId.GetHashCode();
      if (UplinkId != 0) hash ^= UplinkId.GetHashCode();
      if (time_ != null) hash ^= Time.GetHashCode();
      if (timeSinceGpsEpoch_ != null) hash ^= TimeSinceGpsEpoch.GetHashCode();
      if (fineTimeSinceGpsEpoch_ != null) hash ^= FineTimeSinceGpsEpoch.GetHashCode();
      if (Rssi != 0) hash ^= Rssi.GetHashCode();
      if (Snr != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Snr);
      if (Channel != 0) hash ^= Channel.GetHashCode();
      if (RfChain != 0) hash ^= RfChain.GetHashCode();
      if (Board != 0) hash ^= Board.GetHashCode();
      if (Antenna != 0) hash ^= Antenna.GetHashCode();
      if (location_ != null) hash ^= Location.GetHashCode();
      if (Context.Length != 0) hash ^= Context.GetHashCode();
      hash ^= Metadata.GetHashCode();
      if (CrcStatus != global::Chirpstack.Gateway.CRCStatus.NoCrc) hash ^= CrcStatus.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 (GatewayId.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(GatewayId);
      }
      if (UplinkId != 0) {
        output.WriteRawTag(16);
        output.WriteUInt32(UplinkId);
      }
      if (time_ != null) {
        output.WriteRawTag(26);
        output.WriteMessage(Time);
      }
      if (timeSinceGpsEpoch_ != null) {
        output.WriteRawTag(34);
        output.WriteMessage(TimeSinceGpsEpoch);
      }
      if (fineTimeSinceGpsEpoch_ != null) {
        output.WriteRawTag(42);
        output.WriteMessage(FineTimeSinceGpsEpoch);
      }
      if (Rssi != 0) {
        output.WriteRawTag(48);
        output.WriteInt32(Rssi);
      }
      if (Snr != 0F) {
        output.WriteRawTag(61);
        output.WriteFloat(Snr);
      }
      if (Channel != 0) {
        output.WriteRawTag(64);
        output.WriteUInt32(Channel);
      }
      if (RfChain != 0) {
        output.WriteRawTag(72);
        output.WriteUInt32(RfChain);
      }
      if (Board != 0) {
        output.WriteRawTag(80);
        output.WriteUInt32(Board);
      }
      if (Antenna != 0) {
        output.WriteRawTag(88);
        output.WriteUInt32(Antenna);
      }
      if (location_ != null) {
        output.WriteRawTag(98);
        output.WriteMessage(Location);
      }
      if (Context.Length != 0) {
        output.WriteRawTag(106);
        output.WriteBytes(Context);
      }
      metadata_.WriteTo(output, _map_metadata_codec);
      if (CrcStatus != global::Chirpstack.Gateway.CRCStatus.NoCrc) {
        output.WriteRawTag(128, 1);
        output.WriteEnum((int) CrcStatus);
      }
      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 (GatewayId.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(GatewayId);
      }
      if (UplinkId != 0) {
        output.WriteRawTag(16);
        output.WriteUInt32(UplinkId);
      }
      if (time_ != null) {
        output.WriteRawTag(26);
        output.WriteMessage(Time);
      }
      if (timeSinceGpsEpoch_ != null) {
        output.WriteRawTag(34);
        output.WriteMessage(TimeSinceGpsEpoch);
      }
      if (fineTimeSinceGpsEpoch_ != null) {
        output.WriteRawTag(42);
        output.WriteMessage(FineTimeSinceGpsEpoch);
      }
      if (Rssi != 0) {
        output.WriteRawTag(48);
        output.WriteInt32(Rssi);
      }
      if (Snr != 0F) {
        output.WriteRawTag(61);
        output.WriteFloat(Snr);
      }
      if (Channel != 0) {
        output.WriteRawTag(64);
        output.WriteUInt32(Channel);
      }
      if (RfChain != 0) {
        output.WriteRawTag(72);
        output.WriteUInt32(RfChain);
      }
      if (Board != 0) {
        output.WriteRawTag(80);
        output.WriteUInt32(Board);
      }
      if (Antenna != 0) {
        output.WriteRawTag(88);
        output.WriteUInt32(Antenna);
      }
      if (location_ != null) {
        output.WriteRawTag(98);
        output.WriteMessage(Location);
      }
      if (Context.Length != 0) {
        output.WriteRawTag(106);
        output.WriteBytes(Context);
      }
      metadata_.WriteTo(ref output, _map_metadata_codec);
      if (CrcStatus != global::Chirpstack.Gateway.CRCStatus.NoCrc) {
        output.WriteRawTag(128, 1);
        output.WriteEnum((int) CrcStatus);
      }
      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 (GatewayId.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(GatewayId);
      }
      if (UplinkId != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(UplinkId);
      }
      if (time_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Time);
      }
      if (timeSinceGpsEpoch_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(TimeSinceGpsEpoch);
      }
      if (fineTimeSinceGpsEpoch_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(FineTimeSinceGpsEpoch);
      }
      if (Rssi != 0) {
        size += 1 + pb::CodedOutputStream.ComputeInt32Size(Rssi);
      }
      if (Snr != 0F) {
        size += 1 + 4;
      }
      if (Channel != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Channel);
      }
      if (RfChain != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(RfChain);
      }
      if (Board != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Board);
      }
      if (Antenna != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Antenna);
      }
      if (location_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Location);
      }
      if (Context.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeBytesSize(Context);
      }
      size += metadata_.CalculateSize(_map_metadata_codec);
      if (CrcStatus != global::Chirpstack.Gateway.CRCStatus.NoCrc) {
        size += 2 + pb::CodedOutputStream.ComputeEnumSize((int) CrcStatus);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(UplinkRxInfo other) {
      if (other == null) {
        return;
      }
      if (other.GatewayId.Length != 0) {
        GatewayId = other.GatewayId;
      }
      if (other.UplinkId != 0) {
        UplinkId = other.UplinkId;
      }
      if (other.time_ != null) {
        if (time_ == null) {
          Time = new global::Google.Protobuf.WellKnownTypes.Timestamp();
        }
        Time.MergeFrom(other.Time);
      }
      if (other.timeSinceGpsEpoch_ != null) {
        if (timeSinceGpsEpoch_ == null) {
          TimeSinceGpsEpoch = new global::Google.Protobuf.WellKnownTypes.Duration();
        }
        TimeSinceGpsEpoch.MergeFrom(other.TimeSinceGpsEpoch);
      }
      if (other.fineTimeSinceGpsEpoch_ != null) {
        if (fineTimeSinceGpsEpoch_ == null) {
          FineTimeSinceGpsEpoch = new global::Google.Protobuf.WellKnownTypes.Duration();
        }
        FineTimeSinceGpsEpoch.MergeFrom(other.FineTimeSinceGpsEpoch);
      }
      if (other.Rssi != 0) {
        Rssi = other.Rssi;
      }
      if (other.Snr != 0F) {
        Snr = other.Snr;
      }
      if (other.Channel != 0) {
        Channel = other.Channel;
      }
      if (other.RfChain != 0) {
        RfChain = other.RfChain;
      }
      if (other.Board != 0) {
        Board = other.Board;
      }
      if (other.Antenna != 0) {
        Antenna = other.Antenna;
      }
      if (other.location_ != null) {
        if (location_ == null) {
          Location = new global::Chirpstack.Common.Location();
        }
        Location.MergeFrom(other.Location);
      }
      if (other.Context.Length != 0) {
        Context = other.Context;
      }
      metadata_.Add(other.metadata_);
      if (other.CrcStatus != global::Chirpstack.Gateway.CRCStatus.NoCrc) {
        CrcStatus = other.CrcStatus;
      }
      _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: {
            GatewayId = input.ReadString();
            break;
          }
          case 16: {
            UplinkId = input.ReadUInt32();
            break;
          }
          case 26: {
            if (time_ == null) {
              Time = new global::Google.Protobuf.WellKnownTypes.Timestamp();
            }
            input.ReadMessage(Time);
            break;
          }
          case 34: {
            if (timeSinceGpsEpoch_ == null) {
              TimeSinceGpsEpoch = new global::Google.Protobuf.WellKnownTypes.Duration();
            }
            input.ReadMessage(TimeSinceGpsEpoch);
            break;
          }
          case 42: {
            if (fineTimeSinceGpsEpoch_ == null) {
              FineTimeSinceGpsEpoch = new global::Google.Protobuf.WellKnownTypes.Duration();
            }
            input.ReadMessage(FineTimeSinceGpsEpoch);
            break;
          }
          case 48: {
            Rssi = input.ReadInt32();
            break;
          }
          case 61: {
            Snr = input.ReadFloat();
            break;
          }
          case 64: {
            Channel = input.ReadUInt32();
            break;
          }
          case 72: {
            RfChain = input.ReadUInt32();
            break;
          }
          case 80: {
            Board = input.ReadUInt32();
            break;
          }
          case 88: {
            Antenna = input.ReadUInt32();
            break;
          }
          case 98: {
            if (location_ == null) {
              Location = new global::Chirpstack.Common.Location();
            }
            input.ReadMessage(Location);
            break;
          }
          case 106: {
            Context = input.ReadBytes();
            break;
          }
          case 122: {
            metadata_.AddEntriesFrom(input, _map_metadata_codec);
            break;
          }
          case 128: {
            CrcStatus = (global::Chirpstack.Gateway.CRCStatus) input.ReadEnum();
            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: {
            GatewayId = input.ReadString();
            break;
          }
          case 16: {
            UplinkId = input.ReadUInt32();
            break;
          }
          case 26: {
            if (time_ == null) {
              Time = new global::Google.Protobuf.WellKnownTypes.Timestamp();
            }
            input.ReadMessage(Time);
            break;
          }
          case 34: {
            if (timeSinceGpsEpoch_ == null) {
              TimeSinceGpsEpoch = new global::Google.Protobuf.WellKnownTypes.Duration();
            }
            input.ReadMessage(TimeSinceGpsEpoch);
            break;
          }
          case 42: {
            if (fineTimeSinceGpsEpoch_ == null) {
              FineTimeSinceGpsEpoch = new global::Google.Protobuf.WellKnownTypes.Duration();
            }
            input.ReadMessage(FineTimeSinceGpsEpoch);
            break;
          }
          case 48: {
            Rssi = input.ReadInt32();
            break;
          }
          case 61: {
            Snr = input.ReadFloat();
            break;
          }
          case 64: {
            Channel = input.ReadUInt32();
            break;
          }
          case 72: {
            RfChain = input.ReadUInt32();
            break;
          }
          case 80: {
            Board = input.ReadUInt32();
            break;
          }
          case 88: {
            Antenna = input.ReadUInt32();
            break;
          }
          case 98: {
            if (location_ == null) {
              Location = new global::Chirpstack.Common.Location();
            }
            input.ReadMessage(Location);
            break;
          }
          case 106: {
            Context = input.ReadBytes();
            break;
          }
          case 122: {
            metadata_.AddEntriesFrom(ref input, _map_metadata_codec);
            break;
          }
          case 128: {
            CrcStatus = (global::Chirpstack.Gateway.CRCStatus) input.ReadEnum();
            break;
          }
        }
      }
    }
    #endif

  }

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

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

    [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 DownlinkTxInfoLegacy() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public DownlinkTxInfoLegacy(DownlinkTxInfoLegacy other) : this() {
      gatewayId_ = other.gatewayId_;
      frequency_ = other.frequency_;
      power_ = other.power_;
      modulation_ = other.modulation_;
      board_ = other.board_;
      antenna_ = other.antenna_;
      timing_ = other.timing_;
      context_ = other.context_;
      switch (other.ModulationInfoCase) {
        case ModulationInfoOneofCase.LoraModulationInfo:
          LoraModulationInfo = other.LoraModulationInfo.Clone();
          break;
        case ModulationInfoOneofCase.FskModulationInfo:
          FskModulationInfo = other.FskModulationInfo.Clone();
          break;
      }

      switch (other.TimingInfoCase) {
        case TimingInfoOneofCase.ImmediatelyTimingInfo:
          ImmediatelyTimingInfo = other.ImmediatelyTimingInfo.Clone();
          break;
        case TimingInfoOneofCase.DelayTimingInfo:
          DelayTimingInfo = other.DelayTimingInfo.Clone();
          break;
        case TimingInfoOneofCase.GpsEpochTimingInfo:
          GpsEpochTimingInfo = other.GpsEpochTimingInfo.Clone();
          break;
      }

      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

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

    /// <summary>Field number for the "gateway_id" field.</summary>
    public const int GatewayIdFieldNumber = 1;
    private pb::ByteString gatewayId_ = pb::ByteString.Empty;
    /// <summary>
    /// Gateway ID.
    /// Deprecated: replaced by gateway_id in DownlinkFrame.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pb::ByteString GatewayId {
      get { return gatewayId_; }
      set {
        gatewayId_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "frequency" field.</summary>
    public const int FrequencyFieldNumber = 5;
    private uint frequency_;
    /// <summary>
    /// TX frequency (in Hz).
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint Frequency {
      get { return frequency_; }
      set {
        frequency_ = value;
      }
    }

    /// <summary>Field number for the "power" field.</summary>
    public const int PowerFieldNumber = 6;
    private int power_;
    /// <summary>
    /// TX power (in dBm).
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public int Power {
      get { return power_; }
      set {
        power_ = value;
      }
    }

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

    /// <summary>Field number for the "lora_modulation_info" field.</summary>
    public const int LoraModulationInfoFieldNumber = 8;
    /// <summary>
    /// LoRa modulation information.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Gateway.LoraModulationInfo LoraModulationInfo {
      get { return modulationInfoCase_ == ModulationInfoOneofCase.LoraModulationInfo ? (global::Chirpstack.Gateway.LoraModulationInfo) modulationInfo_ : null; }
      set {
        modulationInfo_ = value;
        modulationInfoCase_ = value == null ? ModulationInfoOneofCase.None : ModulationInfoOneofCase.LoraModulationInfo;
      }
    }

    /// <summary>Field number for the "fsk_modulation_info" field.</summary>
    public const int FskModulationInfoFieldNumber = 9;
    /// <summary>
    /// FSK modulation information.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Gateway.FskModulationInfo FskModulationInfo {
      get { return modulationInfoCase_ == ModulationInfoOneofCase.FskModulationInfo ? (global::Chirpstack.Gateway.FskModulationInfo) modulationInfo_ : null; }
      set {
        modulationInfo_ = value;
        modulationInfoCase_ = value == null ? ModulationInfoOneofCase.None : ModulationInfoOneofCase.FskModulationInfo;
      }
    }

    /// <summary>Field number for the "board" field.</summary>
    public const int BoardFieldNumber = 10;
    private uint board_;
    /// <summary>
    /// The board identifier for emitting the frame.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint Board {
      get { return board_; }
      set {
        board_ = value;
      }
    }

    /// <summary>Field number for the "antenna" field.</summary>
    public const int AntennaFieldNumber = 11;
    private uint antenna_;
    /// <summary>
    /// The antenna identifier for emitting the frame.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint Antenna {
      get { return antenna_; }
      set {
        antenna_ = value;
      }
    }

    /// <summary>Field number for the "timing" field.</summary>
    public const int TimingFieldNumber = 12;
    private global::Chirpstack.Gateway.DownlinkTiming timing_ = global::Chirpstack.Gateway.DownlinkTiming.Immediately;
    /// <summary>
    /// Timing defines the downlink timing to use.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Gateway.DownlinkTiming Timing {
      get { return timing_; }
      set {
        timing_ = value;
      }
    }

    /// <summary>Field number for the "immediately_timing_info" field.</summary>
    public const int ImmediatelyTimingInfoFieldNumber = 13;
    /// <summary>
    /// Immediately timing information.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Gateway.ImmediatelyTimingInfo ImmediatelyTimingInfo {
      get { return timingInfoCase_ == TimingInfoOneofCase.ImmediatelyTimingInfo ? (global::Chirpstack.Gateway.ImmediatelyTimingInfo) timingInfo_ : null; }
      set {
        timingInfo_ = value;
        timingInfoCase_ = value == null ? TimingInfoOneofCase.None : TimingInfoOneofCase.ImmediatelyTimingInfo;
      }
    }

    /// <summary>Field number for the "delay_timing_info" field.</summary>
    public const int DelayTimingInfoFieldNumber = 14;
    /// <summary>
    /// Context based delay timing information.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Gateway.DelayTimingInfo DelayTimingInfo {
      get { return timingInfoCase_ == TimingInfoOneofCase.DelayTimingInfo ? (global::Chirpstack.Gateway.DelayTimingInfo) timingInfo_ : null; }
      set {
        timingInfo_ = value;
        timingInfoCase_ = value == null ? TimingInfoOneofCase.None : TimingInfoOneofCase.DelayTimingInfo;
      }
    }

    /// <summary>Field number for the "gps_epoch_timing_info" field.</summary>
    public const int GpsEpochTimingInfoFieldNumber = 15;
    /// <summary>
    /// GPS Epoch timing information.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Gateway.GPSEpochTimingInfo GpsEpochTimingInfo {
      get { return timingInfoCase_ == TimingInfoOneofCase.GpsEpochTimingInfo ? (global::Chirpstack.Gateway.GPSEpochTimingInfo) timingInfo_ : null; }
      set {
        timingInfo_ = value;
        timingInfoCase_ = value == null ? TimingInfoOneofCase.None : TimingInfoOneofCase.GpsEpochTimingInfo;
      }
    }

    /// <summary>Field number for the "context" field.</summary>
    public const int ContextFieldNumber = 16;
    private pb::ByteString context_ = pb::ByteString.Empty;
    /// <summary>
    /// Gateway specific context.
    /// In case of a Class-A downlink, this contains a copy of the uplink context.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pb::ByteString Context {
      get { return context_; }
      set {
        context_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    private object modulationInfo_;
    /// <summary>Enum of possible cases for the "modulation_info" oneof.</summary>
    public enum ModulationInfoOneofCase {
      None = 0,
      LoraModulationInfo = 8,
      FskModulationInfo = 9,
    }
    private ModulationInfoOneofCase modulationInfoCase_ = ModulationInfoOneofCase.None;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public ModulationInfoOneofCase ModulationInfoCase {
      get { return modulationInfoCase_; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void ClearModulationInfo() {
      modulationInfoCase_ = ModulationInfoOneofCase.None;
      modulationInfo_ = null;
    }

    private object timingInfo_;
    /// <summary>Enum of possible cases for the "timing_info" oneof.</summary>
    public enum TimingInfoOneofCase {
      None = 0,
      ImmediatelyTimingInfo = 13,
      DelayTimingInfo = 14,
      GpsEpochTimingInfo = 15,
    }
    private TimingInfoOneofCase timingInfoCase_ = TimingInfoOneofCase.None;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public TimingInfoOneofCase TimingInfoCase {
      get { return timingInfoCase_; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void ClearTimingInfo() {
      timingInfoCase_ = TimingInfoOneofCase.None;
      timingInfo_ = null;
    }

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(DownlinkTxInfoLegacy other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (GatewayId != other.GatewayId) return false;
      if (Frequency != other.Frequency) return false;
      if (Power != other.Power) return false;
      if (Modulation != other.Modulation) return false;
      if (!object.Equals(LoraModulationInfo, other.LoraModulationInfo)) return false;
      if (!object.Equals(FskModulationInfo, other.FskModulationInfo)) return false;
      if (Board != other.Board) return false;
      if (Antenna != other.Antenna) return false;
      if (Timing != other.Timing) return false;
      if (!object.Equals(ImmediatelyTimingInfo, other.ImmediatelyTimingInfo)) return false;
      if (!object.Equals(DelayTimingInfo, other.DelayTimingInfo)) return false;
      if (!object.Equals(GpsEpochTimingInfo, other.GpsEpochTimingInfo)) return false;
      if (Context != other.Context) return false;
      if (ModulationInfoCase != other.ModulationInfoCase) return false;
      if (TimingInfoCase != other.TimingInfoCase) 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 (GatewayId.Length != 0) hash ^= GatewayId.GetHashCode();
      if (Frequency != 0) hash ^= Frequency.GetHashCode();
      if (Power != 0) hash ^= Power.GetHashCode();
      if (Modulation != global::Chirpstack.Common.Modulation.Lora) hash ^= Modulation.GetHashCode();
      if (modulationInfoCase_ == ModulationInfoOneofCase.LoraModulationInfo) hash ^= LoraModulationInfo.GetHashCode();
      if (modulationInfoCase_ == ModulationInfoOneofCase.FskModulationInfo) hash ^= FskModulationInfo.GetHashCode();
      if (Board != 0) hash ^= Board.GetHashCode();
      if (Antenna != 0) hash ^= Antenna.GetHashCode();
      if (Timing != global::Chirpstack.Gateway.DownlinkTiming.Immediately) hash ^= Timing.GetHashCode();
      if (timingInfoCase_ == TimingInfoOneofCase.ImmediatelyTimingInfo) hash ^= ImmediatelyTimingInfo.GetHashCode();
      if (timingInfoCase_ == TimingInfoOneofCase.DelayTimingInfo) hash ^= DelayTimingInfo.GetHashCode();
      if (timingInfoCase_ == TimingInfoOneofCase.GpsEpochTimingInfo) hash ^= GpsEpochTimingInfo.GetHashCode();
      if (Context.Length != 0) hash ^= Context.GetHashCode();
      hash ^= (int) modulationInfoCase_;
      hash ^= (int) timingInfoCase_;
      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 (GatewayId.Length != 0) {
        output.WriteRawTag(10);
        output.WriteBytes(GatewayId);
      }
      if (Frequency != 0) {
        output.WriteRawTag(40);
        output.WriteUInt32(Frequency);
      }
      if (Power != 0) {
        output.WriteRawTag(48);
        output.WriteInt32(Power);
      }
      if (Modulation != global::Chirpstack.Common.Modulation.Lora) {
        output.WriteRawTag(56);
        output.WriteEnum((int) Modulation);
      }
      if (modulationInfoCase_ == ModulationInfoOneofCase.LoraModulationInfo) {
        output.WriteRawTag(66);
        output.WriteMessage(LoraModulationInfo);
      }
      if (modulationInfoCase_ == ModulationInfoOneofCase.FskModulationInfo) {
        output.WriteRawTag(74);
        output.WriteMessage(FskModulationInfo);
      }
      if (Board != 0) {
        output.WriteRawTag(80);
        output.WriteUInt32(Board);
      }
      if (Antenna != 0) {
        output.WriteRawTag(88);
        output.WriteUInt32(Antenna);
      }
      if (Timing != global::Chirpstack.Gateway.DownlinkTiming.Immediately) {
        output.WriteRawTag(96);
        output.WriteEnum((int) Timing);
      }
      if (timingInfoCase_ == TimingInfoOneofCase.ImmediatelyTimingInfo) {
        output.WriteRawTag(106);
        output.WriteMessage(ImmediatelyTimingInfo);
      }
      if (timingInfoCase_ == TimingInfoOneofCase.DelayTimingInfo) {
        output.WriteRawTag(114);
        output.WriteMessage(DelayTimingInfo);
      }
      if (timingInfoCase_ == TimingInfoOneofCase.GpsEpochTimingInfo) {
        output.WriteRawTag(122);
        output.WriteMessage(GpsEpochTimingInfo);
      }
      if (Context.Length != 0) {
        output.WriteRawTag(130, 1);
        output.WriteBytes(Context);
      }
      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 (GatewayId.Length != 0) {
        output.WriteRawTag(10);
        output.WriteBytes(GatewayId);
      }
      if (Frequency != 0) {
        output.WriteRawTag(40);
        output.WriteUInt32(Frequency);
      }
      if (Power != 0) {
        output.WriteRawTag(48);
        output.WriteInt32(Power);
      }
      if (Modulation != global::Chirpstack.Common.Modulation.Lora) {
        output.WriteRawTag(56);
        output.WriteEnum((int) Modulation);
      }
      if (modulationInfoCase_ == ModulationInfoOneofCase.LoraModulationInfo) {
        output.WriteRawTag(66);
        output.WriteMessage(LoraModulationInfo);
      }
      if (modulationInfoCase_ == ModulationInfoOneofCase.FskModulationInfo) {
        output.WriteRawTag(74);
        output.WriteMessage(FskModulationInfo);
      }
      if (Board != 0) {
        output.WriteRawTag(80);
        output.WriteUInt32(Board);
      }
      if (Antenna != 0) {
        output.WriteRawTag(88);
        output.WriteUInt32(Antenna);
      }
      if (Timing != global::Chirpstack.Gateway.DownlinkTiming.Immediately) {
        output.WriteRawTag(96);
        output.WriteEnum((int) Timing);
      }
      if (timingInfoCase_ == TimingInfoOneofCase.ImmediatelyTimingInfo) {
        output.WriteRawTag(106);
        output.WriteMessage(ImmediatelyTimingInfo);
      }
      if (timingInfoCase_ == TimingInfoOneofCase.DelayTimingInfo) {
        output.WriteRawTag(114);
        output.WriteMessage(DelayTimingInfo);
      }
      if (timingInfoCase_ == TimingInfoOneofCase.GpsEpochTimingInfo) {
        output.WriteRawTag(122);
        output.WriteMessage(GpsEpochTimingInfo);
      }
      if (Context.Length != 0) {
        output.WriteRawTag(130, 1);
        output.WriteBytes(Context);
      }
      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 (GatewayId.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeBytesSize(GatewayId);
      }
      if (Frequency != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Frequency);
      }
      if (Power != 0) {
        size += 1 + pb::CodedOutputStream.ComputeInt32Size(Power);
      }
      if (Modulation != global::Chirpstack.Common.Modulation.Lora) {
        size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Modulation);
      }
      if (modulationInfoCase_ == ModulationInfoOneofCase.LoraModulationInfo) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(LoraModulationInfo);
      }
      if (modulationInfoCase_ == ModulationInfoOneofCase.FskModulationInfo) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(FskModulationInfo);
      }
      if (Board != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Board);
      }
      if (Antenna != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Antenna);
      }
      if (Timing != global::Chirpstack.Gateway.DownlinkTiming.Immediately) {
        size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Timing);
      }
      if (timingInfoCase_ == TimingInfoOneofCase.ImmediatelyTimingInfo) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(ImmediatelyTimingInfo);
      }
      if (timingInfoCase_ == TimingInfoOneofCase.DelayTimingInfo) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(DelayTimingInfo);
      }
      if (timingInfoCase_ == TimingInfoOneofCase.GpsEpochTimingInfo) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(GpsEpochTimingInfo);
      }
      if (Context.Length != 0) {
        size += 2 + pb::CodedOutputStream.ComputeBytesSize(Context);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(DownlinkTxInfoLegacy other) {
      if (other == null) {
        return;
      }
      if (other.GatewayId.Length != 0) {
        GatewayId = other.GatewayId;
      }
      if (other.Frequency != 0) {
        Frequency = other.Frequency;
      }
      if (other.Power != 0) {
        Power = other.Power;
      }
      if (other.Modulation != global::Chirpstack.Common.Modulation.Lora) {
        Modulation = other.Modulation;
      }
      if (other.Board != 0) {
        Board = other.Board;
      }
      if (other.Antenna != 0) {
        Antenna = other.Antenna;
      }
      if (other.Timing != global::Chirpstack.Gateway.DownlinkTiming.Immediately) {
        Timing = other.Timing;
      }
      if (other.Context.Length != 0) {
        Context = other.Context;
      }
      switch (other.ModulationInfoCase) {
        case ModulationInfoOneofCase.LoraModulationInfo:
          if (LoraModulationInfo == null) {
            LoraModulationInfo = new global::Chirpstack.Gateway.LoraModulationInfo();
          }
          LoraModulationInfo.MergeFrom(other.LoraModulationInfo);
          break;
        case ModulationInfoOneofCase.FskModulationInfo:
          if (FskModulationInfo == null) {
            FskModulationInfo = new global::Chirpstack.Gateway.FskModulationInfo();
          }
          FskModulationInfo.MergeFrom(other.FskModulationInfo);
          break;
      }

      switch (other.TimingInfoCase) {
        case TimingInfoOneofCase.ImmediatelyTimingInfo:
          if (ImmediatelyTimingInfo == null) {
            ImmediatelyTimingInfo = new global::Chirpstack.Gateway.ImmediatelyTimingInfo();
          }
          ImmediatelyTimingInfo.MergeFrom(other.ImmediatelyTimingInfo);
          break;
        case TimingInfoOneofCase.DelayTimingInfo:
          if (DelayTimingInfo == null) {
            DelayTimingInfo = new global::Chirpstack.Gateway.DelayTimingInfo();
          }
          DelayTimingInfo.MergeFrom(other.DelayTimingInfo);
          break;
        case TimingInfoOneofCase.GpsEpochTimingInfo:
          if (GpsEpochTimingInfo == null) {
            GpsEpochTimingInfo = new global::Chirpstack.Gateway.GPSEpochTimingInfo();
          }
          GpsEpochTimingInfo.MergeFrom(other.GpsEpochTimingInfo);
          break;
      }

      _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: {
            GatewayId = input.ReadBytes();
            break;
          }
          case 40: {
            Frequency = input.ReadUInt32();
            break;
          }
          case 48: {
            Power = input.ReadInt32();
            break;
          }
          case 56: {
            Modulation = (global::Chirpstack.Common.Modulation) input.ReadEnum();
            break;
          }
          case 66: {
            global::Chirpstack.Gateway.LoraModulationInfo subBuilder = new global::Chirpstack.Gateway.LoraModulationInfo();
            if (modulationInfoCase_ == ModulationInfoOneofCase.LoraModulationInfo) {
              subBuilder.MergeFrom(LoraModulationInfo);
            }
            input.ReadMessage(subBuilder);
            LoraModulationInfo = subBuilder;
            break;
          }
          case 74: {
            global::Chirpstack.Gateway.FskModulationInfo subBuilder = new global::Chirpstack.Gateway.FskModulationInfo();
            if (modulationInfoCase_ == ModulationInfoOneofCase.FskModulationInfo) {
              subBuilder.MergeFrom(FskModulationInfo);
            }
            input.ReadMessage(subBuilder);
            FskModulationInfo = subBuilder;
            break;
          }
          case 80: {
            Board = input.ReadUInt32();
            break;
          }
          case 88: {
            Antenna = input.ReadUInt32();
            break;
          }
          case 96: {
            Timing = (global::Chirpstack.Gateway.DownlinkTiming) input.ReadEnum();
            break;
          }
          case 106: {
            global::Chirpstack.Gateway.ImmediatelyTimingInfo subBuilder = new global::Chirpstack.Gateway.ImmediatelyTimingInfo();
            if (timingInfoCase_ == TimingInfoOneofCase.ImmediatelyTimingInfo) {
              subBuilder.MergeFrom(ImmediatelyTimingInfo);
            }
            input.ReadMessage(subBuilder);
            ImmediatelyTimingInfo = subBuilder;
            break;
          }
          case 114: {
            global::Chirpstack.Gateway.DelayTimingInfo subBuilder = new global::Chirpstack.Gateway.DelayTimingInfo();
            if (timingInfoCase_ == TimingInfoOneofCase.DelayTimingInfo) {
              subBuilder.MergeFrom(DelayTimingInfo);
            }
            input.ReadMessage(subBuilder);
            DelayTimingInfo = subBuilder;
            break;
          }
          case 122: {
            global::Chirpstack.Gateway.GPSEpochTimingInfo subBuilder = new global::Chirpstack.Gateway.GPSEpochTimingInfo();
            if (timingInfoCase_ == TimingInfoOneofCase.GpsEpochTimingInfo) {
              subBuilder.MergeFrom(GpsEpochTimingInfo);
            }
            input.ReadMessage(subBuilder);
            GpsEpochTimingInfo = subBuilder;
            break;
          }
          case 130: {
            Context = input.ReadBytes();
            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: {
            GatewayId = input.ReadBytes();
            break;
          }
          case 40: {
            Frequency = input.ReadUInt32();
            break;
          }
          case 48: {
            Power = input.ReadInt32();
            break;
          }
          case 56: {
            Modulation = (global::Chirpstack.Common.Modulation) input.ReadEnum();
            break;
          }
          case 66: {
            global::Chirpstack.Gateway.LoraModulationInfo subBuilder = new global::Chirpstack.Gateway.LoraModulationInfo();
            if (modulationInfoCase_ == ModulationInfoOneofCase.LoraModulationInfo) {
              subBuilder.MergeFrom(LoraModulationInfo);
            }
            input.ReadMessage(subBuilder);
            LoraModulationInfo = subBuilder;
            break;
          }
          case 74: {
            global::Chirpstack.Gateway.FskModulationInfo subBuilder = new global::Chirpstack.Gateway.FskModulationInfo();
            if (modulationInfoCase_ == ModulationInfoOneofCase.FskModulationInfo) {
              subBuilder.MergeFrom(FskModulationInfo);
            }
            input.ReadMessage(subBuilder);
            FskModulationInfo = subBuilder;
            break;
          }
          case 80: {
            Board = input.ReadUInt32();
            break;
          }
          case 88: {
            Antenna = input.ReadUInt32();
            break;
          }
          case 96: {
            Timing = (global::Chirpstack.Gateway.DownlinkTiming) input.ReadEnum();
            break;
          }
          case 106: {
            global::Chirpstack.Gateway.ImmediatelyTimingInfo subBuilder = new global::Chirpstack.Gateway.ImmediatelyTimingInfo();
            if (timingInfoCase_ == TimingInfoOneofCase.ImmediatelyTimingInfo) {
              subBuilder.MergeFrom(ImmediatelyTimingInfo);
            }
            input.ReadMessage(subBuilder);
            ImmediatelyTimingInfo = subBuilder;
            break;
          }
          case 114: {
            global::Chirpstack.Gateway.DelayTimingInfo subBuilder = new global::Chirpstack.Gateway.DelayTimingInfo();
            if (timingInfoCase_ == TimingInfoOneofCase.DelayTimingInfo) {
              subBuilder.MergeFrom(DelayTimingInfo);
            }
            input.ReadMessage(subBuilder);
            DelayTimingInfo = subBuilder;
            break;
          }
          case 122: {
            global::Chirpstack.Gateway.GPSEpochTimingInfo subBuilder = new global::Chirpstack.Gateway.GPSEpochTimingInfo();
            if (timingInfoCase_ == TimingInfoOneofCase.GpsEpochTimingInfo) {
              subBuilder.MergeFrom(GpsEpochTimingInfo);
            }
            input.ReadMessage(subBuilder);
            GpsEpochTimingInfo = subBuilder;
            break;
          }
          case 130: {
            Context = input.ReadBytes();
            break;
          }
        }
      }
    }
    #endif

  }

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

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

    [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 DownlinkTxInfo() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public DownlinkTxInfo(DownlinkTxInfo other) : this() {
      frequency_ = other.frequency_;
      power_ = other.power_;
      modulation_ = other.modulation_ != null ? other.modulation_.Clone() : null;
      board_ = other.board_;
      antenna_ = other.antenna_;
      timing_ = other.timing_ != null ? other.timing_.Clone() : null;
      context_ = other.context_;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

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

    /// <summary>Field number for the "frequency" field.</summary>
    public const int FrequencyFieldNumber = 1;
    private uint frequency_;
    /// <summary>
    /// TX frequency (in Hz).
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint Frequency {
      get { return frequency_; }
      set {
        frequency_ = value;
      }
    }

    /// <summary>Field number for the "power" field.</summary>
    public const int PowerFieldNumber = 2;
    private int power_;
    /// <summary>
    /// TX power (in dBm).
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public int Power {
      get { return power_; }
      set {
        power_ = value;
      }
    }

    /// <summary>Field number for the "modulation" field.</summary>
    public const int ModulationFieldNumber = 3;
    private global::Chirpstack.Gateway.Modulation modulation_;
    /// <summary>
    /// Modulation.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Gateway.Modulation Modulation {
      get { return modulation_; }
      set {
        modulation_ = value;
      }
    }

    /// <summary>Field number for the "board" field.</summary>
    public const int BoardFieldNumber = 4;
    private uint board_;
    /// <summary>
    /// The board identifier for emitting the frame.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint Board {
      get { return board_; }
      set {
        board_ = value;
      }
    }

    /// <summary>Field number for the "antenna" field.</summary>
    public const int AntennaFieldNumber = 5;
    private uint antenna_;
    /// <summary>
    /// The antenna identifier for emitting the frame.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint Antenna {
      get { return antenna_; }
      set {
        antenna_ = value;
      }
    }

    /// <summary>Field number for the "timing" field.</summary>
    public const int TimingFieldNumber = 6;
    private global::Chirpstack.Gateway.Timing timing_;
    /// <summary>
    /// Timing.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Gateway.Timing Timing {
      get { return timing_; }
      set {
        timing_ = value;
      }
    }

    /// <summary>Field number for the "context" field.</summary>
    public const int ContextFieldNumber = 7;
    private pb::ByteString context_ = pb::ByteString.Empty;
    /// <summary>
    /// Gateway specific context.
    /// In case of a Class-A downlink, this contains a copy of the uplink context.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pb::ByteString Context {
      get { return context_; }
      set {
        context_ = 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 DownlinkTxInfo);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(DownlinkTxInfo other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (Frequency != other.Frequency) return false;
      if (Power != other.Power) return false;
      if (!object.Equals(Modulation, other.Modulation)) return false;
      if (Board != other.Board) return false;
      if (Antenna != other.Antenna) return false;
      if (!object.Equals(Timing, other.Timing)) return false;
      if (Context != other.Context) 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 (Frequency != 0) hash ^= Frequency.GetHashCode();
      if (Power != 0) hash ^= Power.GetHashCode();
      if (modulation_ != null) hash ^= Modulation.GetHashCode();
      if (Board != 0) hash ^= Board.GetHashCode();
      if (Antenna != 0) hash ^= Antenna.GetHashCode();
      if (timing_ != null) hash ^= Timing.GetHashCode();
      if (Context.Length != 0) hash ^= Context.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 (Frequency != 0) {
        output.WriteRawTag(8);
        output.WriteUInt32(Frequency);
      }
      if (Power != 0) {
        output.WriteRawTag(16);
        output.WriteInt32(Power);
      }
      if (modulation_ != null) {
        output.WriteRawTag(26);
        output.WriteMessage(Modulation);
      }
      if (Board != 0) {
        output.WriteRawTag(32);
        output.WriteUInt32(Board);
      }
      if (Antenna != 0) {
        output.WriteRawTag(40);
        output.WriteUInt32(Antenna);
      }
      if (timing_ != null) {
        output.WriteRawTag(50);
        output.WriteMessage(Timing);
      }
      if (Context.Length != 0) {
        output.WriteRawTag(58);
        output.WriteBytes(Context);
      }
      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 (Frequency != 0) {
        output.WriteRawTag(8);
        output.WriteUInt32(Frequency);
      }
      if (Power != 0) {
        output.WriteRawTag(16);
        output.WriteInt32(Power);
      }
      if (modulation_ != null) {
        output.WriteRawTag(26);
        output.WriteMessage(Modulation);
      }
      if (Board != 0) {
        output.WriteRawTag(32);
        output.WriteUInt32(Board);
      }
      if (Antenna != 0) {
        output.WriteRawTag(40);
        output.WriteUInt32(Antenna);
      }
      if (timing_ != null) {
        output.WriteRawTag(50);
        output.WriteMessage(Timing);
      }
      if (Context.Length != 0) {
        output.WriteRawTag(58);
        output.WriteBytes(Context);
      }
      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 (Frequency != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Frequency);
      }
      if (Power != 0) {
        size += 1 + pb::CodedOutputStream.ComputeInt32Size(Power);
      }
      if (modulation_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Modulation);
      }
      if (Board != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Board);
      }
      if (Antenna != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Antenna);
      }
      if (timing_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Timing);
      }
      if (Context.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeBytesSize(Context);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(DownlinkTxInfo other) {
      if (other == null) {
        return;
      }
      if (other.Frequency != 0) {
        Frequency = other.Frequency;
      }
      if (other.Power != 0) {
        Power = other.Power;
      }
      if (other.modulation_ != null) {
        if (modulation_ == null) {
          Modulation = new global::Chirpstack.Gateway.Modulation();
        }
        Modulation.MergeFrom(other.Modulation);
      }
      if (other.Board != 0) {
        Board = other.Board;
      }
      if (other.Antenna != 0) {
        Antenna = other.Antenna;
      }
      if (other.timing_ != null) {
        if (timing_ == null) {
          Timing = new global::Chirpstack.Gateway.Timing();
        }
        Timing.MergeFrom(other.Timing);
      }
      if (other.Context.Length != 0) {
        Context = other.Context;
      }
      _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: {
            Frequency = input.ReadUInt32();
            break;
          }
          case 16: {
            Power = input.ReadInt32();
            break;
          }
          case 26: {
            if (modulation_ == null) {
              Modulation = new global::Chirpstack.Gateway.Modulation();
            }
            input.ReadMessage(Modulation);
            break;
          }
          case 32: {
            Board = input.ReadUInt32();
            break;
          }
          case 40: {
            Antenna = input.ReadUInt32();
            break;
          }
          case 50: {
            if (timing_ == null) {
              Timing = new global::Chirpstack.Gateway.Timing();
            }
            input.ReadMessage(Timing);
            break;
          }
          case 58: {
            Context = input.ReadBytes();
            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: {
            Frequency = input.ReadUInt32();
            break;
          }
          case 16: {
            Power = input.ReadInt32();
            break;
          }
          case 26: {
            if (modulation_ == null) {
              Modulation = new global::Chirpstack.Gateway.Modulation();
            }
            input.ReadMessage(Modulation);
            break;
          }
          case 32: {
            Board = input.ReadUInt32();
            break;
          }
          case 40: {
            Antenna = input.ReadUInt32();
            break;
          }
          case 50: {
            if (timing_ == null) {
              Timing = new global::Chirpstack.Gateway.Timing();
            }
            input.ReadMessage(Timing);
            break;
          }
          case 58: {
            Context = input.ReadBytes();
            break;
          }
        }
      }
    }
    #endif

  }

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

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

    [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 Timing() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public Timing(Timing other) : this() {
      switch (other.ParametersCase) {
        case ParametersOneofCase.Immediately:
          Immediately = other.Immediately.Clone();
          break;
        case ParametersOneofCase.Delay:
          Delay = other.Delay.Clone();
          break;
        case ParametersOneofCase.GpsEpoch:
          GpsEpoch = other.GpsEpoch.Clone();
          break;
      }

      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

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

    /// <summary>Field number for the "immediately" field.</summary>
    public const int ImmediatelyFieldNumber = 1;
    /// <summary>
    /// Immediately timing information.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Gateway.ImmediatelyTimingInfo Immediately {
      get { return parametersCase_ == ParametersOneofCase.Immediately ? (global::Chirpstack.Gateway.ImmediatelyTimingInfo) parameters_ : null; }
      set {
        parameters_ = value;
        parametersCase_ = value == null ? ParametersOneofCase.None : ParametersOneofCase.Immediately;
      }
    }

    /// <summary>Field number for the "delay" field.</summary>
    public const int DelayFieldNumber = 2;
    /// <summary>
    /// Context based delay timing information.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Gateway.DelayTimingInfo Delay {
      get { return parametersCase_ == ParametersOneofCase.Delay ? (global::Chirpstack.Gateway.DelayTimingInfo) parameters_ : null; }
      set {
        parameters_ = value;
        parametersCase_ = value == null ? ParametersOneofCase.None : ParametersOneofCase.Delay;
      }
    }

    /// <summary>Field number for the "gps_epoch" field.</summary>
    public const int GpsEpochFieldNumber = 3;
    /// <summary>
    /// GPS Epoch timing information.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Gateway.GPSEpochTimingInfo GpsEpoch {
      get { return parametersCase_ == ParametersOneofCase.GpsEpoch ? (global::Chirpstack.Gateway.GPSEpochTimingInfo) parameters_ : null; }
      set {
        parameters_ = value;
        parametersCase_ = value == null ? ParametersOneofCase.None : ParametersOneofCase.GpsEpoch;
      }
    }

    private object parameters_;
    /// <summary>Enum of possible cases for the "parameters" oneof.</summary>
    public enum ParametersOneofCase {
      None = 0,
      Immediately = 1,
      Delay = 2,
      GpsEpoch = 3,
    }
    private ParametersOneofCase parametersCase_ = ParametersOneofCase.None;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public ParametersOneofCase ParametersCase {
      get { return parametersCase_; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void ClearParameters() {
      parametersCase_ = ParametersOneofCase.None;
      parameters_ = null;
    }

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(Timing other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (!object.Equals(Immediately, other.Immediately)) return false;
      if (!object.Equals(Delay, other.Delay)) return false;
      if (!object.Equals(GpsEpoch, other.GpsEpoch)) return false;
      if (ParametersCase != other.ParametersCase) 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 (parametersCase_ == ParametersOneofCase.Immediately) hash ^= Immediately.GetHashCode();
      if (parametersCase_ == ParametersOneofCase.Delay) hash ^= Delay.GetHashCode();
      if (parametersCase_ == ParametersOneofCase.GpsEpoch) hash ^= GpsEpoch.GetHashCode();
      hash ^= (int) parametersCase_;
      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 (parametersCase_ == ParametersOneofCase.Immediately) {
        output.WriteRawTag(10);
        output.WriteMessage(Immediately);
      }
      if (parametersCase_ == ParametersOneofCase.Delay) {
        output.WriteRawTag(18);
        output.WriteMessage(Delay);
      }
      if (parametersCase_ == ParametersOneofCase.GpsEpoch) {
        output.WriteRawTag(26);
        output.WriteMessage(GpsEpoch);
      }
      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 (parametersCase_ == ParametersOneofCase.Immediately) {
        output.WriteRawTag(10);
        output.WriteMessage(Immediately);
      }
      if (parametersCase_ == ParametersOneofCase.Delay) {
        output.WriteRawTag(18);
        output.WriteMessage(Delay);
      }
      if (parametersCase_ == ParametersOneofCase.GpsEpoch) {
        output.WriteRawTag(26);
        output.WriteMessage(GpsEpoch);
      }
      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 (parametersCase_ == ParametersOneofCase.Immediately) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Immediately);
      }
      if (parametersCase_ == ParametersOneofCase.Delay) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Delay);
      }
      if (parametersCase_ == ParametersOneofCase.GpsEpoch) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(GpsEpoch);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(Timing other) {
      if (other == null) {
        return;
      }
      switch (other.ParametersCase) {
        case ParametersOneofCase.Immediately:
          if (Immediately == null) {
            Immediately = new global::Chirpstack.Gateway.ImmediatelyTimingInfo();
          }
          Immediately.MergeFrom(other.Immediately);
          break;
        case ParametersOneofCase.Delay:
          if (Delay == null) {
            Delay = new global::Chirpstack.Gateway.DelayTimingInfo();
          }
          Delay.MergeFrom(other.Delay);
          break;
        case ParametersOneofCase.GpsEpoch:
          if (GpsEpoch == null) {
            GpsEpoch = new global::Chirpstack.Gateway.GPSEpochTimingInfo();
          }
          GpsEpoch.MergeFrom(other.GpsEpoch);
          break;
      }

      _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: {
            global::Chirpstack.Gateway.ImmediatelyTimingInfo subBuilder = new global::Chirpstack.Gateway.ImmediatelyTimingInfo();
            if (parametersCase_ == ParametersOneofCase.Immediately) {
              subBuilder.MergeFrom(Immediately);
            }
            input.ReadMessage(subBuilder);
            Immediately = subBuilder;
            break;
          }
          case 18: {
            global::Chirpstack.Gateway.DelayTimingInfo subBuilder = new global::Chirpstack.Gateway.DelayTimingInfo();
            if (parametersCase_ == ParametersOneofCase.Delay) {
              subBuilder.MergeFrom(Delay);
            }
            input.ReadMessage(subBuilder);
            Delay = subBuilder;
            break;
          }
          case 26: {
            global::Chirpstack.Gateway.GPSEpochTimingInfo subBuilder = new global::Chirpstack.Gateway.GPSEpochTimingInfo();
            if (parametersCase_ == ParametersOneofCase.GpsEpoch) {
              subBuilder.MergeFrom(GpsEpoch);
            }
            input.ReadMessage(subBuilder);
            GpsEpoch = subBuilder;
            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: {
            global::Chirpstack.Gateway.ImmediatelyTimingInfo subBuilder = new global::Chirpstack.Gateway.ImmediatelyTimingInfo();
            if (parametersCase_ == ParametersOneofCase.Immediately) {
              subBuilder.MergeFrom(Immediately);
            }
            input.ReadMessage(subBuilder);
            Immediately = subBuilder;
            break;
          }
          case 18: {
            global::Chirpstack.Gateway.DelayTimingInfo subBuilder = new global::Chirpstack.Gateway.DelayTimingInfo();
            if (parametersCase_ == ParametersOneofCase.Delay) {
              subBuilder.MergeFrom(Delay);
            }
            input.ReadMessage(subBuilder);
            Delay = subBuilder;
            break;
          }
          case 26: {
            global::Chirpstack.Gateway.GPSEpochTimingInfo subBuilder = new global::Chirpstack.Gateway.GPSEpochTimingInfo();
            if (parametersCase_ == ParametersOneofCase.GpsEpoch) {
              subBuilder.MergeFrom(GpsEpoch);
            }
            input.ReadMessage(subBuilder);
            GpsEpoch = subBuilder;
            break;
          }
        }
      }
    }
    #endif

  }

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

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

    [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 ImmediatelyTimingInfo() {
      OnConstruction();
    }

    partial void OnConstruction();

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

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

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

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override int GetHashCode() {
      int hash = 1;
      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 (_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 (_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 (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(ImmediatelyTimingInfo other) {
      if (other == null) {
        return;
      }
      _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;
        }
      }
    #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;
        }
      }
    }
    #endif

  }

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

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

    [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 DelayTimingInfo() {
      OnConstruction();
    }

    partial void OnConstruction();

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

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

    /// <summary>Field number for the "delay" field.</summary>
    public const int DelayFieldNumber = 1;
    private global::Google.Protobuf.WellKnownTypes.Duration delay_;
    /// <summary>
    /// Delay (duration).
    /// The delay will be added to the gateway internal timing, provided by the context object.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Google.Protobuf.WellKnownTypes.Duration Delay {
      get { return delay_; }
      set {
        delay_ = value;
      }
    }

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(DelayTimingInfo other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (!object.Equals(Delay, other.Delay)) 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 (delay_ != null) hash ^= Delay.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 (delay_ != null) {
        output.WriteRawTag(10);
        output.WriteMessage(Delay);
      }
      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 (delay_ != null) {
        output.WriteRawTag(10);
        output.WriteMessage(Delay);
      }
      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 (delay_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Delay);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(DelayTimingInfo other) {
      if (other == null) {
        return;
      }
      if (other.delay_ != null) {
        if (delay_ == null) {
          Delay = new global::Google.Protobuf.WellKnownTypes.Duration();
        }
        Delay.MergeFrom(other.Delay);
      }
      _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 (delay_ == null) {
              Delay = new global::Google.Protobuf.WellKnownTypes.Duration();
            }
            input.ReadMessage(Delay);
            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 (delay_ == null) {
              Delay = new global::Google.Protobuf.WellKnownTypes.Duration();
            }
            input.ReadMessage(Delay);
            break;
          }
        }
      }
    }
    #endif

  }

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

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

    [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 GPSEpochTimingInfo() {
      OnConstruction();
    }

    partial void OnConstruction();

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

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

    /// <summary>Field number for the "time_since_gps_epoch" field.</summary>
    public const int TimeSinceGpsEpochFieldNumber = 1;
    private global::Google.Protobuf.WellKnownTypes.Duration timeSinceGpsEpoch_;
    /// <summary>
    /// Duration since GPS Epoch.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Google.Protobuf.WellKnownTypes.Duration TimeSinceGpsEpoch {
      get { return timeSinceGpsEpoch_; }
      set {
        timeSinceGpsEpoch_ = value;
      }
    }

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(GPSEpochTimingInfo other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (!object.Equals(TimeSinceGpsEpoch, other.TimeSinceGpsEpoch)) 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 (timeSinceGpsEpoch_ != null) hash ^= TimeSinceGpsEpoch.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 (timeSinceGpsEpoch_ != null) {
        output.WriteRawTag(10);
        output.WriteMessage(TimeSinceGpsEpoch);
      }
      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 (timeSinceGpsEpoch_ != null) {
        output.WriteRawTag(10);
        output.WriteMessage(TimeSinceGpsEpoch);
      }
      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 (timeSinceGpsEpoch_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(TimeSinceGpsEpoch);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(GPSEpochTimingInfo other) {
      if (other == null) {
        return;
      }
      if (other.timeSinceGpsEpoch_ != null) {
        if (timeSinceGpsEpoch_ == null) {
          TimeSinceGpsEpoch = new global::Google.Protobuf.WellKnownTypes.Duration();
        }
        TimeSinceGpsEpoch.MergeFrom(other.TimeSinceGpsEpoch);
      }
      _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 (timeSinceGpsEpoch_ == null) {
              TimeSinceGpsEpoch = new global::Google.Protobuf.WellKnownTypes.Duration();
            }
            input.ReadMessage(TimeSinceGpsEpoch);
            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 (timeSinceGpsEpoch_ == null) {
              TimeSinceGpsEpoch = new global::Google.Protobuf.WellKnownTypes.Duration();
            }
            input.ReadMessage(TimeSinceGpsEpoch);
            break;
          }
        }
      }
    }
    #endif

  }

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

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

    [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 UplinkFrame() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public UplinkFrame(UplinkFrame other) : this() {
      phyPayload_ = other.phyPayload_;
      txInfoLegacy_ = other.txInfoLegacy_ != null ? other.txInfoLegacy_.Clone() : null;
      rxInfoLegacy_ = other.rxInfoLegacy_ != null ? other.rxInfoLegacy_.Clone() : null;
      txInfo_ = other.txInfo_ != null ? other.txInfo_.Clone() : null;
      rxInfo_ = other.rxInfo_ != null ? other.rxInfo_.Clone() : null;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

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

    /// <summary>Field number for the "phy_payload" field.</summary>
    public const int PhyPayloadFieldNumber = 1;
    private pb::ByteString phyPayload_ = pb::ByteString.Empty;
    /// <summary>
    /// PHYPayload.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pb::ByteString PhyPayload {
      get { return phyPayload_; }
      set {
        phyPayload_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "tx_info_legacy" field.</summary>
    public const int TxInfoLegacyFieldNumber = 2;
    private global::Chirpstack.Gateway.UplinkTxInfoLegacy txInfoLegacy_;
    /// <summary>
    /// TX meta-data (deprecated).
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Gateway.UplinkTxInfoLegacy TxInfoLegacy {
      get { return txInfoLegacy_; }
      set {
        txInfoLegacy_ = value;
      }
    }

    /// <summary>Field number for the "rx_info_legacy" field.</summary>
    public const int RxInfoLegacyFieldNumber = 3;
    private global::Chirpstack.Gateway.UplinkRxInfoLegacy rxInfoLegacy_;
    /// <summary>
    /// RX meta-data (deprecated).
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Gateway.UplinkRxInfoLegacy RxInfoLegacy {
      get { return rxInfoLegacy_; }
      set {
        rxInfoLegacy_ = value;
      }
    }

    /// <summary>Field number for the "tx_info" field.</summary>
    public const int TxInfoFieldNumber = 4;
    private global::Chirpstack.Gateway.UplinkTxInfo txInfo_;
    /// <summary>
    /// Tx meta-data.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Gateway.UplinkTxInfo TxInfo {
      get { return txInfo_; }
      set {
        txInfo_ = value;
      }
    }

    /// <summary>Field number for the "rx_info" field.</summary>
    public const int RxInfoFieldNumber = 5;
    private global::Chirpstack.Gateway.UplinkRxInfo rxInfo_;
    /// <summary>
    /// Rx meta-data.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Gateway.UplinkRxInfo RxInfo {
      get { return rxInfo_; }
      set {
        rxInfo_ = value;
      }
    }

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(UplinkFrame other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (PhyPayload != other.PhyPayload) return false;
      if (!object.Equals(TxInfoLegacy, other.TxInfoLegacy)) return false;
      if (!object.Equals(RxInfoLegacy, other.RxInfoLegacy)) return false;
      if (!object.Equals(TxInfo, other.TxInfo)) return false;
      if (!object.Equals(RxInfo, other.RxInfo)) 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 (PhyPayload.Length != 0) hash ^= PhyPayload.GetHashCode();
      if (txInfoLegacy_ != null) hash ^= TxInfoLegacy.GetHashCode();
      if (rxInfoLegacy_ != null) hash ^= RxInfoLegacy.GetHashCode();
      if (txInfo_ != null) hash ^= TxInfo.GetHashCode();
      if (rxInfo_ != null) hash ^= RxInfo.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 (PhyPayload.Length != 0) {
        output.WriteRawTag(10);
        output.WriteBytes(PhyPayload);
      }
      if (txInfoLegacy_ != null) {
        output.WriteRawTag(18);
        output.WriteMessage(TxInfoLegacy);
      }
      if (rxInfoLegacy_ != null) {
        output.WriteRawTag(26);
        output.WriteMessage(RxInfoLegacy);
      }
      if (txInfo_ != null) {
        output.WriteRawTag(34);
        output.WriteMessage(TxInfo);
      }
      if (rxInfo_ != null) {
        output.WriteRawTag(42);
        output.WriteMessage(RxInfo);
      }
      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 (PhyPayload.Length != 0) {
        output.WriteRawTag(10);
        output.WriteBytes(PhyPayload);
      }
      if (txInfoLegacy_ != null) {
        output.WriteRawTag(18);
        output.WriteMessage(TxInfoLegacy);
      }
      if (rxInfoLegacy_ != null) {
        output.WriteRawTag(26);
        output.WriteMessage(RxInfoLegacy);
      }
      if (txInfo_ != null) {
        output.WriteRawTag(34);
        output.WriteMessage(TxInfo);
      }
      if (rxInfo_ != null) {
        output.WriteRawTag(42);
        output.WriteMessage(RxInfo);
      }
      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 (PhyPayload.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeBytesSize(PhyPayload);
      }
      if (txInfoLegacy_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(TxInfoLegacy);
      }
      if (rxInfoLegacy_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(RxInfoLegacy);
      }
      if (txInfo_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(TxInfo);
      }
      if (rxInfo_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(RxInfo);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(UplinkFrame other) {
      if (other == null) {
        return;
      }
      if (other.PhyPayload.Length != 0) {
        PhyPayload = other.PhyPayload;
      }
      if (other.txInfoLegacy_ != null) {
        if (txInfoLegacy_ == null) {
          TxInfoLegacy = new global::Chirpstack.Gateway.UplinkTxInfoLegacy();
        }
        TxInfoLegacy.MergeFrom(other.TxInfoLegacy);
      }
      if (other.rxInfoLegacy_ != null) {
        if (rxInfoLegacy_ == null) {
          RxInfoLegacy = new global::Chirpstack.Gateway.UplinkRxInfoLegacy();
        }
        RxInfoLegacy.MergeFrom(other.RxInfoLegacy);
      }
      if (other.txInfo_ != null) {
        if (txInfo_ == null) {
          TxInfo = new global::Chirpstack.Gateway.UplinkTxInfo();
        }
        TxInfo.MergeFrom(other.TxInfo);
      }
      if (other.rxInfo_ != null) {
        if (rxInfo_ == null) {
          RxInfo = new global::Chirpstack.Gateway.UplinkRxInfo();
        }
        RxInfo.MergeFrom(other.RxInfo);
      }
      _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: {
            PhyPayload = input.ReadBytes();
            break;
          }
          case 18: {
            if (txInfoLegacy_ == null) {
              TxInfoLegacy = new global::Chirpstack.Gateway.UplinkTxInfoLegacy();
            }
            input.ReadMessage(TxInfoLegacy);
            break;
          }
          case 26: {
            if (rxInfoLegacy_ == null) {
              RxInfoLegacy = new global::Chirpstack.Gateway.UplinkRxInfoLegacy();
            }
            input.ReadMessage(RxInfoLegacy);
            break;
          }
          case 34: {
            if (txInfo_ == null) {
              TxInfo = new global::Chirpstack.Gateway.UplinkTxInfo();
            }
            input.ReadMessage(TxInfo);
            break;
          }
          case 42: {
            if (rxInfo_ == null) {
              RxInfo = new global::Chirpstack.Gateway.UplinkRxInfo();
            }
            input.ReadMessage(RxInfo);
            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: {
            PhyPayload = input.ReadBytes();
            break;
          }
          case 18: {
            if (txInfoLegacy_ == null) {
              TxInfoLegacy = new global::Chirpstack.Gateway.UplinkTxInfoLegacy();
            }
            input.ReadMessage(TxInfoLegacy);
            break;
          }
          case 26: {
            if (rxInfoLegacy_ == null) {
              RxInfoLegacy = new global::Chirpstack.Gateway.UplinkRxInfoLegacy();
            }
            input.ReadMessage(RxInfoLegacy);
            break;
          }
          case 34: {
            if (txInfo_ == null) {
              TxInfo = new global::Chirpstack.Gateway.UplinkTxInfo();
            }
            input.ReadMessage(TxInfo);
            break;
          }
          case 42: {
            if (rxInfo_ == null) {
              RxInfo = new global::Chirpstack.Gateway.UplinkRxInfo();
            }
            input.ReadMessage(RxInfo);
            break;
          }
        }
      }
    }
    #endif

  }

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

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

    [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 UplinkFrameSet() {
      OnConstruction();
    }

    partial void OnConstruction();

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

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

    /// <summary>Field number for the "phy_payload" field.</summary>
    public const int PhyPayloadFieldNumber = 1;
    private pb::ByteString phyPayload_ = pb::ByteString.Empty;
    /// <summary>
    /// PHYPayload.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pb::ByteString PhyPayload {
      get { return phyPayload_; }
      set {
        phyPayload_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "tx_info" field.</summary>
    public const int TxInfoFieldNumber = 2;
    private global::Chirpstack.Gateway.UplinkTxInfo txInfo_;
    /// <summary>
    /// TX meta-data.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Gateway.UplinkTxInfo TxInfo {
      get { return txInfo_; }
      set {
        txInfo_ = value;
      }
    }

    /// <summary>Field number for the "rx_info" field.</summary>
    public const int RxInfoFieldNumber = 3;
    private static readonly pb::FieldCodec<global::Chirpstack.Gateway.UplinkRxInfo> _repeated_rxInfo_codec
        = pb::FieldCodec.ForMessage(26, global::Chirpstack.Gateway.UplinkRxInfo.Parser);
    private readonly pbc::RepeatedField<global::Chirpstack.Gateway.UplinkRxInfo> rxInfo_ = new pbc::RepeatedField<global::Chirpstack.Gateway.UplinkRxInfo>();
    /// <summary>
    /// RX meta-data set.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pbc::RepeatedField<global::Chirpstack.Gateway.UplinkRxInfo> RxInfo {
      get { return rxInfo_; }
    }

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(UplinkFrameSet other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (PhyPayload != other.PhyPayload) return false;
      if (!object.Equals(TxInfo, other.TxInfo)) return false;
      if(!rxInfo_.Equals(other.rxInfo_)) 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 (PhyPayload.Length != 0) hash ^= PhyPayload.GetHashCode();
      if (txInfo_ != null) hash ^= TxInfo.GetHashCode();
      hash ^= rxInfo_.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 (PhyPayload.Length != 0) {
        output.WriteRawTag(10);
        output.WriteBytes(PhyPayload);
      }
      if (txInfo_ != null) {
        output.WriteRawTag(18);
        output.WriteMessage(TxInfo);
      }
      rxInfo_.WriteTo(output, _repeated_rxInfo_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 (PhyPayload.Length != 0) {
        output.WriteRawTag(10);
        output.WriteBytes(PhyPayload);
      }
      if (txInfo_ != null) {
        output.WriteRawTag(18);
        output.WriteMessage(TxInfo);
      }
      rxInfo_.WriteTo(ref output, _repeated_rxInfo_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 (PhyPayload.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeBytesSize(PhyPayload);
      }
      if (txInfo_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(TxInfo);
      }
      size += rxInfo_.CalculateSize(_repeated_rxInfo_codec);
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(UplinkFrameSet other) {
      if (other == null) {
        return;
      }
      if (other.PhyPayload.Length != 0) {
        PhyPayload = other.PhyPayload;
      }
      if (other.txInfo_ != null) {
        if (txInfo_ == null) {
          TxInfo = new global::Chirpstack.Gateway.UplinkTxInfo();
        }
        TxInfo.MergeFrom(other.TxInfo);
      }
      rxInfo_.Add(other.rxInfo_);
      _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: {
            PhyPayload = input.ReadBytes();
            break;
          }
          case 18: {
            if (txInfo_ == null) {
              TxInfo = new global::Chirpstack.Gateway.UplinkTxInfo();
            }
            input.ReadMessage(TxInfo);
            break;
          }
          case 26: {
            rxInfo_.AddEntriesFrom(input, _repeated_rxInfo_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 10: {
            PhyPayload = input.ReadBytes();
            break;
          }
          case 18: {
            if (txInfo_ == null) {
              TxInfo = new global::Chirpstack.Gateway.UplinkTxInfo();
            }
            input.ReadMessage(TxInfo);
            break;
          }
          case 26: {
            rxInfo_.AddEntriesFrom(ref input, _repeated_rxInfo_codec);
            break;
          }
        }
      }
    }
    #endif

  }

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

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

    [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 DownlinkFrame() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public DownlinkFrame(DownlinkFrame other) : this() {
      downlinkId_ = other.downlinkId_;
      downlinkIdLegacy_ = other.downlinkIdLegacy_;
      items_ = other.items_.Clone();
      gatewayIdLegacy_ = other.gatewayIdLegacy_;
      gatewayId_ = other.gatewayId_;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

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

    /// <summary>Field number for the "downlink_id" field.</summary>
    public const int DownlinkIdFieldNumber = 3;
    private uint downlinkId_;
    /// <summary>
    /// Downlink ID.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint DownlinkId {
      get { return downlinkId_; }
      set {
        downlinkId_ = value;
      }
    }

    /// <summary>Field number for the "downlink_id_legacy" field.</summary>
    public const int DownlinkIdLegacyFieldNumber = 4;
    private pb::ByteString downlinkIdLegacy_ = pb::ByteString.Empty;
    /// <summary>
    /// Downlink ID (UUID).
    /// Deprecated: use downlink_id.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pb::ByteString DownlinkIdLegacy {
      get { return downlinkIdLegacy_; }
      set {
        downlinkIdLegacy_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "items" field.</summary>
    public const int ItemsFieldNumber = 5;
    private static readonly pb::FieldCodec<global::Chirpstack.Gateway.DownlinkFrameItem> _repeated_items_codec
        = pb::FieldCodec.ForMessage(42, global::Chirpstack.Gateway.DownlinkFrameItem.Parser);
    private readonly pbc::RepeatedField<global::Chirpstack.Gateway.DownlinkFrameItem> items_ = new pbc::RepeatedField<global::Chirpstack.Gateway.DownlinkFrameItem>();
    /// <summary>
    /// Downlink frame items.
    /// This makes it possible to send multiple downlink opportunities to the
    /// gateway at once (e.g. RX1 and RX2 in LoRaWAN). The first item has the
    /// highest priority, the last the lowest. The gateway will emit at most
    /// one item.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pbc::RepeatedField<global::Chirpstack.Gateway.DownlinkFrameItem> Items {
      get { return items_; }
    }

    /// <summary>Field number for the "gateway_id_legacy" field.</summary>
    public const int GatewayIdLegacyFieldNumber = 6;
    private pb::ByteString gatewayIdLegacy_ = pb::ByteString.Empty;
    /// <summary>
    /// Gateway ID.
    /// Deprecated: use gateway_id
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pb::ByteString GatewayIdLegacy {
      get { return gatewayIdLegacy_; }
      set {
        gatewayIdLegacy_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "gateway_id" field.</summary>
    public const int GatewayIdFieldNumber = 7;
    private string gatewayId_ = "";
    /// <summary>
    /// Gateway ID.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string GatewayId {
      get { return gatewayId_; }
      set {
        gatewayId_ = 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 DownlinkFrame);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(DownlinkFrame other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (DownlinkId != other.DownlinkId) return false;
      if (DownlinkIdLegacy != other.DownlinkIdLegacy) return false;
      if(!items_.Equals(other.items_)) return false;
      if (GatewayIdLegacy != other.GatewayIdLegacy) return false;
      if (GatewayId != other.GatewayId) 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 (DownlinkId != 0) hash ^= DownlinkId.GetHashCode();
      if (DownlinkIdLegacy.Length != 0) hash ^= DownlinkIdLegacy.GetHashCode();
      hash ^= items_.GetHashCode();
      if (GatewayIdLegacy.Length != 0) hash ^= GatewayIdLegacy.GetHashCode();
      if (GatewayId.Length != 0) hash ^= GatewayId.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 (DownlinkId != 0) {
        output.WriteRawTag(24);
        output.WriteUInt32(DownlinkId);
      }
      if (DownlinkIdLegacy.Length != 0) {
        output.WriteRawTag(34);
        output.WriteBytes(DownlinkIdLegacy);
      }
      items_.WriteTo(output, _repeated_items_codec);
      if (GatewayIdLegacy.Length != 0) {
        output.WriteRawTag(50);
        output.WriteBytes(GatewayIdLegacy);
      }
      if (GatewayId.Length != 0) {
        output.WriteRawTag(58);
        output.WriteString(GatewayId);
      }
      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 (DownlinkId != 0) {
        output.WriteRawTag(24);
        output.WriteUInt32(DownlinkId);
      }
      if (DownlinkIdLegacy.Length != 0) {
        output.WriteRawTag(34);
        output.WriteBytes(DownlinkIdLegacy);
      }
      items_.WriteTo(ref output, _repeated_items_codec);
      if (GatewayIdLegacy.Length != 0) {
        output.WriteRawTag(50);
        output.WriteBytes(GatewayIdLegacy);
      }
      if (GatewayId.Length != 0) {
        output.WriteRawTag(58);
        output.WriteString(GatewayId);
      }
      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 (DownlinkId != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(DownlinkId);
      }
      if (DownlinkIdLegacy.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeBytesSize(DownlinkIdLegacy);
      }
      size += items_.CalculateSize(_repeated_items_codec);
      if (GatewayIdLegacy.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeBytesSize(GatewayIdLegacy);
      }
      if (GatewayId.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(GatewayId);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(DownlinkFrame other) {
      if (other == null) {
        return;
      }
      if (other.DownlinkId != 0) {
        DownlinkId = other.DownlinkId;
      }
      if (other.DownlinkIdLegacy.Length != 0) {
        DownlinkIdLegacy = other.DownlinkIdLegacy;
      }
      items_.Add(other.items_);
      if (other.GatewayIdLegacy.Length != 0) {
        GatewayIdLegacy = other.GatewayIdLegacy;
      }
      if (other.GatewayId.Length != 0) {
        GatewayId = other.GatewayId;
      }
      _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 24: {
            DownlinkId = input.ReadUInt32();
            break;
          }
          case 34: {
            DownlinkIdLegacy = input.ReadBytes();
            break;
          }
          case 42: {
            items_.AddEntriesFrom(input, _repeated_items_codec);
            break;
          }
          case 50: {
            GatewayIdLegacy = input.ReadBytes();
            break;
          }
          case 58: {
            GatewayId = 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 24: {
            DownlinkId = input.ReadUInt32();
            break;
          }
          case 34: {
            DownlinkIdLegacy = input.ReadBytes();
            break;
          }
          case 42: {
            items_.AddEntriesFrom(ref input, _repeated_items_codec);
            break;
          }
          case 50: {
            GatewayIdLegacy = input.ReadBytes();
            break;
          }
          case 58: {
            GatewayId = input.ReadString();
            break;
          }
        }
      }
    }
    #endif

  }

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

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

    [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 DownlinkFrameItem() {
      OnConstruction();
    }

    partial void OnConstruction();

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

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

    /// <summary>Field number for the "phy_payload" field.</summary>
    public const int PhyPayloadFieldNumber = 1;
    private pb::ByteString phyPayload_ = pb::ByteString.Empty;
    /// <summary>
    /// PHYPayload.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pb::ByteString PhyPayload {
      get { return phyPayload_; }
      set {
        phyPayload_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "tx_info_legacy" field.</summary>
    public const int TxInfoLegacyFieldNumber = 2;
    private global::Chirpstack.Gateway.DownlinkTxInfoLegacy txInfoLegacy_;
    /// <summary>
    /// TX meta-data (deprecated).
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Gateway.DownlinkTxInfoLegacy TxInfoLegacy {
      get { return txInfoLegacy_; }
      set {
        txInfoLegacy_ = value;
      }
    }

    /// <summary>Field number for the "tx_info" field.</summary>
    public const int TxInfoFieldNumber = 3;
    private global::Chirpstack.Gateway.DownlinkTxInfo txInfo_;
    /// <summary>
    /// Tx meta-data.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Gateway.DownlinkTxInfo TxInfo {
      get { return txInfo_; }
      set {
        txInfo_ = value;
      }
    }

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(DownlinkFrameItem other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (PhyPayload != other.PhyPayload) return false;
      if (!object.Equals(TxInfoLegacy, other.TxInfoLegacy)) return false;
      if (!object.Equals(TxInfo, other.TxInfo)) 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 (PhyPayload.Length != 0) hash ^= PhyPayload.GetHashCode();
      if (txInfoLegacy_ != null) hash ^= TxInfoLegacy.GetHashCode();
      if (txInfo_ != null) hash ^= TxInfo.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 (PhyPayload.Length != 0) {
        output.WriteRawTag(10);
        output.WriteBytes(PhyPayload);
      }
      if (txInfoLegacy_ != null) {
        output.WriteRawTag(18);
        output.WriteMessage(TxInfoLegacy);
      }
      if (txInfo_ != null) {
        output.WriteRawTag(26);
        output.WriteMessage(TxInfo);
      }
      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 (PhyPayload.Length != 0) {
        output.WriteRawTag(10);
        output.WriteBytes(PhyPayload);
      }
      if (txInfoLegacy_ != null) {
        output.WriteRawTag(18);
        output.WriteMessage(TxInfoLegacy);
      }
      if (txInfo_ != null) {
        output.WriteRawTag(26);
        output.WriteMessage(TxInfo);
      }
      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 (PhyPayload.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeBytesSize(PhyPayload);
      }
      if (txInfoLegacy_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(TxInfoLegacy);
      }
      if (txInfo_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(TxInfo);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(DownlinkFrameItem other) {
      if (other == null) {
        return;
      }
      if (other.PhyPayload.Length != 0) {
        PhyPayload = other.PhyPayload;
      }
      if (other.txInfoLegacy_ != null) {
        if (txInfoLegacy_ == null) {
          TxInfoLegacy = new global::Chirpstack.Gateway.DownlinkTxInfoLegacy();
        }
        TxInfoLegacy.MergeFrom(other.TxInfoLegacy);
      }
      if (other.txInfo_ != null) {
        if (txInfo_ == null) {
          TxInfo = new global::Chirpstack.Gateway.DownlinkTxInfo();
        }
        TxInfo.MergeFrom(other.TxInfo);
      }
      _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: {
            PhyPayload = input.ReadBytes();
            break;
          }
          case 18: {
            if (txInfoLegacy_ == null) {
              TxInfoLegacy = new global::Chirpstack.Gateway.DownlinkTxInfoLegacy();
            }
            input.ReadMessage(TxInfoLegacy);
            break;
          }
          case 26: {
            if (txInfo_ == null) {
              TxInfo = new global::Chirpstack.Gateway.DownlinkTxInfo();
            }
            input.ReadMessage(TxInfo);
            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: {
            PhyPayload = input.ReadBytes();
            break;
          }
          case 18: {
            if (txInfoLegacy_ == null) {
              TxInfoLegacy = new global::Chirpstack.Gateway.DownlinkTxInfoLegacy();
            }
            input.ReadMessage(TxInfoLegacy);
            break;
          }
          case 26: {
            if (txInfo_ == null) {
              TxInfo = new global::Chirpstack.Gateway.DownlinkTxInfo();
            }
            input.ReadMessage(TxInfo);
            break;
          }
        }
      }
    }
    #endif

  }

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

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

    [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 DownlinkTxAck() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public DownlinkTxAck(DownlinkTxAck other) : this() {
      gatewayIdLegacy_ = other.gatewayIdLegacy_;
      gatewayId_ = other.gatewayId_;
      downlinkId_ = other.downlinkId_;
      downlinkIdLegacy_ = other.downlinkIdLegacy_;
      items_ = other.items_.Clone();
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

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

    /// <summary>Field number for the "gateway_id_legacy" field.</summary>
    public const int GatewayIdLegacyFieldNumber = 1;
    private pb::ByteString gatewayIdLegacy_ = pb::ByteString.Empty;
    /// <summary>
    /// Gateway ID (deprecated).
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pb::ByteString GatewayIdLegacy {
      get { return gatewayIdLegacy_; }
      set {
        gatewayIdLegacy_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

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

    /// <summary>Field number for the "downlink_id" field.</summary>
    public const int DownlinkIdFieldNumber = 2;
    private uint downlinkId_;
    /// <summary>
    /// Downlink ID.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint DownlinkId {
      get { return downlinkId_; }
      set {
        downlinkId_ = value;
      }
    }

    /// <summary>Field number for the "downlink_id_legacy" field.</summary>
    public const int DownlinkIdLegacyFieldNumber = 4;
    private pb::ByteString downlinkIdLegacy_ = pb::ByteString.Empty;
    /// <summary>
    /// Downlink ID (deprecated).
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pb::ByteString DownlinkIdLegacy {
      get { return downlinkIdLegacy_; }
      set {
        downlinkIdLegacy_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "items" field.</summary>
    public const int ItemsFieldNumber = 5;
    private static readonly pb::FieldCodec<global::Chirpstack.Gateway.DownlinkTxAckItem> _repeated_items_codec
        = pb::FieldCodec.ForMessage(42, global::Chirpstack.Gateway.DownlinkTxAckItem.Parser);
    private readonly pbc::RepeatedField<global::Chirpstack.Gateway.DownlinkTxAckItem> items_ = new pbc::RepeatedField<global::Chirpstack.Gateway.DownlinkTxAckItem>();
    /// <summary>
    /// Downlink frame items.
    /// This list has the same length as the request and indicates which
    /// downlink frame has been emitted of the requested list (or why it failed).
    /// Note that at most one item has a positive acknowledgement.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pbc::RepeatedField<global::Chirpstack.Gateway.DownlinkTxAckItem> Items {
      get { return items_; }
    }

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(DownlinkTxAck other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (GatewayIdLegacy != other.GatewayIdLegacy) return false;
      if (GatewayId != other.GatewayId) return false;
      if (DownlinkId != other.DownlinkId) return false;
      if (DownlinkIdLegacy != other.DownlinkIdLegacy) return false;
      if(!items_.Equals(other.items_)) 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 (GatewayIdLegacy.Length != 0) hash ^= GatewayIdLegacy.GetHashCode();
      if (GatewayId.Length != 0) hash ^= GatewayId.GetHashCode();
      if (DownlinkId != 0) hash ^= DownlinkId.GetHashCode();
      if (DownlinkIdLegacy.Length != 0) hash ^= DownlinkIdLegacy.GetHashCode();
      hash ^= items_.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 (GatewayIdLegacy.Length != 0) {
        output.WriteRawTag(10);
        output.WriteBytes(GatewayIdLegacy);
      }
      if (DownlinkId != 0) {
        output.WriteRawTag(16);
        output.WriteUInt32(DownlinkId);
      }
      if (DownlinkIdLegacy.Length != 0) {
        output.WriteRawTag(34);
        output.WriteBytes(DownlinkIdLegacy);
      }
      items_.WriteTo(output, _repeated_items_codec);
      if (GatewayId.Length != 0) {
        output.WriteRawTag(50);
        output.WriteString(GatewayId);
      }
      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 (GatewayIdLegacy.Length != 0) {
        output.WriteRawTag(10);
        output.WriteBytes(GatewayIdLegacy);
      }
      if (DownlinkId != 0) {
        output.WriteRawTag(16);
        output.WriteUInt32(DownlinkId);
      }
      if (DownlinkIdLegacy.Length != 0) {
        output.WriteRawTag(34);
        output.WriteBytes(DownlinkIdLegacy);
      }
      items_.WriteTo(ref output, _repeated_items_codec);
      if (GatewayId.Length != 0) {
        output.WriteRawTag(50);
        output.WriteString(GatewayId);
      }
      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 (GatewayIdLegacy.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeBytesSize(GatewayIdLegacy);
      }
      if (GatewayId.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(GatewayId);
      }
      if (DownlinkId != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(DownlinkId);
      }
      if (DownlinkIdLegacy.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeBytesSize(DownlinkIdLegacy);
      }
      size += items_.CalculateSize(_repeated_items_codec);
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(DownlinkTxAck other) {
      if (other == null) {
        return;
      }
      if (other.GatewayIdLegacy.Length != 0) {
        GatewayIdLegacy = other.GatewayIdLegacy;
      }
      if (other.GatewayId.Length != 0) {
        GatewayId = other.GatewayId;
      }
      if (other.DownlinkId != 0) {
        DownlinkId = other.DownlinkId;
      }
      if (other.DownlinkIdLegacy.Length != 0) {
        DownlinkIdLegacy = other.DownlinkIdLegacy;
      }
      items_.Add(other.items_);
      _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: {
            GatewayIdLegacy = input.ReadBytes();
            break;
          }
          case 16: {
            DownlinkId = input.ReadUInt32();
            break;
          }
          case 34: {
            DownlinkIdLegacy = input.ReadBytes();
            break;
          }
          case 42: {
            items_.AddEntriesFrom(input, _repeated_items_codec);
            break;
          }
          case 50: {
            GatewayId = 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: {
            GatewayIdLegacy = input.ReadBytes();
            break;
          }
          case 16: {
            DownlinkId = input.ReadUInt32();
            break;
          }
          case 34: {
            DownlinkIdLegacy = input.ReadBytes();
            break;
          }
          case 42: {
            items_.AddEntriesFrom(ref input, _repeated_items_codec);
            break;
          }
          case 50: {
            GatewayId = input.ReadString();
            break;
          }
        }
      }
    }
    #endif

  }

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

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

    [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 DownlinkTxAckItem() {
      OnConstruction();
    }

    partial void OnConstruction();

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

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

    /// <summary>Field number for the "status" field.</summary>
    public const int StatusFieldNumber = 1;
    private global::Chirpstack.Gateway.TxAckStatus status_ = global::Chirpstack.Gateway.TxAckStatus.Ignored;
    /// <summary>
    /// The Ack status of this item.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Gateway.TxAckStatus Status {
      get { return status_; }
      set {
        status_ = value;
      }
    }

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(DownlinkTxAckItem other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (Status != other.Status) 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 (Status != global::Chirpstack.Gateway.TxAckStatus.Ignored) hash ^= Status.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 (Status != global::Chirpstack.Gateway.TxAckStatus.Ignored) {
        output.WriteRawTag(8);
        output.WriteEnum((int) Status);
      }
      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 (Status != global::Chirpstack.Gateway.TxAckStatus.Ignored) {
        output.WriteRawTag(8);
        output.WriteEnum((int) Status);
      }
      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 (Status != global::Chirpstack.Gateway.TxAckStatus.Ignored) {
        size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Status);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(DownlinkTxAckItem other) {
      if (other == null) {
        return;
      }
      if (other.Status != global::Chirpstack.Gateway.TxAckStatus.Ignored) {
        Status = other.Status;
      }
      _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: {
            Status = (global::Chirpstack.Gateway.TxAckStatus) input.ReadEnum();
            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: {
            Status = (global::Chirpstack.Gateway.TxAckStatus) input.ReadEnum();
            break;
          }
        }
      }
    }
    #endif

  }

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

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

    [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 GatewayConfiguration() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public GatewayConfiguration(GatewayConfiguration other) : this() {
      gatewayIdLegacy_ = other.gatewayIdLegacy_;
      gatewayId_ = other.gatewayId_;
      version_ = other.version_;
      channels_ = other.channels_.Clone();
      statsInterval_ = other.statsInterval_ != null ? other.statsInterval_.Clone() : null;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

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

    /// <summary>Field number for the "gateway_id_legacy" field.</summary>
    public const int GatewayIdLegacyFieldNumber = 1;
    private pb::ByteString gatewayIdLegacy_ = pb::ByteString.Empty;
    /// <summary>
    /// Gateway ID.
    /// Deprecated: use gateway_id.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pb::ByteString GatewayIdLegacy {
      get { return gatewayIdLegacy_; }
      set {
        gatewayIdLegacy_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

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

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

    /// <summary>Field number for the "channels" field.</summary>
    public const int ChannelsFieldNumber = 3;
    private static readonly pb::FieldCodec<global::Chirpstack.Gateway.ChannelConfiguration> _repeated_channels_codec
        = pb::FieldCodec.ForMessage(26, global::Chirpstack.Gateway.ChannelConfiguration.Parser);
    private readonly pbc::RepeatedField<global::Chirpstack.Gateway.ChannelConfiguration> channels_ = new pbc::RepeatedField<global::Chirpstack.Gateway.ChannelConfiguration>();
    /// <summary>
    /// Channels.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pbc::RepeatedField<global::Chirpstack.Gateway.ChannelConfiguration> Channels {
      get { return channels_; }
    }

    /// <summary>Field number for the "stats_interval" field.</summary>
    public const int StatsIntervalFieldNumber = 4;
    private global::Google.Protobuf.WellKnownTypes.Duration statsInterval_;
    /// <summary>
    /// Stats interval.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Google.Protobuf.WellKnownTypes.Duration StatsInterval {
      get { return statsInterval_; }
      set {
        statsInterval_ = value;
      }
    }

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(GatewayConfiguration other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (GatewayIdLegacy != other.GatewayIdLegacy) return false;
      if (GatewayId != other.GatewayId) return false;
      if (Version != other.Version) return false;
      if(!channels_.Equals(other.channels_)) return false;
      if (!object.Equals(StatsInterval, other.StatsInterval)) 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 (GatewayIdLegacy.Length != 0) hash ^= GatewayIdLegacy.GetHashCode();
      if (GatewayId.Length != 0) hash ^= GatewayId.GetHashCode();
      if (Version.Length != 0) hash ^= Version.GetHashCode();
      hash ^= channels_.GetHashCode();
      if (statsInterval_ != null) hash ^= StatsInterval.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 (GatewayIdLegacy.Length != 0) {
        output.WriteRawTag(10);
        output.WriteBytes(GatewayIdLegacy);
      }
      if (Version.Length != 0) {
        output.WriteRawTag(18);
        output.WriteString(Version);
      }
      channels_.WriteTo(output, _repeated_channels_codec);
      if (statsInterval_ != null) {
        output.WriteRawTag(34);
        output.WriteMessage(StatsInterval);
      }
      if (GatewayId.Length != 0) {
        output.WriteRawTag(42);
        output.WriteString(GatewayId);
      }
      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 (GatewayIdLegacy.Length != 0) {
        output.WriteRawTag(10);
        output.WriteBytes(GatewayIdLegacy);
      }
      if (Version.Length != 0) {
        output.WriteRawTag(18);
        output.WriteString(Version);
      }
      channels_.WriteTo(ref output, _repeated_channels_codec);
      if (statsInterval_ != null) {
        output.WriteRawTag(34);
        output.WriteMessage(StatsInterval);
      }
      if (GatewayId.Length != 0) {
        output.WriteRawTag(42);
        output.WriteString(GatewayId);
      }
      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 (GatewayIdLegacy.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeBytesSize(GatewayIdLegacy);
      }
      if (GatewayId.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(GatewayId);
      }
      if (Version.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Version);
      }
      size += channels_.CalculateSize(_repeated_channels_codec);
      if (statsInterval_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(StatsInterval);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(GatewayConfiguration other) {
      if (other == null) {
        return;
      }
      if (other.GatewayIdLegacy.Length != 0) {
        GatewayIdLegacy = other.GatewayIdLegacy;
      }
      if (other.GatewayId.Length != 0) {
        GatewayId = other.GatewayId;
      }
      if (other.Version.Length != 0) {
        Version = other.Version;
      }
      channels_.Add(other.channels_);
      if (other.statsInterval_ != null) {
        if (statsInterval_ == null) {
          StatsInterval = new global::Google.Protobuf.WellKnownTypes.Duration();
        }
        StatsInterval.MergeFrom(other.StatsInterval);
      }
      _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: {
            GatewayIdLegacy = input.ReadBytes();
            break;
          }
          case 18: {
            Version = input.ReadString();
            break;
          }
          case 26: {
            channels_.AddEntriesFrom(input, _repeated_channels_codec);
            break;
          }
          case 34: {
            if (statsInterval_ == null) {
              StatsInterval = new global::Google.Protobuf.WellKnownTypes.Duration();
            }
            input.ReadMessage(StatsInterval);
            break;
          }
          case 42: {
            GatewayId = 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: {
            GatewayIdLegacy = input.ReadBytes();
            break;
          }
          case 18: {
            Version = input.ReadString();
            break;
          }
          case 26: {
            channels_.AddEntriesFrom(ref input, _repeated_channels_codec);
            break;
          }
          case 34: {
            if (statsInterval_ == null) {
              StatsInterval = new global::Google.Protobuf.WellKnownTypes.Duration();
            }
            input.ReadMessage(StatsInterval);
            break;
          }
          case 42: {
            GatewayId = input.ReadString();
            break;
          }
        }
      }
    }
    #endif

  }

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

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

    [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 ChannelConfiguration() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public ChannelConfiguration(ChannelConfiguration other) : this() {
      frequency_ = other.frequency_;
      modulationLegacy_ = other.modulationLegacy_;
      board_ = other.board_;
      demodulator_ = other.demodulator_;
      switch (other.ModulationConfigCase) {
        case ModulationConfigOneofCase.LoraModulationConfig:
          LoraModulationConfig = other.LoraModulationConfig.Clone();
          break;
        case ModulationConfigOneofCase.FskModulationConfig:
          FskModulationConfig = other.FskModulationConfig.Clone();
          break;
      }

      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

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

    /// <summary>Field number for the "frequency" field.</summary>
    public const int FrequencyFieldNumber = 1;
    private uint frequency_;
    /// <summary>
    /// Frequency (Hz).
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint Frequency {
      get { return frequency_; }
      set {
        frequency_ = value;
      }
    }

    /// <summary>Field number for the "modulation_legacy" field.</summary>
    public const int ModulationLegacyFieldNumber = 2;
    private global::Chirpstack.Common.Modulation modulationLegacy_ = global::Chirpstack.Common.Modulation.Lora;
    /// <summary>
    /// Modulation (deprecated).
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Common.Modulation ModulationLegacy {
      get { return modulationLegacy_; }
      set {
        modulationLegacy_ = value;
      }
    }

    /// <summary>Field number for the "lora_modulation_config" field.</summary>
    public const int LoraModulationConfigFieldNumber = 3;
    /// <summary>
    /// LoRa modulation config.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Gateway.LoraModulationConfig LoraModulationConfig {
      get { return modulationConfigCase_ == ModulationConfigOneofCase.LoraModulationConfig ? (global::Chirpstack.Gateway.LoraModulationConfig) modulationConfig_ : null; }
      set {
        modulationConfig_ = value;
        modulationConfigCase_ = value == null ? ModulationConfigOneofCase.None : ModulationConfigOneofCase.LoraModulationConfig;
      }
    }

    /// <summary>Field number for the "fsk_modulation_config" field.</summary>
    public const int FskModulationConfigFieldNumber = 4;
    /// <summary>
    /// FSK modulation config.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Gateway.FskModulationConfig FskModulationConfig {
      get { return modulationConfigCase_ == ModulationConfigOneofCase.FskModulationConfig ? (global::Chirpstack.Gateway.FskModulationConfig) modulationConfig_ : null; }
      set {
        modulationConfig_ = value;
        modulationConfigCase_ = value == null ? ModulationConfigOneofCase.None : ModulationConfigOneofCase.FskModulationConfig;
      }
    }

    /// <summary>Field number for the "board" field.</summary>
    public const int BoardFieldNumber = 5;
    private uint board_;
    /// <summary>
    /// Board index.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint Board {
      get { return board_; }
      set {
        board_ = value;
      }
    }

    /// <summary>Field number for the "demodulator" field.</summary>
    public const int DemodulatorFieldNumber = 6;
    private uint demodulator_;
    /// <summary>
    /// Demodulator index (of the given board).
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint Demodulator {
      get { return demodulator_; }
      set {
        demodulator_ = value;
      }
    }

    private object modulationConfig_;
    /// <summary>Enum of possible cases for the "modulation_config" oneof.</summary>
    public enum ModulationConfigOneofCase {
      None = 0,
      LoraModulationConfig = 3,
      FskModulationConfig = 4,
    }
    private ModulationConfigOneofCase modulationConfigCase_ = ModulationConfigOneofCase.None;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public ModulationConfigOneofCase ModulationConfigCase {
      get { return modulationConfigCase_; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void ClearModulationConfig() {
      modulationConfigCase_ = ModulationConfigOneofCase.None;
      modulationConfig_ = null;
    }

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(ChannelConfiguration other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (Frequency != other.Frequency) return false;
      if (ModulationLegacy != other.ModulationLegacy) return false;
      if (!object.Equals(LoraModulationConfig, other.LoraModulationConfig)) return false;
      if (!object.Equals(FskModulationConfig, other.FskModulationConfig)) return false;
      if (Board != other.Board) return false;
      if (Demodulator != other.Demodulator) return false;
      if (ModulationConfigCase != other.ModulationConfigCase) 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 (Frequency != 0) hash ^= Frequency.GetHashCode();
      if (ModulationLegacy != global::Chirpstack.Common.Modulation.Lora) hash ^= ModulationLegacy.GetHashCode();
      if (modulationConfigCase_ == ModulationConfigOneofCase.LoraModulationConfig) hash ^= LoraModulationConfig.GetHashCode();
      if (modulationConfigCase_ == ModulationConfigOneofCase.FskModulationConfig) hash ^= FskModulationConfig.GetHashCode();
      if (Board != 0) hash ^= Board.GetHashCode();
      if (Demodulator != 0) hash ^= Demodulator.GetHashCode();
      hash ^= (int) modulationConfigCase_;
      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 (Frequency != 0) {
        output.WriteRawTag(8);
        output.WriteUInt32(Frequency);
      }
      if (ModulationLegacy != global::Chirpstack.Common.Modulation.Lora) {
        output.WriteRawTag(16);
        output.WriteEnum((int) ModulationLegacy);
      }
      if (modulationConfigCase_ == ModulationConfigOneofCase.LoraModulationConfig) {
        output.WriteRawTag(26);
        output.WriteMessage(LoraModulationConfig);
      }
      if (modulationConfigCase_ == ModulationConfigOneofCase.FskModulationConfig) {
        output.WriteRawTag(34);
        output.WriteMessage(FskModulationConfig);
      }
      if (Board != 0) {
        output.WriteRawTag(40);
        output.WriteUInt32(Board);
      }
      if (Demodulator != 0) {
        output.WriteRawTag(48);
        output.WriteUInt32(Demodulator);
      }
      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 (Frequency != 0) {
        output.WriteRawTag(8);
        output.WriteUInt32(Frequency);
      }
      if (ModulationLegacy != global::Chirpstack.Common.Modulation.Lora) {
        output.WriteRawTag(16);
        output.WriteEnum((int) ModulationLegacy);
      }
      if (modulationConfigCase_ == ModulationConfigOneofCase.LoraModulationConfig) {
        output.WriteRawTag(26);
        output.WriteMessage(LoraModulationConfig);
      }
      if (modulationConfigCase_ == ModulationConfigOneofCase.FskModulationConfig) {
        output.WriteRawTag(34);
        output.WriteMessage(FskModulationConfig);
      }
      if (Board != 0) {
        output.WriteRawTag(40);
        output.WriteUInt32(Board);
      }
      if (Demodulator != 0) {
        output.WriteRawTag(48);
        output.WriteUInt32(Demodulator);
      }
      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 (Frequency != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Frequency);
      }
      if (ModulationLegacy != global::Chirpstack.Common.Modulation.Lora) {
        size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ModulationLegacy);
      }
      if (modulationConfigCase_ == ModulationConfigOneofCase.LoraModulationConfig) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(LoraModulationConfig);
      }
      if (modulationConfigCase_ == ModulationConfigOneofCase.FskModulationConfig) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(FskModulationConfig);
      }
      if (Board != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Board);
      }
      if (Demodulator != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Demodulator);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(ChannelConfiguration other) {
      if (other == null) {
        return;
      }
      if (other.Frequency != 0) {
        Frequency = other.Frequency;
      }
      if (other.ModulationLegacy != global::Chirpstack.Common.Modulation.Lora) {
        ModulationLegacy = other.ModulationLegacy;
      }
      if (other.Board != 0) {
        Board = other.Board;
      }
      if (other.Demodulator != 0) {
        Demodulator = other.Demodulator;
      }
      switch (other.ModulationConfigCase) {
        case ModulationConfigOneofCase.LoraModulationConfig:
          if (LoraModulationConfig == null) {
            LoraModulationConfig = new global::Chirpstack.Gateway.LoraModulationConfig();
          }
          LoraModulationConfig.MergeFrom(other.LoraModulationConfig);
          break;
        case ModulationConfigOneofCase.FskModulationConfig:
          if (FskModulationConfig == null) {
            FskModulationConfig = new global::Chirpstack.Gateway.FskModulationConfig();
          }
          FskModulationConfig.MergeFrom(other.FskModulationConfig);
          break;
      }

      _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: {
            Frequency = input.ReadUInt32();
            break;
          }
          case 16: {
            ModulationLegacy = (global::Chirpstack.Common.Modulation) input.ReadEnum();
            break;
          }
          case 26: {
            global::Chirpstack.Gateway.LoraModulationConfig subBuilder = new global::Chirpstack.Gateway.LoraModulationConfig();
            if (modulationConfigCase_ == ModulationConfigOneofCase.LoraModulationConfig) {
              subBuilder.MergeFrom(LoraModulationConfig);
            }
            input.ReadMessage(subBuilder);
            LoraModulationConfig = subBuilder;
            break;
          }
          case 34: {
            global::Chirpstack.Gateway.FskModulationConfig subBuilder = new global::Chirpstack.Gateway.FskModulationConfig();
            if (modulationConfigCase_ == ModulationConfigOneofCase.FskModulationConfig) {
              subBuilder.MergeFrom(FskModulationConfig);
            }
            input.ReadMessage(subBuilder);
            FskModulationConfig = subBuilder;
            break;
          }
          case 40: {
            Board = input.ReadUInt32();
            break;
          }
          case 48: {
            Demodulator = 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: {
            Frequency = input.ReadUInt32();
            break;
          }
          case 16: {
            ModulationLegacy = (global::Chirpstack.Common.Modulation) input.ReadEnum();
            break;
          }
          case 26: {
            global::Chirpstack.Gateway.LoraModulationConfig subBuilder = new global::Chirpstack.Gateway.LoraModulationConfig();
            if (modulationConfigCase_ == ModulationConfigOneofCase.LoraModulationConfig) {
              subBuilder.MergeFrom(LoraModulationConfig);
            }
            input.ReadMessage(subBuilder);
            LoraModulationConfig = subBuilder;
            break;
          }
          case 34: {
            global::Chirpstack.Gateway.FskModulationConfig subBuilder = new global::Chirpstack.Gateway.FskModulationConfig();
            if (modulationConfigCase_ == ModulationConfigOneofCase.FskModulationConfig) {
              subBuilder.MergeFrom(FskModulationConfig);
            }
            input.ReadMessage(subBuilder);
            FskModulationConfig = subBuilder;
            break;
          }
          case 40: {
            Board = input.ReadUInt32();
            break;
          }
          case 48: {
            Demodulator = input.ReadUInt32();
            break;
          }
        }
      }
    }
    #endif

  }

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

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

    [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 LoraModulationConfig() {
      OnConstruction();
    }

    partial void OnConstruction();

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

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

    /// <summary>Field number for the "bandwidth_legacy" field.</summary>
    public const int BandwidthLegacyFieldNumber = 1;
    private uint bandwidthLegacy_;
    /// <summary>
    /// Bandwidth (kHz).
    /// Deprecated: use bandwidth.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint BandwidthLegacy {
      get { return bandwidthLegacy_; }
      set {
        bandwidthLegacy_ = value;
      }
    }

    /// <summary>Field number for the "bandwidth" field.</summary>
    public const int BandwidthFieldNumber = 3;
    private uint bandwidth_;
    /// <summary>
    /// Bandwidth (Hz).
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint Bandwidth {
      get { return bandwidth_; }
      set {
        bandwidth_ = value;
      }
    }

    /// <summary>Field number for the "spreading_factors" field.</summary>
    public const int SpreadingFactorsFieldNumber = 2;
    private static readonly pb::FieldCodec<uint> _repeated_spreadingFactors_codec
        = pb::FieldCodec.ForUInt32(18);
    private readonly pbc::RepeatedField<uint> spreadingFactors_ = new pbc::RepeatedField<uint>();
    /// <summary>
    /// Spreading-factors.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pbc::RepeatedField<uint> SpreadingFactors {
      get { return spreadingFactors_; }
    }

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(LoraModulationConfig other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (BandwidthLegacy != other.BandwidthLegacy) return false;
      if (Bandwidth != other.Bandwidth) return false;
      if(!spreadingFactors_.Equals(other.spreadingFactors_)) 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 (BandwidthLegacy != 0) hash ^= BandwidthLegacy.GetHashCode();
      if (Bandwidth != 0) hash ^= Bandwidth.GetHashCode();
      hash ^= spreadingFactors_.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 (BandwidthLegacy != 0) {
        output.WriteRawTag(8);
        output.WriteUInt32(BandwidthLegacy);
      }
      spreadingFactors_.WriteTo(output, _repeated_spreadingFactors_codec);
      if (Bandwidth != 0) {
        output.WriteRawTag(24);
        output.WriteUInt32(Bandwidth);
      }
      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 (BandwidthLegacy != 0) {
        output.WriteRawTag(8);
        output.WriteUInt32(BandwidthLegacy);
      }
      spreadingFactors_.WriteTo(ref output, _repeated_spreadingFactors_codec);
      if (Bandwidth != 0) {
        output.WriteRawTag(24);
        output.WriteUInt32(Bandwidth);
      }
      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 (BandwidthLegacy != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(BandwidthLegacy);
      }
      if (Bandwidth != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Bandwidth);
      }
      size += spreadingFactors_.CalculateSize(_repeated_spreadingFactors_codec);
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(LoraModulationConfig other) {
      if (other == null) {
        return;
      }
      if (other.BandwidthLegacy != 0) {
        BandwidthLegacy = other.BandwidthLegacy;
      }
      if (other.Bandwidth != 0) {
        Bandwidth = other.Bandwidth;
      }
      spreadingFactors_.Add(other.spreadingFactors_);
      _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: {
            BandwidthLegacy = input.ReadUInt32();
            break;
          }
          case 18:
          case 16: {
            spreadingFactors_.AddEntriesFrom(input, _repeated_spreadingFactors_codec);
            break;
          }
          case 24: {
            Bandwidth = 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: {
            BandwidthLegacy = input.ReadUInt32();
            break;
          }
          case 18:
          case 16: {
            spreadingFactors_.AddEntriesFrom(ref input, _repeated_spreadingFactors_codec);
            break;
          }
          case 24: {
            Bandwidth = input.ReadUInt32();
            break;
          }
        }
      }
    }
    #endif

  }

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

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

    [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 FskModulationConfig() {
      OnConstruction();
    }

    partial void OnConstruction();

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

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

    /// <summary>Field number for the "bandwidth_legacy" field.</summary>
    public const int BandwidthLegacyFieldNumber = 1;
    private uint bandwidthLegacy_;
    /// <summary>
    /// Bandwidth (kHz).
    /// Deprecated: use bandwidth.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint BandwidthLegacy {
      get { return bandwidthLegacy_; }
      set {
        bandwidthLegacy_ = value;
      }
    }

    /// <summary>Field number for the "bandwidth" field.</summary>
    public const int BandwidthFieldNumber = 3;
    private uint bandwidth_;
    /// <summary>
    /// Bandwidth (Hz).
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint Bandwidth {
      get { return bandwidth_; }
      set {
        bandwidth_ = value;
      }
    }

    /// <summary>Field number for the "bitrate" field.</summary>
    public const int BitrateFieldNumber = 2;
    private uint bitrate_;
    /// <summary>
    /// Bitrate.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint Bitrate {
      get { return bitrate_; }
      set {
        bitrate_ = value;
      }
    }

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(FskModulationConfig other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (BandwidthLegacy != other.BandwidthLegacy) return false;
      if (Bandwidth != other.Bandwidth) return false;
      if (Bitrate != other.Bitrate) 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 (BandwidthLegacy != 0) hash ^= BandwidthLegacy.GetHashCode();
      if (Bandwidth != 0) hash ^= Bandwidth.GetHashCode();
      if (Bitrate != 0) hash ^= Bitrate.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 (BandwidthLegacy != 0) {
        output.WriteRawTag(8);
        output.WriteUInt32(BandwidthLegacy);
      }
      if (Bitrate != 0) {
        output.WriteRawTag(16);
        output.WriteUInt32(Bitrate);
      }
      if (Bandwidth != 0) {
        output.WriteRawTag(24);
        output.WriteUInt32(Bandwidth);
      }
      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 (BandwidthLegacy != 0) {
        output.WriteRawTag(8);
        output.WriteUInt32(BandwidthLegacy);
      }
      if (Bitrate != 0) {
        output.WriteRawTag(16);
        output.WriteUInt32(Bitrate);
      }
      if (Bandwidth != 0) {
        output.WriteRawTag(24);
        output.WriteUInt32(Bandwidth);
      }
      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 (BandwidthLegacy != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(BandwidthLegacy);
      }
      if (Bandwidth != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Bandwidth);
      }
      if (Bitrate != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Bitrate);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(FskModulationConfig other) {
      if (other == null) {
        return;
      }
      if (other.BandwidthLegacy != 0) {
        BandwidthLegacy = other.BandwidthLegacy;
      }
      if (other.Bandwidth != 0) {
        Bandwidth = other.Bandwidth;
      }
      if (other.Bitrate != 0) {
        Bitrate = other.Bitrate;
      }
      _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: {
            BandwidthLegacy = input.ReadUInt32();
            break;
          }
          case 16: {
            Bitrate = input.ReadUInt32();
            break;
          }
          case 24: {
            Bandwidth = 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: {
            BandwidthLegacy = input.ReadUInt32();
            break;
          }
          case 16: {
            Bitrate = input.ReadUInt32();
            break;
          }
          case 24: {
            Bandwidth = input.ReadUInt32();
            break;
          }
        }
      }
    }
    #endif

  }

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

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

    [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 GatewayCommandExecRequest() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public GatewayCommandExecRequest(GatewayCommandExecRequest other) : this() {
      gatewayIdLegacy_ = other.gatewayIdLegacy_;
      gatewayId_ = other.gatewayId_;
      command_ = other.command_;
      execId_ = other.execId_;
      stdin_ = other.stdin_;
      environment_ = other.environment_.Clone();
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

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

    /// <summary>Field number for the "gateway_id_legacy" field.</summary>
    public const int GatewayIdLegacyFieldNumber = 1;
    private pb::ByteString gatewayIdLegacy_ = pb::ByteString.Empty;
    /// <summary>
    /// Gateway ID.
    /// Deprecated: use gateway_id.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pb::ByteString GatewayIdLegacy {
      get { return gatewayIdLegacy_; }
      set {
        gatewayIdLegacy_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

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

    /// <summary>Field number for the "command" field.</summary>
    public const int CommandFieldNumber = 2;
    private string command_ = "";
    /// <summary>
    /// Command to execute.
    /// This command must be pre-configured in the LoRa Gateway Bridge configuration.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string Command {
      get { return command_; }
      set {
        command_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "exec_id" field.</summary>
    public const int ExecIdFieldNumber = 7;
    private uint execId_;
    /// <summary>
    /// Execution request ID.
    /// The same will be returned when the execution of the command has
    /// completed.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint ExecId {
      get { return execId_; }
      set {
        execId_ = value;
      }
    }

    /// <summary>Field number for the "stdin" field.</summary>
    public const int StdinFieldNumber = 4;
    private pb::ByteString stdin_ = pb::ByteString.Empty;
    /// <summary>
    /// Standard input.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pb::ByteString Stdin {
      get { return stdin_; }
      set {
        stdin_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "environment" field.</summary>
    public const int EnvironmentFieldNumber = 5;
    private static readonly pbc::MapField<string, string>.Codec _map_environment_codec
        = new pbc::MapField<string, string>.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForString(18, ""), 42);
    private readonly pbc::MapField<string, string> environment_ = new pbc::MapField<string, string>();
    /// <summary>
    /// Environment variables.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pbc::MapField<string, string> Environment {
      get { return environment_; }
    }

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(GatewayCommandExecRequest other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (GatewayIdLegacy != other.GatewayIdLegacy) return false;
      if (GatewayId != other.GatewayId) return false;
      if (Command != other.Command) return false;
      if (ExecId != other.ExecId) return false;
      if (Stdin != other.Stdin) return false;
      if (!Environment.Equals(other.Environment)) 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 (GatewayIdLegacy.Length != 0) hash ^= GatewayIdLegacy.GetHashCode();
      if (GatewayId.Length != 0) hash ^= GatewayId.GetHashCode();
      if (Command.Length != 0) hash ^= Command.GetHashCode();
      if (ExecId != 0) hash ^= ExecId.GetHashCode();
      if (Stdin.Length != 0) hash ^= Stdin.GetHashCode();
      hash ^= Environment.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 (GatewayIdLegacy.Length != 0) {
        output.WriteRawTag(10);
        output.WriteBytes(GatewayIdLegacy);
      }
      if (Command.Length != 0) {
        output.WriteRawTag(18);
        output.WriteString(Command);
      }
      if (Stdin.Length != 0) {
        output.WriteRawTag(34);
        output.WriteBytes(Stdin);
      }
      environment_.WriteTo(output, _map_environment_codec);
      if (GatewayId.Length != 0) {
        output.WriteRawTag(50);
        output.WriteString(GatewayId);
      }
      if (ExecId != 0) {
        output.WriteRawTag(56);
        output.WriteUInt32(ExecId);
      }
      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 (GatewayIdLegacy.Length != 0) {
        output.WriteRawTag(10);
        output.WriteBytes(GatewayIdLegacy);
      }
      if (Command.Length != 0) {
        output.WriteRawTag(18);
        output.WriteString(Command);
      }
      if (Stdin.Length != 0) {
        output.WriteRawTag(34);
        output.WriteBytes(Stdin);
      }
      environment_.WriteTo(ref output, _map_environment_codec);
      if (GatewayId.Length != 0) {
        output.WriteRawTag(50);
        output.WriteString(GatewayId);
      }
      if (ExecId != 0) {
        output.WriteRawTag(56);
        output.WriteUInt32(ExecId);
      }
      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 (GatewayIdLegacy.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeBytesSize(GatewayIdLegacy);
      }
      if (GatewayId.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(GatewayId);
      }
      if (Command.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Command);
      }
      if (ExecId != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(ExecId);
      }
      if (Stdin.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeBytesSize(Stdin);
      }
      size += environment_.CalculateSize(_map_environment_codec);
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(GatewayCommandExecRequest other) {
      if (other == null) {
        return;
      }
      if (other.GatewayIdLegacy.Length != 0) {
        GatewayIdLegacy = other.GatewayIdLegacy;
      }
      if (other.GatewayId.Length != 0) {
        GatewayId = other.GatewayId;
      }
      if (other.Command.Length != 0) {
        Command = other.Command;
      }
      if (other.ExecId != 0) {
        ExecId = other.ExecId;
      }
      if (other.Stdin.Length != 0) {
        Stdin = other.Stdin;
      }
      environment_.Add(other.environment_);
      _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: {
            GatewayIdLegacy = input.ReadBytes();
            break;
          }
          case 18: {
            Command = input.ReadString();
            break;
          }
          case 34: {
            Stdin = input.ReadBytes();
            break;
          }
          case 42: {
            environment_.AddEntriesFrom(input, _map_environment_codec);
            break;
          }
          case 50: {
            GatewayId = input.ReadString();
            break;
          }
          case 56: {
            ExecId = 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 10: {
            GatewayIdLegacy = input.ReadBytes();
            break;
          }
          case 18: {
            Command = input.ReadString();
            break;
          }
          case 34: {
            Stdin = input.ReadBytes();
            break;
          }
          case 42: {
            environment_.AddEntriesFrom(ref input, _map_environment_codec);
            break;
          }
          case 50: {
            GatewayId = input.ReadString();
            break;
          }
          case 56: {
            ExecId = input.ReadUInt32();
            break;
          }
        }
      }
    }
    #endif

  }

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

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

    [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 GatewayCommandExecResponse() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public GatewayCommandExecResponse(GatewayCommandExecResponse other) : this() {
      gatewayIdLegacy_ = other.gatewayIdLegacy_;
      gatewayId_ = other.gatewayId_;
      execId_ = other.execId_;
      stdout_ = other.stdout_;
      stderr_ = other.stderr_;
      error_ = other.error_;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

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

    /// <summary>Field number for the "gateway_id_legacy" field.</summary>
    public const int GatewayIdLegacyFieldNumber = 1;
    private pb::ByteString gatewayIdLegacy_ = pb::ByteString.Empty;
    /// <summary>
    /// Gateway ID.
    /// Deprecated: use gateway_id.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pb::ByteString GatewayIdLegacy {
      get { return gatewayIdLegacy_; }
      set {
        gatewayIdLegacy_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

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

    /// <summary>Field number for the "exec_id" field.</summary>
    public const int ExecIdFieldNumber = 7;
    private uint execId_;
    /// <summary>
    /// Execution request ID.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint ExecId {
      get { return execId_; }
      set {
        execId_ = value;
      }
    }

    /// <summary>Field number for the "stdout" field.</summary>
    public const int StdoutFieldNumber = 3;
    private pb::ByteString stdout_ = pb::ByteString.Empty;
    /// <summary>
    /// Standard output.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pb::ByteString Stdout {
      get { return stdout_; }
      set {
        stdout_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "stderr" field.</summary>
    public const int StderrFieldNumber = 4;
    private pb::ByteString stderr_ = pb::ByteString.Empty;
    /// <summary>
    /// Standard error.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pb::ByteString Stderr {
      get { return stderr_; }
      set {
        stderr_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "error" field.</summary>
    public const int ErrorFieldNumber = 5;
    private string error_ = "";
    /// <summary>
    /// Error message.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string Error {
      get { return error_; }
      set {
        error_ = 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 GatewayCommandExecResponse);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(GatewayCommandExecResponse other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (GatewayIdLegacy != other.GatewayIdLegacy) return false;
      if (GatewayId != other.GatewayId) return false;
      if (ExecId != other.ExecId) return false;
      if (Stdout != other.Stdout) return false;
      if (Stderr != other.Stderr) return false;
      if (Error != other.Error) 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 (GatewayIdLegacy.Length != 0) hash ^= GatewayIdLegacy.GetHashCode();
      if (GatewayId.Length != 0) hash ^= GatewayId.GetHashCode();
      if (ExecId != 0) hash ^= ExecId.GetHashCode();
      if (Stdout.Length != 0) hash ^= Stdout.GetHashCode();
      if (Stderr.Length != 0) hash ^= Stderr.GetHashCode();
      if (Error.Length != 0) hash ^= Error.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 (GatewayIdLegacy.Length != 0) {
        output.WriteRawTag(10);
        output.WriteBytes(GatewayIdLegacy);
      }
      if (Stdout.Length != 0) {
        output.WriteRawTag(26);
        output.WriteBytes(Stdout);
      }
      if (Stderr.Length != 0) {
        output.WriteRawTag(34);
        output.WriteBytes(Stderr);
      }
      if (Error.Length != 0) {
        output.WriteRawTag(42);
        output.WriteString(Error);
      }
      if (GatewayId.Length != 0) {
        output.WriteRawTag(50);
        output.WriteString(GatewayId);
      }
      if (ExecId != 0) {
        output.WriteRawTag(56);
        output.WriteUInt32(ExecId);
      }
      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 (GatewayIdLegacy.Length != 0) {
        output.WriteRawTag(10);
        output.WriteBytes(GatewayIdLegacy);
      }
      if (Stdout.Length != 0) {
        output.WriteRawTag(26);
        output.WriteBytes(Stdout);
      }
      if (Stderr.Length != 0) {
        output.WriteRawTag(34);
        output.WriteBytes(Stderr);
      }
      if (Error.Length != 0) {
        output.WriteRawTag(42);
        output.WriteString(Error);
      }
      if (GatewayId.Length != 0) {
        output.WriteRawTag(50);
        output.WriteString(GatewayId);
      }
      if (ExecId != 0) {
        output.WriteRawTag(56);
        output.WriteUInt32(ExecId);
      }
      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 (GatewayIdLegacy.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeBytesSize(GatewayIdLegacy);
      }
      if (GatewayId.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(GatewayId);
      }
      if (ExecId != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(ExecId);
      }
      if (Stdout.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeBytesSize(Stdout);
      }
      if (Stderr.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeBytesSize(Stderr);
      }
      if (Error.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Error);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(GatewayCommandExecResponse other) {
      if (other == null) {
        return;
      }
      if (other.GatewayIdLegacy.Length != 0) {
        GatewayIdLegacy = other.GatewayIdLegacy;
      }
      if (other.GatewayId.Length != 0) {
        GatewayId = other.GatewayId;
      }
      if (other.ExecId != 0) {
        ExecId = other.ExecId;
      }
      if (other.Stdout.Length != 0) {
        Stdout = other.Stdout;
      }
      if (other.Stderr.Length != 0) {
        Stderr = other.Stderr;
      }
      if (other.Error.Length != 0) {
        Error = other.Error;
      }
      _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: {
            GatewayIdLegacy = input.ReadBytes();
            break;
          }
          case 26: {
            Stdout = input.ReadBytes();
            break;
          }
          case 34: {
            Stderr = input.ReadBytes();
            break;
          }
          case 42: {
            Error = input.ReadString();
            break;
          }
          case 50: {
            GatewayId = input.ReadString();
            break;
          }
          case 56: {
            ExecId = 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 10: {
            GatewayIdLegacy = input.ReadBytes();
            break;
          }
          case 26: {
            Stdout = input.ReadBytes();
            break;
          }
          case 34: {
            Stderr = input.ReadBytes();
            break;
          }
          case 42: {
            Error = input.ReadString();
            break;
          }
          case 50: {
            GatewayId = input.ReadString();
            break;
          }
          case 56: {
            ExecId = input.ReadUInt32();
            break;
          }
        }
      }
    }
    #endif

  }

  /// <summary>
  /// RawPacketForwarderEvent contains a raw packet-forwarder event.
  /// It can be used to access packet-forwarder features that are not (fully)
  /// integrated with the ChirpStack Gateway Bridge.
  /// </summary>
  public sealed partial class RawPacketForwarderEvent : pb::IMessage<RawPacketForwarderEvent>
  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      , pb::IBufferMessage
  #endif
  {
    private static readonly pb::MessageParser<RawPacketForwarderEvent> _parser = new pb::MessageParser<RawPacketForwarderEvent>(() => new RawPacketForwarderEvent());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pb::MessageParser<RawPacketForwarderEvent> Parser { get { return _parser; } }

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

    [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 RawPacketForwarderEvent() {
      OnConstruction();
    }

    partial void OnConstruction();

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

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

    /// <summary>Field number for the "gateway_id_legacy" field.</summary>
    public const int GatewayIdLegacyFieldNumber = 1;
    private pb::ByteString gatewayIdLegacy_ = pb::ByteString.Empty;
    /// <summary>
    /// Gateway ID.
    /// Deprecated: use gateway_id.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pb::ByteString GatewayIdLegacy {
      get { return gatewayIdLegacy_; }
      set {
        gatewayIdLegacy_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

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

    /// <summary>Field number for the "payload" field.</summary>
    public const int PayloadFieldNumber = 3;
    private pb::ByteString payload_ = pb::ByteString.Empty;
    /// <summary>
    /// Payload contains the raw payload.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pb::ByteString Payload {
      get { return payload_; }
      set {
        payload_ = 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 RawPacketForwarderEvent);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(RawPacketForwarderEvent other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (GatewayIdLegacy != other.GatewayIdLegacy) return false;
      if (GatewayId != other.GatewayId) return false;
      if (Payload != other.Payload) 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 (GatewayIdLegacy.Length != 0) hash ^= GatewayIdLegacy.GetHashCode();
      if (GatewayId.Length != 0) hash ^= GatewayId.GetHashCode();
      if (Payload.Length != 0) hash ^= Payload.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 (GatewayIdLegacy.Length != 0) {
        output.WriteRawTag(10);
        output.WriteBytes(GatewayIdLegacy);
      }
      if (Payload.Length != 0) {
        output.WriteRawTag(26);
        output.WriteBytes(Payload);
      }
      if (GatewayId.Length != 0) {
        output.WriteRawTag(34);
        output.WriteString(GatewayId);
      }
      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 (GatewayIdLegacy.Length != 0) {
        output.WriteRawTag(10);
        output.WriteBytes(GatewayIdLegacy);
      }
      if (Payload.Length != 0) {
        output.WriteRawTag(26);
        output.WriteBytes(Payload);
      }
      if (GatewayId.Length != 0) {
        output.WriteRawTag(34);
        output.WriteString(GatewayId);
      }
      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 (GatewayIdLegacy.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeBytesSize(GatewayIdLegacy);
      }
      if (GatewayId.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(GatewayId);
      }
      if (Payload.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeBytesSize(Payload);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(RawPacketForwarderEvent other) {
      if (other == null) {
        return;
      }
      if (other.GatewayIdLegacy.Length != 0) {
        GatewayIdLegacy = other.GatewayIdLegacy;
      }
      if (other.GatewayId.Length != 0) {
        GatewayId = other.GatewayId;
      }
      if (other.Payload.Length != 0) {
        Payload = other.Payload;
      }
      _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: {
            GatewayIdLegacy = input.ReadBytes();
            break;
          }
          case 26: {
            Payload = input.ReadBytes();
            break;
          }
          case 34: {
            GatewayId = 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: {
            GatewayIdLegacy = input.ReadBytes();
            break;
          }
          case 26: {
            Payload = input.ReadBytes();
            break;
          }
          case 34: {
            GatewayId = input.ReadString();
            break;
          }
        }
      }
    }
    #endif

  }

  /// <summary>
  /// RawPacketForwarderEvent contains a raw packet-forwarder command.
  /// It can be used to access packet-forwarder features that are not (fully)
  /// integrated with the ChirpStack Gateway Bridge.
  /// </summary>
  public sealed partial class RawPacketForwarderCommand : pb::IMessage<RawPacketForwarderCommand>
  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      , pb::IBufferMessage
  #endif
  {
    private static readonly pb::MessageParser<RawPacketForwarderCommand> _parser = new pb::MessageParser<RawPacketForwarderCommand>(() => new RawPacketForwarderCommand());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pb::MessageParser<RawPacketForwarderCommand> Parser { get { return _parser; } }

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

    [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 RawPacketForwarderCommand() {
      OnConstruction();
    }

    partial void OnConstruction();

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

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

    /// <summary>Field number for the "gateway_id_legacy" field.</summary>
    public const int GatewayIdLegacyFieldNumber = 1;
    private pb::ByteString gatewayIdLegacy_ = pb::ByteString.Empty;
    /// <summary>
    /// Gateway ID.
    /// Deprecated: use gateway_id.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pb::ByteString GatewayIdLegacy {
      get { return gatewayIdLegacy_; }
      set {
        gatewayIdLegacy_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

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

    /// <summary>Field number for the "payload" field.</summary>
    public const int PayloadFieldNumber = 3;
    private pb::ByteString payload_ = pb::ByteString.Empty;
    /// <summary>
    /// Payload contains the raw payload.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pb::ByteString Payload {
      get { return payload_; }
      set {
        payload_ = 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 RawPacketForwarderCommand);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(RawPacketForwarderCommand other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (GatewayIdLegacy != other.GatewayIdLegacy) return false;
      if (GatewayId != other.GatewayId) return false;
      if (Payload != other.Payload) 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 (GatewayIdLegacy.Length != 0) hash ^= GatewayIdLegacy.GetHashCode();
      if (GatewayId.Length != 0) hash ^= GatewayId.GetHashCode();
      if (Payload.Length != 0) hash ^= Payload.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 (GatewayIdLegacy.Length != 0) {
        output.WriteRawTag(10);
        output.WriteBytes(GatewayIdLegacy);
      }
      if (Payload.Length != 0) {
        output.WriteRawTag(26);
        output.WriteBytes(Payload);
      }
      if (GatewayId.Length != 0) {
        output.WriteRawTag(34);
        output.WriteString(GatewayId);
      }
      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 (GatewayIdLegacy.Length != 0) {
        output.WriteRawTag(10);
        output.WriteBytes(GatewayIdLegacy);
      }
      if (Payload.Length != 0) {
        output.WriteRawTag(26);
        output.WriteBytes(Payload);
      }
      if (GatewayId.Length != 0) {
        output.WriteRawTag(34);
        output.WriteString(GatewayId);
      }
      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 (GatewayIdLegacy.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeBytesSize(GatewayIdLegacy);
      }
      if (GatewayId.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(GatewayId);
      }
      if (Payload.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeBytesSize(Payload);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(RawPacketForwarderCommand other) {
      if (other == null) {
        return;
      }
      if (other.GatewayIdLegacy.Length != 0) {
        GatewayIdLegacy = other.GatewayIdLegacy;
      }
      if (other.GatewayId.Length != 0) {
        GatewayId = other.GatewayId;
      }
      if (other.Payload.Length != 0) {
        Payload = other.Payload;
      }
      _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: {
            GatewayIdLegacy = input.ReadBytes();
            break;
          }
          case 26: {
            Payload = input.ReadBytes();
            break;
          }
          case 34: {
            GatewayId = 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: {
            GatewayIdLegacy = input.ReadBytes();
            break;
          }
          case 26: {
            Payload = input.ReadBytes();
            break;
          }
          case 34: {
            GatewayId = input.ReadString();
            break;
          }
        }
      }
    }
    #endif

  }

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

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

    [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 ConnState() {
      OnConstruction();
    }

    partial void OnConstruction();

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

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

    /// <summary>Field number for the "gateway_id_legacy" field.</summary>
    public const int GatewayIdLegacyFieldNumber = 1;
    private pb::ByteString gatewayIdLegacy_ = pb::ByteString.Empty;
    /// <summary>
    /// Gateway ID.
    /// Deprecated: use gateway_id.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pb::ByteString GatewayIdLegacy {
      get { return gatewayIdLegacy_; }
      set {
        gatewayIdLegacy_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

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

    /// <summary>Field number for the "state" field.</summary>
    public const int StateFieldNumber = 2;
    private global::Chirpstack.Gateway.ConnState.Types.State state_ = global::Chirpstack.Gateway.ConnState.Types.State.Offline;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Gateway.ConnState.Types.State State {
      get { return state_; }
      set {
        state_ = value;
      }
    }

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(ConnState other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (GatewayIdLegacy != other.GatewayIdLegacy) return false;
      if (GatewayId != other.GatewayId) return false;
      if (State != other.State) 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 (GatewayIdLegacy.Length != 0) hash ^= GatewayIdLegacy.GetHashCode();
      if (GatewayId.Length != 0) hash ^= GatewayId.GetHashCode();
      if (State != global::Chirpstack.Gateway.ConnState.Types.State.Offline) hash ^= State.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 (GatewayIdLegacy.Length != 0) {
        output.WriteRawTag(10);
        output.WriteBytes(GatewayIdLegacy);
      }
      if (State != global::Chirpstack.Gateway.ConnState.Types.State.Offline) {
        output.WriteRawTag(16);
        output.WriteEnum((int) State);
      }
      if (GatewayId.Length != 0) {
        output.WriteRawTag(26);
        output.WriteString(GatewayId);
      }
      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 (GatewayIdLegacy.Length != 0) {
        output.WriteRawTag(10);
        output.WriteBytes(GatewayIdLegacy);
      }
      if (State != global::Chirpstack.Gateway.ConnState.Types.State.Offline) {
        output.WriteRawTag(16);
        output.WriteEnum((int) State);
      }
      if (GatewayId.Length != 0) {
        output.WriteRawTag(26);
        output.WriteString(GatewayId);
      }
      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 (GatewayIdLegacy.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeBytesSize(GatewayIdLegacy);
      }
      if (GatewayId.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(GatewayId);
      }
      if (State != global::Chirpstack.Gateway.ConnState.Types.State.Offline) {
        size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) State);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(ConnState other) {
      if (other == null) {
        return;
      }
      if (other.GatewayIdLegacy.Length != 0) {
        GatewayIdLegacy = other.GatewayIdLegacy;
      }
      if (other.GatewayId.Length != 0) {
        GatewayId = other.GatewayId;
      }
      if (other.State != global::Chirpstack.Gateway.ConnState.Types.State.Offline) {
        State = other.State;
      }
      _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: {
            GatewayIdLegacy = input.ReadBytes();
            break;
          }
          case 16: {
            State = (global::Chirpstack.Gateway.ConnState.Types.State) input.ReadEnum();
            break;
          }
          case 26: {
            GatewayId = 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: {
            GatewayIdLegacy = input.ReadBytes();
            break;
          }
          case 16: {
            State = (global::Chirpstack.Gateway.ConnState.Types.State) input.ReadEnum();
            break;
          }
          case 26: {
            GatewayId = input.ReadString();
            break;
          }
        }
      }
    }
    #endif

    #region Nested types
    /// <summary>Container for nested types declared in the ConnState message type.</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static partial class Types {
      public enum State {
        [pbr::OriginalName("OFFLINE")] Offline = 0,
        [pbr::OriginalName("ONLINE")] Online = 1,
      }

    }
    #endregion

  }

  #endregion

}

#endregion Designer generated code
