// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: bgs/low/pb/client/channel_types.proto
#pragma warning disable 1591, 0612, 3021
#region Designer generated code

using pb = Google.Protobuf;
using pbc = Google.Protobuf.Collections;
using pbr = Google.Protobuf.Reflection;
namespace Bgs.Protocol.Channel.V1
{

    /// <summary>Holder for reflection information generated from bgs/low/pb/client/channel_types.proto</summary>
    [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  public static partial class ChannelTypesReflection {

    #region Descriptor
    /// <summary>File descriptor for bgs/low/pb/client/channel_types.proto</summary>
    public static pbr::FileDescriptor Descriptor {
      get { return descriptor; }
    }
    private static pbr::FileDescriptor descriptor;

    static ChannelTypesReflection() {
      byte[] descriptorData = System.Convert.FromBase64String(
          string.Concat(
            "CiViZ3MvbG93L3BiL2NsaWVudC9jaGFubmVsX3R5cGVzLnByb3RvEhdiZ3Mu",
            "cHJvdG9jb2wuY2hhbm5lbC52MRonYmdzL2xvdy9wYi9jbGllbnQvYXR0cmli",
            "dXRlX3R5cGVzLnByb3RvGiRiZ3MvbG93L3BiL2NsaWVudC9lbnRpdHlfdHlw",
            "ZXMucHJvdG8aKGJncy9sb3cvcGIvY2xpZW50L2ludml0YXRpb25fdHlwZXMu",
            "cHJvdG8aIWJncy9sb3cvcGIvY2xpZW50L3JwY190eXBlcy5wcm90byJMCglD",
            "aGFubmVsSWQSDAoEdHlwZRgBIAEoDRIlCgRob3N0GAIgASgLMhcuYmdzLnBy",
            "b3RvY29sLlByb2Nlc3NJZBIKCgJpZBgDIAEoByJDCgdNZXNzYWdlEioKCWF0",
            "dHJpYnV0ZRgBIAMoCzIXLmJncy5wcm90b2NvbC5BdHRyaWJ1dGUSDAoEcm9s",
            "ZRgCIAEoDSLUAQoTTGlzdENoYW5uZWxzT3B0aW9ucxITCgtzdGFydF9pbmRl",
            "eBgBIAEoDRITCgttYXhfcmVzdWx0cxgCIAEoDRIMCgRuYW1lGAMgASgJEg8K",
            "B3Byb2dyYW0YBCABKAcSDgoGbG9jYWxlGAUgASgHEhUKDWNhcGFjaXR5X2Z1",
            "bGwYBiABKA0SNwoQYXR0cmlidXRlX2ZpbHRlchgHIAEoCzIdLmJncy5wcm90",
            "b2NvbC5BdHRyaWJ1dGVGaWx0ZXISFAoMY2hhbm5lbF90eXBlGAggASgJIo8B",
            "ChJDaGFubmVsRGVzY3JpcHRpb24SKgoKY2hhbm5lbF9pZBgBIAEoCzIWLmJn",
            "cy5wcm90b2NvbC5FbnRpdHlJZBIXCg9jdXJyZW50X21lbWJlcnMYAiABKA0S",
            "NAoFc3RhdGUYAyABKAsyJS5iZ3MucHJvdG9jb2wuY2hhbm5lbC52MS5DaGFu",
            "bmVsU3RhdGUigAEKC0NoYW5uZWxJbmZvEkAKC2Rlc2NyaXB0aW9uGAEgASgL",
            "MisuYmdzLnByb3RvY29sLmNoYW5uZWwudjEuQ2hhbm5lbERlc2NyaXB0aW9u",
            "Ei8KBm1lbWJlchgCIAMoCzIfLmJncy5wcm90b2NvbC5jaGFubmVsLnYxLk1l",
            "bWJlciLeBAoMQ2hhbm5lbFN0YXRlEhMKC21heF9tZW1iZXJzGAEgASgNEhMK",
            "C21pbl9tZW1iZXJzGAIgASgNEioKCWF0dHJpYnV0ZRgDIAMoCzIXLmJncy5w",
            "cm90b2NvbC5BdHRyaWJ1dGUSLAoKaW52aXRhdGlvbhgEIAMoCzIYLmJncy5w",
            "cm90b2NvbC5JbnZpdGF0aW9uEhcKD21heF9pbnZpdGF0aW9ucxgFIAEoDRIO",
            "CgZyZWFzb24YBiABKA0SSQoNcHJpdmFjeV9sZXZlbBgHIAEoDjIyLmJncy5w",
            "cm90b2NvbC5jaGFubmVsLnYxLkNoYW5uZWxTdGF0ZS5Qcml2YWN5TGV2ZWwS",
            "DAoEbmFtZRgIIAEoCRIVCg1kZWxlZ2F0ZV9uYW1lGAkgASgJEhQKDGNoYW5u",
            "ZWxfdHlwZRgKIAEoCRIPCgdwcm9ncmFtGAsgASgHEh0KFWFsbG93X29mZmxp",
            "bmVfbWVtYmVycxgMIAEoCBIdChVzdWJzY3JpYmVfdG9fcHJlc2VuY2UYDSAB",
            "KAgSIAoYZGVzdHJveV9vbl9mb3VuZGVyX2xlYXZlGA4gASgIIqkBCgxQcml2",
            "YWN5TGV2ZWwSFgoSUFJJVkFDWV9MRVZFTF9OT05FEAASFgoSUFJJVkFDWV9M",
            "RVZFTF9PUEVOEAESLAooUFJJVkFDWV9MRVZFTF9PUEVOX0lOVklUQVRJT05f",
            "QU5EX0ZSSUVORBACEiEKHVBSSVZBQ1lfTEVWRUxfT1BFTl9JTlZJVEFUSU9O",
            "EAMSGAoUUFJJVkFDWV9MRVZFTF9DTE9TRUQQBCKnAQoLTWVtYmVyU3RhdGUS",
            "KgoJYXR0cmlidXRlGAEgAygLMhcuYmdzLnByb3RvY29sLkF0dHJpYnV0ZRIQ",
            "CgRyb2xlGAIgAygNQgIQARISCgpwcml2aWxlZ2VzGAMgASgEEicKBGluZm8Y",
            "BCABKAsyGS5iZ3MucHJvdG9jb2wuQWNjb3VudEluZm8SHQoRREVQUkVDQVRF",
            "RF9oaWRkZW4YBSABKAhCAhgBImcKBk1lbWJlchIoCghpZGVudGl0eRgBIAEo",
            "CzIWLmJncy5wcm90b2NvbC5JZGVudGl0eRIzCgVzdGF0ZRgCIAEoCzIkLmJn",
            "cy5wcm90b2NvbC5jaGFubmVsLnYxLk1lbWJlclN0YXRlQgJIAmIGcHJvdG8z"));
      descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
          new pbr::FileDescriptor[] { Bgs.Protocol.AttributeTypesReflection.Descriptor, Bgs.Protocol.EntityTypesReflection.Descriptor, Bgs.Protocol.InvitationTypesReflection.Descriptor, Bgs.Protocol.RpcTypesReflection.Descriptor, },
          new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
            new pbr::GeneratedClrTypeInfo(typeof(Bgs.Protocol.Channel.V1.ChannelId), Bgs.Protocol.Channel.V1.ChannelId.Parser, new[]{ "Type", "Host", "Id" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(Bgs.Protocol.Channel.V1.Message), Bgs.Protocol.Channel.V1.Message.Parser, new[]{ "Attribute", "Role" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(Bgs.Protocol.Channel.V1.ListChannelsOptions), Bgs.Protocol.Channel.V1.ListChannelsOptions.Parser, new[]{ "StartIndex", "MaxResults", "Name", "Program", "Locale", "CapacityFull", "AttributeFilter", "ChannelType" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(Bgs.Protocol.Channel.V1.ChannelDescription), Bgs.Protocol.Channel.V1.ChannelDescription.Parser, new[]{ "ChannelId", "CurrentMembers", "State" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(Bgs.Protocol.Channel.V1.ChannelInfo), Bgs.Protocol.Channel.V1.ChannelInfo.Parser, new[]{ "Description", "Member" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(Bgs.Protocol.Channel.V1.ChannelState), Bgs.Protocol.Channel.V1.ChannelState.Parser, new[]{ "MaxMembers", "MinMembers", "Attribute", "Invitation", "MaxInvitations", "Reason", "PrivacyLevel", "Name", "DelegateName", "ChannelType", "Program", "AllowOfflineMembers", "SubscribeToPresence", "DestroyOnFounderLeave" }, null, new[]{ typeof(Bgs.Protocol.Channel.V1.ChannelState.Types.PrivacyLevel) }, null),
            new pbr::GeneratedClrTypeInfo(typeof(Bgs.Protocol.Channel.V1.MemberState), Bgs.Protocol.Channel.V1.MemberState.Parser, new[]{ "Attribute", "Role", "Privileges", "Info", "DEPRECATEDHidden" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(Bgs.Protocol.Channel.V1.Member), Bgs.Protocol.Channel.V1.Member.Parser, new[]{ "Identity", "State" }, null, null, null)
          }));
    }
    #endregion

  }
  #region Messages
  [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  public sealed partial class ChannelId : pb::IMessage<ChannelId> {
    private static readonly pb::MessageParser<ChannelId> _parser = new pb::MessageParser<ChannelId>(() => new ChannelId());
    public static pb::MessageParser<ChannelId> Parser { get { return _parser; } }

    public static pbr::MessageDescriptor Descriptor {
      get { return Bgs.Protocol.Channel.V1.ChannelTypesReflection.Descriptor.MessageTypes[0]; }
    }

    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    public ChannelId() {
      OnConstruction();
    }

    partial void OnConstruction();

    public ChannelId(ChannelId other) : this() {
      type_ = other.type_;
      Host = other.host_ != null ? other.Host.Clone() : null;
      id_ = other.id_;
    }

    public ChannelId Clone() {
      return new ChannelId(this);
    }

    /// <summary>Field number for the "type" field.</summary>
    public const int TypeFieldNumber = 1;
    private uint type_;
    public uint Type {
      get { return type_; }
      set {
        type_ = value;
      }
    }

    /// <summary>Field number for the "host" field.</summary>
    public const int HostFieldNumber = 2;
    private Bgs.Protocol.ProcessId host_;
    public Bgs.Protocol.ProcessId Host {
      get { return host_; }
      set {
        host_ = value;
      }
    }

    /// <summary>Field number for the "id" field.</summary>
    public const int IdFieldNumber = 3;
    private uint id_;
    public uint Id {
      get { return id_; }
      set {
        id_ = value;
      }
    }

    public override bool Equals(object other) {
      return Equals(other as ChannelId);
    }

    public bool Equals(ChannelId other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (Type != other.Type) return false;
      if (!object.Equals(Host, other.Host)) return false;
      if (Id != other.Id) return false;
      return true;
    }

    public override int GetHashCode() {
      int hash = 1;
      if (Type != 0) hash ^= Type.GetHashCode();
      if (host_ != null) hash ^= Host.GetHashCode();
      if (Id != 0) hash ^= Id.GetHashCode();
      return hash;
    }

    public override string ToString() {
      return pb::JsonFormatter.ToDiagnosticString(this);
    }

    public void WriteTo(pb::CodedOutputStream output) {
      if (Type != 0) {
        output.WriteRawTag(8);
        output.WriteUInt32(Type);
      }
      if (host_ != null) {
        output.WriteRawTag(18);
        output.WriteMessage(Host);
      }
      if (Id != 0) {
        output.WriteRawTag(29);
        output.WriteFixed32(Id);
      }
    }

    public int CalculateSize() {
      int size = 0;
      if (Type != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Type);
      }
      if (host_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Host);
      }
      if (Id != 0) {
        size += 1 + 4;
      }
      return size;
    }

    public void MergeFrom(ChannelId other) {
      if (other == null) {
        return;
      }
      if (other.Type != 0) {
        Type = other.Type;
      }
      if (other.host_ != null) {
        if (host_ == null) {
          host_ = new Bgs.Protocol.ProcessId();
        }
        Host.MergeFrom(other.Host);
      }
      if (other.Id != 0) {
        Id = other.Id;
      }
    }

    public void MergeFrom(pb::CodedInputStream input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            input.SkipLastField();
            break;
          case 8: {
            Type = input.ReadUInt32();
            break;
          }
          case 18: {
            if (host_ == null) {
              host_ = new Bgs.Protocol.ProcessId();
            }
            input.ReadMessage(host_);
            break;
          }
          case 29: {
            Id = input.ReadFixed32();
            break;
          }
        }
      }
    }

  }

  [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  public sealed partial class Message : pb::IMessage<Message> {
    private static readonly pb::MessageParser<Message> _parser = new pb::MessageParser<Message>(() => new Message());
    public static pb::MessageParser<Message> Parser { get { return _parser; } }

    public static pbr::MessageDescriptor Descriptor {
      get { return Bgs.Protocol.Channel.V1.ChannelTypesReflection.Descriptor.MessageTypes[1]; }
    }

    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    public Message() {
      OnConstruction();
    }

    partial void OnConstruction();

    public Message(Message other) : this() {
      attribute_ = other.attribute_.Clone();
      role_ = other.role_;
    }

    public Message Clone() {
      return new Message(this);
    }

    /// <summary>Field number for the "attribute" field.</summary>
    public const int AttributeFieldNumber = 1;
    private static readonly pb::FieldCodec<Bgs.Protocol.Attribute> _repeated_attribute_codec
        = pb::FieldCodec.ForMessage(10, Bgs.Protocol.Attribute.Parser);
    private readonly pbc::RepeatedField<Bgs.Protocol.Attribute> attribute_ = new pbc::RepeatedField<Bgs.Protocol.Attribute>();
    public pbc::RepeatedField<Bgs.Protocol.Attribute> Attribute {
      get { return attribute_; }
    }

    /// <summary>Field number for the "role" field.</summary>
    public const int RoleFieldNumber = 2;
    private uint role_;
    public uint Role {
      get { return role_; }
      set {
        role_ = value;
      }
    }

    public override bool Equals(object other) {
      return Equals(other as Message);
    }

    public bool Equals(Message other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if(!attribute_.Equals(other.attribute_)) return false;
      if (Role != other.Role) return false;
      return true;
    }

    public override int GetHashCode() {
      int hash = 1;
      hash ^= attribute_.GetHashCode();
      if (Role != 0) hash ^= Role.GetHashCode();
      return hash;
    }

    public override string ToString() {
      return pb::JsonFormatter.ToDiagnosticString(this);
    }

    public void WriteTo(pb::CodedOutputStream output) {
      attribute_.WriteTo(output, _repeated_attribute_codec);
      if (Role != 0) {
        output.WriteRawTag(16);
        output.WriteUInt32(Role);
      }
    }

    public int CalculateSize() {
      int size = 0;
      size += attribute_.CalculateSize(_repeated_attribute_codec);
      if (Role != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Role);
      }
      return size;
    }

    public void MergeFrom(Message other) {
      if (other == null) {
        return;
      }
      attribute_.Add(other.attribute_);
      if (other.Role != 0) {
        Role = other.Role;
      }
    }

    public void MergeFrom(pb::CodedInputStream input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            input.SkipLastField();
            break;
          case 10: {
            attribute_.AddEntriesFrom(input, _repeated_attribute_codec);
            break;
          }
          case 16: {
            Role = input.ReadUInt32();
            break;
          }
        }
      }
    }

  }

  [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  public sealed partial class ListChannelsOptions : pb::IMessage<ListChannelsOptions> {
    private static readonly pb::MessageParser<ListChannelsOptions> _parser = new pb::MessageParser<ListChannelsOptions>(() => new ListChannelsOptions());
    public static pb::MessageParser<ListChannelsOptions> Parser { get { return _parser; } }

    public static pbr::MessageDescriptor Descriptor {
      get { return Bgs.Protocol.Channel.V1.ChannelTypesReflection.Descriptor.MessageTypes[2]; }
    }

    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    public ListChannelsOptions() {
      OnConstruction();
    }

    partial void OnConstruction();

    public ListChannelsOptions(ListChannelsOptions other) : this() {
      startIndex_ = other.startIndex_;
      maxResults_ = other.maxResults_;
      name_ = other.name_;
      program_ = other.program_;
      locale_ = other.locale_;
      capacityFull_ = other.capacityFull_;
      AttributeFilter = other.attributeFilter_ != null ? other.AttributeFilter.Clone() : null;
      channelType_ = other.channelType_;
    }

    public ListChannelsOptions Clone() {
      return new ListChannelsOptions(this);
    }

    /// <summary>Field number for the "start_index" field.</summary>
    public const int StartIndexFieldNumber = 1;
    private uint startIndex_;
    public uint StartIndex {
      get { return startIndex_; }
      set {
        startIndex_ = value;
      }
    }

    /// <summary>Field number for the "max_results" field.</summary>
    public const int MaxResultsFieldNumber = 2;
    private uint maxResults_;
    public uint MaxResults {
      get { return maxResults_; }
      set {
        maxResults_ = value;
      }
    }

    /// <summary>Field number for the "name" field.</summary>
    public const int NameFieldNumber = 3;
    private string name_ = "";
    public string Name {
      get { return name_; }
      set {
        name_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "program" field.</summary>
    public const int ProgramFieldNumber = 4;
    private uint program_;
    public uint Program {
      get { return program_; }
      set {
        program_ = value;
      }
    }

    /// <summary>Field number for the "locale" field.</summary>
    public const int LocaleFieldNumber = 5;
    private uint locale_;
    public uint Locale {
      get { return locale_; }
      set {
        locale_ = value;
      }
    }

    /// <summary>Field number for the "capacity_full" field.</summary>
    public const int CapacityFullFieldNumber = 6;
    private uint capacityFull_;
    public uint CapacityFull {
      get { return capacityFull_; }
      set {
        capacityFull_ = value;
      }
    }

    /// <summary>Field number for the "attribute_filter" field.</summary>
    public const int AttributeFilterFieldNumber = 7;
    private Bgs.Protocol.AttributeFilter attributeFilter_;
    public Bgs.Protocol.AttributeFilter AttributeFilter {
      get { return attributeFilter_; }
      set {
        attributeFilter_ = value;
      }
    }

    /// <summary>Field number for the "channel_type" field.</summary>
    public const int ChannelTypeFieldNumber = 8;
    private string channelType_ = "";
    public string ChannelType {
      get { return channelType_; }
      set {
        channelType_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    public override bool Equals(object other) {
      return Equals(other as ListChannelsOptions);
    }

    public bool Equals(ListChannelsOptions other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (StartIndex != other.StartIndex) return false;
      if (MaxResults != other.MaxResults) return false;
      if (Name != other.Name) return false;
      if (Program != other.Program) return false;
      if (Locale != other.Locale) return false;
      if (CapacityFull != other.CapacityFull) return false;
      if (!object.Equals(AttributeFilter, other.AttributeFilter)) return false;
      if (ChannelType != other.ChannelType) return false;
      return true;
    }

    public override int GetHashCode() {
      int hash = 1;
      if (StartIndex != 0) hash ^= StartIndex.GetHashCode();
      if (MaxResults != 0) hash ^= MaxResults.GetHashCode();
      if (Name.Length != 0) hash ^= Name.GetHashCode();
      if (Program != 0) hash ^= Program.GetHashCode();
      if (Locale != 0) hash ^= Locale.GetHashCode();
      if (CapacityFull != 0) hash ^= CapacityFull.GetHashCode();
      if (attributeFilter_ != null) hash ^= AttributeFilter.GetHashCode();
      if (ChannelType.Length != 0) hash ^= ChannelType.GetHashCode();
      return hash;
    }

    public override string ToString() {
      return pb::JsonFormatter.ToDiagnosticString(this);
    }

    public void WriteTo(pb::CodedOutputStream output) {
      if (StartIndex != 0) {
        output.WriteRawTag(8);
        output.WriteUInt32(StartIndex);
      }
      if (MaxResults != 0) {
        output.WriteRawTag(16);
        output.WriteUInt32(MaxResults);
      }
      if (Name.Length != 0) {
        output.WriteRawTag(26);
        output.WriteString(Name);
      }
      if (Program != 0) {
        output.WriteRawTag(37);
        output.WriteFixed32(Program);
      }
      if (Locale != 0) {
        output.WriteRawTag(45);
        output.WriteFixed32(Locale);
      }
      if (CapacityFull != 0) {
        output.WriteRawTag(48);
        output.WriteUInt32(CapacityFull);
      }
      if (attributeFilter_ != null) {
        output.WriteRawTag(58);
        output.WriteMessage(AttributeFilter);
      }
      if (ChannelType.Length != 0) {
        output.WriteRawTag(66);
        output.WriteString(ChannelType);
      }
    }

    public int CalculateSize() {
      int size = 0;
      if (StartIndex != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(StartIndex);
      }
      if (MaxResults != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(MaxResults);
      }
      if (Name.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
      }
      if (Program != 0) {
        size += 1 + 4;
      }
      if (Locale != 0) {
        size += 1 + 4;
      }
      if (CapacityFull != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(CapacityFull);
      }
      if (attributeFilter_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(AttributeFilter);
      }
      if (ChannelType.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(ChannelType);
      }
      return size;
    }

    public void MergeFrom(ListChannelsOptions other) {
      if (other == null) {
        return;
      }
      if (other.StartIndex != 0) {
        StartIndex = other.StartIndex;
      }
      if (other.MaxResults != 0) {
        MaxResults = other.MaxResults;
      }
      if (other.Name.Length != 0) {
        Name = other.Name;
      }
      if (other.Program != 0) {
        Program = other.Program;
      }
      if (other.Locale != 0) {
        Locale = other.Locale;
      }
      if (other.CapacityFull != 0) {
        CapacityFull = other.CapacityFull;
      }
      if (other.attributeFilter_ != null) {
        if (attributeFilter_ == null) {
          attributeFilter_ = new Bgs.Protocol.AttributeFilter();
        }
        AttributeFilter.MergeFrom(other.AttributeFilter);
      }
      if (other.ChannelType.Length != 0) {
        ChannelType = other.ChannelType;
      }
    }

    public void MergeFrom(pb::CodedInputStream input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            input.SkipLastField();
            break;
          case 8: {
            StartIndex = input.ReadUInt32();
            break;
          }
          case 16: {
            MaxResults = input.ReadUInt32();
            break;
          }
          case 26: {
            Name = input.ReadString();
            break;
          }
          case 37: {
            Program = input.ReadFixed32();
            break;
          }
          case 45: {
            Locale = input.ReadFixed32();
            break;
          }
          case 48: {
            CapacityFull = input.ReadUInt32();
            break;
          }
          case 58: {
            if (attributeFilter_ == null) {
              attributeFilter_ = new Bgs.Protocol.AttributeFilter();
            }
            input.ReadMessage(attributeFilter_);
            break;
          }
          case 66: {
            ChannelType = input.ReadString();
            break;
          }
        }
      }
    }

  }

  [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  public sealed partial class ChannelDescription : pb::IMessage<ChannelDescription> {
    private static readonly pb::MessageParser<ChannelDescription> _parser = new pb::MessageParser<ChannelDescription>(() => new ChannelDescription());
    public static pb::MessageParser<ChannelDescription> Parser { get { return _parser; } }

    public static pbr::MessageDescriptor Descriptor {
      get { return Bgs.Protocol.Channel.V1.ChannelTypesReflection.Descriptor.MessageTypes[3]; }
    }

    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    public ChannelDescription() {
      OnConstruction();
    }

    partial void OnConstruction();

    public ChannelDescription(ChannelDescription other) : this() {
      ChannelId = other.channelId_ != null ? other.ChannelId.Clone() : null;
      currentMembers_ = other.currentMembers_;
      State = other.state_ != null ? other.State.Clone() : null;
    }

    public ChannelDescription Clone() {
      return new ChannelDescription(this);
    }

    /// <summary>Field number for the "channel_id" field.</summary>
    public const int ChannelIdFieldNumber = 1;
    private Bgs.Protocol.EntityId channelId_;
    public Bgs.Protocol.EntityId ChannelId {
      get { return channelId_; }
      set {
        channelId_ = value;
      }
    }

    /// <summary>Field number for the "current_members" field.</summary>
    public const int CurrentMembersFieldNumber = 2;
    private uint currentMembers_;
    public uint CurrentMembers {
      get { return currentMembers_; }
      set {
        currentMembers_ = value;
      }
    }

    /// <summary>Field number for the "state" field.</summary>
    public const int StateFieldNumber = 3;
    private Bgs.Protocol.Channel.V1.ChannelState state_;
    public Bgs.Protocol.Channel.V1.ChannelState State {
      get { return state_; }
      set {
        state_ = value;
      }
    }

    public override bool Equals(object other) {
      return Equals(other as ChannelDescription);
    }

    public bool Equals(ChannelDescription other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (!object.Equals(ChannelId, other.ChannelId)) return false;
      if (CurrentMembers != other.CurrentMembers) return false;
      if (!object.Equals(State, other.State)) return false;
      return true;
    }

    public override int GetHashCode() {
      int hash = 1;
      if (channelId_ != null) hash ^= ChannelId.GetHashCode();
      if (CurrentMembers != 0) hash ^= CurrentMembers.GetHashCode();
      if (state_ != null) hash ^= State.GetHashCode();
      return hash;
    }

    public override string ToString() {
      return pb::JsonFormatter.ToDiagnosticString(this);
    }

    public void WriteTo(pb::CodedOutputStream output) {
      if (channelId_ != null) {
        output.WriteRawTag(10);
        output.WriteMessage(ChannelId);
      }
      if (CurrentMembers != 0) {
        output.WriteRawTag(16);
        output.WriteUInt32(CurrentMembers);
      }
      if (state_ != null) {
        output.WriteRawTag(26);
        output.WriteMessage(State);
      }
    }

    public int CalculateSize() {
      int size = 0;
      if (channelId_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(ChannelId);
      }
      if (CurrentMembers != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(CurrentMembers);
      }
      if (state_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(State);
      }
      return size;
    }

    public void MergeFrom(ChannelDescription other) {
      if (other == null) {
        return;
      }
      if (other.channelId_ != null) {
        if (channelId_ == null) {
          channelId_ = new Bgs.Protocol.EntityId();
        }
        ChannelId.MergeFrom(other.ChannelId);
      }
      if (other.CurrentMembers != 0) {
        CurrentMembers = other.CurrentMembers;
      }
      if (other.state_ != null) {
        if (state_ == null) {
          state_ = new Bgs.Protocol.Channel.V1.ChannelState();
        }
        State.MergeFrom(other.State);
      }
    }

    public void MergeFrom(pb::CodedInputStream input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            input.SkipLastField();
            break;
          case 10: {
            if (channelId_ == null) {
              channelId_ = new Bgs.Protocol.EntityId();
            }
            input.ReadMessage(channelId_);
            break;
          }
          case 16: {
            CurrentMembers = input.ReadUInt32();
            break;
          }
          case 26: {
            if (state_ == null) {
              state_ = new Bgs.Protocol.Channel.V1.ChannelState();
            }
            input.ReadMessage(state_);
            break;
          }
        }
      }
    }

  }

  [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  public sealed partial class ChannelInfo : pb::IMessage<ChannelInfo> {
    private static readonly pb::MessageParser<ChannelInfo> _parser = new pb::MessageParser<ChannelInfo>(() => new ChannelInfo());
    public static pb::MessageParser<ChannelInfo> Parser { get { return _parser; } }

    public static pbr::MessageDescriptor Descriptor {
      get { return Bgs.Protocol.Channel.V1.ChannelTypesReflection.Descriptor.MessageTypes[4]; }
    }

    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    public ChannelInfo() {
      OnConstruction();
    }

    partial void OnConstruction();

    public ChannelInfo(ChannelInfo other) : this() {
      Description = other.description_ != null ? other.Description.Clone() : null;
      member_ = other.member_.Clone();
    }

    public ChannelInfo Clone() {
      return new ChannelInfo(this);
    }

    /// <summary>Field number for the "description" field.</summary>
    public const int DescriptionFieldNumber = 1;
    private Bgs.Protocol.Channel.V1.ChannelDescription description_;
    public Bgs.Protocol.Channel.V1.ChannelDescription Description {
      get { return description_; }
      set {
        description_ = value;
      }
    }

    /// <summary>Field number for the "member" field.</summary>
    public const int MemberFieldNumber = 2;
    private static readonly pb::FieldCodec<Bgs.Protocol.Channel.V1.Member> _repeated_member_codec
        = pb::FieldCodec.ForMessage(18, Bgs.Protocol.Channel.V1.Member.Parser);
    private readonly pbc::RepeatedField<Bgs.Protocol.Channel.V1.Member> member_ = new pbc::RepeatedField<Bgs.Protocol.Channel.V1.Member>();
    public pbc::RepeatedField<Bgs.Protocol.Channel.V1.Member> Member {
      get { return member_; }
    }

    public override bool Equals(object other) {
      return Equals(other as ChannelInfo);
    }

    public bool Equals(ChannelInfo other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (!object.Equals(Description, other.Description)) return false;
      if(!member_.Equals(other.member_)) return false;
      return true;
    }

    public override int GetHashCode() {
      int hash = 1;
      if (description_ != null) hash ^= Description.GetHashCode();
      hash ^= member_.GetHashCode();
      return hash;
    }

    public override string ToString() {
      return pb::JsonFormatter.ToDiagnosticString(this);
    }

    public void WriteTo(pb::CodedOutputStream output) {
      if (description_ != null) {
        output.WriteRawTag(10);
        output.WriteMessage(Description);
      }
      member_.WriteTo(output, _repeated_member_codec);
    }

    public int CalculateSize() {
      int size = 0;
      if (description_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Description);
      }
      size += member_.CalculateSize(_repeated_member_codec);
      return size;
    }

    public void MergeFrom(ChannelInfo other) {
      if (other == null) {
        return;
      }
      if (other.description_ != null) {
        if (description_ == null) {
          description_ = new Bgs.Protocol.Channel.V1.ChannelDescription();
        }
        Description.MergeFrom(other.Description);
      }
      member_.Add(other.member_);
    }

    public void MergeFrom(pb::CodedInputStream input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            input.SkipLastField();
            break;
          case 10: {
            if (description_ == null) {
              description_ = new Bgs.Protocol.Channel.V1.ChannelDescription();
            }
            input.ReadMessage(description_);
            break;
          }
          case 18: {
            member_.AddEntriesFrom(input, _repeated_member_codec);
            break;
          }
        }
      }
    }

  }

  [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  public sealed partial class ChannelState : pb::IMessage<ChannelState> {
    private static readonly pb::MessageParser<ChannelState> _parser = new pb::MessageParser<ChannelState>(() => new ChannelState());
    public static pb::MessageParser<ChannelState> Parser { get { return _parser; } }

    public static pbr::MessageDescriptor Descriptor {
      get { return Bgs.Protocol.Channel.V1.ChannelTypesReflection.Descriptor.MessageTypes[5]; }
    }

    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    public ChannelState() {
      OnConstruction();
    }

    partial void OnConstruction();

    public ChannelState(ChannelState other) : this() {
      maxMembers_ = other.maxMembers_;
      minMembers_ = other.minMembers_;
      attribute_ = other.attribute_.Clone();
      invitation_ = other.invitation_.Clone();
      maxInvitations_ = other.maxInvitations_;
      reason_ = other.reason_;
      privacyLevel_ = other.privacyLevel_;
      name_ = other.name_;
      delegateName_ = other.delegateName_;
      channelType_ = other.channelType_;
      program_ = other.program_;
      allowOfflineMembers_ = other.allowOfflineMembers_;
      subscribeToPresence_ = other.subscribeToPresence_;
      destroyOnFounderLeave_ = other.destroyOnFounderLeave_;
    }

    public ChannelState Clone() {
      return new ChannelState(this);
    }

    /// <summary>Field number for the "max_members" field.</summary>
    public const int MaxMembersFieldNumber = 1;
    private uint maxMembers_;
    public uint MaxMembers {
      get { return maxMembers_; }
      set {
        maxMembers_ = value;
      }
    }

    /// <summary>Field number for the "min_members" field.</summary>
    public const int MinMembersFieldNumber = 2;
    private uint minMembers_;
    public uint MinMembers {
      get { return minMembers_; }
      set {
        minMembers_ = value;
      }
    }

    /// <summary>Field number for the "attribute" field.</summary>
    public const int AttributeFieldNumber = 3;
    private static readonly pb::FieldCodec<Bgs.Protocol.Attribute> _repeated_attribute_codec
        = pb::FieldCodec.ForMessage(26, Bgs.Protocol.Attribute.Parser);
    private readonly pbc::RepeatedField<Bgs.Protocol.Attribute> attribute_ = new pbc::RepeatedField<Bgs.Protocol.Attribute>();
    public pbc::RepeatedField<Bgs.Protocol.Attribute> Attribute {
      get { return attribute_; }
    }

    /// <summary>Field number for the "invitation" field.</summary>
    public const int InvitationFieldNumber = 4;
    private static readonly pb::FieldCodec<Bgs.Protocol.Invitation> _repeated_invitation_codec
        = pb::FieldCodec.ForMessage(34, Bgs.Protocol.Invitation.Parser);
    private readonly pbc::RepeatedField<Bgs.Protocol.Invitation> invitation_ = new pbc::RepeatedField<Bgs.Protocol.Invitation>();
    public pbc::RepeatedField<Bgs.Protocol.Invitation> Invitation {
      get { return invitation_; }
    }

    /// <summary>Field number for the "max_invitations" field.</summary>
    public const int MaxInvitationsFieldNumber = 5;
    private uint maxInvitations_;
    public uint MaxInvitations {
      get { return maxInvitations_; }
      set {
        maxInvitations_ = value;
      }
    }

    /// <summary>Field number for the "reason" field.</summary>
    public const int ReasonFieldNumber = 6;
    private uint reason_;
    public uint Reason {
      get { return reason_; }
      set {
        reason_ = value;
      }
    }

    /// <summary>Field number for the "privacy_level" field.</summary>
    public const int PrivacyLevelFieldNumber = 7;
    private Bgs.Protocol.Channel.V1.ChannelState.Types.PrivacyLevel privacyLevel_ = Bgs.Protocol.Channel.V1.ChannelState.Types.PrivacyLevel.PRIVACY_LEVEL_NONE;
    public Bgs.Protocol.Channel.V1.ChannelState.Types.PrivacyLevel PrivacyLevel {
      get { return privacyLevel_; }
      set {
        privacyLevel_ = value;
      }
    }

    /// <summary>Field number for the "name" field.</summary>
    public const int NameFieldNumber = 8;
    private string name_ = "";
    public string Name {
      get { return name_; }
      set {
        name_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "delegate_name" field.</summary>
    public const int DelegateNameFieldNumber = 9;
    private string delegateName_ = "";
    public string DelegateName {
      get { return delegateName_; }
      set {
        delegateName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "channel_type" field.</summary>
    public const int ChannelTypeFieldNumber = 10;
    private string channelType_ = "";
    public string ChannelType {
      get { return channelType_; }
      set {
        channelType_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "program" field.</summary>
    public const int ProgramFieldNumber = 11;
    private uint program_;
    public uint Program {
      get { return program_; }
      set {
        program_ = value;
      }
    }

    /// <summary>Field number for the "allow_offline_members" field.</summary>
    public const int AllowOfflineMembersFieldNumber = 12;
    private bool allowOfflineMembers_;
    public bool AllowOfflineMembers {
      get { return allowOfflineMembers_; }
      set {
        allowOfflineMembers_ = value;
      }
    }

    /// <summary>Field number for the "subscribe_to_presence" field.</summary>
    public const int SubscribeToPresenceFieldNumber = 13;
    private bool subscribeToPresence_;
    public bool SubscribeToPresence {
      get { return subscribeToPresence_; }
      set {
        subscribeToPresence_ = value;
      }
    }

    /// <summary>Field number for the "destroy_on_founder_leave" field.</summary>
    public const int DestroyOnFounderLeaveFieldNumber = 14;
    private bool destroyOnFounderLeave_;
    public bool DestroyOnFounderLeave {
      get { return destroyOnFounderLeave_; }
      set {
        destroyOnFounderLeave_ = value;
      }
    }

    public override bool Equals(object other) {
      return Equals(other as ChannelState);
    }

    public bool Equals(ChannelState other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (MaxMembers != other.MaxMembers) return false;
      if (MinMembers != other.MinMembers) return false;
      if(!attribute_.Equals(other.attribute_)) return false;
      if(!invitation_.Equals(other.invitation_)) return false;
      if (MaxInvitations != other.MaxInvitations) return false;
      if (Reason != other.Reason) return false;
      if (PrivacyLevel != other.PrivacyLevel) return false;
      if (Name != other.Name) return false;
      if (DelegateName != other.DelegateName) return false;
      if (ChannelType != other.ChannelType) return false;
      if (Program != other.Program) return false;
      if (AllowOfflineMembers != other.AllowOfflineMembers) return false;
      if (SubscribeToPresence != other.SubscribeToPresence) return false;
      if (DestroyOnFounderLeave != other.DestroyOnFounderLeave) return false;
      return true;
    }

    public override int GetHashCode() {
      int hash = 1;
      if (MaxMembers != 0) hash ^= MaxMembers.GetHashCode();
      if (MinMembers != 0) hash ^= MinMembers.GetHashCode();
      hash ^= attribute_.GetHashCode();
      hash ^= invitation_.GetHashCode();
      if (MaxInvitations != 0) hash ^= MaxInvitations.GetHashCode();
      if (Reason != 0) hash ^= Reason.GetHashCode();
      if (PrivacyLevel != Bgs.Protocol.Channel.V1.ChannelState.Types.PrivacyLevel.PRIVACY_LEVEL_NONE) hash ^= PrivacyLevel.GetHashCode();
      if (Name.Length != 0) hash ^= Name.GetHashCode();
      if (DelegateName.Length != 0) hash ^= DelegateName.GetHashCode();
      if (ChannelType.Length != 0) hash ^= ChannelType.GetHashCode();
      if (Program != 0) hash ^= Program.GetHashCode();
      if (AllowOfflineMembers != false) hash ^= AllowOfflineMembers.GetHashCode();
      if (SubscribeToPresence != false) hash ^= SubscribeToPresence.GetHashCode();
      if (DestroyOnFounderLeave != false) hash ^= DestroyOnFounderLeave.GetHashCode();
      return hash;
    }

    public override string ToString() {
      return pb::JsonFormatter.ToDiagnosticString(this);
    }

    public void WriteTo(pb::CodedOutputStream output) {
      if (MaxMembers != 0) {
        output.WriteRawTag(8);
        output.WriteUInt32(MaxMembers);
      }
      if (MinMembers != 0) {
        output.WriteRawTag(16);
        output.WriteUInt32(MinMembers);
      }
      attribute_.WriteTo(output, _repeated_attribute_codec);
      invitation_.WriteTo(output, _repeated_invitation_codec);
      if (MaxInvitations != 0) {
        output.WriteRawTag(40);
        output.WriteUInt32(MaxInvitations);
      }
      if (Reason != 0) {
        output.WriteRawTag(48);
        output.WriteUInt32(Reason);
      }
      if (PrivacyLevel != Bgs.Protocol.Channel.V1.ChannelState.Types.PrivacyLevel.PRIVACY_LEVEL_NONE) {
        output.WriteRawTag(56);
        output.WriteEnum((int) PrivacyLevel);
      }
      if (Name.Length != 0) {
        output.WriteRawTag(66);
        output.WriteString(Name);
      }
      if (DelegateName.Length != 0) {
        output.WriteRawTag(74);
        output.WriteString(DelegateName);
      }
      if (ChannelType.Length != 0) {
        output.WriteRawTag(82);
        output.WriteString(ChannelType);
      }
      if (Program != 0) {
        output.WriteRawTag(93);
        output.WriteFixed32(Program);
      }
      if (AllowOfflineMembers != false) {
        output.WriteRawTag(96);
        output.WriteBool(AllowOfflineMembers);
      }
      if (SubscribeToPresence != false) {
        output.WriteRawTag(104);
        output.WriteBool(SubscribeToPresence);
      }
      if (DestroyOnFounderLeave != false) {
        output.WriteRawTag(112);
        output.WriteBool(DestroyOnFounderLeave);
      }
    }

    public int CalculateSize() {
      int size = 0;
      if (MaxMembers != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(MaxMembers);
      }
      if (MinMembers != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(MinMembers);
      }
      size += attribute_.CalculateSize(_repeated_attribute_codec);
      size += invitation_.CalculateSize(_repeated_invitation_codec);
      if (MaxInvitations != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(MaxInvitations);
      }
      if (Reason != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Reason);
      }
      if (PrivacyLevel != Bgs.Protocol.Channel.V1.ChannelState.Types.PrivacyLevel.PRIVACY_LEVEL_NONE) {
        size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) PrivacyLevel);
      }
      if (Name.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
      }
      if (DelegateName.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(DelegateName);
      }
      if (ChannelType.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(ChannelType);
      }
      if (Program != 0) {
        size += 1 + 4;
      }
      if (AllowOfflineMembers != false) {
        size += 1 + 1;
      }
      if (SubscribeToPresence != false) {
        size += 1 + 1;
      }
      if (DestroyOnFounderLeave != false) {
        size += 1 + 1;
      }
      return size;
    }

    public void MergeFrom(ChannelState other) {
      if (other == null) {
        return;
      }
      if (other.MaxMembers != 0) {
        MaxMembers = other.MaxMembers;
      }
      if (other.MinMembers != 0) {
        MinMembers = other.MinMembers;
      }
      attribute_.Add(other.attribute_);
      invitation_.Add(other.invitation_);
      if (other.MaxInvitations != 0) {
        MaxInvitations = other.MaxInvitations;
      }
      if (other.Reason != 0) {
        Reason = other.Reason;
      }
      if (other.PrivacyLevel != Bgs.Protocol.Channel.V1.ChannelState.Types.PrivacyLevel.PRIVACY_LEVEL_NONE) {
        PrivacyLevel = other.PrivacyLevel;
      }
      if (other.Name.Length != 0) {
        Name = other.Name;
      }
      if (other.DelegateName.Length != 0) {
        DelegateName = other.DelegateName;
      }
      if (other.ChannelType.Length != 0) {
        ChannelType = other.ChannelType;
      }
      if (other.Program != 0) {
        Program = other.Program;
      }
      if (other.AllowOfflineMembers != false) {
        AllowOfflineMembers = other.AllowOfflineMembers;
      }
      if (other.SubscribeToPresence != false) {
        SubscribeToPresence = other.SubscribeToPresence;
      }
      if (other.DestroyOnFounderLeave != false) {
        DestroyOnFounderLeave = other.DestroyOnFounderLeave;
      }
    }

    public void MergeFrom(pb::CodedInputStream input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            input.SkipLastField();
            break;
          case 8: {
            MaxMembers = input.ReadUInt32();
            break;
          }
          case 16: {
            MinMembers = input.ReadUInt32();
            break;
          }
          case 26: {
            attribute_.AddEntriesFrom(input, _repeated_attribute_codec);
            break;
          }
          case 34: {
            invitation_.AddEntriesFrom(input, _repeated_invitation_codec);
            break;
          }
          case 40: {
            MaxInvitations = input.ReadUInt32();
            break;
          }
          case 48: {
            Reason = input.ReadUInt32();
            break;
          }
          case 56: {
            privacyLevel_ = (Bgs.Protocol.Channel.V1.ChannelState.Types.PrivacyLevel) input.ReadEnum();
            break;
          }
          case 66: {
            Name = input.ReadString();
            break;
          }
          case 74: {
            DelegateName = input.ReadString();
            break;
          }
          case 82: {
            ChannelType = input.ReadString();
            break;
          }
          case 93: {
            Program = input.ReadFixed32();
            break;
          }
          case 96: {
            AllowOfflineMembers = input.ReadBool();
            break;
          }
          case 104: {
            SubscribeToPresence = input.ReadBool();
            break;
          }
          case 112: {
            DestroyOnFounderLeave = input.ReadBool();
            break;
          }
        }
      }
    }

    #region Nested types
    /// <summary>Container for nested types declared in the ChannelState message type.</summary>
    [System.Diagnostics.DebuggerNonUserCodeAttribute()]
    public static partial class Types {
      public enum PrivacyLevel {
        PRIVACY_LEVEL_NONE = 0,
        PRIVACY_LEVEL_OPEN = 1,
        PRIVACY_LEVEL_OPEN_INVITATION_AND_FRIEND = 2,
        PRIVACY_LEVEL_OPEN_INVITATION = 3,
        PRIVACY_LEVEL_CLOSED = 4,
      }

    }
    #endregion

  }

  [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  public sealed partial class MemberState : pb::IMessage<MemberState> {
    private static readonly pb::MessageParser<MemberState> _parser = new pb::MessageParser<MemberState>(() => new MemberState());
    public static pb::MessageParser<MemberState> Parser { get { return _parser; } }

    public static pbr::MessageDescriptor Descriptor {
      get { return Bgs.Protocol.Channel.V1.ChannelTypesReflection.Descriptor.MessageTypes[6]; }
    }

    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    public MemberState() {
      OnConstruction();
    }

    partial void OnConstruction();

    public MemberState(MemberState other) : this() {
      attribute_ = other.attribute_.Clone();
      role_ = other.role_.Clone();
      privileges_ = other.privileges_;
      Info = other.info_ != null ? other.Info.Clone() : null;
      dEPRECATEDHidden_ = other.dEPRECATEDHidden_;
    }

    public MemberState Clone() {
      return new MemberState(this);
    }

    /// <summary>Field number for the "attribute" field.</summary>
    public const int AttributeFieldNumber = 1;
    private static readonly pb::FieldCodec<Bgs.Protocol.Attribute> _repeated_attribute_codec
        = pb::FieldCodec.ForMessage(10, Bgs.Protocol.Attribute.Parser);
    private readonly pbc::RepeatedField<Bgs.Protocol.Attribute> attribute_ = new pbc::RepeatedField<Bgs.Protocol.Attribute>();
    public pbc::RepeatedField<Bgs.Protocol.Attribute> Attribute {
      get { return attribute_; }
    }

    /// <summary>Field number for the "role" field.</summary>
    public const int RoleFieldNumber = 2;
    private static readonly pb::FieldCodec<uint> _repeated_role_codec
        = pb::FieldCodec.ForUInt32(18);
    private readonly pbc::RepeatedField<uint> role_ = new pbc::RepeatedField<uint>();
    public pbc::RepeatedField<uint> Role {
      get { return role_; }
    }

    /// <summary>Field number for the "privileges" field.</summary>
    public const int PrivilegesFieldNumber = 3;
    private ulong privileges_;
    public ulong Privileges {
      get { return privileges_; }
      set {
        privileges_ = value;
      }
    }

    /// <summary>Field number for the "info" field.</summary>
    public const int InfoFieldNumber = 4;
    private Bgs.Protocol.AccountInfo info_;
    public Bgs.Protocol.AccountInfo Info {
      get { return info_; }
      set {
        info_ = value;
      }
    }

    /// <summary>Field number for the "DEPRECATED_hidden" field.</summary>
    public const int DEPRECATEDHiddenFieldNumber = 5;
    private bool dEPRECATEDHidden_;
    [System.ObsoleteAttribute()]
    public bool DEPRECATEDHidden {
      get { return dEPRECATEDHidden_; }
      set {
        dEPRECATEDHidden_ = value;
      }
    }

    public override bool Equals(object other) {
      return Equals(other as MemberState);
    }

    public bool Equals(MemberState other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if(!attribute_.Equals(other.attribute_)) return false;
      if(!role_.Equals(other.role_)) return false;
      if (Privileges != other.Privileges) return false;
      if (!object.Equals(Info, other.Info)) return false;
      if (DEPRECATEDHidden != other.DEPRECATEDHidden) return false;
      return true;
    }

    public override int GetHashCode() {
      int hash = 1;
      hash ^= attribute_.GetHashCode();
      hash ^= role_.GetHashCode();
      if (Privileges != 0UL) hash ^= Privileges.GetHashCode();
      if (info_ != null) hash ^= Info.GetHashCode();
      if (DEPRECATEDHidden != false) hash ^= DEPRECATEDHidden.GetHashCode();
      return hash;
    }

    public override string ToString() {
      return pb::JsonFormatter.ToDiagnosticString(this);
    }

    public void WriteTo(pb::CodedOutputStream output) {
      attribute_.WriteTo(output, _repeated_attribute_codec);
      role_.WriteTo(output, _repeated_role_codec);
      if (Privileges != 0UL) {
        output.WriteRawTag(24);
        output.WriteUInt64(Privileges);
      }
      if (info_ != null) {
        output.WriteRawTag(34);
        output.WriteMessage(Info);
      }
      if (DEPRECATEDHidden != false) {
        output.WriteRawTag(40);
        output.WriteBool(DEPRECATEDHidden);
      }
    }

    public int CalculateSize() {
      int size = 0;
      size += attribute_.CalculateSize(_repeated_attribute_codec);
      size += role_.CalculateSize(_repeated_role_codec);
      if (Privileges != 0UL) {
        size += 1 + pb::CodedOutputStream.ComputeUInt64Size(Privileges);
      }
      if (info_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Info);
      }
      if (DEPRECATEDHidden != false) {
        size += 1 + 1;
      }
      return size;
    }

    public void MergeFrom(MemberState other) {
      if (other == null) {
        return;
      }
      attribute_.Add(other.attribute_);
      role_.Add(other.role_);
      if (other.Privileges != 0UL) {
        Privileges = other.Privileges;
      }
      if (other.info_ != null) {
        if (info_ == null) {
          info_ = new Bgs.Protocol.AccountInfo();
        }
        Info.MergeFrom(other.Info);
      }
      if (other.DEPRECATEDHidden != false) {
        DEPRECATEDHidden = other.DEPRECATEDHidden;
      }
    }

    public void MergeFrom(pb::CodedInputStream input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            input.SkipLastField();
            break;
          case 10: {
            attribute_.AddEntriesFrom(input, _repeated_attribute_codec);
            break;
          }
          case 18:
          case 16: {
            role_.AddEntriesFrom(input, _repeated_role_codec);
            break;
          }
          case 24: {
            Privileges = input.ReadUInt64();
            break;
          }
          case 34: {
            if (info_ == null) {
              info_ = new Bgs.Protocol.AccountInfo();
            }
            input.ReadMessage(info_);
            break;
          }
          case 40: {
            DEPRECATEDHidden = input.ReadBool();
            break;
          }
        }
      }
    }

  }

  [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  public sealed partial class Member : pb::IMessage<Member> {
    private static readonly pb::MessageParser<Member> _parser = new pb::MessageParser<Member>(() => new Member());
    public static pb::MessageParser<Member> Parser { get { return _parser; } }

    public static pbr::MessageDescriptor Descriptor {
      get { return Bgs.Protocol.Channel.V1.ChannelTypesReflection.Descriptor.MessageTypes[7]; }
    }

    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    public Member() {
      OnConstruction();
    }

    partial void OnConstruction();

    public Member(Member other) : this() {
      Identity = other.identity_ != null ? other.Identity.Clone() : null;
      State = other.state_ != null ? other.State.Clone() : null;
    }

    public Member Clone() {
      return new Member(this);
    }

    /// <summary>Field number for the "identity" field.</summary>
    public const int IdentityFieldNumber = 1;
    private Bgs.Protocol.Identity identity_;
    public Bgs.Protocol.Identity Identity {
      get { return identity_; }
      set {
        identity_ = value;
      }
    }

    /// <summary>Field number for the "state" field.</summary>
    public const int StateFieldNumber = 2;
    private Bgs.Protocol.Channel.V1.MemberState state_;
    public Bgs.Protocol.Channel.V1.MemberState State {
      get { return state_; }
      set {
        state_ = value;
      }
    }

    public override bool Equals(object other) {
      return Equals(other as Member);
    }

    public bool Equals(Member other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (!object.Equals(Identity, other.Identity)) return false;
      if (!object.Equals(State, other.State)) return false;
      return true;
    }

    public override int GetHashCode() {
      int hash = 1;
      if (identity_ != null) hash ^= Identity.GetHashCode();
      if (state_ != null) hash ^= State.GetHashCode();
      return hash;
    }

    public override string ToString() {
      return pb::JsonFormatter.ToDiagnosticString(this);
    }

    public void WriteTo(pb::CodedOutputStream output) {
      if (identity_ != null) {
        output.WriteRawTag(10);
        output.WriteMessage(Identity);
      }
      if (state_ != null) {
        output.WriteRawTag(18);
        output.WriteMessage(State);
      }
    }

    public int CalculateSize() {
      int size = 0;
      if (identity_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Identity);
      }
      if (state_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(State);
      }
      return size;
    }

    public void MergeFrom(Member other) {
      if (other == null) {
        return;
      }
      if (other.identity_ != null) {
        if (identity_ == null) {
          identity_ = new Bgs.Protocol.Identity();
        }
        Identity.MergeFrom(other.Identity);
      }
      if (other.state_ != null) {
        if (state_ == null) {
          state_ = new Bgs.Protocol.Channel.V1.MemberState();
        }
        State.MergeFrom(other.State);
      }
    }

    public void MergeFrom(pb::CodedInputStream input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            input.SkipLastField();
            break;
          case 10: {
            if (identity_ == null) {
              identity_ = new Bgs.Protocol.Identity();
            }
            input.ReadMessage(identity_);
            break;
          }
          case 18: {
            if (state_ == null) {
              state_ = new Bgs.Protocol.Channel.V1.MemberState();
            }
            input.ReadMessage(state_);
            break;
          }
        }
      }
    }

  }

  #endregion

}

#endregion Designer generated code
