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

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

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

    static IntegrationReflection() {
      byte[] descriptorData = global::System.Convert.FromBase64String(
          string.Concat(
            "Ch1pbnRlZ3JhdGlvbi9pbnRlZ3JhdGlvbi5wcm90bxILaW50ZWdyYXRpb24a",
            "E2NvbW1vbi9jb21tb24ucHJvdG8aC2d3L2d3LnByb3RvGh9nb29nbGUvcHJv",
            "dG9idWYvdGltZXN0YW1wLnByb3RvGhxnb29nbGUvcHJvdG9idWYvc3RydWN0",
            "LnByb3RvIqICCgpEZXZpY2VJbmZvEhEKCXRlbmFudF9pZBgBIAEoCRITCgt0",
            "ZW5hbnRfbmFtZRgCIAEoCRIWCg5hcHBsaWNhdGlvbl9pZBgDIAEoCRIYChBh",
            "cHBsaWNhdGlvbl9uYW1lGAQgASgJEhkKEWRldmljZV9wcm9maWxlX2lkGAUg",
            "ASgJEhsKE2RldmljZV9wcm9maWxlX25hbWUYBiABKAkSEwoLZGV2aWNlX25h",
            "bWUYByABKAkSDwoHZGV2X2V1aRgIIAEoCRIvCgR0YWdzGAkgAygLMiEuaW50",
            "ZWdyYXRpb24uRGV2aWNlSW5mby5UYWdzRW50cnkaKwoJVGFnc0VudHJ5EgsK",
            "A2tleRgBIAEoCRINCgV2YWx1ZRgCIAEoCToCOAEi2QIKC1VwbGlua0V2ZW50",
            "EhgKEGRlZHVwbGljYXRpb25faWQYASABKAkSKAoEdGltZRgCIAEoCzIaLmdv",
            "b2dsZS5wcm90b2J1Zi5UaW1lc3RhbXASLAoLZGV2aWNlX2luZm8YAyABKAsy",
            "Fy5pbnRlZ3JhdGlvbi5EZXZpY2VJbmZvEhAKCGRldl9hZGRyGAQgASgJEgsK",
            "A2FkchgFIAEoCBIKCgJkchgGIAEoDRINCgVmX2NudBgHIAEoDRIOCgZmX3Bv",
            "cnQYCCABKA0SEQoJY29uZmlybWVkGAkgASgIEgwKBGRhdGEYCiABKAwSJwoG",
            "b2JqZWN0GAsgASgLMhcuZ29vZ2xlLnByb3RvYnVmLlN0cnVjdBIhCgdyeF9p",
            "bmZvGAwgAygLMhAuZ3cuVXBsaW5rUnhJbmZvEiEKB3R4X2luZm8YDSABKAsy",
            "EC5ndy5VcGxpbmtUeEluZm8ijwEKCUpvaW5FdmVudBIYChBkZWR1cGxpY2F0",
            "aW9uX2lkGAEgASgJEigKBHRpbWUYAiABKAsyGi5nb29nbGUucHJvdG9idWYu",
            "VGltZXN0YW1wEiwKC2RldmljZV9pbmZvGAMgASgLMhcuaW50ZWdyYXRpb24u",
            "RGV2aWNlSW5mbxIQCghkZXZfYWRkchgEIAEoCSK9AQoIQWNrRXZlbnQSGAoQ",
            "ZGVkdXBsaWNhdGlvbl9pZBgBIAEoCRIoCgR0aW1lGAIgASgLMhouZ29vZ2xl",
            "LnByb3RvYnVmLlRpbWVzdGFtcBIsCgtkZXZpY2VfaW5mbxgDIAEoCzIXLmlu",
            "dGVncmF0aW9uLkRldmljZUluZm8SFQoNcXVldWVfaXRlbV9pZBgEIAEoCRIU",
            "CgxhY2tub3dsZWRnZWQYBSABKAgSEgoKZl9jbnRfZG93bhgGIAEoDSLdAQoK",
            "VHhBY2tFdmVudBITCgtkb3dubGlua19pZBgBIAEoDRIoCgR0aW1lGAIgASgL",
            "MhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcBIsCgtkZXZpY2VfaW5mbxgD",
            "IAEoCzIXLmludGVncmF0aW9uLkRldmljZUluZm8SFQoNcXVldWVfaXRlbV9p",
            "ZBgEIAEoCRISCgpmX2NudF9kb3duGAUgASgNEhIKCmdhdGV3YXlfaWQYBiAB",
            "KAkSIwoHdHhfaW5mbxgHIAEoCzISLmd3LkRvd25saW5rVHhJbmZvIqYCCghM",
            "b2dFdmVudBIoCgR0aW1lGAEgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVz",
            "dGFtcBIsCgtkZXZpY2VfaW5mbxgCIAEoCzIXLmludGVncmF0aW9uLkRldmlj",
            "ZUluZm8SJAoFbGV2ZWwYAyABKA4yFS5pbnRlZ3JhdGlvbi5Mb2dMZXZlbBIi",
            "CgRjb2RlGAQgASgOMhQuaW50ZWdyYXRpb24uTG9nQ29kZRITCgtkZXNjcmlw",
            "dGlvbhgFIAEoCRIzCgdjb250ZXh0GAYgAygLMiIuaW50ZWdyYXRpb24uTG9n",
            "RXZlbnQuQ29udGV4dEVudHJ5Gi4KDENvbnRleHRFbnRyeRILCgNrZXkYASAB",
            "KAkSDQoFdmFsdWUYAiABKAk6AjgBIugBCgtTdGF0dXNFdmVudBIYChBkZWR1",
            "cGxpY2F0aW9uX2lkGAEgASgJEigKBHRpbWUYAiABKAsyGi5nb29nbGUucHJv",
            "dG9idWYuVGltZXN0YW1wEiwKC2RldmljZV9pbmZvGAMgASgLMhcuaW50ZWdy",
            "YXRpb24uRGV2aWNlSW5mbxIOCgZtYXJnaW4YBSABKAUSHQoVZXh0ZXJuYWxf",
            "cG93ZXJfc291cmNlGAYgASgIEiEKGWJhdHRlcnlfbGV2ZWxfdW5hdmFpbGFi",
            "bGUYByABKAgSFQoNYmF0dGVyeV9sZXZlbBgIIAEoAiKlAQoNTG9jYXRpb25F",
            "dmVudBIYChBkZWR1cGxpY2F0aW9uX2lkGAEgASgJEigKBHRpbWUYAiABKAsy",
            "Gi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEiwKC2RldmljZV9pbmZvGAMg",
            "ASgLMhcuaW50ZWdyYXRpb24uRGV2aWNlSW5mbxIiCghsb2NhdGlvbhgEIAEo",
            "CzIQLmNvbW1vbi5Mb2NhdGlvbiLbAQoQSW50ZWdyYXRpb25FdmVudBIYChBk",
            "ZWR1cGxpY2F0aW9uX2lkGAEgASgJEigKBHRpbWUYAiABKAsyGi5nb29nbGUu",
            "cHJvdG9idWYuVGltZXN0YW1wEiwKC2RldmljZV9pbmZvGAMgASgLMhcuaW50",
            "ZWdyYXRpb24uRGV2aWNlSW5mbxIYChBpbnRlZ3JhdGlvbl9uYW1lGAQgASgJ",
            "EhIKCmV2ZW50X3R5cGUYBSABKAkSJwoGb2JqZWN0GAYgASgLMhcuZ29vZ2xl",
            "LnByb3RvYnVmLlN0cnVjdCKIAQoPRG93bmxpbmtDb21tYW5kEgoKAmlkGAEg",
            "ASgJEg8KB2Rldl9ldWkYAiABKAkSEQoJY29uZmlybWVkGAMgASgIEg4KBmZf",
            "cG9ydBgEIAEoDRIMCgRkYXRhGAUgASgMEicKBm9iamVjdBgGIAEoCzIXLmdv",
            "b2dsZS5wcm90b2J1Zi5TdHJ1Y3QqLAoITG9nTGV2ZWwSCAoESU5GTxAAEgsK",
            "B1dBUk5JTkcQARIJCgVFUlJPUhACKsABCgdMb2dDb2RlEgsKB1VOS05PV04Q",
            "ABIZChVET1dOTElOS19QQVlMT0FEX1NJWkUQARIQCgxVUExJTktfQ09ERUMQ",
            "AhISCg5ET1dOTElOS19DT0RFQxADEggKBE9UQUEQBBIWChJVUExJTktfRl9D",
            "TlRfUkVTRVQQBRIOCgpVUExJTktfTUlDEAYSHwobVVBMSU5LX0ZfQ05UX1JF",
            "VFJBTlNNSVNTSU9OEAcSFAoQRE9XTkxJTktfR0FURVdBWRAIQoEBCh1pby5j",
            "aGlycHN0YWNrLmFwaS5pbnRlZ3JhdGlvbkIQSW50ZWdyYXRpb25Qcm90b1AB",
            "WjNnaXRodWIuY29tL2Jyb2NhYXIvY2hpcnBzdGFjay9hcGkvZ28vdjQvaW50",
            "ZWdyYXRpb26qAhZDaGlycHN0YWNrLkludGVncmF0aW9uYgZwcm90bzM="));
      descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
          new pbr::FileDescriptor[] { global::Chirpstack.Common.CommonReflection.Descriptor, global::Chirpstack.Gateway.GwReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.TimestampReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.StructReflection.Descriptor, },
          new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Chirpstack.Integration.LogLevel), typeof(global::Chirpstack.Integration.LogCode), }, null, new pbr::GeneratedClrTypeInfo[] {
            new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Integration.DeviceInfo), global::Chirpstack.Integration.DeviceInfo.Parser, new[]{ "TenantId", "TenantName", "ApplicationId", "ApplicationName", "DeviceProfileId", "DeviceProfileName", "DeviceName", "DevEui", "Tags" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, }),
            new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Integration.UplinkEvent), global::Chirpstack.Integration.UplinkEvent.Parser, new[]{ "DeduplicationId", "Time", "DeviceInfo", "DevAddr", "Adr", "Dr", "FCnt", "FPort", "Confirmed", "Data", "Object", "RxInfo", "TxInfo" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Integration.JoinEvent), global::Chirpstack.Integration.JoinEvent.Parser, new[]{ "DeduplicationId", "Time", "DeviceInfo", "DevAddr" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Integration.AckEvent), global::Chirpstack.Integration.AckEvent.Parser, new[]{ "DeduplicationId", "Time", "DeviceInfo", "QueueItemId", "Acknowledged", "FCntDown" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Integration.TxAckEvent), global::Chirpstack.Integration.TxAckEvent.Parser, new[]{ "DownlinkId", "Time", "DeviceInfo", "QueueItemId", "FCntDown", "GatewayId", "TxInfo" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Integration.LogEvent), global::Chirpstack.Integration.LogEvent.Parser, new[]{ "Time", "DeviceInfo", "Level", "Code", "Description", "Context" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, }),
            new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Integration.StatusEvent), global::Chirpstack.Integration.StatusEvent.Parser, new[]{ "DeduplicationId", "Time", "DeviceInfo", "Margin", "ExternalPowerSource", "BatteryLevelUnavailable", "BatteryLevel" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Integration.LocationEvent), global::Chirpstack.Integration.LocationEvent.Parser, new[]{ "DeduplicationId", "Time", "DeviceInfo", "Location" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Integration.IntegrationEvent), global::Chirpstack.Integration.IntegrationEvent.Parser, new[]{ "DeduplicationId", "Time", "DeviceInfo", "IntegrationName", "EventType", "Object" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Integration.DownlinkCommand), global::Chirpstack.Integration.DownlinkCommand.Parser, new[]{ "Id", "DevEui", "Confirmed", "FPort", "Data", "Object" }, null, null, null, null)
          }));
    }
    #endregion

  }
  #region Enums
  public enum LogLevel {
    /// <summary>
    /// Info.
    /// </summary>
    [pbr::OriginalName("INFO")] Info = 0,
    /// <summary>
    /// Warning.
    /// </summary>
    [pbr::OriginalName("WARNING")] Warning = 1,
    /// <summary>
    /// Error.
    /// </summary>
    [pbr::OriginalName("ERROR")] Error = 2,
  }

  public enum LogCode {
    /// <summary>
    /// Unknown type.
    /// </summary>
    [pbr::OriginalName("UNKNOWN")] Unknown = 0,
    /// <summary>
    /// Error related to the downlink payload size.
    /// Usually seen when the payload exceeded the maximum allowed payload size.
    /// </summary>
    [pbr::OriginalName("DOWNLINK_PAYLOAD_SIZE")] DownlinkPayloadSize = 1,
    /// <summary>
    /// Uplink codec error.
    /// </summary>
    [pbr::OriginalName("UPLINK_CODEC")] UplinkCodec = 2,
    /// <summary>
    /// Downlink codec error.
    /// </summary>
    [pbr::OriginalName("DOWNLINK_CODEC")] DownlinkCodec = 3,
    /// <summary>
    /// OTAA error.
    /// </summary>
    [pbr::OriginalName("OTAA")] Otaa = 4,
    /// <summary>
    /// Uplink frame-counter was reset.
    /// </summary>
    [pbr::OriginalName("UPLINK_F_CNT_RESET")] UplinkFCntReset = 5,
    /// <summary>
    /// Uplink MIC error.
    /// </summary>
    [pbr::OriginalName("UPLINK_MIC")] UplinkMic = 6,
    /// <summary>
    /// Uplink frame-counter retransmission.
    /// </summary>
    [pbr::OriginalName("UPLINK_F_CNT_RETRANSMISSION")] UplinkFCntRetransmission = 7,
    /// <summary>
    /// Downlink gateway error.
    /// </summary>
    [pbr::OriginalName("DOWNLINK_GATEWAY")] DownlinkGateway = 8,
  }

  #endregion

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

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

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public DeviceInfo(DeviceInfo other) : this() {
      tenantId_ = other.tenantId_;
      tenantName_ = other.tenantName_;
      applicationId_ = other.applicationId_;
      applicationName_ = other.applicationName_;
      deviceProfileId_ = other.deviceProfileId_;
      deviceProfileName_ = other.deviceProfileName_;
      deviceName_ = other.deviceName_;
      devEui_ = other.devEui_;
      tags_ = other.tags_.Clone();
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

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

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

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

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

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

    /// <summary>Field number for the "device_profile_id" field.</summary>
    public const int DeviceProfileIdFieldNumber = 5;
    private string deviceProfileId_ = "";
    /// <summary>
    /// Device-profile ID (UUID).
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string DeviceProfileId {
      get { return deviceProfileId_; }
      set {
        deviceProfileId_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "device_profile_name" field.</summary>
    public const int DeviceProfileNameFieldNumber = 6;
    private string deviceProfileName_ = "";
    /// <summary>
    /// Device-profile name.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string DeviceProfileName {
      get { return deviceProfileName_; }
      set {
        deviceProfileName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

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

    /// <summary>Field number for the "dev_eui" field.</summary>
    public const int DevEuiFieldNumber = 8;
    private string devEui_ = "";
    /// <summary>
    /// Device EUI.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string DevEui {
      get { return devEui_; }
      set {
        devEui_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

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

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(DeviceInfo other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (TenantId != other.TenantId) return false;
      if (TenantName != other.TenantName) return false;
      if (ApplicationId != other.ApplicationId) return false;
      if (ApplicationName != other.ApplicationName) return false;
      if (DeviceProfileId != other.DeviceProfileId) return false;
      if (DeviceProfileName != other.DeviceProfileName) return false;
      if (DeviceName != other.DeviceName) return false;
      if (DevEui != other.DevEui) return false;
      if (!Tags.Equals(other.Tags)) 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 (TenantId.Length != 0) hash ^= TenantId.GetHashCode();
      if (TenantName.Length != 0) hash ^= TenantName.GetHashCode();
      if (ApplicationId.Length != 0) hash ^= ApplicationId.GetHashCode();
      if (ApplicationName.Length != 0) hash ^= ApplicationName.GetHashCode();
      if (DeviceProfileId.Length != 0) hash ^= DeviceProfileId.GetHashCode();
      if (DeviceProfileName.Length != 0) hash ^= DeviceProfileName.GetHashCode();
      if (DeviceName.Length != 0) hash ^= DeviceName.GetHashCode();
      if (DevEui.Length != 0) hash ^= DevEui.GetHashCode();
      hash ^= Tags.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 (TenantId.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(TenantId);
      }
      if (TenantName.Length != 0) {
        output.WriteRawTag(18);
        output.WriteString(TenantName);
      }
      if (ApplicationId.Length != 0) {
        output.WriteRawTag(26);
        output.WriteString(ApplicationId);
      }
      if (ApplicationName.Length != 0) {
        output.WriteRawTag(34);
        output.WriteString(ApplicationName);
      }
      if (DeviceProfileId.Length != 0) {
        output.WriteRawTag(42);
        output.WriteString(DeviceProfileId);
      }
      if (DeviceProfileName.Length != 0) {
        output.WriteRawTag(50);
        output.WriteString(DeviceProfileName);
      }
      if (DeviceName.Length != 0) {
        output.WriteRawTag(58);
        output.WriteString(DeviceName);
      }
      if (DevEui.Length != 0) {
        output.WriteRawTag(66);
        output.WriteString(DevEui);
      }
      tags_.WriteTo(output, _map_tags_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 (TenantId.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(TenantId);
      }
      if (TenantName.Length != 0) {
        output.WriteRawTag(18);
        output.WriteString(TenantName);
      }
      if (ApplicationId.Length != 0) {
        output.WriteRawTag(26);
        output.WriteString(ApplicationId);
      }
      if (ApplicationName.Length != 0) {
        output.WriteRawTag(34);
        output.WriteString(ApplicationName);
      }
      if (DeviceProfileId.Length != 0) {
        output.WriteRawTag(42);
        output.WriteString(DeviceProfileId);
      }
      if (DeviceProfileName.Length != 0) {
        output.WriteRawTag(50);
        output.WriteString(DeviceProfileName);
      }
      if (DeviceName.Length != 0) {
        output.WriteRawTag(58);
        output.WriteString(DeviceName);
      }
      if (DevEui.Length != 0) {
        output.WriteRawTag(66);
        output.WriteString(DevEui);
      }
      tags_.WriteTo(ref output, _map_tags_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 (TenantId.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(TenantId);
      }
      if (TenantName.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(TenantName);
      }
      if (ApplicationId.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(ApplicationId);
      }
      if (ApplicationName.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(ApplicationName);
      }
      if (DeviceProfileId.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(DeviceProfileId);
      }
      if (DeviceProfileName.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(DeviceProfileName);
      }
      if (DeviceName.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(DeviceName);
      }
      if (DevEui.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(DevEui);
      }
      size += tags_.CalculateSize(_map_tags_codec);
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(DeviceInfo other) {
      if (other == null) {
        return;
      }
      if (other.TenantId.Length != 0) {
        TenantId = other.TenantId;
      }
      if (other.TenantName.Length != 0) {
        TenantName = other.TenantName;
      }
      if (other.ApplicationId.Length != 0) {
        ApplicationId = other.ApplicationId;
      }
      if (other.ApplicationName.Length != 0) {
        ApplicationName = other.ApplicationName;
      }
      if (other.DeviceProfileId.Length != 0) {
        DeviceProfileId = other.DeviceProfileId;
      }
      if (other.DeviceProfileName.Length != 0) {
        DeviceProfileName = other.DeviceProfileName;
      }
      if (other.DeviceName.Length != 0) {
        DeviceName = other.DeviceName;
      }
      if (other.DevEui.Length != 0) {
        DevEui = other.DevEui;
      }
      tags_.Add(other.tags_);
      _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: {
            TenantId = input.ReadString();
            break;
          }
          case 18: {
            TenantName = input.ReadString();
            break;
          }
          case 26: {
            ApplicationId = input.ReadString();
            break;
          }
          case 34: {
            ApplicationName = input.ReadString();
            break;
          }
          case 42: {
            DeviceProfileId = input.ReadString();
            break;
          }
          case 50: {
            DeviceProfileName = input.ReadString();
            break;
          }
          case 58: {
            DeviceName = input.ReadString();
            break;
          }
          case 66: {
            DevEui = input.ReadString();
            break;
          }
          case 74: {
            tags_.AddEntriesFrom(input, _map_tags_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: {
            TenantId = input.ReadString();
            break;
          }
          case 18: {
            TenantName = input.ReadString();
            break;
          }
          case 26: {
            ApplicationId = input.ReadString();
            break;
          }
          case 34: {
            ApplicationName = input.ReadString();
            break;
          }
          case 42: {
            DeviceProfileId = input.ReadString();
            break;
          }
          case 50: {
            DeviceProfileName = input.ReadString();
            break;
          }
          case 58: {
            DeviceName = input.ReadString();
            break;
          }
          case 66: {
            DevEui = input.ReadString();
            break;
          }
          case 74: {
            tags_.AddEntriesFrom(ref input, _map_tags_codec);
            break;
          }
        }
      }
    }
    #endif

  }

  /// <summary>
  /// UplinkEvent is the message sent when an uplink payload has been received.
  /// </summary>
  public sealed partial class UplinkEvent : pb::IMessage<UplinkEvent>
  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      , pb::IBufferMessage
  #endif
  {
    private static readonly pb::MessageParser<UplinkEvent> _parser = new pb::MessageParser<UplinkEvent>(() => new UplinkEvent());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pb::MessageParser<UplinkEvent> Parser { get { return _parser; } }

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

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public UplinkEvent(UplinkEvent other) : this() {
      deduplicationId_ = other.deduplicationId_;
      time_ = other.time_ != null ? other.time_.Clone() : null;
      deviceInfo_ = other.deviceInfo_ != null ? other.deviceInfo_.Clone() : null;
      devAddr_ = other.devAddr_;
      adr_ = other.adr_;
      dr_ = other.dr_;
      fCnt_ = other.fCnt_;
      fPort_ = other.fPort_;
      confirmed_ = other.confirmed_;
      data_ = other.data_;
      object_ = other.object_ != null ? other.object_.Clone() : null;
      rxInfo_ = other.rxInfo_.Clone();
      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 UplinkEvent Clone() {
      return new UplinkEvent(this);
    }

    /// <summary>Field number for the "deduplication_id" field.</summary>
    public const int DeduplicationIdFieldNumber = 1;
    private string deduplicationId_ = "";
    /// <summary>
    /// Deduplication ID (UUID).
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string DeduplicationId {
      get { return deduplicationId_; }
      set {
        deduplicationId_ = 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>
    /// 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;
      }
    }

    /// <summary>Field number for the "device_info" field.</summary>
    public const int DeviceInfoFieldNumber = 3;
    private global::Chirpstack.Integration.DeviceInfo deviceInfo_;
    /// <summary>
    /// Device information.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Integration.DeviceInfo DeviceInfo {
      get { return deviceInfo_; }
      set {
        deviceInfo_ = value;
      }
    }

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

    /// <summary>Field number for the "adr" field.</summary>
    public const int AdrFieldNumber = 5;
    private bool adr_;
    /// <summary>
    /// Device has ADR bit set.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Adr {
      get { return adr_; }
      set {
        adr_ = value;
      }
    }

    /// <summary>Field number for the "dr" field.</summary>
    public const int DrFieldNumber = 6;
    private uint dr_;
    /// <summary>
    /// Data-rate.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint Dr {
      get { return dr_; }
      set {
        dr_ = value;
      }
    }

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

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

    /// <summary>Field number for the "confirmed" field.</summary>
    public const int ConfirmedFieldNumber = 9;
    private bool confirmed_;
    /// <summary>
    /// Uplink was of type confirmed.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Confirmed {
      get { return confirmed_; }
      set {
        confirmed_ = value;
      }
    }

    /// <summary>Field number for the "data" field.</summary>
    public const int DataFieldNumber = 10;
    private pb::ByteString data_ = pb::ByteString.Empty;
    /// <summary>
    /// FRMPayload data.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pb::ByteString Data {
      get { return data_; }
      set {
        data_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "object" field.</summary>
    public const int ObjectFieldNumber = 11;
    private global::Google.Protobuf.WellKnownTypes.Struct object_;
    /// <summary>
    /// Note that this is only set when a codec is configured in the Device Profile.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Google.Protobuf.WellKnownTypes.Struct Object {
      get { return object_; }
      set {
        object_ = value;
      }
    }

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

    /// <summary>Field number for the "tx_info" field.</summary>
    public const int TxInfoFieldNumber = 13;
    private global::Chirpstack.Gateway.UplinkTxInfo txInfo_;
    /// <summary>
    /// TX info.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Gateway.UplinkTxInfo 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 UplinkEvent);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(UplinkEvent other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (DeduplicationId != other.DeduplicationId) return false;
      if (!object.Equals(Time, other.Time)) return false;
      if (!object.Equals(DeviceInfo, other.DeviceInfo)) return false;
      if (DevAddr != other.DevAddr) return false;
      if (Adr != other.Adr) return false;
      if (Dr != other.Dr) return false;
      if (FCnt != other.FCnt) return false;
      if (FPort != other.FPort) return false;
      if (Confirmed != other.Confirmed) return false;
      if (Data != other.Data) return false;
      if (!object.Equals(Object, other.Object)) return false;
      if(!rxInfo_.Equals(other.rxInfo_)) 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 (DeduplicationId.Length != 0) hash ^= DeduplicationId.GetHashCode();
      if (time_ != null) hash ^= Time.GetHashCode();
      if (deviceInfo_ != null) hash ^= DeviceInfo.GetHashCode();
      if (DevAddr.Length != 0) hash ^= DevAddr.GetHashCode();
      if (Adr != false) hash ^= Adr.GetHashCode();
      if (Dr != 0) hash ^= Dr.GetHashCode();
      if (FCnt != 0) hash ^= FCnt.GetHashCode();
      if (FPort != 0) hash ^= FPort.GetHashCode();
      if (Confirmed != false) hash ^= Confirmed.GetHashCode();
      if (Data.Length != 0) hash ^= Data.GetHashCode();
      if (object_ != null) hash ^= Object.GetHashCode();
      hash ^= rxInfo_.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 (DeduplicationId.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(DeduplicationId);
      }
      if (time_ != null) {
        output.WriteRawTag(18);
        output.WriteMessage(Time);
      }
      if (deviceInfo_ != null) {
        output.WriteRawTag(26);
        output.WriteMessage(DeviceInfo);
      }
      if (DevAddr.Length != 0) {
        output.WriteRawTag(34);
        output.WriteString(DevAddr);
      }
      if (Adr != false) {
        output.WriteRawTag(40);
        output.WriteBool(Adr);
      }
      if (Dr != 0) {
        output.WriteRawTag(48);
        output.WriteUInt32(Dr);
      }
      if (FCnt != 0) {
        output.WriteRawTag(56);
        output.WriteUInt32(FCnt);
      }
      if (FPort != 0) {
        output.WriteRawTag(64);
        output.WriteUInt32(FPort);
      }
      if (Confirmed != false) {
        output.WriteRawTag(72);
        output.WriteBool(Confirmed);
      }
      if (Data.Length != 0) {
        output.WriteRawTag(82);
        output.WriteBytes(Data);
      }
      if (object_ != null) {
        output.WriteRawTag(90);
        output.WriteMessage(Object);
      }
      rxInfo_.WriteTo(output, _repeated_rxInfo_codec);
      if (txInfo_ != null) {
        output.WriteRawTag(106);
        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 (DeduplicationId.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(DeduplicationId);
      }
      if (time_ != null) {
        output.WriteRawTag(18);
        output.WriteMessage(Time);
      }
      if (deviceInfo_ != null) {
        output.WriteRawTag(26);
        output.WriteMessage(DeviceInfo);
      }
      if (DevAddr.Length != 0) {
        output.WriteRawTag(34);
        output.WriteString(DevAddr);
      }
      if (Adr != false) {
        output.WriteRawTag(40);
        output.WriteBool(Adr);
      }
      if (Dr != 0) {
        output.WriteRawTag(48);
        output.WriteUInt32(Dr);
      }
      if (FCnt != 0) {
        output.WriteRawTag(56);
        output.WriteUInt32(FCnt);
      }
      if (FPort != 0) {
        output.WriteRawTag(64);
        output.WriteUInt32(FPort);
      }
      if (Confirmed != false) {
        output.WriteRawTag(72);
        output.WriteBool(Confirmed);
      }
      if (Data.Length != 0) {
        output.WriteRawTag(82);
        output.WriteBytes(Data);
      }
      if (object_ != null) {
        output.WriteRawTag(90);
        output.WriteMessage(Object);
      }
      rxInfo_.WriteTo(ref output, _repeated_rxInfo_codec);
      if (txInfo_ != null) {
        output.WriteRawTag(106);
        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 (DeduplicationId.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(DeduplicationId);
      }
      if (time_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Time);
      }
      if (deviceInfo_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(DeviceInfo);
      }
      if (DevAddr.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(DevAddr);
      }
      if (Adr != false) {
        size += 1 + 1;
      }
      if (Dr != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Dr);
      }
      if (FCnt != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(FCnt);
      }
      if (FPort != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(FPort);
      }
      if (Confirmed != false) {
        size += 1 + 1;
      }
      if (Data.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeBytesSize(Data);
      }
      if (object_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Object);
      }
      size += rxInfo_.CalculateSize(_repeated_rxInfo_codec);
      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(UplinkEvent other) {
      if (other == null) {
        return;
      }
      if (other.DeduplicationId.Length != 0) {
        DeduplicationId = other.DeduplicationId;
      }
      if (other.time_ != null) {
        if (time_ == null) {
          Time = new global::Google.Protobuf.WellKnownTypes.Timestamp();
        }
        Time.MergeFrom(other.Time);
      }
      if (other.deviceInfo_ != null) {
        if (deviceInfo_ == null) {
          DeviceInfo = new global::Chirpstack.Integration.DeviceInfo();
        }
        DeviceInfo.MergeFrom(other.DeviceInfo);
      }
      if (other.DevAddr.Length != 0) {
        DevAddr = other.DevAddr;
      }
      if (other.Adr != false) {
        Adr = other.Adr;
      }
      if (other.Dr != 0) {
        Dr = other.Dr;
      }
      if (other.FCnt != 0) {
        FCnt = other.FCnt;
      }
      if (other.FPort != 0) {
        FPort = other.FPort;
      }
      if (other.Confirmed != false) {
        Confirmed = other.Confirmed;
      }
      if (other.Data.Length != 0) {
        Data = other.Data;
      }
      if (other.object_ != null) {
        if (object_ == null) {
          Object = new global::Google.Protobuf.WellKnownTypes.Struct();
        }
        Object.MergeFrom(other.Object);
      }
      rxInfo_.Add(other.rxInfo_);
      if (other.txInfo_ != null) {
        if (txInfo_ == null) {
          TxInfo = new global::Chirpstack.Gateway.UplinkTxInfo();
        }
        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: {
            DeduplicationId = input.ReadString();
            break;
          }
          case 18: {
            if (time_ == null) {
              Time = new global::Google.Protobuf.WellKnownTypes.Timestamp();
            }
            input.ReadMessage(Time);
            break;
          }
          case 26: {
            if (deviceInfo_ == null) {
              DeviceInfo = new global::Chirpstack.Integration.DeviceInfo();
            }
            input.ReadMessage(DeviceInfo);
            break;
          }
          case 34: {
            DevAddr = input.ReadString();
            break;
          }
          case 40: {
            Adr = input.ReadBool();
            break;
          }
          case 48: {
            Dr = input.ReadUInt32();
            break;
          }
          case 56: {
            FCnt = input.ReadUInt32();
            break;
          }
          case 64: {
            FPort = input.ReadUInt32();
            break;
          }
          case 72: {
            Confirmed = input.ReadBool();
            break;
          }
          case 82: {
            Data = input.ReadBytes();
            break;
          }
          case 90: {
            if (object_ == null) {
              Object = new global::Google.Protobuf.WellKnownTypes.Struct();
            }
            input.ReadMessage(Object);
            break;
          }
          case 98: {
            rxInfo_.AddEntriesFrom(input, _repeated_rxInfo_codec);
            break;
          }
          case 106: {
            if (txInfo_ == null) {
              TxInfo = new global::Chirpstack.Gateway.UplinkTxInfo();
            }
            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: {
            DeduplicationId = input.ReadString();
            break;
          }
          case 18: {
            if (time_ == null) {
              Time = new global::Google.Protobuf.WellKnownTypes.Timestamp();
            }
            input.ReadMessage(Time);
            break;
          }
          case 26: {
            if (deviceInfo_ == null) {
              DeviceInfo = new global::Chirpstack.Integration.DeviceInfo();
            }
            input.ReadMessage(DeviceInfo);
            break;
          }
          case 34: {
            DevAddr = input.ReadString();
            break;
          }
          case 40: {
            Adr = input.ReadBool();
            break;
          }
          case 48: {
            Dr = input.ReadUInt32();
            break;
          }
          case 56: {
            FCnt = input.ReadUInt32();
            break;
          }
          case 64: {
            FPort = input.ReadUInt32();
            break;
          }
          case 72: {
            Confirmed = input.ReadBool();
            break;
          }
          case 82: {
            Data = input.ReadBytes();
            break;
          }
          case 90: {
            if (object_ == null) {
              Object = new global::Google.Protobuf.WellKnownTypes.Struct();
            }
            input.ReadMessage(Object);
            break;
          }
          case 98: {
            rxInfo_.AddEntriesFrom(ref input, _repeated_rxInfo_codec);
            break;
          }
          case 106: {
            if (txInfo_ == null) {
              TxInfo = new global::Chirpstack.Gateway.UplinkTxInfo();
            }
            input.ReadMessage(TxInfo);
            break;
          }
        }
      }
    }
    #endif

  }

  /// <summary>
  /// JoinEvent is the message sent when a device joined the network.
  /// Note: this event is sent at the first uplink after OTAA.
  /// </summary>
  public sealed partial class JoinEvent : pb::IMessage<JoinEvent>
  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      , pb::IBufferMessage
  #endif
  {
    private static readonly pb::MessageParser<JoinEvent> _parser = new pb::MessageParser<JoinEvent>(() => new JoinEvent());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pb::MessageParser<JoinEvent> Parser { get { return _parser; } }

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

    partial void OnConstruction();

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

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

    /// <summary>Field number for the "deduplication_id" field.</summary>
    public const int DeduplicationIdFieldNumber = 1;
    private string deduplicationId_ = "";
    /// <summary>
    /// Deduplication ID (UUID).
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string DeduplicationId {
      get { return deduplicationId_; }
      set {
        deduplicationId_ = 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>
    /// 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;
      }
    }

    /// <summary>Field number for the "device_info" field.</summary>
    public const int DeviceInfoFieldNumber = 3;
    private global::Chirpstack.Integration.DeviceInfo deviceInfo_;
    /// <summary>
    /// Device info.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Integration.DeviceInfo DeviceInfo {
      get { return deviceInfo_; }
      set {
        deviceInfo_ = value;
      }
    }

    /// <summary>Field number for the "dev_addr" field.</summary>
    public const int DevAddrFieldNumber = 4;
    private string devAddr_ = "";
    /// <summary>
    /// Device address.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string DevAddr {
      get { return devAddr_; }
      set {
        devAddr_ = 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 JoinEvent);
    }

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(JoinEvent other) {
      if (other == null) {
        return;
      }
      if (other.DeduplicationId.Length != 0) {
        DeduplicationId = other.DeduplicationId;
      }
      if (other.time_ != null) {
        if (time_ == null) {
          Time = new global::Google.Protobuf.WellKnownTypes.Timestamp();
        }
        Time.MergeFrom(other.Time);
      }
      if (other.deviceInfo_ != null) {
        if (deviceInfo_ == null) {
          DeviceInfo = new global::Chirpstack.Integration.DeviceInfo();
        }
        DeviceInfo.MergeFrom(other.DeviceInfo);
      }
      if (other.DevAddr.Length != 0) {
        DevAddr = other.DevAddr;
      }
      _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: {
            DeduplicationId = input.ReadString();
            break;
          }
          case 18: {
            if (time_ == null) {
              Time = new global::Google.Protobuf.WellKnownTypes.Timestamp();
            }
            input.ReadMessage(Time);
            break;
          }
          case 26: {
            if (deviceInfo_ == null) {
              DeviceInfo = new global::Chirpstack.Integration.DeviceInfo();
            }
            input.ReadMessage(DeviceInfo);
            break;
          }
          case 34: {
            DevAddr = 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: {
            DeduplicationId = input.ReadString();
            break;
          }
          case 18: {
            if (time_ == null) {
              Time = new global::Google.Protobuf.WellKnownTypes.Timestamp();
            }
            input.ReadMessage(Time);
            break;
          }
          case 26: {
            if (deviceInfo_ == null) {
              DeviceInfo = new global::Chirpstack.Integration.DeviceInfo();
            }
            input.ReadMessage(DeviceInfo);
            break;
          }
          case 34: {
            DevAddr = input.ReadString();
            break;
          }
        }
      }
    }
    #endif

  }

  /// <summary>
  /// AckEvent is the message sent when a confirmation on a confirmed downlink
  /// has been received -or- when the downlink timed out.
  /// </summary>
  public sealed partial class AckEvent : pb::IMessage<AckEvent>
  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      , pb::IBufferMessage
  #endif
  {
    private static readonly pb::MessageParser<AckEvent> _parser = new pb::MessageParser<AckEvent>(() => new AckEvent());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pb::MessageParser<AckEvent> Parser { get { return _parser; } }

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

    partial void OnConstruction();

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

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

    /// <summary>Field number for the "deduplication_id" field.</summary>
    public const int DeduplicationIdFieldNumber = 1;
    private string deduplicationId_ = "";
    /// <summary>
    /// Deduplication ID (UUID).
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string DeduplicationId {
      get { return deduplicationId_; }
      set {
        deduplicationId_ = 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>
    /// 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;
      }
    }

    /// <summary>Field number for the "device_info" field.</summary>
    public const int DeviceInfoFieldNumber = 3;
    private global::Chirpstack.Integration.DeviceInfo deviceInfo_;
    /// <summary>
    /// Device info.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Integration.DeviceInfo DeviceInfo {
      get { return deviceInfo_; }
      set {
        deviceInfo_ = value;
      }
    }

    /// <summary>Field number for the "queue_item_id" field.</summary>
    public const int QueueItemIdFieldNumber = 4;
    private string queueItemId_ = "";
    /// <summary>
    /// Downlink queue item ID (UUID).
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string QueueItemId {
      get { return queueItemId_; }
      set {
        queueItemId_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "acknowledged" field.</summary>
    public const int AcknowledgedFieldNumber = 5;
    private bool acknowledged_;
    /// <summary>
    /// Frame was acknowledged.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Acknowledged {
      get { return acknowledged_; }
      set {
        acknowledged_ = value;
      }
    }

    /// <summary>Field number for the "f_cnt_down" field.</summary>
    public const int FCntDownFieldNumber = 6;
    private uint fCntDown_;
    /// <summary>
    /// Downlink frame counter to which the acknowledgement relates.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint FCntDown {
      get { return fCntDown_; }
      set {
        fCntDown_ = value;
      }
    }

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(AckEvent other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (DeduplicationId != other.DeduplicationId) return false;
      if (!object.Equals(Time, other.Time)) return false;
      if (!object.Equals(DeviceInfo, other.DeviceInfo)) return false;
      if (QueueItemId != other.QueueItemId) return false;
      if (Acknowledged != other.Acknowledged) return false;
      if (FCntDown != other.FCntDown) 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 (DeduplicationId.Length != 0) hash ^= DeduplicationId.GetHashCode();
      if (time_ != null) hash ^= Time.GetHashCode();
      if (deviceInfo_ != null) hash ^= DeviceInfo.GetHashCode();
      if (QueueItemId.Length != 0) hash ^= QueueItemId.GetHashCode();
      if (Acknowledged != false) hash ^= Acknowledged.GetHashCode();
      if (FCntDown != 0) hash ^= FCntDown.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 (DeduplicationId.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(DeduplicationId);
      }
      if (time_ != null) {
        output.WriteRawTag(18);
        output.WriteMessage(Time);
      }
      if (deviceInfo_ != null) {
        output.WriteRawTag(26);
        output.WriteMessage(DeviceInfo);
      }
      if (QueueItemId.Length != 0) {
        output.WriteRawTag(34);
        output.WriteString(QueueItemId);
      }
      if (Acknowledged != false) {
        output.WriteRawTag(40);
        output.WriteBool(Acknowledged);
      }
      if (FCntDown != 0) {
        output.WriteRawTag(48);
        output.WriteUInt32(FCntDown);
      }
      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 (DeduplicationId.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(DeduplicationId);
      }
      if (time_ != null) {
        output.WriteRawTag(18);
        output.WriteMessage(Time);
      }
      if (deviceInfo_ != null) {
        output.WriteRawTag(26);
        output.WriteMessage(DeviceInfo);
      }
      if (QueueItemId.Length != 0) {
        output.WriteRawTag(34);
        output.WriteString(QueueItemId);
      }
      if (Acknowledged != false) {
        output.WriteRawTag(40);
        output.WriteBool(Acknowledged);
      }
      if (FCntDown != 0) {
        output.WriteRawTag(48);
        output.WriteUInt32(FCntDown);
      }
      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 (DeduplicationId.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(DeduplicationId);
      }
      if (time_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Time);
      }
      if (deviceInfo_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(DeviceInfo);
      }
      if (QueueItemId.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(QueueItemId);
      }
      if (Acknowledged != false) {
        size += 1 + 1;
      }
      if (FCntDown != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(FCntDown);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(AckEvent other) {
      if (other == null) {
        return;
      }
      if (other.DeduplicationId.Length != 0) {
        DeduplicationId = other.DeduplicationId;
      }
      if (other.time_ != null) {
        if (time_ == null) {
          Time = new global::Google.Protobuf.WellKnownTypes.Timestamp();
        }
        Time.MergeFrom(other.Time);
      }
      if (other.deviceInfo_ != null) {
        if (deviceInfo_ == null) {
          DeviceInfo = new global::Chirpstack.Integration.DeviceInfo();
        }
        DeviceInfo.MergeFrom(other.DeviceInfo);
      }
      if (other.QueueItemId.Length != 0) {
        QueueItemId = other.QueueItemId;
      }
      if (other.Acknowledged != false) {
        Acknowledged = other.Acknowledged;
      }
      if (other.FCntDown != 0) {
        FCntDown = other.FCntDown;
      }
      _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: {
            DeduplicationId = input.ReadString();
            break;
          }
          case 18: {
            if (time_ == null) {
              Time = new global::Google.Protobuf.WellKnownTypes.Timestamp();
            }
            input.ReadMessage(Time);
            break;
          }
          case 26: {
            if (deviceInfo_ == null) {
              DeviceInfo = new global::Chirpstack.Integration.DeviceInfo();
            }
            input.ReadMessage(DeviceInfo);
            break;
          }
          case 34: {
            QueueItemId = input.ReadString();
            break;
          }
          case 40: {
            Acknowledged = input.ReadBool();
            break;
          }
          case 48: {
            FCntDown = 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: {
            DeduplicationId = input.ReadString();
            break;
          }
          case 18: {
            if (time_ == null) {
              Time = new global::Google.Protobuf.WellKnownTypes.Timestamp();
            }
            input.ReadMessage(Time);
            break;
          }
          case 26: {
            if (deviceInfo_ == null) {
              DeviceInfo = new global::Chirpstack.Integration.DeviceInfo();
            }
            input.ReadMessage(DeviceInfo);
            break;
          }
          case 34: {
            QueueItemId = input.ReadString();
            break;
          }
          case 40: {
            Acknowledged = input.ReadBool();
            break;
          }
          case 48: {
            FCntDown = input.ReadUInt32();
            break;
          }
        }
      }
    }
    #endif

  }

  /// <summary>
  /// TxAckEvent is the message sent when a downlink was acknowledged by the gateway
  /// for transmission. As a downlink can be scheduled in the future, this event
  /// does not confirm that the message has already been transmitted.
  /// </summary>
  public sealed partial class TxAckEvent : pb::IMessage<TxAckEvent>
  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      , pb::IBufferMessage
  #endif
  {
    private static readonly pb::MessageParser<TxAckEvent> _parser = new pb::MessageParser<TxAckEvent>(() => new TxAckEvent());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pb::MessageParser<TxAckEvent> Parser { get { return _parser; } }

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

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public TxAckEvent(TxAckEvent other) : this() {
      downlinkId_ = other.downlinkId_;
      time_ = other.time_ != null ? other.time_.Clone() : null;
      deviceInfo_ = other.deviceInfo_ != null ? other.deviceInfo_.Clone() : null;
      queueItemId_ = other.queueItemId_;
      fCntDown_ = other.fCntDown_;
      gatewayId_ = other.gatewayId_;
      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 TxAckEvent Clone() {
      return new TxAckEvent(this);
    }

    /// <summary>Field number for the "downlink_id" field.</summary>
    public const int DownlinkIdFieldNumber = 1;
    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 "time" field.</summary>
    public const int TimeFieldNumber = 2;
    private global::Google.Protobuf.WellKnownTypes.Timestamp time_;
    /// <summary>
    /// 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;
      }
    }

    /// <summary>Field number for the "device_info" field.</summary>
    public const int DeviceInfoFieldNumber = 3;
    private global::Chirpstack.Integration.DeviceInfo deviceInfo_;
    /// <summary>
    /// Device info.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Integration.DeviceInfo DeviceInfo {
      get { return deviceInfo_; }
      set {
        deviceInfo_ = value;
      }
    }

    /// <summary>Field number for the "queue_item_id" field.</summary>
    public const int QueueItemIdFieldNumber = 4;
    private string queueItemId_ = "";
    /// <summary>
    /// Downlink queue item ID (UUID).
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string QueueItemId {
      get { return queueItemId_; }
      set {
        queueItemId_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "f_cnt_down" field.</summary>
    public const int FCntDownFieldNumber = 5;
    private uint fCntDown_;
    /// <summary>
    /// Downlink frame-counter.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint FCntDown {
      get { return fCntDown_; }
      set {
        fCntDown_ = 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 "tx_info" field.</summary>
    public const int TxInfoFieldNumber = 7;
    private global::Chirpstack.Gateway.DownlinkTxInfo txInfo_;
    /// <summary>
    /// TX info.
    /// </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 TxAckEvent);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(TxAckEvent other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (DownlinkId != other.DownlinkId) return false;
      if (!object.Equals(Time, other.Time)) return false;
      if (!object.Equals(DeviceInfo, other.DeviceInfo)) return false;
      if (QueueItemId != other.QueueItemId) return false;
      if (FCntDown != other.FCntDown) return false;
      if (GatewayId != other.GatewayId) 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 (DownlinkId != 0) hash ^= DownlinkId.GetHashCode();
      if (time_ != null) hash ^= Time.GetHashCode();
      if (deviceInfo_ != null) hash ^= DeviceInfo.GetHashCode();
      if (QueueItemId.Length != 0) hash ^= QueueItemId.GetHashCode();
      if (FCntDown != 0) hash ^= FCntDown.GetHashCode();
      if (GatewayId.Length != 0) hash ^= GatewayId.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 (DownlinkId != 0) {
        output.WriteRawTag(8);
        output.WriteUInt32(DownlinkId);
      }
      if (time_ != null) {
        output.WriteRawTag(18);
        output.WriteMessage(Time);
      }
      if (deviceInfo_ != null) {
        output.WriteRawTag(26);
        output.WriteMessage(DeviceInfo);
      }
      if (QueueItemId.Length != 0) {
        output.WriteRawTag(34);
        output.WriteString(QueueItemId);
      }
      if (FCntDown != 0) {
        output.WriteRawTag(40);
        output.WriteUInt32(FCntDown);
      }
      if (GatewayId.Length != 0) {
        output.WriteRawTag(50);
        output.WriteString(GatewayId);
      }
      if (txInfo_ != null) {
        output.WriteRawTag(58);
        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 (DownlinkId != 0) {
        output.WriteRawTag(8);
        output.WriteUInt32(DownlinkId);
      }
      if (time_ != null) {
        output.WriteRawTag(18);
        output.WriteMessage(Time);
      }
      if (deviceInfo_ != null) {
        output.WriteRawTag(26);
        output.WriteMessage(DeviceInfo);
      }
      if (QueueItemId.Length != 0) {
        output.WriteRawTag(34);
        output.WriteString(QueueItemId);
      }
      if (FCntDown != 0) {
        output.WriteRawTag(40);
        output.WriteUInt32(FCntDown);
      }
      if (GatewayId.Length != 0) {
        output.WriteRawTag(50);
        output.WriteString(GatewayId);
      }
      if (txInfo_ != null) {
        output.WriteRawTag(58);
        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 (DownlinkId != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(DownlinkId);
      }
      if (time_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Time);
      }
      if (deviceInfo_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(DeviceInfo);
      }
      if (QueueItemId.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(QueueItemId);
      }
      if (FCntDown != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(FCntDown);
      }
      if (GatewayId.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(GatewayId);
      }
      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(TxAckEvent other) {
      if (other == null) {
        return;
      }
      if (other.DownlinkId != 0) {
        DownlinkId = other.DownlinkId;
      }
      if (other.time_ != null) {
        if (time_ == null) {
          Time = new global::Google.Protobuf.WellKnownTypes.Timestamp();
        }
        Time.MergeFrom(other.Time);
      }
      if (other.deviceInfo_ != null) {
        if (deviceInfo_ == null) {
          DeviceInfo = new global::Chirpstack.Integration.DeviceInfo();
        }
        DeviceInfo.MergeFrom(other.DeviceInfo);
      }
      if (other.QueueItemId.Length != 0) {
        QueueItemId = other.QueueItemId;
      }
      if (other.FCntDown != 0) {
        FCntDown = other.FCntDown;
      }
      if (other.GatewayId.Length != 0) {
        GatewayId = other.GatewayId;
      }
      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 8: {
            DownlinkId = input.ReadUInt32();
            break;
          }
          case 18: {
            if (time_ == null) {
              Time = new global::Google.Protobuf.WellKnownTypes.Timestamp();
            }
            input.ReadMessage(Time);
            break;
          }
          case 26: {
            if (deviceInfo_ == null) {
              DeviceInfo = new global::Chirpstack.Integration.DeviceInfo();
            }
            input.ReadMessage(DeviceInfo);
            break;
          }
          case 34: {
            QueueItemId = input.ReadString();
            break;
          }
          case 40: {
            FCntDown = input.ReadUInt32();
            break;
          }
          case 50: {
            GatewayId = input.ReadString();
            break;
          }
          case 58: {
            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 8: {
            DownlinkId = input.ReadUInt32();
            break;
          }
          case 18: {
            if (time_ == null) {
              Time = new global::Google.Protobuf.WellKnownTypes.Timestamp();
            }
            input.ReadMessage(Time);
            break;
          }
          case 26: {
            if (deviceInfo_ == null) {
              DeviceInfo = new global::Chirpstack.Integration.DeviceInfo();
            }
            input.ReadMessage(DeviceInfo);
            break;
          }
          case 34: {
            QueueItemId = input.ReadString();
            break;
          }
          case 40: {
            FCntDown = input.ReadUInt32();
            break;
          }
          case 50: {
            GatewayId = input.ReadString();
            break;
          }
          case 58: {
            if (txInfo_ == null) {
              TxInfo = new global::Chirpstack.Gateway.DownlinkTxInfo();
            }
            input.ReadMessage(TxInfo);
            break;
          }
        }
      }
    }
    #endif

  }

  /// <summary>
  /// LogEvent is the message sent when a device-related log was sent.
  /// </summary>
  public sealed partial class LogEvent : pb::IMessage<LogEvent>
  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      , pb::IBufferMessage
  #endif
  {
    private static readonly pb::MessageParser<LogEvent> _parser = new pb::MessageParser<LogEvent>(() => new LogEvent());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pb::MessageParser<LogEvent> Parser { get { return _parser; } }

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

    partial void OnConstruction();

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

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

    /// <summary>Field number for the "time" field.</summary>
    public const int TimeFieldNumber = 1;
    private global::Google.Protobuf.WellKnownTypes.Timestamp time_;
    /// <summary>
    /// 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;
      }
    }

    /// <summary>Field number for the "device_info" field.</summary>
    public const int DeviceInfoFieldNumber = 2;
    private global::Chirpstack.Integration.DeviceInfo deviceInfo_;
    /// <summary>
    /// Device info.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Integration.DeviceInfo DeviceInfo {
      get { return deviceInfo_; }
      set {
        deviceInfo_ = value;
      }
    }

    /// <summary>Field number for the "level" field.</summary>
    public const int LevelFieldNumber = 3;
    private global::Chirpstack.Integration.LogLevel level_ = global::Chirpstack.Integration.LogLevel.Info;
    /// <summary>
    /// Log level.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Integration.LogLevel Level {
      get { return level_; }
      set {
        level_ = value;
      }
    }

    /// <summary>Field number for the "code" field.</summary>
    public const int CodeFieldNumber = 4;
    private global::Chirpstack.Integration.LogCode code_ = global::Chirpstack.Integration.LogCode.Unknown;
    /// <summary>
    /// Log code.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Integration.LogCode Code {
      get { return code_; }
      set {
        code_ = value;
      }
    }

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

    /// <summary>Field number for the "context" field.</summary>
    public const int ContextFieldNumber = 6;
    private static readonly pbc::MapField<string, string>.Codec _map_context_codec
        = new pbc::MapField<string, string>.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForString(18, ""), 50);
    private readonly pbc::MapField<string, string> context_ = new pbc::MapField<string, string>();
    /// <summary>
    /// Context map.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pbc::MapField<string, string> Context {
      get { return context_; }
    }

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(LogEvent other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (!object.Equals(Time, other.Time)) return false;
      if (!object.Equals(DeviceInfo, other.DeviceInfo)) return false;
      if (Level != other.Level) return false;
      if (Code != other.Code) return false;
      if (Description != other.Description) return false;
      if (!Context.Equals(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 (time_ != null) hash ^= Time.GetHashCode();
      if (deviceInfo_ != null) hash ^= DeviceInfo.GetHashCode();
      if (Level != global::Chirpstack.Integration.LogLevel.Info) hash ^= Level.GetHashCode();
      if (Code != global::Chirpstack.Integration.LogCode.Unknown) hash ^= Code.GetHashCode();
      if (Description.Length != 0) hash ^= Description.GetHashCode();
      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 (time_ != null) {
        output.WriteRawTag(10);
        output.WriteMessage(Time);
      }
      if (deviceInfo_ != null) {
        output.WriteRawTag(18);
        output.WriteMessage(DeviceInfo);
      }
      if (Level != global::Chirpstack.Integration.LogLevel.Info) {
        output.WriteRawTag(24);
        output.WriteEnum((int) Level);
      }
      if (Code != global::Chirpstack.Integration.LogCode.Unknown) {
        output.WriteRawTag(32);
        output.WriteEnum((int) Code);
      }
      if (Description.Length != 0) {
        output.WriteRawTag(42);
        output.WriteString(Description);
      }
      context_.WriteTo(output, _map_context_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 (time_ != null) {
        output.WriteRawTag(10);
        output.WriteMessage(Time);
      }
      if (deviceInfo_ != null) {
        output.WriteRawTag(18);
        output.WriteMessage(DeviceInfo);
      }
      if (Level != global::Chirpstack.Integration.LogLevel.Info) {
        output.WriteRawTag(24);
        output.WriteEnum((int) Level);
      }
      if (Code != global::Chirpstack.Integration.LogCode.Unknown) {
        output.WriteRawTag(32);
        output.WriteEnum((int) Code);
      }
      if (Description.Length != 0) {
        output.WriteRawTag(42);
        output.WriteString(Description);
      }
      context_.WriteTo(ref output, _map_context_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 (time_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Time);
      }
      if (deviceInfo_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(DeviceInfo);
      }
      if (Level != global::Chirpstack.Integration.LogLevel.Info) {
        size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Level);
      }
      if (Code != global::Chirpstack.Integration.LogCode.Unknown) {
        size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Code);
      }
      if (Description.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Description);
      }
      size += context_.CalculateSize(_map_context_codec);
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(LogEvent other) {
      if (other == null) {
        return;
      }
      if (other.time_ != null) {
        if (time_ == null) {
          Time = new global::Google.Protobuf.WellKnownTypes.Timestamp();
        }
        Time.MergeFrom(other.Time);
      }
      if (other.deviceInfo_ != null) {
        if (deviceInfo_ == null) {
          DeviceInfo = new global::Chirpstack.Integration.DeviceInfo();
        }
        DeviceInfo.MergeFrom(other.DeviceInfo);
      }
      if (other.Level != global::Chirpstack.Integration.LogLevel.Info) {
        Level = other.Level;
      }
      if (other.Code != global::Chirpstack.Integration.LogCode.Unknown) {
        Code = other.Code;
      }
      if (other.Description.Length != 0) {
        Description = other.Description;
      }
      context_.Add(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 10: {
            if (time_ == null) {
              Time = new global::Google.Protobuf.WellKnownTypes.Timestamp();
            }
            input.ReadMessage(Time);
            break;
          }
          case 18: {
            if (deviceInfo_ == null) {
              DeviceInfo = new global::Chirpstack.Integration.DeviceInfo();
            }
            input.ReadMessage(DeviceInfo);
            break;
          }
          case 24: {
            Level = (global::Chirpstack.Integration.LogLevel) input.ReadEnum();
            break;
          }
          case 32: {
            Code = (global::Chirpstack.Integration.LogCode) input.ReadEnum();
            break;
          }
          case 42: {
            Description = input.ReadString();
            break;
          }
          case 50: {
            context_.AddEntriesFrom(input, _map_context_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: {
            if (time_ == null) {
              Time = new global::Google.Protobuf.WellKnownTypes.Timestamp();
            }
            input.ReadMessage(Time);
            break;
          }
          case 18: {
            if (deviceInfo_ == null) {
              DeviceInfo = new global::Chirpstack.Integration.DeviceInfo();
            }
            input.ReadMessage(DeviceInfo);
            break;
          }
          case 24: {
            Level = (global::Chirpstack.Integration.LogLevel) input.ReadEnum();
            break;
          }
          case 32: {
            Code = (global::Chirpstack.Integration.LogCode) input.ReadEnum();
            break;
          }
          case 42: {
            Description = input.ReadString();
            break;
          }
          case 50: {
            context_.AddEntriesFrom(ref input, _map_context_codec);
            break;
          }
        }
      }
    }
    #endif

  }

  /// <summary>
  /// StatusEvent is the message sent when a device-status mac-command was sent
  /// by the device.
  /// </summary>
  public sealed partial class StatusEvent : pb::IMessage<StatusEvent>
  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      , pb::IBufferMessage
  #endif
  {
    private static readonly pb::MessageParser<StatusEvent> _parser = new pb::MessageParser<StatusEvent>(() => new StatusEvent());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pb::MessageParser<StatusEvent> Parser { get { return _parser; } }

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

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public StatusEvent(StatusEvent other) : this() {
      deduplicationId_ = other.deduplicationId_;
      time_ = other.time_ != null ? other.time_.Clone() : null;
      deviceInfo_ = other.deviceInfo_ != null ? other.deviceInfo_.Clone() : null;
      margin_ = other.margin_;
      externalPowerSource_ = other.externalPowerSource_;
      batteryLevelUnavailable_ = other.batteryLevelUnavailable_;
      batteryLevel_ = other.batteryLevel_;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

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

    /// <summary>Field number for the "deduplication_id" field.</summary>
    public const int DeduplicationIdFieldNumber = 1;
    private string deduplicationId_ = "";
    /// <summary>
    /// Deduplication ID (UUID).
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string DeduplicationId {
      get { return deduplicationId_; }
      set {
        deduplicationId_ = 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>
    /// 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;
      }
    }

    /// <summary>Field number for the "device_info" field.</summary>
    public const int DeviceInfoFieldNumber = 3;
    private global::Chirpstack.Integration.DeviceInfo deviceInfo_;
    /// <summary>
    /// Device info.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Integration.DeviceInfo DeviceInfo {
      get { return deviceInfo_; }
      set {
        deviceInfo_ = value;
      }
    }

    /// <summary>Field number for the "margin" field.</summary>
    public const int MarginFieldNumber = 5;
    private int margin_;
    /// <summary>
    /// The demodulation signal-to-noise ratio in dB for the last successfully
    /// received device-status request by the Network Server.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public int Margin {
      get { return margin_; }
      set {
        margin_ = value;
      }
    }

    /// <summary>Field number for the "external_power_source" field.</summary>
    public const int ExternalPowerSourceFieldNumber = 6;
    private bool externalPowerSource_;
    /// <summary>
    /// Device is connected to an external power source.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool ExternalPowerSource {
      get { return externalPowerSource_; }
      set {
        externalPowerSource_ = value;
      }
    }

    /// <summary>Field number for the "battery_level_unavailable" field.</summary>
    public const int BatteryLevelUnavailableFieldNumber = 7;
    private bool batteryLevelUnavailable_;
    /// <summary>
    /// Battery level is not available.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool BatteryLevelUnavailable {
      get { return batteryLevelUnavailable_; }
      set {
        batteryLevelUnavailable_ = value;
      }
    }

    /// <summary>Field number for the "battery_level" field.</summary>
    public const int BatteryLevelFieldNumber = 8;
    private float batteryLevel_;
    /// <summary>
    /// Battery level.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public float BatteryLevel {
      get { return batteryLevel_; }
      set {
        batteryLevel_ = value;
      }
    }

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(StatusEvent other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (DeduplicationId != other.DeduplicationId) return false;
      if (!object.Equals(Time, other.Time)) return false;
      if (!object.Equals(DeviceInfo, other.DeviceInfo)) return false;
      if (Margin != other.Margin) return false;
      if (ExternalPowerSource != other.ExternalPowerSource) return false;
      if (BatteryLevelUnavailable != other.BatteryLevelUnavailable) return false;
      if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(BatteryLevel, other.BatteryLevel)) 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 (DeduplicationId.Length != 0) hash ^= DeduplicationId.GetHashCode();
      if (time_ != null) hash ^= Time.GetHashCode();
      if (deviceInfo_ != null) hash ^= DeviceInfo.GetHashCode();
      if (Margin != 0) hash ^= Margin.GetHashCode();
      if (ExternalPowerSource != false) hash ^= ExternalPowerSource.GetHashCode();
      if (BatteryLevelUnavailable != false) hash ^= BatteryLevelUnavailable.GetHashCode();
      if (BatteryLevel != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(BatteryLevel);
      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 (DeduplicationId.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(DeduplicationId);
      }
      if (time_ != null) {
        output.WriteRawTag(18);
        output.WriteMessage(Time);
      }
      if (deviceInfo_ != null) {
        output.WriteRawTag(26);
        output.WriteMessage(DeviceInfo);
      }
      if (Margin != 0) {
        output.WriteRawTag(40);
        output.WriteInt32(Margin);
      }
      if (ExternalPowerSource != false) {
        output.WriteRawTag(48);
        output.WriteBool(ExternalPowerSource);
      }
      if (BatteryLevelUnavailable != false) {
        output.WriteRawTag(56);
        output.WriteBool(BatteryLevelUnavailable);
      }
      if (BatteryLevel != 0F) {
        output.WriteRawTag(69);
        output.WriteFloat(BatteryLevel);
      }
      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 (DeduplicationId.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(DeduplicationId);
      }
      if (time_ != null) {
        output.WriteRawTag(18);
        output.WriteMessage(Time);
      }
      if (deviceInfo_ != null) {
        output.WriteRawTag(26);
        output.WriteMessage(DeviceInfo);
      }
      if (Margin != 0) {
        output.WriteRawTag(40);
        output.WriteInt32(Margin);
      }
      if (ExternalPowerSource != false) {
        output.WriteRawTag(48);
        output.WriteBool(ExternalPowerSource);
      }
      if (BatteryLevelUnavailable != false) {
        output.WriteRawTag(56);
        output.WriteBool(BatteryLevelUnavailable);
      }
      if (BatteryLevel != 0F) {
        output.WriteRawTag(69);
        output.WriteFloat(BatteryLevel);
      }
      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 (DeduplicationId.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(DeduplicationId);
      }
      if (time_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Time);
      }
      if (deviceInfo_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(DeviceInfo);
      }
      if (Margin != 0) {
        size += 1 + pb::CodedOutputStream.ComputeInt32Size(Margin);
      }
      if (ExternalPowerSource != false) {
        size += 1 + 1;
      }
      if (BatteryLevelUnavailable != false) {
        size += 1 + 1;
      }
      if (BatteryLevel != 0F) {
        size += 1 + 4;
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(StatusEvent other) {
      if (other == null) {
        return;
      }
      if (other.DeduplicationId.Length != 0) {
        DeduplicationId = other.DeduplicationId;
      }
      if (other.time_ != null) {
        if (time_ == null) {
          Time = new global::Google.Protobuf.WellKnownTypes.Timestamp();
        }
        Time.MergeFrom(other.Time);
      }
      if (other.deviceInfo_ != null) {
        if (deviceInfo_ == null) {
          DeviceInfo = new global::Chirpstack.Integration.DeviceInfo();
        }
        DeviceInfo.MergeFrom(other.DeviceInfo);
      }
      if (other.Margin != 0) {
        Margin = other.Margin;
      }
      if (other.ExternalPowerSource != false) {
        ExternalPowerSource = other.ExternalPowerSource;
      }
      if (other.BatteryLevelUnavailable != false) {
        BatteryLevelUnavailable = other.BatteryLevelUnavailable;
      }
      if (other.BatteryLevel != 0F) {
        BatteryLevel = other.BatteryLevel;
      }
      _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: {
            DeduplicationId = input.ReadString();
            break;
          }
          case 18: {
            if (time_ == null) {
              Time = new global::Google.Protobuf.WellKnownTypes.Timestamp();
            }
            input.ReadMessage(Time);
            break;
          }
          case 26: {
            if (deviceInfo_ == null) {
              DeviceInfo = new global::Chirpstack.Integration.DeviceInfo();
            }
            input.ReadMessage(DeviceInfo);
            break;
          }
          case 40: {
            Margin = input.ReadInt32();
            break;
          }
          case 48: {
            ExternalPowerSource = input.ReadBool();
            break;
          }
          case 56: {
            BatteryLevelUnavailable = input.ReadBool();
            break;
          }
          case 69: {
            BatteryLevel = input.ReadFloat();
            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: {
            DeduplicationId = input.ReadString();
            break;
          }
          case 18: {
            if (time_ == null) {
              Time = new global::Google.Protobuf.WellKnownTypes.Timestamp();
            }
            input.ReadMessage(Time);
            break;
          }
          case 26: {
            if (deviceInfo_ == null) {
              DeviceInfo = new global::Chirpstack.Integration.DeviceInfo();
            }
            input.ReadMessage(DeviceInfo);
            break;
          }
          case 40: {
            Margin = input.ReadInt32();
            break;
          }
          case 48: {
            ExternalPowerSource = input.ReadBool();
            break;
          }
          case 56: {
            BatteryLevelUnavailable = input.ReadBool();
            break;
          }
          case 69: {
            BatteryLevel = input.ReadFloat();
            break;
          }
        }
      }
    }
    #endif

  }

  /// <summary>
  /// LocationEvent is the message sent when a geolocation resolve was returned.
  /// </summary>
  public sealed partial class LocationEvent : pb::IMessage<LocationEvent>
  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      , pb::IBufferMessage
  #endif
  {
    private static readonly pb::MessageParser<LocationEvent> _parser = new pb::MessageParser<LocationEvent>(() => new LocationEvent());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pb::MessageParser<LocationEvent> Parser { get { return _parser; } }

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

    partial void OnConstruction();

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

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

    /// <summary>Field number for the "deduplication_id" field.</summary>
    public const int DeduplicationIdFieldNumber = 1;
    private string deduplicationId_ = "";
    /// <summary>
    /// Deduplication ID (UUID).
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string DeduplicationId {
      get { return deduplicationId_; }
      set {
        deduplicationId_ = 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>
    /// 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;
      }
    }

    /// <summary>Field number for the "device_info" field.</summary>
    public const int DeviceInfoFieldNumber = 3;
    private global::Chirpstack.Integration.DeviceInfo deviceInfo_;
    /// <summary>
    /// Device info.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Integration.DeviceInfo DeviceInfo {
      get { return deviceInfo_; }
      set {
        deviceInfo_ = value;
      }
    }

    /// <summary>Field number for the "location" field.</summary>
    public const int LocationFieldNumber = 4;
    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;
      }
    }

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(LocationEvent other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (DeduplicationId != other.DeduplicationId) return false;
      if (!object.Equals(Time, other.Time)) return false;
      if (!object.Equals(DeviceInfo, other.DeviceInfo)) return false;
      if (!object.Equals(Location, other.Location)) 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 (DeduplicationId.Length != 0) hash ^= DeduplicationId.GetHashCode();
      if (time_ != null) hash ^= Time.GetHashCode();
      if (deviceInfo_ != null) hash ^= DeviceInfo.GetHashCode();
      if (location_ != null) hash ^= Location.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 (DeduplicationId.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(DeduplicationId);
      }
      if (time_ != null) {
        output.WriteRawTag(18);
        output.WriteMessage(Time);
      }
      if (deviceInfo_ != null) {
        output.WriteRawTag(26);
        output.WriteMessage(DeviceInfo);
      }
      if (location_ != null) {
        output.WriteRawTag(34);
        output.WriteMessage(Location);
      }
      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 (DeduplicationId.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(DeduplicationId);
      }
      if (time_ != null) {
        output.WriteRawTag(18);
        output.WriteMessage(Time);
      }
      if (deviceInfo_ != null) {
        output.WriteRawTag(26);
        output.WriteMessage(DeviceInfo);
      }
      if (location_ != null) {
        output.WriteRawTag(34);
        output.WriteMessage(Location);
      }
      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 (DeduplicationId.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(DeduplicationId);
      }
      if (time_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Time);
      }
      if (deviceInfo_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(DeviceInfo);
      }
      if (location_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Location);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(LocationEvent other) {
      if (other == null) {
        return;
      }
      if (other.DeduplicationId.Length != 0) {
        DeduplicationId = other.DeduplicationId;
      }
      if (other.time_ != null) {
        if (time_ == null) {
          Time = new global::Google.Protobuf.WellKnownTypes.Timestamp();
        }
        Time.MergeFrom(other.Time);
      }
      if (other.deviceInfo_ != null) {
        if (deviceInfo_ == null) {
          DeviceInfo = new global::Chirpstack.Integration.DeviceInfo();
        }
        DeviceInfo.MergeFrom(other.DeviceInfo);
      }
      if (other.location_ != null) {
        if (location_ == null) {
          Location = new global::Chirpstack.Common.Location();
        }
        Location.MergeFrom(other.Location);
      }
      _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: {
            DeduplicationId = input.ReadString();
            break;
          }
          case 18: {
            if (time_ == null) {
              Time = new global::Google.Protobuf.WellKnownTypes.Timestamp();
            }
            input.ReadMessage(Time);
            break;
          }
          case 26: {
            if (deviceInfo_ == null) {
              DeviceInfo = new global::Chirpstack.Integration.DeviceInfo();
            }
            input.ReadMessage(DeviceInfo);
            break;
          }
          case 34: {
            if (location_ == null) {
              Location = new global::Chirpstack.Common.Location();
            }
            input.ReadMessage(Location);
            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: {
            DeduplicationId = input.ReadString();
            break;
          }
          case 18: {
            if (time_ == null) {
              Time = new global::Google.Protobuf.WellKnownTypes.Timestamp();
            }
            input.ReadMessage(Time);
            break;
          }
          case 26: {
            if (deviceInfo_ == null) {
              DeviceInfo = new global::Chirpstack.Integration.DeviceInfo();
            }
            input.ReadMessage(DeviceInfo);
            break;
          }
          case 34: {
            if (location_ == null) {
              Location = new global::Chirpstack.Common.Location();
            }
            input.ReadMessage(Location);
            break;
          }
        }
      }
    }
    #endif

  }

  /// <summary>
  /// IntegrationEvent is the message that can be sent by an integration.
  /// It allows for sending events which are provided by an external integration
  /// which are "not native" to ChirpStack.
  /// </summary>
  public sealed partial class IntegrationEvent : pb::IMessage<IntegrationEvent>
  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      , pb::IBufferMessage
  #endif
  {
    private static readonly pb::MessageParser<IntegrationEvent> _parser = new pb::MessageParser<IntegrationEvent>(() => new IntegrationEvent());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pb::MessageParser<IntegrationEvent> Parser { get { return _parser; } }

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

    partial void OnConstruction();

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

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

    /// <summary>Field number for the "deduplication_id" field.</summary>
    public const int DeduplicationIdFieldNumber = 1;
    private string deduplicationId_ = "";
    /// <summary>
    /// Deduplication ID (UUID).
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string DeduplicationId {
      get { return deduplicationId_; }
      set {
        deduplicationId_ = 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>
    /// 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;
      }
    }

    /// <summary>Field number for the "device_info" field.</summary>
    public const int DeviceInfoFieldNumber = 3;
    private global::Chirpstack.Integration.DeviceInfo deviceInfo_;
    /// <summary>
    /// Device info.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Integration.DeviceInfo DeviceInfo {
      get { return deviceInfo_; }
      set {
        deviceInfo_ = value;
      }
    }

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

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

    /// <summary>Field number for the "object" field.</summary>
    public const int ObjectFieldNumber = 6;
    private global::Google.Protobuf.WellKnownTypes.Struct object_;
    /// <summary>
    /// Struct containing the event object.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Google.Protobuf.WellKnownTypes.Struct Object {
      get { return object_; }
      set {
        object_ = value;
      }
    }

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(IntegrationEvent other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (DeduplicationId != other.DeduplicationId) return false;
      if (!object.Equals(Time, other.Time)) return false;
      if (!object.Equals(DeviceInfo, other.DeviceInfo)) return false;
      if (IntegrationName != other.IntegrationName) return false;
      if (EventType != other.EventType) return false;
      if (!object.Equals(Object, other.Object)) 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 (DeduplicationId.Length != 0) hash ^= DeduplicationId.GetHashCode();
      if (time_ != null) hash ^= Time.GetHashCode();
      if (deviceInfo_ != null) hash ^= DeviceInfo.GetHashCode();
      if (IntegrationName.Length != 0) hash ^= IntegrationName.GetHashCode();
      if (EventType.Length != 0) hash ^= EventType.GetHashCode();
      if (object_ != null) hash ^= Object.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 (DeduplicationId.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(DeduplicationId);
      }
      if (time_ != null) {
        output.WriteRawTag(18);
        output.WriteMessage(Time);
      }
      if (deviceInfo_ != null) {
        output.WriteRawTag(26);
        output.WriteMessage(DeviceInfo);
      }
      if (IntegrationName.Length != 0) {
        output.WriteRawTag(34);
        output.WriteString(IntegrationName);
      }
      if (EventType.Length != 0) {
        output.WriteRawTag(42);
        output.WriteString(EventType);
      }
      if (object_ != null) {
        output.WriteRawTag(50);
        output.WriteMessage(Object);
      }
      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 (DeduplicationId.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(DeduplicationId);
      }
      if (time_ != null) {
        output.WriteRawTag(18);
        output.WriteMessage(Time);
      }
      if (deviceInfo_ != null) {
        output.WriteRawTag(26);
        output.WriteMessage(DeviceInfo);
      }
      if (IntegrationName.Length != 0) {
        output.WriteRawTag(34);
        output.WriteString(IntegrationName);
      }
      if (EventType.Length != 0) {
        output.WriteRawTag(42);
        output.WriteString(EventType);
      }
      if (object_ != null) {
        output.WriteRawTag(50);
        output.WriteMessage(Object);
      }
      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 (DeduplicationId.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(DeduplicationId);
      }
      if (time_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Time);
      }
      if (deviceInfo_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(DeviceInfo);
      }
      if (IntegrationName.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(IntegrationName);
      }
      if (EventType.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(EventType);
      }
      if (object_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Object);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(IntegrationEvent other) {
      if (other == null) {
        return;
      }
      if (other.DeduplicationId.Length != 0) {
        DeduplicationId = other.DeduplicationId;
      }
      if (other.time_ != null) {
        if (time_ == null) {
          Time = new global::Google.Protobuf.WellKnownTypes.Timestamp();
        }
        Time.MergeFrom(other.Time);
      }
      if (other.deviceInfo_ != null) {
        if (deviceInfo_ == null) {
          DeviceInfo = new global::Chirpstack.Integration.DeviceInfo();
        }
        DeviceInfo.MergeFrom(other.DeviceInfo);
      }
      if (other.IntegrationName.Length != 0) {
        IntegrationName = other.IntegrationName;
      }
      if (other.EventType.Length != 0) {
        EventType = other.EventType;
      }
      if (other.object_ != null) {
        if (object_ == null) {
          Object = new global::Google.Protobuf.WellKnownTypes.Struct();
        }
        Object.MergeFrom(other.Object);
      }
      _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: {
            DeduplicationId = input.ReadString();
            break;
          }
          case 18: {
            if (time_ == null) {
              Time = new global::Google.Protobuf.WellKnownTypes.Timestamp();
            }
            input.ReadMessage(Time);
            break;
          }
          case 26: {
            if (deviceInfo_ == null) {
              DeviceInfo = new global::Chirpstack.Integration.DeviceInfo();
            }
            input.ReadMessage(DeviceInfo);
            break;
          }
          case 34: {
            IntegrationName = input.ReadString();
            break;
          }
          case 42: {
            EventType = input.ReadString();
            break;
          }
          case 50: {
            if (object_ == null) {
              Object = new global::Google.Protobuf.WellKnownTypes.Struct();
            }
            input.ReadMessage(Object);
            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: {
            DeduplicationId = input.ReadString();
            break;
          }
          case 18: {
            if (time_ == null) {
              Time = new global::Google.Protobuf.WellKnownTypes.Timestamp();
            }
            input.ReadMessage(Time);
            break;
          }
          case 26: {
            if (deviceInfo_ == null) {
              DeviceInfo = new global::Chirpstack.Integration.DeviceInfo();
            }
            input.ReadMessage(DeviceInfo);
            break;
          }
          case 34: {
            IntegrationName = input.ReadString();
            break;
          }
          case 42: {
            EventType = input.ReadString();
            break;
          }
          case 50: {
            if (object_ == null) {
              Object = new global::Google.Protobuf.WellKnownTypes.Struct();
            }
            input.ReadMessage(Object);
            break;
          }
        }
      }
    }
    #endif

  }

  /// <summary>
  /// DownlinkCommand is the command to enqueue a downlink payload for the given
  /// device.
  /// </summary>
  public sealed partial class DownlinkCommand : pb::IMessage<DownlinkCommand>
  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      , pb::IBufferMessage
  #endif
  {
    private static readonly pb::MessageParser<DownlinkCommand> _parser = new pb::MessageParser<DownlinkCommand>(() => new DownlinkCommand());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pb::MessageParser<DownlinkCommand> Parser { get { return _parser; } }

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

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public DownlinkCommand(DownlinkCommand other) : this() {
      id_ = other.id_;
      devEui_ = other.devEui_;
      confirmed_ = other.confirmed_;
      fPort_ = other.fPort_;
      data_ = other.data_;
      object_ = other.object_ != null ? other.object_.Clone() : null;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

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

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

    /// <summary>Field number for the "dev_eui" field.</summary>
    public const int DevEuiFieldNumber = 2;
    private string devEui_ = "";
    /// <summary>
    /// Device EUI (EUI64).
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string DevEui {
      get { return devEui_; }
      set {
        devEui_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "confirmed" field.</summary>
    public const int ConfirmedFieldNumber = 3;
    private bool confirmed_;
    /// <summary>
    /// Confirmed.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Confirmed {
      get { return confirmed_; }
      set {
        confirmed_ = value;
      }
    }

    /// <summary>Field number for the "f_port" field.</summary>
    public const int FPortFieldNumber = 4;
    private uint fPort_;
    /// <summary>
    /// FPort (must be > 0).
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint FPort {
      get { return fPort_; }
      set {
        fPort_ = value;
      }
    }

    /// <summary>Field number for the "data" field.</summary>
    public const int DataFieldNumber = 5;
    private pb::ByteString data_ = pb::ByteString.Empty;
    /// <summary>
    /// Data.
    /// Or use the json_object field when a codec has been configured.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pb::ByteString Data {
      get { return data_; }
      set {
        data_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "object" field.</summary>
    public const int ObjectFieldNumber = 6;
    private global::Google.Protobuf.WellKnownTypes.Struct object_;
    /// <summary>
    /// Only use this when a codec has been configured that can encode this
    /// object to bytes.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Google.Protobuf.WellKnownTypes.Struct Object {
      get { return object_; }
      set {
        object_ = value;
      }
    }

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

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

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

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void WriteTo(pb::CodedOutputStream output) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      output.WriteRawMessage(this);
    #else
      if (Id.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(Id);
      }
      if (DevEui.Length != 0) {
        output.WriteRawTag(18);
        output.WriteString(DevEui);
      }
      if (Confirmed != false) {
        output.WriteRawTag(24);
        output.WriteBool(Confirmed);
      }
      if (FPort != 0) {
        output.WriteRawTag(32);
        output.WriteUInt32(FPort);
      }
      if (Data.Length != 0) {
        output.WriteRawTag(42);
        output.WriteBytes(Data);
      }
      if (object_ != null) {
        output.WriteRawTag(50);
        output.WriteMessage(Object);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
      if (Id.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(Id);
      }
      if (DevEui.Length != 0) {
        output.WriteRawTag(18);
        output.WriteString(DevEui);
      }
      if (Confirmed != false) {
        output.WriteRawTag(24);
        output.WriteBool(Confirmed);
      }
      if (FPort != 0) {
        output.WriteRawTag(32);
        output.WriteUInt32(FPort);
      }
      if (Data.Length != 0) {
        output.WriteRawTag(42);
        output.WriteBytes(Data);
      }
      if (object_ != null) {
        output.WriteRawTag(50);
        output.WriteMessage(Object);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(ref output);
      }
    }
    #endif

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public int CalculateSize() {
      int size = 0;
      if (Id.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Id);
      }
      if (DevEui.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(DevEui);
      }
      if (Confirmed != false) {
        size += 1 + 1;
      }
      if (FPort != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(FPort);
      }
      if (Data.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeBytesSize(Data);
      }
      if (object_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Object);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(DownlinkCommand other) {
      if (other == null) {
        return;
      }
      if (other.Id.Length != 0) {
        Id = other.Id;
      }
      if (other.DevEui.Length != 0) {
        DevEui = other.DevEui;
      }
      if (other.Confirmed != false) {
        Confirmed = other.Confirmed;
      }
      if (other.FPort != 0) {
        FPort = other.FPort;
      }
      if (other.Data.Length != 0) {
        Data = other.Data;
      }
      if (other.object_ != null) {
        if (object_ == null) {
          Object = new global::Google.Protobuf.WellKnownTypes.Struct();
        }
        Object.MergeFrom(other.Object);
      }
      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(pb::CodedInputStream input) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      input.ReadRawMessage(this);
    #else
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
            break;
          case 10: {
            Id = input.ReadString();
            break;
          }
          case 18: {
            DevEui = input.ReadString();
            break;
          }
          case 24: {
            Confirmed = input.ReadBool();
            break;
          }
          case 32: {
            FPort = input.ReadUInt32();
            break;
          }
          case 42: {
            Data = input.ReadBytes();
            break;
          }
          case 50: {
            if (object_ == null) {
              Object = new global::Google.Protobuf.WellKnownTypes.Struct();
            }
            input.ReadMessage(Object);
            break;
          }
        }
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
            break;
          case 10: {
            Id = input.ReadString();
            break;
          }
          case 18: {
            DevEui = input.ReadString();
            break;
          }
          case 24: {
            Confirmed = input.ReadBool();
            break;
          }
          case 32: {
            FPort = input.ReadUInt32();
            break;
          }
          case 42: {
            Data = input.ReadBytes();
            break;
          }
          case 50: {
            if (object_ == null) {
              Object = new global::Google.Protobuf.WellKnownTypes.Struct();
            }
            input.ReadMessage(Object);
            break;
          }
        }
      }
    }
    #endif

  }

  #endregion

}

#endregion Designer generated code
