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

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

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

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

    static GatewayReflection() {
      byte[] descriptorData = global::System.Convert.FromBase64String(
          string.Concat(
            "ChFhcGkvZ2F0ZXdheS5wcm90bxIDYXBpGhxnb29nbGUvYXBpL2Fubm90YXRp",
            "b25zLnByb3RvGh9nb29nbGUvcHJvdG9idWYvdGltZXN0YW1wLnByb3RvGhtn",
            "b29nbGUvcHJvdG9idWYvZW1wdHkucHJvdG8aE2NvbW1vbi9jb21tb24ucHJv",
            "dG8iwQIKB0dhdGV3YXkSEgoKZ2F0ZXdheV9pZBgBIAEoCRIMCgRuYW1lGAIg",
            "ASgJEhMKC2Rlc2NyaXB0aW9uGAMgASgJEiIKCGxvY2F0aW9uGAQgASgLMhAu",
            "Y29tbW9uLkxvY2F0aW9uEhEKCXRlbmFudF9pZBgFIAEoCRIkCgR0YWdzGAYg",
            "AygLMhYuYXBpLkdhdGV3YXkuVGFnc0VudHJ5EiwKCG1ldGFkYXRhGAcgAygL",
            "MhouYXBpLkdhdGV3YXkuTWV0YWRhdGFFbnRyeRIWCg5zdGF0c19pbnRlcnZh",
            "bBgIIAEoDRorCglUYWdzRW50cnkSCwoDa2V5GAEgASgJEg0KBXZhbHVlGAIg",
            "ASgJOgI4ARovCg1NZXRhZGF0YUVudHJ5EgsKA2tleRgBIAEoCRINCgV2YWx1",
            "ZRgCIAEoCToCOAEioAMKD0dhdGV3YXlMaXN0SXRlbRIRCgl0ZW5hbnRfaWQY",
            "ASABKAkSEgoKZ2F0ZXdheV9pZBgCIAEoCRIMCgRuYW1lGAMgASgJEhMKC2Rl",
            "c2NyaXB0aW9uGAQgASgJEiIKCGxvY2F0aW9uGAUgASgLMhAuY29tbW9uLkxv",
            "Y2F0aW9uEjgKCnByb3BlcnRpZXMYBiADKAsyJC5hcGkuR2F0ZXdheUxpc3RJ",
            "dGVtLlByb3BlcnRpZXNFbnRyeRIuCgpjcmVhdGVkX2F0GAcgASgLMhouZ29v",
            "Z2xlLnByb3RvYnVmLlRpbWVzdGFtcBIuCgp1cGRhdGVkX2F0GAggASgLMhou",
            "Z29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcBIwCgxsYXN0X3NlZW5fYXQYCSAB",
            "KAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEiAKBXN0YXRlGAogASgO",
            "MhEuYXBpLkdhdGV3YXlTdGF0ZRoxCg9Qcm9wZXJ0aWVzRW50cnkSCwoDa2V5",
            "GAEgASgJEg0KBXZhbHVlGAIgASgJOgI4ASI1ChRDcmVhdGVHYXRld2F5UmVx",
            "dWVzdBIdCgdnYXRld2F5GAEgASgLMgwuYXBpLkdhdGV3YXkiJwoRR2V0R2F0",
            "ZXdheVJlcXVlc3QSEgoKZ2F0ZXdheV9pZBgBIAEoCSLFAQoSR2V0R2F0ZXdh",
            "eVJlc3BvbnNlEh0KB2dhdGV3YXkYASABKAsyDC5hcGkuR2F0ZXdheRIuCgpj",
            "cmVhdGVkX2F0GAIgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcBIu",
            "Cgp1cGRhdGVkX2F0GAMgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFt",
            "cBIwCgxsYXN0X3NlZW5fYXQYBCABKAsyGi5nb29nbGUucHJvdG9idWYuVGlt",
            "ZXN0YW1wIjUKFFVwZGF0ZUdhdGV3YXlSZXF1ZXN0Eh0KB2dhdGV3YXkYASAB",
            "KAsyDC5hcGkuR2F0ZXdheSIqChREZWxldGVHYXRld2F5UmVxdWVzdBISCgpn",
            "YXRld2F5X2lkGAEgASgJInMKE0xpc3RHYXRld2F5c1JlcXVlc3QSDQoFbGlt",
            "aXQYASABKA0SDgoGb2Zmc2V0GAIgASgNEg4KBnNlYXJjaBgDIAEoCRIRCgl0",
            "ZW5hbnRfaWQYBCABKAkSGgoSbXVsdGljYXN0X2dyb3VwX2lkGAUgASgJIlEK",
            "FExpc3RHYXRld2F5c1Jlc3BvbnNlEhMKC3RvdGFsX2NvdW50GAEgASgNEiQK",
            "BnJlc3VsdBgCIAMoCzIULmFwaS5HYXRld2F5TGlzdEl0ZW0iPQonR2VuZXJh",
            "dGVHYXRld2F5Q2xpZW50Q2VydGlmaWNhdGVSZXF1ZXN0EhIKCmdhdGV3YXlf",
            "aWQYASABKAkijgEKKEdlbmVyYXRlR2F0ZXdheUNsaWVudENlcnRpZmljYXRl",
            "UmVzcG9uc2USEAoIdGxzX2NlcnQYASABKAkSDwoHdGxzX2tleRgCIAEoCRIP",
            "CgdjYV9jZXJ0GAMgASgJEi4KCmV4cGlyZXNfYXQYBCABKAsyGi5nb29nbGUu",
            "cHJvdG9idWYuVGltZXN0YW1wIqwBChhHZXRHYXRld2F5TWV0cmljc1JlcXVl",
            "c3QSEgoKZ2F0ZXdheV9pZBgBIAEoCRIpCgVzdGFydBgCIAEoCzIaLmdvb2ds",
            "ZS5wcm90b2J1Zi5UaW1lc3RhbXASJwoDZW5kGAMgASgLMhouZ29vZ2xlLnBy",
            "b3RvYnVmLlRpbWVzdGFtcBIoCgthZ2dyZWdhdGlvbhgEIAEoDjITLmNvbW1v",
            "bi5BZ2dyZWdhdGlvbiLCAgoZR2V0R2F0ZXdheU1ldHJpY3NSZXNwb25zZRIi",
            "CgpyeF9wYWNrZXRzGAEgASgLMg4uY29tbW9uLk1ldHJpYxIiCgp0eF9wYWNr",
            "ZXRzGAIgASgLMg4uY29tbW9uLk1ldHJpYxIrChN0eF9wYWNrZXRzX3Blcl9m",
            "cmVxGAMgASgLMg4uY29tbW9uLk1ldHJpYxIrChNyeF9wYWNrZXRzX3Blcl9m",
            "cmVxGAQgASgLMg4uY29tbW9uLk1ldHJpYxIpChF0eF9wYWNrZXRzX3Blcl9k",
            "chgFIAEoCzIOLmNvbW1vbi5NZXRyaWMSKQoRcnhfcGFja2V0c19wZXJfZHIY",
            "BiABKAsyDi5jb21tb24uTWV0cmljEi0KFXR4X3BhY2tldHNfcGVyX3N0YXR1",
            "cxgHIAEoCzIOLmNvbW1vbi5NZXRyaWMqNwoMR2F0ZXdheVN0YXRlEg4KCk5F",
            "VkVSX1NFRU4QABIKCgZPTkxJTkUQARILCgdPRkZMSU5FEAIykQYKDkdhdGV3",
            "YXlTZXJ2aWNlElUKBkNyZWF0ZRIZLmFwaS5DcmVhdGVHYXRld2F5UmVxdWVz",
            "dBoWLmdvb2dsZS5wcm90b2J1Zi5FbXB0eSIYgtPkkwISIg0vYXBpL2dhdGV3",
            "YXlzOgEqEloKA0dldBIWLmFwaS5HZXRHYXRld2F5UmVxdWVzdBoXLmFwaS5H",
            "ZXRHYXRld2F5UmVzcG9uc2UiIoLT5JMCHBIaL2FwaS9nYXRld2F5cy97Z2F0",
            "ZXdheV9pZH0SagoGVXBkYXRlEhkuYXBpLlVwZGF0ZUdhdGV3YXlSZXF1ZXN0",
            "GhYuZ29vZ2xlLnByb3RvYnVmLkVtcHR5Ii2C0+STAicaIi9hcGkvZ2F0ZXdh",
            "eXMve2dhdGV3YXkuZ2F0ZXdheV9pZH06ASoSXwoGRGVsZXRlEhkuYXBpLkRl",
            "bGV0ZUdhdGV3YXlSZXF1ZXN0GhYuZ29vZ2xlLnByb3RvYnVmLkVtcHR5IiKC",
            "0+STAhwqGi9hcGkvZ2F0ZXdheXMve2dhdGV3YXlfaWR9ElIKBExpc3QSGC5h",
            "cGkuTGlzdEdhdGV3YXlzUmVxdWVzdBoZLmFwaS5MaXN0R2F0ZXdheXNSZXNw",
            "b25zZSIVgtPkkwIPEg0vYXBpL2dhdGV3YXlzErEBChlHZW5lcmF0ZUNsaWVu",
            "dENlcnRpZmljYXRlEiwuYXBpLkdlbmVyYXRlR2F0ZXdheUNsaWVudENlcnRp",
            "ZmljYXRlUmVxdWVzdBotLmFwaS5HZW5lcmF0ZUdhdGV3YXlDbGllbnRDZXJ0",
            "aWZpY2F0ZVJlc3BvbnNlIjeC0+STAjEiLy9hcGkvZ2F0ZXdheXMve2dhdGV3",
            "YXlfaWR9L2dlbmVyYXRlLWNlcnRpZmljYXRlEncKCkdldE1ldHJpY3MSHS5h",
            "cGkuR2V0R2F0ZXdheU1ldHJpY3NSZXF1ZXN0Gh4uYXBpLkdldEdhdGV3YXlN",
            "ZXRyaWNzUmVzcG9uc2UiKoLT5JMCJBIiL2FwaS9nYXRld2F5cy97Z2F0ZXdh",
            "eV9pZH0vbWV0cmljc0JkChFpby5jaGlycHN0YWNrLmFwaUIMR2F0ZXdheVBy",
            "b3RvUAFaLmdpdGh1Yi5jb20vY2hpcnBzdGFjay9jaGlycHN0YWNrL2FwaS9n",
            "by92NC9hcGmqAg5DaGlycHN0YWNrLkFwaWIGcHJvdG8z"));
      descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
          new pbr::FileDescriptor[] { global::Google.Api.AnnotationsReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.TimestampReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.EmptyReflection.Descriptor, global::Chirpstack.Common.CommonReflection.Descriptor, },
          new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Chirpstack.Api.GatewayState), }, null, new pbr::GeneratedClrTypeInfo[] {
            new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Api.Gateway), global::Chirpstack.Api.Gateway.Parser, new[]{ "GatewayId", "Name", "Description", "Location", "TenantId", "Tags", "Metadata", "StatsInterval" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, null, }),
            new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Api.GatewayListItem), global::Chirpstack.Api.GatewayListItem.Parser, new[]{ "TenantId", "GatewayId", "Name", "Description", "Location", "Properties", "CreatedAt", "UpdatedAt", "LastSeenAt", "State" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, }),
            new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Api.CreateGatewayRequest), global::Chirpstack.Api.CreateGatewayRequest.Parser, new[]{ "Gateway" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Api.GetGatewayRequest), global::Chirpstack.Api.GetGatewayRequest.Parser, new[]{ "GatewayId" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Api.GetGatewayResponse), global::Chirpstack.Api.GetGatewayResponse.Parser, new[]{ "Gateway", "CreatedAt", "UpdatedAt", "LastSeenAt" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Api.UpdateGatewayRequest), global::Chirpstack.Api.UpdateGatewayRequest.Parser, new[]{ "Gateway" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Api.DeleteGatewayRequest), global::Chirpstack.Api.DeleteGatewayRequest.Parser, new[]{ "GatewayId" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Api.ListGatewaysRequest), global::Chirpstack.Api.ListGatewaysRequest.Parser, new[]{ "Limit", "Offset", "Search", "TenantId", "MulticastGroupId" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Api.ListGatewaysResponse), global::Chirpstack.Api.ListGatewaysResponse.Parser, new[]{ "TotalCount", "Result" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Api.GenerateGatewayClientCertificateRequest), global::Chirpstack.Api.GenerateGatewayClientCertificateRequest.Parser, new[]{ "GatewayId" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Api.GenerateGatewayClientCertificateResponse), global::Chirpstack.Api.GenerateGatewayClientCertificateResponse.Parser, new[]{ "TlsCert", "TlsKey", "CaCert", "ExpiresAt" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Api.GetGatewayMetricsRequest), global::Chirpstack.Api.GetGatewayMetricsRequest.Parser, new[]{ "GatewayId", "Start", "End", "Aggregation" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Api.GetGatewayMetricsResponse), global::Chirpstack.Api.GetGatewayMetricsResponse.Parser, new[]{ "RxPackets", "TxPackets", "TxPacketsPerFreq", "RxPacketsPerFreq", "TxPacketsPerDr", "RxPacketsPerDr", "TxPacketsPerStatus" }, null, null, null, null)
          }));
    }
    #endregion

  }
  #region Enums
  public enum GatewayState {
    /// <summary>
    /// The gateway has never sent any stats.
    /// </summary>
    [pbr::OriginalName("NEVER_SEEN")] NeverSeen = 0,
    /// <summary>
    /// Online.
    /// </summary>
    [pbr::OriginalName("ONLINE")] Online = 1,
    /// <summary>
    /// Offline.
    /// </summary>
    [pbr::OriginalName("OFFLINE")] Offline = 2,
  }

  #endregion

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

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

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public Gateway(Gateway other) : this() {
      gatewayId_ = other.gatewayId_;
      name_ = other.name_;
      description_ = other.description_;
      location_ = other.location_ != null ? other.location_.Clone() : null;
      tenantId_ = other.tenantId_;
      tags_ = other.tags_.Clone();
      metadata_ = other.metadata_.Clone();
      statsInterval_ = other.statsInterval_;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

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

    /// <summary>Field number for the "gateway_id" field.</summary>
    public const int GatewayIdFieldNumber = 1;
    private string gatewayId_ = "";
    /// <summary>
    /// Gateway ID (EUI64).
    /// </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 "name" field.</summary>
    public const int NameFieldNumber = 2;
    private string name_ = "";
    /// <summary>
    /// Name.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string Name {
      get { return name_; }
      set {
        name_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

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

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

    /// <summary>Field number for the "tenant_id" field.</summary>
    public const int TenantIdFieldNumber = 5;
    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 "tags" field.</summary>
    public const int TagsFieldNumber = 6;
    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, ""), 50);
    private readonly pbc::MapField<string, string> tags_ = new pbc::MapField<string, string>();
    /// <summary>
    /// Tags.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pbc::MapField<string, string> Tags {
      get { return tags_; }
    }

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

    /// <summary>Field number for the "stats_interval" field.</summary>
    public const int StatsIntervalFieldNumber = 8;
    private uint statsInterval_;
    /// <summary>
    /// Stats interval (seconds).
    /// This defines the expected interval in which the gateway sends its
    /// statistics.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint StatsInterval {
      get { return statsInterval_; }
      set {
        statsInterval_ = value;
      }
    }

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(Gateway other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (GatewayId != other.GatewayId) return false;
      if (Name != other.Name) return false;
      if (Description != other.Description) return false;
      if (!object.Equals(Location, other.Location)) return false;
      if (TenantId != other.TenantId) return false;
      if (!Tags.Equals(other.Tags)) return false;
      if (!Metadata.Equals(other.Metadata)) return false;
      if (StatsInterval != other.StatsInterval) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override int GetHashCode() {
      int hash = 1;
      if (GatewayId.Length != 0) hash ^= GatewayId.GetHashCode();
      if (Name.Length != 0) hash ^= Name.GetHashCode();
      if (Description.Length != 0) hash ^= Description.GetHashCode();
      if (location_ != null) hash ^= Location.GetHashCode();
      if (TenantId.Length != 0) hash ^= TenantId.GetHashCode();
      hash ^= Tags.GetHashCode();
      hash ^= Metadata.GetHashCode();
      if (StatsInterval != 0) hash ^= StatsInterval.GetHashCode();
      if (_unknownFields != null) {
        hash ^= _unknownFields.GetHashCode();
      }
      return hash;
    }

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void WriteTo(pb::CodedOutputStream output) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      output.WriteRawMessage(this);
    #else
      if (GatewayId.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(GatewayId);
      }
      if (Name.Length != 0) {
        output.WriteRawTag(18);
        output.WriteString(Name);
      }
      if (Description.Length != 0) {
        output.WriteRawTag(26);
        output.WriteString(Description);
      }
      if (location_ != null) {
        output.WriteRawTag(34);
        output.WriteMessage(Location);
      }
      if (TenantId.Length != 0) {
        output.WriteRawTag(42);
        output.WriteString(TenantId);
      }
      tags_.WriteTo(output, _map_tags_codec);
      metadata_.WriteTo(output, _map_metadata_codec);
      if (StatsInterval != 0) {
        output.WriteRawTag(64);
        output.WriteUInt32(StatsInterval);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
      if (GatewayId.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(GatewayId);
      }
      if (Name.Length != 0) {
        output.WriteRawTag(18);
        output.WriteString(Name);
      }
      if (Description.Length != 0) {
        output.WriteRawTag(26);
        output.WriteString(Description);
      }
      if (location_ != null) {
        output.WriteRawTag(34);
        output.WriteMessage(Location);
      }
      if (TenantId.Length != 0) {
        output.WriteRawTag(42);
        output.WriteString(TenantId);
      }
      tags_.WriteTo(ref output, _map_tags_codec);
      metadata_.WriteTo(ref output, _map_metadata_codec);
      if (StatsInterval != 0) {
        output.WriteRawTag(64);
        output.WriteUInt32(StatsInterval);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(ref output);
      }
    }
    #endif

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public int CalculateSize() {
      int size = 0;
      if (GatewayId.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(GatewayId);
      }
      if (Name.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
      }
      if (Description.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Description);
      }
      if (location_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Location);
      }
      if (TenantId.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(TenantId);
      }
      size += tags_.CalculateSize(_map_tags_codec);
      size += metadata_.CalculateSize(_map_metadata_codec);
      if (StatsInterval != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(StatsInterval);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(Gateway other) {
      if (other == null) {
        return;
      }
      if (other.GatewayId.Length != 0) {
        GatewayId = other.GatewayId;
      }
      if (other.Name.Length != 0) {
        Name = other.Name;
      }
      if (other.Description.Length != 0) {
        Description = other.Description;
      }
      if (other.location_ != null) {
        if (location_ == null) {
          Location = new global::Chirpstack.Common.Location();
        }
        Location.MergeFrom(other.Location);
      }
      if (other.TenantId.Length != 0) {
        TenantId = other.TenantId;
      }
      tags_.Add(other.tags_);
      metadata_.Add(other.metadata_);
      if (other.StatsInterval != 0) {
        StatsInterval = other.StatsInterval;
      }
      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(pb::CodedInputStream input) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      input.ReadRawMessage(this);
    #else
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
            break;
          case 10: {
            GatewayId = input.ReadString();
            break;
          }
          case 18: {
            Name = input.ReadString();
            break;
          }
          case 26: {
            Description = input.ReadString();
            break;
          }
          case 34: {
            if (location_ == null) {
              Location = new global::Chirpstack.Common.Location();
            }
            input.ReadMessage(Location);
            break;
          }
          case 42: {
            TenantId = input.ReadString();
            break;
          }
          case 50: {
            tags_.AddEntriesFrom(input, _map_tags_codec);
            break;
          }
          case 58: {
            metadata_.AddEntriesFrom(input, _map_metadata_codec);
            break;
          }
          case 64: {
            StatsInterval = 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: {
            GatewayId = input.ReadString();
            break;
          }
          case 18: {
            Name = input.ReadString();
            break;
          }
          case 26: {
            Description = input.ReadString();
            break;
          }
          case 34: {
            if (location_ == null) {
              Location = new global::Chirpstack.Common.Location();
            }
            input.ReadMessage(Location);
            break;
          }
          case 42: {
            TenantId = input.ReadString();
            break;
          }
          case 50: {
            tags_.AddEntriesFrom(ref input, _map_tags_codec);
            break;
          }
          case 58: {
            metadata_.AddEntriesFrom(ref input, _map_metadata_codec);
            break;
          }
          case 64: {
            StatsInterval = input.ReadUInt32();
            break;
          }
        }
      }
    }
    #endif

  }

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

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

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public GatewayListItem(GatewayListItem other) : this() {
      tenantId_ = other.tenantId_;
      gatewayId_ = other.gatewayId_;
      name_ = other.name_;
      description_ = other.description_;
      location_ = other.location_ != null ? other.location_.Clone() : null;
      properties_ = other.properties_.Clone();
      createdAt_ = other.createdAt_ != null ? other.createdAt_.Clone() : null;
      updatedAt_ = other.updatedAt_ != null ? other.updatedAt_.Clone() : null;
      lastSeenAt_ = other.lastSeenAt_ != null ? other.lastSeenAt_.Clone() : null;
      state_ = other.state_;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

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

    /// <summary>Field number for the "tenant_id" field.</summary>
    public const int TenantIdFieldNumber = 1;
    private string tenantId_ = "";
    /// <summary>
    /// Tenant ID.
    /// </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 "gateway_id" field.</summary>
    public const int GatewayIdFieldNumber = 2;
    private string gatewayId_ = "";
    /// <summary>
    /// Gateway ID (EUI64).
    /// </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 "name" field.</summary>
    public const int NameFieldNumber = 3;
    private string name_ = "";
    /// <summary>
    /// Name.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string Name {
      get { return name_; }
      set {
        name_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

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

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

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

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

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

    /// <summary>Field number for the "last_seen_at" field.</summary>
    public const int LastSeenAtFieldNumber = 9;
    private global::Google.Protobuf.WellKnownTypes.Timestamp lastSeenAt_;
    /// <summary>
    /// Last seen at timestamp.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Google.Protobuf.WellKnownTypes.Timestamp LastSeenAt {
      get { return lastSeenAt_; }
      set {
        lastSeenAt_ = value;
      }
    }

    /// <summary>Field number for the "state" field.</summary>
    public const int StateFieldNumber = 10;
    private global::Chirpstack.Api.GatewayState state_ = global::Chirpstack.Api.GatewayState.NeverSeen;
    /// <summary>
    /// Gateway state.
    /// Please note that the state of the gateway is driven by the stats
    /// packages that are sent by the gateway.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Api.GatewayState State {
      get { return state_; }
      set {
        state_ = value;
      }
    }

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(GatewayListItem other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (TenantId != other.TenantId) return false;
      if (GatewayId != other.GatewayId) return false;
      if (Name != other.Name) return false;
      if (Description != other.Description) return false;
      if (!object.Equals(Location, other.Location)) return false;
      if (!Properties.Equals(other.Properties)) return false;
      if (!object.Equals(CreatedAt, other.CreatedAt)) return false;
      if (!object.Equals(UpdatedAt, other.UpdatedAt)) return false;
      if (!object.Equals(LastSeenAt, other.LastSeenAt)) return false;
      if (State != other.State) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override int GetHashCode() {
      int hash = 1;
      if (TenantId.Length != 0) hash ^= TenantId.GetHashCode();
      if (GatewayId.Length != 0) hash ^= GatewayId.GetHashCode();
      if (Name.Length != 0) hash ^= Name.GetHashCode();
      if (Description.Length != 0) hash ^= Description.GetHashCode();
      if (location_ != null) hash ^= Location.GetHashCode();
      hash ^= Properties.GetHashCode();
      if (createdAt_ != null) hash ^= CreatedAt.GetHashCode();
      if (updatedAt_ != null) hash ^= UpdatedAt.GetHashCode();
      if (lastSeenAt_ != null) hash ^= LastSeenAt.GetHashCode();
      if (State != global::Chirpstack.Api.GatewayState.NeverSeen) hash ^= State.GetHashCode();
      if (_unknownFields != null) {
        hash ^= _unknownFields.GetHashCode();
      }
      return hash;
    }

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void WriteTo(pb::CodedOutputStream output) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      output.WriteRawMessage(this);
    #else
      if (TenantId.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(TenantId);
      }
      if (GatewayId.Length != 0) {
        output.WriteRawTag(18);
        output.WriteString(GatewayId);
      }
      if (Name.Length != 0) {
        output.WriteRawTag(26);
        output.WriteString(Name);
      }
      if (Description.Length != 0) {
        output.WriteRawTag(34);
        output.WriteString(Description);
      }
      if (location_ != null) {
        output.WriteRawTag(42);
        output.WriteMessage(Location);
      }
      properties_.WriteTo(output, _map_properties_codec);
      if (createdAt_ != null) {
        output.WriteRawTag(58);
        output.WriteMessage(CreatedAt);
      }
      if (updatedAt_ != null) {
        output.WriteRawTag(66);
        output.WriteMessage(UpdatedAt);
      }
      if (lastSeenAt_ != null) {
        output.WriteRawTag(74);
        output.WriteMessage(LastSeenAt);
      }
      if (State != global::Chirpstack.Api.GatewayState.NeverSeen) {
        output.WriteRawTag(80);
        output.WriteEnum((int) State);
      }
      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 (GatewayId.Length != 0) {
        output.WriteRawTag(18);
        output.WriteString(GatewayId);
      }
      if (Name.Length != 0) {
        output.WriteRawTag(26);
        output.WriteString(Name);
      }
      if (Description.Length != 0) {
        output.WriteRawTag(34);
        output.WriteString(Description);
      }
      if (location_ != null) {
        output.WriteRawTag(42);
        output.WriteMessage(Location);
      }
      properties_.WriteTo(ref output, _map_properties_codec);
      if (createdAt_ != null) {
        output.WriteRawTag(58);
        output.WriteMessage(CreatedAt);
      }
      if (updatedAt_ != null) {
        output.WriteRawTag(66);
        output.WriteMessage(UpdatedAt);
      }
      if (lastSeenAt_ != null) {
        output.WriteRawTag(74);
        output.WriteMessage(LastSeenAt);
      }
      if (State != global::Chirpstack.Api.GatewayState.NeverSeen) {
        output.WriteRawTag(80);
        output.WriteEnum((int) State);
      }
      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 (GatewayId.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(GatewayId);
      }
      if (Name.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
      }
      if (Description.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Description);
      }
      if (location_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Location);
      }
      size += properties_.CalculateSize(_map_properties_codec);
      if (createdAt_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(CreatedAt);
      }
      if (updatedAt_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(UpdatedAt);
      }
      if (lastSeenAt_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(LastSeenAt);
      }
      if (State != global::Chirpstack.Api.GatewayState.NeverSeen) {
        size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) State);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(GatewayListItem other) {
      if (other == null) {
        return;
      }
      if (other.TenantId.Length != 0) {
        TenantId = other.TenantId;
      }
      if (other.GatewayId.Length != 0) {
        GatewayId = other.GatewayId;
      }
      if (other.Name.Length != 0) {
        Name = other.Name;
      }
      if (other.Description.Length != 0) {
        Description = other.Description;
      }
      if (other.location_ != null) {
        if (location_ == null) {
          Location = new global::Chirpstack.Common.Location();
        }
        Location.MergeFrom(other.Location);
      }
      properties_.Add(other.properties_);
      if (other.createdAt_ != null) {
        if (createdAt_ == null) {
          CreatedAt = new global::Google.Protobuf.WellKnownTypes.Timestamp();
        }
        CreatedAt.MergeFrom(other.CreatedAt);
      }
      if (other.updatedAt_ != null) {
        if (updatedAt_ == null) {
          UpdatedAt = new global::Google.Protobuf.WellKnownTypes.Timestamp();
        }
        UpdatedAt.MergeFrom(other.UpdatedAt);
      }
      if (other.lastSeenAt_ != null) {
        if (lastSeenAt_ == null) {
          LastSeenAt = new global::Google.Protobuf.WellKnownTypes.Timestamp();
        }
        LastSeenAt.MergeFrom(other.LastSeenAt);
      }
      if (other.State != global::Chirpstack.Api.GatewayState.NeverSeen) {
        State = other.State;
      }
      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(pb::CodedInputStream input) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      input.ReadRawMessage(this);
    #else
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
            break;
          case 10: {
            TenantId = input.ReadString();
            break;
          }
          case 18: {
            GatewayId = input.ReadString();
            break;
          }
          case 26: {
            Name = input.ReadString();
            break;
          }
          case 34: {
            Description = input.ReadString();
            break;
          }
          case 42: {
            if (location_ == null) {
              Location = new global::Chirpstack.Common.Location();
            }
            input.ReadMessage(Location);
            break;
          }
          case 50: {
            properties_.AddEntriesFrom(input, _map_properties_codec);
            break;
          }
          case 58: {
            if (createdAt_ == null) {
              CreatedAt = new global::Google.Protobuf.WellKnownTypes.Timestamp();
            }
            input.ReadMessage(CreatedAt);
            break;
          }
          case 66: {
            if (updatedAt_ == null) {
              UpdatedAt = new global::Google.Protobuf.WellKnownTypes.Timestamp();
            }
            input.ReadMessage(UpdatedAt);
            break;
          }
          case 74: {
            if (lastSeenAt_ == null) {
              LastSeenAt = new global::Google.Protobuf.WellKnownTypes.Timestamp();
            }
            input.ReadMessage(LastSeenAt);
            break;
          }
          case 80: {
            State = (global::Chirpstack.Api.GatewayState) input.ReadEnum();
            break;
          }
        }
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
            break;
          case 10: {
            TenantId = input.ReadString();
            break;
          }
          case 18: {
            GatewayId = input.ReadString();
            break;
          }
          case 26: {
            Name = input.ReadString();
            break;
          }
          case 34: {
            Description = input.ReadString();
            break;
          }
          case 42: {
            if (location_ == null) {
              Location = new global::Chirpstack.Common.Location();
            }
            input.ReadMessage(Location);
            break;
          }
          case 50: {
            properties_.AddEntriesFrom(ref input, _map_properties_codec);
            break;
          }
          case 58: {
            if (createdAt_ == null) {
              CreatedAt = new global::Google.Protobuf.WellKnownTypes.Timestamp();
            }
            input.ReadMessage(CreatedAt);
            break;
          }
          case 66: {
            if (updatedAt_ == null) {
              UpdatedAt = new global::Google.Protobuf.WellKnownTypes.Timestamp();
            }
            input.ReadMessage(UpdatedAt);
            break;
          }
          case 74: {
            if (lastSeenAt_ == null) {
              LastSeenAt = new global::Google.Protobuf.WellKnownTypes.Timestamp();
            }
            input.ReadMessage(LastSeenAt);
            break;
          }
          case 80: {
            State = (global::Chirpstack.Api.GatewayState) input.ReadEnum();
            break;
          }
        }
      }
    }
    #endif

  }

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

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

    partial void OnConstruction();

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

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

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

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

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

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

  }

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

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

    partial void OnConstruction();

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

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

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

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

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

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

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

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

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

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

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

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

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

  }

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

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

    partial void OnConstruction();

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

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

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

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

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

    /// <summary>Field number for the "last_seen_at" field.</summary>
    public const int LastSeenAtFieldNumber = 4;
    private global::Google.Protobuf.WellKnownTypes.Timestamp lastSeenAt_;
    /// <summary>
    /// Last seen at timestamp.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Google.Protobuf.WellKnownTypes.Timestamp LastSeenAt {
      get { return lastSeenAt_; }
      set {
        lastSeenAt_ = value;
      }
    }

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(GetGatewayResponse other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (!object.Equals(Gateway, other.Gateway)) return false;
      if (!object.Equals(CreatedAt, other.CreatedAt)) return false;
      if (!object.Equals(UpdatedAt, other.UpdatedAt)) return false;
      if (!object.Equals(LastSeenAt, other.LastSeenAt)) 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 (gateway_ != null) hash ^= Gateway.GetHashCode();
      if (createdAt_ != null) hash ^= CreatedAt.GetHashCode();
      if (updatedAt_ != null) hash ^= UpdatedAt.GetHashCode();
      if (lastSeenAt_ != null) hash ^= LastSeenAt.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 (gateway_ != null) {
        output.WriteRawTag(10);
        output.WriteMessage(Gateway);
      }
      if (createdAt_ != null) {
        output.WriteRawTag(18);
        output.WriteMessage(CreatedAt);
      }
      if (updatedAt_ != null) {
        output.WriteRawTag(26);
        output.WriteMessage(UpdatedAt);
      }
      if (lastSeenAt_ != null) {
        output.WriteRawTag(34);
        output.WriteMessage(LastSeenAt);
      }
      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 (gateway_ != null) {
        output.WriteRawTag(10);
        output.WriteMessage(Gateway);
      }
      if (createdAt_ != null) {
        output.WriteRawTag(18);
        output.WriteMessage(CreatedAt);
      }
      if (updatedAt_ != null) {
        output.WriteRawTag(26);
        output.WriteMessage(UpdatedAt);
      }
      if (lastSeenAt_ != null) {
        output.WriteRawTag(34);
        output.WriteMessage(LastSeenAt);
      }
      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 (gateway_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Gateway);
      }
      if (createdAt_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(CreatedAt);
      }
      if (updatedAt_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(UpdatedAt);
      }
      if (lastSeenAt_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(LastSeenAt);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(GetGatewayResponse other) {
      if (other == null) {
        return;
      }
      if (other.gateway_ != null) {
        if (gateway_ == null) {
          Gateway = new global::Chirpstack.Api.Gateway();
        }
        Gateway.MergeFrom(other.Gateway);
      }
      if (other.createdAt_ != null) {
        if (createdAt_ == null) {
          CreatedAt = new global::Google.Protobuf.WellKnownTypes.Timestamp();
        }
        CreatedAt.MergeFrom(other.CreatedAt);
      }
      if (other.updatedAt_ != null) {
        if (updatedAt_ == null) {
          UpdatedAt = new global::Google.Protobuf.WellKnownTypes.Timestamp();
        }
        UpdatedAt.MergeFrom(other.UpdatedAt);
      }
      if (other.lastSeenAt_ != null) {
        if (lastSeenAt_ == null) {
          LastSeenAt = new global::Google.Protobuf.WellKnownTypes.Timestamp();
        }
        LastSeenAt.MergeFrom(other.LastSeenAt);
      }
      _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 (gateway_ == null) {
              Gateway = new global::Chirpstack.Api.Gateway();
            }
            input.ReadMessage(Gateway);
            break;
          }
          case 18: {
            if (createdAt_ == null) {
              CreatedAt = new global::Google.Protobuf.WellKnownTypes.Timestamp();
            }
            input.ReadMessage(CreatedAt);
            break;
          }
          case 26: {
            if (updatedAt_ == null) {
              UpdatedAt = new global::Google.Protobuf.WellKnownTypes.Timestamp();
            }
            input.ReadMessage(UpdatedAt);
            break;
          }
          case 34: {
            if (lastSeenAt_ == null) {
              LastSeenAt = new global::Google.Protobuf.WellKnownTypes.Timestamp();
            }
            input.ReadMessage(LastSeenAt);
            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 (gateway_ == null) {
              Gateway = new global::Chirpstack.Api.Gateway();
            }
            input.ReadMessage(Gateway);
            break;
          }
          case 18: {
            if (createdAt_ == null) {
              CreatedAt = new global::Google.Protobuf.WellKnownTypes.Timestamp();
            }
            input.ReadMessage(CreatedAt);
            break;
          }
          case 26: {
            if (updatedAt_ == null) {
              UpdatedAt = new global::Google.Protobuf.WellKnownTypes.Timestamp();
            }
            input.ReadMessage(UpdatedAt);
            break;
          }
          case 34: {
            if (lastSeenAt_ == null) {
              LastSeenAt = new global::Google.Protobuf.WellKnownTypes.Timestamp();
            }
            input.ReadMessage(LastSeenAt);
            break;
          }
        }
      }
    }
    #endif

  }

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

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

    partial void OnConstruction();

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

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

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

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

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

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

  }

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

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

    partial void OnConstruction();

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

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

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

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

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

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

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

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

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

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

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

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

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

  }

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

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

    partial void OnConstruction();

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

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

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

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

    /// <summary>Field number for the "search" field.</summary>
    public const int SearchFieldNumber = 3;
    private string search_ = "";
    /// <summary>
    /// If set, the given string will be used to search on name (optional).
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string Search {
      get { return search_; }
      set {
        search_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "tenant_id" field.</summary>
    public const int TenantIdFieldNumber = 4;
    private string tenantId_ = "";
    /// <summary>
    /// Tenant ID (UUID) to filter gateways on.
    /// To list all gateways as a global admin user, this field can be left blank.
    /// </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 "multicast_group_id" field.</summary>
    public const int MulticastGroupIdFieldNumber = 5;
    private string multicastGroupId_ = "";
    /// <summary>
    /// Multicast-group ID (UUID) to filter gateways on.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string MulticastGroupId {
      get { return multicastGroupId_; }
      set {
        multicastGroupId_ = 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 ListGatewaysRequest);
    }

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

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

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

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

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

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

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(pb::CodedInputStream input) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      input.ReadRawMessage(this);
    #else
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
            break;
          case 8: {
            Limit = input.ReadUInt32();
            break;
          }
          case 16: {
            Offset = input.ReadUInt32();
            break;
          }
          case 26: {
            Search = input.ReadString();
            break;
          }
          case 34: {
            TenantId = input.ReadString();
            break;
          }
          case 42: {
            MulticastGroupId = 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 8: {
            Limit = input.ReadUInt32();
            break;
          }
          case 16: {
            Offset = input.ReadUInt32();
            break;
          }
          case 26: {
            Search = input.ReadString();
            break;
          }
          case 34: {
            TenantId = input.ReadString();
            break;
          }
          case 42: {
            MulticastGroupId = input.ReadString();
            break;
          }
        }
      }
    }
    #endif

  }

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

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

    partial void OnConstruction();

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  }

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

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

    partial void OnConstruction();

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

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

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

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

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

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

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

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

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

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

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

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

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

  }

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

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

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

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

    partial void OnConstruction();

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

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

    /// <summary>Field number for the "tls_cert" field.</summary>
    public const int TlsCertFieldNumber = 1;
    private string tlsCert_ = "";
    /// <summary>
    /// TLS certificate.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string TlsCert {
      get { return tlsCert_; }
      set {
        tlsCert_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

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

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

    /// <summary>Field number for the "expires_at" field.</summary>
    public const int ExpiresAtFieldNumber = 4;
    private global::Google.Protobuf.WellKnownTypes.Timestamp expiresAt_;
    /// <summary>
    /// Expires at defines the expiration date of the certificate.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Google.Protobuf.WellKnownTypes.Timestamp ExpiresAt {
      get { return expiresAt_; }
      set {
        expiresAt_ = value;
      }
    }

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

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(GenerateGatewayClientCertificateResponse other) {
      if (other == null) {
        return;
      }
      if (other.TlsCert.Length != 0) {
        TlsCert = other.TlsCert;
      }
      if (other.TlsKey.Length != 0) {
        TlsKey = other.TlsKey;
      }
      if (other.CaCert.Length != 0) {
        CaCert = other.CaCert;
      }
      if (other.expiresAt_ != null) {
        if (expiresAt_ == null) {
          ExpiresAt = new global::Google.Protobuf.WellKnownTypes.Timestamp();
        }
        ExpiresAt.MergeFrom(other.ExpiresAt);
      }
      _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: {
            TlsCert = input.ReadString();
            break;
          }
          case 18: {
            TlsKey = input.ReadString();
            break;
          }
          case 26: {
            CaCert = input.ReadString();
            break;
          }
          case 34: {
            if (expiresAt_ == null) {
              ExpiresAt = new global::Google.Protobuf.WellKnownTypes.Timestamp();
            }
            input.ReadMessage(ExpiresAt);
            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: {
            TlsCert = input.ReadString();
            break;
          }
          case 18: {
            TlsKey = input.ReadString();
            break;
          }
          case 26: {
            CaCert = input.ReadString();
            break;
          }
          case 34: {
            if (expiresAt_ == null) {
              ExpiresAt = new global::Google.Protobuf.WellKnownTypes.Timestamp();
            }
            input.ReadMessage(ExpiresAt);
            break;
          }
        }
      }
    }
    #endif

  }

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

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

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

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

    partial void OnConstruction();

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

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

    /// <summary>Field number for the "gateway_id" field.</summary>
    public const int GatewayIdFieldNumber = 1;
    private string gatewayId_ = "";
    /// <summary>
    /// Gateway ID (EUI64).
    /// </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 "start" field.</summary>
    public const int StartFieldNumber = 2;
    private global::Google.Protobuf.WellKnownTypes.Timestamp start_;
    /// <summary>
    /// Interval start timestamp.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Google.Protobuf.WellKnownTypes.Timestamp Start {
      get { return start_; }
      set {
        start_ = value;
      }
    }

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

    /// <summary>Field number for the "aggregation" field.</summary>
    public const int AggregationFieldNumber = 4;
    private global::Chirpstack.Common.Aggregation aggregation_ = global::Chirpstack.Common.Aggregation.Hour;
    /// <summary>
    /// Aggregation.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Common.Aggregation Aggregation {
      get { return aggregation_; }
      set {
        aggregation_ = value;
      }
    }

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

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override int GetHashCode() {
      int hash = 1;
      if (GatewayId.Length != 0) hash ^= GatewayId.GetHashCode();
      if (start_ != null) hash ^= Start.GetHashCode();
      if (end_ != null) hash ^= End.GetHashCode();
      if (Aggregation != global::Chirpstack.Common.Aggregation.Hour) hash ^= Aggregation.GetHashCode();
      if (_unknownFields != null) {
        hash ^= _unknownFields.GetHashCode();
      }
      return hash;
    }

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void WriteTo(pb::CodedOutputStream output) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      output.WriteRawMessage(this);
    #else
      if (GatewayId.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(GatewayId);
      }
      if (start_ != null) {
        output.WriteRawTag(18);
        output.WriteMessage(Start);
      }
      if (end_ != null) {
        output.WriteRawTag(26);
        output.WriteMessage(End);
      }
      if (Aggregation != global::Chirpstack.Common.Aggregation.Hour) {
        output.WriteRawTag(32);
        output.WriteEnum((int) Aggregation);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
      if (GatewayId.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(GatewayId);
      }
      if (start_ != null) {
        output.WriteRawTag(18);
        output.WriteMessage(Start);
      }
      if (end_ != null) {
        output.WriteRawTag(26);
        output.WriteMessage(End);
      }
      if (Aggregation != global::Chirpstack.Common.Aggregation.Hour) {
        output.WriteRawTag(32);
        output.WriteEnum((int) Aggregation);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(ref output);
      }
    }
    #endif

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public int CalculateSize() {
      int size = 0;
      if (GatewayId.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(GatewayId);
      }
      if (start_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Start);
      }
      if (end_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(End);
      }
      if (Aggregation != global::Chirpstack.Common.Aggregation.Hour) {
        size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Aggregation);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(GetGatewayMetricsRequest other) {
      if (other == null) {
        return;
      }
      if (other.GatewayId.Length != 0) {
        GatewayId = other.GatewayId;
      }
      if (other.start_ != null) {
        if (start_ == null) {
          Start = new global::Google.Protobuf.WellKnownTypes.Timestamp();
        }
        Start.MergeFrom(other.Start);
      }
      if (other.end_ != null) {
        if (end_ == null) {
          End = new global::Google.Protobuf.WellKnownTypes.Timestamp();
        }
        End.MergeFrom(other.End);
      }
      if (other.Aggregation != global::Chirpstack.Common.Aggregation.Hour) {
        Aggregation = other.Aggregation;
      }
      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(pb::CodedInputStream input) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      input.ReadRawMessage(this);
    #else
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
            break;
          case 10: {
            GatewayId = input.ReadString();
            break;
          }
          case 18: {
            if (start_ == null) {
              Start = new global::Google.Protobuf.WellKnownTypes.Timestamp();
            }
            input.ReadMessage(Start);
            break;
          }
          case 26: {
            if (end_ == null) {
              End = new global::Google.Protobuf.WellKnownTypes.Timestamp();
            }
            input.ReadMessage(End);
            break;
          }
          case 32: {
            Aggregation = (global::Chirpstack.Common.Aggregation) input.ReadEnum();
            break;
          }
        }
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
            break;
          case 10: {
            GatewayId = input.ReadString();
            break;
          }
          case 18: {
            if (start_ == null) {
              Start = new global::Google.Protobuf.WellKnownTypes.Timestamp();
            }
            input.ReadMessage(Start);
            break;
          }
          case 26: {
            if (end_ == null) {
              End = new global::Google.Protobuf.WellKnownTypes.Timestamp();
            }
            input.ReadMessage(End);
            break;
          }
          case 32: {
            Aggregation = (global::Chirpstack.Common.Aggregation) input.ReadEnum();
            break;
          }
        }
      }
    }
    #endif

  }

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

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

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

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

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public GetGatewayMetricsResponse(GetGatewayMetricsResponse other) : this() {
      rxPackets_ = other.rxPackets_ != null ? other.rxPackets_.Clone() : null;
      txPackets_ = other.txPackets_ != null ? other.txPackets_.Clone() : null;
      txPacketsPerFreq_ = other.txPacketsPerFreq_ != null ? other.txPacketsPerFreq_.Clone() : null;
      rxPacketsPerFreq_ = other.rxPacketsPerFreq_ != null ? other.rxPacketsPerFreq_.Clone() : null;
      txPacketsPerDr_ = other.txPacketsPerDr_ != null ? other.txPacketsPerDr_.Clone() : null;
      rxPacketsPerDr_ = other.rxPacketsPerDr_ != null ? other.rxPacketsPerDr_.Clone() : null;
      txPacketsPerStatus_ = other.txPacketsPerStatus_ != null ? other.txPacketsPerStatus_.Clone() : null;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

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

    /// <summary>Field number for the "rx_packets" field.</summary>
    public const int RxPacketsFieldNumber = 1;
    private global::Chirpstack.Common.Metric rxPackets_;
    /// <summary>
    /// RX packets.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Common.Metric RxPackets {
      get { return rxPackets_; }
      set {
        rxPackets_ = value;
      }
    }

    /// <summary>Field number for the "tx_packets" field.</summary>
    public const int TxPacketsFieldNumber = 2;
    private global::Chirpstack.Common.Metric txPackets_;
    /// <summary>
    /// TX packets.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Common.Metric TxPackets {
      get { return txPackets_; }
      set {
        txPackets_ = value;
      }
    }

    /// <summary>Field number for the "tx_packets_per_freq" field.</summary>
    public const int TxPacketsPerFreqFieldNumber = 3;
    private global::Chirpstack.Common.Metric txPacketsPerFreq_;
    /// <summary>
    /// TX packets / frequency.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Common.Metric TxPacketsPerFreq {
      get { return txPacketsPerFreq_; }
      set {
        txPacketsPerFreq_ = value;
      }
    }

    /// <summary>Field number for the "rx_packets_per_freq" field.</summary>
    public const int RxPacketsPerFreqFieldNumber = 4;
    private global::Chirpstack.Common.Metric rxPacketsPerFreq_;
    /// <summary>
    /// RX packets / frequency.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Common.Metric RxPacketsPerFreq {
      get { return rxPacketsPerFreq_; }
      set {
        rxPacketsPerFreq_ = value;
      }
    }

    /// <summary>Field number for the "tx_packets_per_dr" field.</summary>
    public const int TxPacketsPerDrFieldNumber = 5;
    private global::Chirpstack.Common.Metric txPacketsPerDr_;
    /// <summary>
    /// TX packets / DR.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Common.Metric TxPacketsPerDr {
      get { return txPacketsPerDr_; }
      set {
        txPacketsPerDr_ = value;
      }
    }

    /// <summary>Field number for the "rx_packets_per_dr" field.</summary>
    public const int RxPacketsPerDrFieldNumber = 6;
    private global::Chirpstack.Common.Metric rxPacketsPerDr_;
    /// <summary>
    /// RX packets / DR.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Common.Metric RxPacketsPerDr {
      get { return rxPacketsPerDr_; }
      set {
        rxPacketsPerDr_ = value;
      }
    }

    /// <summary>Field number for the "tx_packets_per_status" field.</summary>
    public const int TxPacketsPerStatusFieldNumber = 7;
    private global::Chirpstack.Common.Metric txPacketsPerStatus_;
    /// <summary>
    /// TX packets per status.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Chirpstack.Common.Metric TxPacketsPerStatus {
      get { return txPacketsPerStatus_; }
      set {
        txPacketsPerStatus_ = value;
      }
    }

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(GetGatewayMetricsResponse other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (!object.Equals(RxPackets, other.RxPackets)) return false;
      if (!object.Equals(TxPackets, other.TxPackets)) return false;
      if (!object.Equals(TxPacketsPerFreq, other.TxPacketsPerFreq)) return false;
      if (!object.Equals(RxPacketsPerFreq, other.RxPacketsPerFreq)) return false;
      if (!object.Equals(TxPacketsPerDr, other.TxPacketsPerDr)) return false;
      if (!object.Equals(RxPacketsPerDr, other.RxPacketsPerDr)) return false;
      if (!object.Equals(TxPacketsPerStatus, other.TxPacketsPerStatus)) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override int GetHashCode() {
      int hash = 1;
      if (rxPackets_ != null) hash ^= RxPackets.GetHashCode();
      if (txPackets_ != null) hash ^= TxPackets.GetHashCode();
      if (txPacketsPerFreq_ != null) hash ^= TxPacketsPerFreq.GetHashCode();
      if (rxPacketsPerFreq_ != null) hash ^= RxPacketsPerFreq.GetHashCode();
      if (txPacketsPerDr_ != null) hash ^= TxPacketsPerDr.GetHashCode();
      if (rxPacketsPerDr_ != null) hash ^= RxPacketsPerDr.GetHashCode();
      if (txPacketsPerStatus_ != null) hash ^= TxPacketsPerStatus.GetHashCode();
      if (_unknownFields != null) {
        hash ^= _unknownFields.GetHashCode();
      }
      return hash;
    }

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void WriteTo(pb::CodedOutputStream output) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      output.WriteRawMessage(this);
    #else
      if (rxPackets_ != null) {
        output.WriteRawTag(10);
        output.WriteMessage(RxPackets);
      }
      if (txPackets_ != null) {
        output.WriteRawTag(18);
        output.WriteMessage(TxPackets);
      }
      if (txPacketsPerFreq_ != null) {
        output.WriteRawTag(26);
        output.WriteMessage(TxPacketsPerFreq);
      }
      if (rxPacketsPerFreq_ != null) {
        output.WriteRawTag(34);
        output.WriteMessage(RxPacketsPerFreq);
      }
      if (txPacketsPerDr_ != null) {
        output.WriteRawTag(42);
        output.WriteMessage(TxPacketsPerDr);
      }
      if (rxPacketsPerDr_ != null) {
        output.WriteRawTag(50);
        output.WriteMessage(RxPacketsPerDr);
      }
      if (txPacketsPerStatus_ != null) {
        output.WriteRawTag(58);
        output.WriteMessage(TxPacketsPerStatus);
      }
      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 (rxPackets_ != null) {
        output.WriteRawTag(10);
        output.WriteMessage(RxPackets);
      }
      if (txPackets_ != null) {
        output.WriteRawTag(18);
        output.WriteMessage(TxPackets);
      }
      if (txPacketsPerFreq_ != null) {
        output.WriteRawTag(26);
        output.WriteMessage(TxPacketsPerFreq);
      }
      if (rxPacketsPerFreq_ != null) {
        output.WriteRawTag(34);
        output.WriteMessage(RxPacketsPerFreq);
      }
      if (txPacketsPerDr_ != null) {
        output.WriteRawTag(42);
        output.WriteMessage(TxPacketsPerDr);
      }
      if (rxPacketsPerDr_ != null) {
        output.WriteRawTag(50);
        output.WriteMessage(RxPacketsPerDr);
      }
      if (txPacketsPerStatus_ != null) {
        output.WriteRawTag(58);
        output.WriteMessage(TxPacketsPerStatus);
      }
      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 (rxPackets_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(RxPackets);
      }
      if (txPackets_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(TxPackets);
      }
      if (txPacketsPerFreq_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(TxPacketsPerFreq);
      }
      if (rxPacketsPerFreq_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(RxPacketsPerFreq);
      }
      if (txPacketsPerDr_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(TxPacketsPerDr);
      }
      if (rxPacketsPerDr_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(RxPacketsPerDr);
      }
      if (txPacketsPerStatus_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(TxPacketsPerStatus);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(GetGatewayMetricsResponse other) {
      if (other == null) {
        return;
      }
      if (other.rxPackets_ != null) {
        if (rxPackets_ == null) {
          RxPackets = new global::Chirpstack.Common.Metric();
        }
        RxPackets.MergeFrom(other.RxPackets);
      }
      if (other.txPackets_ != null) {
        if (txPackets_ == null) {
          TxPackets = new global::Chirpstack.Common.Metric();
        }
        TxPackets.MergeFrom(other.TxPackets);
      }
      if (other.txPacketsPerFreq_ != null) {
        if (txPacketsPerFreq_ == null) {
          TxPacketsPerFreq = new global::Chirpstack.Common.Metric();
        }
        TxPacketsPerFreq.MergeFrom(other.TxPacketsPerFreq);
      }
      if (other.rxPacketsPerFreq_ != null) {
        if (rxPacketsPerFreq_ == null) {
          RxPacketsPerFreq = new global::Chirpstack.Common.Metric();
        }
        RxPacketsPerFreq.MergeFrom(other.RxPacketsPerFreq);
      }
      if (other.txPacketsPerDr_ != null) {
        if (txPacketsPerDr_ == null) {
          TxPacketsPerDr = new global::Chirpstack.Common.Metric();
        }
        TxPacketsPerDr.MergeFrom(other.TxPacketsPerDr);
      }
      if (other.rxPacketsPerDr_ != null) {
        if (rxPacketsPerDr_ == null) {
          RxPacketsPerDr = new global::Chirpstack.Common.Metric();
        }
        RxPacketsPerDr.MergeFrom(other.RxPacketsPerDr);
      }
      if (other.txPacketsPerStatus_ != null) {
        if (txPacketsPerStatus_ == null) {
          TxPacketsPerStatus = new global::Chirpstack.Common.Metric();
        }
        TxPacketsPerStatus.MergeFrom(other.TxPacketsPerStatus);
      }
      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(pb::CodedInputStream input) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      input.ReadRawMessage(this);
    #else
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
            break;
          case 10: {
            if (rxPackets_ == null) {
              RxPackets = new global::Chirpstack.Common.Metric();
            }
            input.ReadMessage(RxPackets);
            break;
          }
          case 18: {
            if (txPackets_ == null) {
              TxPackets = new global::Chirpstack.Common.Metric();
            }
            input.ReadMessage(TxPackets);
            break;
          }
          case 26: {
            if (txPacketsPerFreq_ == null) {
              TxPacketsPerFreq = new global::Chirpstack.Common.Metric();
            }
            input.ReadMessage(TxPacketsPerFreq);
            break;
          }
          case 34: {
            if (rxPacketsPerFreq_ == null) {
              RxPacketsPerFreq = new global::Chirpstack.Common.Metric();
            }
            input.ReadMessage(RxPacketsPerFreq);
            break;
          }
          case 42: {
            if (txPacketsPerDr_ == null) {
              TxPacketsPerDr = new global::Chirpstack.Common.Metric();
            }
            input.ReadMessage(TxPacketsPerDr);
            break;
          }
          case 50: {
            if (rxPacketsPerDr_ == null) {
              RxPacketsPerDr = new global::Chirpstack.Common.Metric();
            }
            input.ReadMessage(RxPacketsPerDr);
            break;
          }
          case 58: {
            if (txPacketsPerStatus_ == null) {
              TxPacketsPerStatus = new global::Chirpstack.Common.Metric();
            }
            input.ReadMessage(TxPacketsPerStatus);
            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 (rxPackets_ == null) {
              RxPackets = new global::Chirpstack.Common.Metric();
            }
            input.ReadMessage(RxPackets);
            break;
          }
          case 18: {
            if (txPackets_ == null) {
              TxPackets = new global::Chirpstack.Common.Metric();
            }
            input.ReadMessage(TxPackets);
            break;
          }
          case 26: {
            if (txPacketsPerFreq_ == null) {
              TxPacketsPerFreq = new global::Chirpstack.Common.Metric();
            }
            input.ReadMessage(TxPacketsPerFreq);
            break;
          }
          case 34: {
            if (rxPacketsPerFreq_ == null) {
              RxPacketsPerFreq = new global::Chirpstack.Common.Metric();
            }
            input.ReadMessage(RxPacketsPerFreq);
            break;
          }
          case 42: {
            if (txPacketsPerDr_ == null) {
              TxPacketsPerDr = new global::Chirpstack.Common.Metric();
            }
            input.ReadMessage(TxPacketsPerDr);
            break;
          }
          case 50: {
            if (rxPacketsPerDr_ == null) {
              RxPacketsPerDr = new global::Chirpstack.Common.Metric();
            }
            input.ReadMessage(RxPacketsPerDr);
            break;
          }
          case 58: {
            if (txPacketsPerStatus_ == null) {
              TxPacketsPerStatus = new global::Chirpstack.Common.Metric();
            }
            input.ReadMessage(TxPacketsPerStatus);
            break;
          }
        }
      }
    }
    #endif

  }

  #endregion

}

#endregion Designer generated code
