// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: bgs/low/pb/client/presence_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.Presence.V1
{

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

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

    static PresenceTypesReflection() {
      byte[] descriptorData = System.Convert.FromBase64String(
          string.Concat(
            "CiZiZ3MvbG93L3BiL2NsaWVudC9wcmVzZW5jZV90eXBlcy5wcm90bxIYYmdz",
            "LnByb3RvY29sLnByZXNlbmNlLnYxGidiZ3MvbG93L3BiL2NsaWVudC9hdHRy",
            "aWJ1dGVfdHlwZXMucHJvdG8aJGJncy9sb3cvcGIvY2xpZW50L2VudGl0eV90",
            "eXBlcy5wcm90bxolYmdzL2xvdy9wYi9jbGllbnQvY2hhbm5lbF90eXBlcy5w",
            "cm90byJXChtSaWNoUHJlc2VuY2VMb2NhbGl6YXRpb25LZXkSDwoHcHJvZ3Jh",
            "bRgBIAEoBxIOCgZzdHJlYW0YAiABKAcSFwoPbG9jYWxpemF0aW9uX2lkGAMg",
            "ASgNIkwKCEZpZWxkS2V5Eg8KB3Byb2dyYW0YASABKA0SDQoFZ3JvdXAYAiAB",
            "KA0SDQoFZmllbGQYAyABKA0SEQoJdW5pcXVlX2lkGAQgASgEIl4KBUZpZWxk",
            "Ei8KA2tleRgBIAEoCzIiLmJncy5wcm90b2NvbC5wcmVzZW5jZS52MS5GaWVs",
            "ZEtleRIkCgV2YWx1ZRgCIAEoCzIVLmJncy5wcm90b2NvbC5WYXJpYW50IrAB",
            "Cg5GaWVsZE9wZXJhdGlvbhIuCgVmaWVsZBgBIAEoCzIfLmJncy5wcm90b2Nv",
            "bC5wcmVzZW5jZS52MS5GaWVsZBJJCglvcGVyYXRpb24YAiABKA4yNi5iZ3Mu",
            "cHJvdG9jb2wucHJlc2VuY2UudjEuRmllbGRPcGVyYXRpb24uT3BlcmF0aW9u",
            "VHlwZSIjCg1PcGVyYXRpb25UeXBlEgcKA1NFVBAAEgkKBUNMRUFSEAEixwEK",
            "DENoYW5uZWxTdGF0ZRIpCgllbnRpdHlfaWQYASABKAsyFi5iZ3MucHJvdG9j",
            "b2wuRW50aXR5SWQSQQoPZmllbGRfb3BlcmF0aW9uGAIgAygLMiguYmdzLnBy",
            "b3RvY29sLnByZXNlbmNlLnYxLkZpZWxkT3BlcmF0aW9uEg8KB2hlYWxpbmcY",
            "AyABKAgSOAoIcHJlc2VuY2UYZSABKAsyJi5iZ3MucHJvdG9jb2wucHJlc2Vu",
            "Y2UudjEuQ2hhbm5lbFN0YXRlQgJIAmIGcHJvdG8z"));
      descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
          new pbr::FileDescriptor[] { Bgs.Protocol.AttributeTypesReflection.Descriptor, Bgs.Protocol.EntityTypesReflection.Descriptor, Bgs.Protocol.Channel.V1.ChannelTypesReflection.Descriptor, },
          new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
            new pbr::GeneratedClrTypeInfo(typeof(Bgs.Protocol.Presence.V1.RichPresenceLocalizationKey), Bgs.Protocol.Presence.V1.RichPresenceLocalizationKey.Parser, new[]{ "Program", "Stream", "LocalizationId" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(Bgs.Protocol.Presence.V1.FieldKey), Bgs.Protocol.Presence.V1.FieldKey.Parser, new[]{ "Program", "Group", "Field", "UniqueId" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(Bgs.Protocol.Presence.V1.Field), Bgs.Protocol.Presence.V1.Field.Parser, new[]{ "Key", "Value" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(Bgs.Protocol.Presence.V1.FieldOperation), Bgs.Protocol.Presence.V1.FieldOperation.Parser, new[]{ "Field", "Operation" }, null, new[]{ typeof(Bgs.Protocol.Presence.V1.FieldOperation.Types.OperationType) }, null),
            new pbr::GeneratedClrTypeInfo(typeof(Bgs.Protocol.Presence.V1.ChannelState), Bgs.Protocol.Presence.V1.ChannelState.Parser, new[]{ "EntityId", "FieldOperation", "Healing", "Presence" }, null, null, null)
          }));
    }
    #endregion

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

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

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

    public RichPresenceLocalizationKey() {
      OnConstruction();
    }

    partial void OnConstruction();

    public RichPresenceLocalizationKey(RichPresenceLocalizationKey other) : this() {
      program_ = other.program_;
      stream_ = other.stream_;
      localizationId_ = other.localizationId_;
    }

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

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

    /// <summary>Field number for the "stream" field.</summary>
    public const int StreamFieldNumber = 2;
    private uint stream_;
    public uint Stream {
      get { return stream_; }
      set {
        stream_ = value;
      }
    }

    /// <summary>Field number for the "localization_id" field.</summary>
    public const int LocalizationIdFieldNumber = 3;
    private uint localizationId_;
    public uint LocalizationId {
      get { return localizationId_; }
      set {
        localizationId_ = value;
      }
    }

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

    public bool Equals(RichPresenceLocalizationKey other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (Program != other.Program) return false;
      if (Stream != other.Stream) return false;
      if (LocalizationId != other.LocalizationId) return false;
      return true;
    }

    public override int GetHashCode() {
      int hash = 1;
      if (Program != 0) hash ^= Program.GetHashCode();
      if (Stream != 0) hash ^= Stream.GetHashCode();
      if (LocalizationId != 0) hash ^= LocalizationId.GetHashCode();
      return hash;
    }

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

    public void WriteTo(pb::CodedOutputStream output) {
      if (Program != 0) {
        output.WriteRawTag(13);
        output.WriteFixed32(Program);
      }
      if (Stream != 0) {
        output.WriteRawTag(21);
        output.WriteFixed32(Stream);
      }
      if (LocalizationId != 0) {
        output.WriteRawTag(24);
        output.WriteUInt32(LocalizationId);
      }
    }

    public int CalculateSize() {
      int size = 0;
      if (Program != 0) {
        size += 1 + 4;
      }
      if (Stream != 0) {
        size += 1 + 4;
      }
      if (LocalizationId != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(LocalizationId);
      }
      return size;
    }

    public void MergeFrom(RichPresenceLocalizationKey other) {
      if (other == null) {
        return;
      }
      if (other.Program != 0) {
        Program = other.Program;
      }
      if (other.Stream != 0) {
        Stream = other.Stream;
      }
      if (other.LocalizationId != 0) {
        LocalizationId = other.LocalizationId;
      }
    }

    public void MergeFrom(pb::CodedInputStream input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            input.SkipLastField();
            break;
          case 13: {
            Program = input.ReadFixed32();
            break;
          }
          case 21: {
            Stream = input.ReadFixed32();
            break;
          }
          case 24: {
            LocalizationId = input.ReadUInt32();
            break;
          }
        }
      }
    }

  }

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

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

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

    public FieldKey() {
      OnConstruction();
    }

    partial void OnConstruction();

    public FieldKey(FieldKey other) : this() {
      program_ = other.program_;
      group_ = other.group_;
      field_ = other.field_;
      uniqueId_ = other.uniqueId_;
    }

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

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

    /// <summary>Field number for the "group" field.</summary>
    public const int GroupFieldNumber = 2;
    private uint group_;
    public uint Group {
      get { return group_; }
      set {
        group_ = value;
      }
    }

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

    /// <summary>Field number for the "unique_id" field.</summary>
    public const int UniqueIdFieldNumber = 4;
    private ulong uniqueId_;
    public ulong UniqueId {
      get { return uniqueId_; }
      set {
        uniqueId_ = value;
      }
    }

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

    public bool Equals(FieldKey other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (Program != other.Program) return false;
      if (Group != other.Group) return false;
      if (Field != other.Field) return false;
      if (UniqueId != other.UniqueId) return false;
      return true;
    }

    public override int GetHashCode() {
      int hash = 1;
      if (Program != 0) hash ^= Program.GetHashCode();
      if (Group != 0) hash ^= Group.GetHashCode();
      if (Field != 0) hash ^= Field.GetHashCode();
      if (UniqueId != 0UL) hash ^= UniqueId.GetHashCode();
      return hash;
    }

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

    public void WriteTo(pb::CodedOutputStream output) {
      if (Program != 0) {
        output.WriteRawTag(8);
        output.WriteUInt32(Program);
      }
      if (Group != 0) {
        output.WriteRawTag(16);
        output.WriteUInt32(Group);
      }
      if (Field != 0) {
        output.WriteRawTag(24);
        output.WriteUInt32(Field);
      }
      if (UniqueId != 0UL) {
        output.WriteRawTag(32);
        output.WriteUInt64(UniqueId);
      }
    }

    public int CalculateSize() {
      int size = 0;
      if (Program != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Program);
      }
      if (Group != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Group);
      }
      if (Field != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Field);
      }
      if (UniqueId != 0UL) {
        size += 1 + pb::CodedOutputStream.ComputeUInt64Size(UniqueId);
      }
      return size;
    }

    public void MergeFrom(FieldKey other) {
      if (other == null) {
        return;
      }
      if (other.Program != 0) {
        Program = other.Program;
      }
      if (other.Group != 0) {
        Group = other.Group;
      }
      if (other.Field != 0) {
        Field = other.Field;
      }
      if (other.UniqueId != 0UL) {
        UniqueId = other.UniqueId;
      }
    }

    public void MergeFrom(pb::CodedInputStream input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            input.SkipLastField();
            break;
          case 8: {
            Program = input.ReadUInt32();
            break;
          }
          case 16: {
            Group = input.ReadUInt32();
            break;
          }
          case 24: {
            Field = input.ReadUInt32();
            break;
          }
          case 32: {
            UniqueId = input.ReadUInt64();
            break;
          }
        }
      }
    }

  }

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

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

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

    public Field() {
      OnConstruction();
    }

    partial void OnConstruction();

    public Field(Field other) : this() {
      Key = other.key_ != null ? other.Key.Clone() : null;
      Value = other.value_ != null ? other.Value.Clone() : null;
    }

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

    /// <summary>Field number for the "key" field.</summary>
    public const int KeyFieldNumber = 1;
    private Bgs.Protocol.Presence.V1.FieldKey key_;
    public Bgs.Protocol.Presence.V1.FieldKey Key {
      get { return key_; }
      set {
        key_ = value;
      }
    }

    /// <summary>Field number for the "value" field.</summary>
    public const int ValueFieldNumber = 2;
    private Bgs.Protocol.Variant value_;
    public Bgs.Protocol.Variant Value {
      get { return value_; }
      set {
        value_ = value;
      }
    }

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

    public bool Equals(Field other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (!object.Equals(Key, other.Key)) return false;
      if (!object.Equals(Value, other.Value)) return false;
      return true;
    }

    public override int GetHashCode() {
      int hash = 1;
      if (key_ != null) hash ^= Key.GetHashCode();
      if (value_ != null) hash ^= Value.GetHashCode();
      return hash;
    }

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

    public void WriteTo(pb::CodedOutputStream output) {
      if (key_ != null) {
        output.WriteRawTag(10);
        output.WriteMessage(Key);
      }
      if (value_ != null) {
        output.WriteRawTag(18);
        output.WriteMessage(Value);
      }
    }

    public int CalculateSize() {
      int size = 0;
      if (key_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Key);
      }
      if (value_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Value);
      }
      return size;
    }

    public void MergeFrom(Field other) {
      if (other == null) {
        return;
      }
      if (other.key_ != null) {
        if (key_ == null) {
          key_ = new Bgs.Protocol.Presence.V1.FieldKey();
        }
        Key.MergeFrom(other.Key);
      }
      if (other.value_ != null) {
        if (value_ == null) {
          value_ = new Bgs.Protocol.Variant();
        }
        Value.MergeFrom(other.Value);
      }
    }

    public void MergeFrom(pb::CodedInputStream input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            input.SkipLastField();
            break;
          case 10: {
            if (key_ == null) {
              key_ = new Bgs.Protocol.Presence.V1.FieldKey();
            }
            input.ReadMessage(key_);
            break;
          }
          case 18: {
            if (value_ == null) {
              value_ = new Bgs.Protocol.Variant();
            }
            input.ReadMessage(value_);
            break;
          }
        }
      }
    }

  }

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

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

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

    public FieldOperation() {
      OnConstruction();
    }

    partial void OnConstruction();

    public FieldOperation(FieldOperation other) : this() {
      Field = other.field_ != null ? other.Field.Clone() : null;
      operation_ = other.operation_;
    }

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

    /// <summary>Field number for the "field" field.</summary>
    public const int FieldFieldNumber = 1;
    private Bgs.Protocol.Presence.V1.Field field_;
    public Bgs.Protocol.Presence.V1.Field Field {
      get { return field_; }
      set {
        field_ = value;
      }
    }

    /// <summary>Field number for the "operation" field.</summary>
    public const int OperationFieldNumber = 2;
    private Bgs.Protocol.Presence.V1.FieldOperation.Types.OperationType operation_ = Bgs.Protocol.Presence.V1.FieldOperation.Types.OperationType.SET;
    public Bgs.Protocol.Presence.V1.FieldOperation.Types.OperationType Operation {
      get { return operation_; }
      set {
        operation_ = value;
      }
    }

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

    public bool Equals(FieldOperation other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (!object.Equals(Field, other.Field)) return false;
      if (Operation != other.Operation) return false;
      return true;
    }

    public override int GetHashCode() {
      int hash = 1;
      if (field_ != null) hash ^= Field.GetHashCode();
      if (Operation != Bgs.Protocol.Presence.V1.FieldOperation.Types.OperationType.SET) hash ^= Operation.GetHashCode();
      return hash;
    }

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

    public void WriteTo(pb::CodedOutputStream output) {
      if (field_ != null) {
        output.WriteRawTag(10);
        output.WriteMessage(Field);
      }
      if (Operation != Bgs.Protocol.Presence.V1.FieldOperation.Types.OperationType.SET) {
        output.WriteRawTag(16);
        output.WriteEnum((int) Operation);
      }
    }

    public int CalculateSize() {
      int size = 0;
      if (field_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Field);
      }
      if (Operation != Bgs.Protocol.Presence.V1.FieldOperation.Types.OperationType.SET) {
        size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Operation);
      }
      return size;
    }

    public void MergeFrom(FieldOperation other) {
      if (other == null) {
        return;
      }
      if (other.field_ != null) {
        if (field_ == null) {
          field_ = new Bgs.Protocol.Presence.V1.Field();
        }
        Field.MergeFrom(other.Field);
      }
      if (other.Operation != Bgs.Protocol.Presence.V1.FieldOperation.Types.OperationType.SET) {
        Operation = other.Operation;
      }
    }

    public void MergeFrom(pb::CodedInputStream input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            input.SkipLastField();
            break;
          case 10: {
            if (field_ == null) {
              field_ = new Bgs.Protocol.Presence.V1.Field();
            }
            input.ReadMessage(field_);
            break;
          }
          case 16: {
            operation_ = (Bgs.Protocol.Presence.V1.FieldOperation.Types.OperationType) input.ReadEnum();
            break;
          }
        }
      }
    }

    #region Nested types
    /// <summary>Container for nested types declared in the FieldOperation message type.</summary>
    [System.Diagnostics.DebuggerNonUserCodeAttribute()]
    public static partial class Types {
      public enum OperationType {
        SET = 0,
        CLEAR = 1,
      }

    }
    #endregion

  }

  [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.Presence.V1.PresenceTypesReflection.Descriptor.MessageTypes[4]; }
    }

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

    public ChannelState() {
      OnConstruction();
    }

    partial void OnConstruction();

    public ChannelState(ChannelState other) : this() {
      EntityId = other.entityId_ != null ? other.EntityId.Clone() : null;
      fieldOperation_ = other.fieldOperation_.Clone();
      healing_ = other.healing_;
      Presence = other.presence_ != null ? other.Presence.Clone() : null;
    }

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

    /// <summary>Field number for the "entity_id" field.</summary>
    public const int EntityIdFieldNumber = 1;
    private Bgs.Protocol.EntityId entityId_;
    public Bgs.Protocol.EntityId EntityId {
      get { return entityId_; }
      set {
        entityId_ = value;
      }
    }

    /// <summary>Field number for the "field_operation" field.</summary>
    public const int FieldOperationFieldNumber = 2;
    private static readonly pb::FieldCodec<Bgs.Protocol.Presence.V1.FieldOperation> _repeated_fieldOperation_codec
        = pb::FieldCodec.ForMessage(18, Bgs.Protocol.Presence.V1.FieldOperation.Parser);
    private readonly pbc::RepeatedField<Bgs.Protocol.Presence.V1.FieldOperation> fieldOperation_ = new pbc::RepeatedField<Bgs.Protocol.Presence.V1.FieldOperation>();
    public pbc::RepeatedField<Bgs.Protocol.Presence.V1.FieldOperation> FieldOperation {
      get { return fieldOperation_; }
    }

    /// <summary>Field number for the "healing" field.</summary>
    public const int HealingFieldNumber = 3;
    private bool healing_;
    public bool Healing {
      get { return healing_; }
      set {
        healing_ = value;
      }
    }

    /// <summary>Field number for the "presence" field.</summary>
    public const int PresenceFieldNumber = 101;
    private Bgs.Protocol.Presence.V1.ChannelState presence_;
    public Bgs.Protocol.Presence.V1.ChannelState Presence {
      get { return presence_; }
      set {
        presence_ = 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 (!object.Equals(EntityId, other.EntityId)) return false;
      if(!fieldOperation_.Equals(other.fieldOperation_)) return false;
      if (Healing != other.Healing) return false;
      if (!object.Equals(Presence, other.Presence)) return false;
      return true;
    }

    public override int GetHashCode() {
      int hash = 1;
      if (entityId_ != null) hash ^= EntityId.GetHashCode();
      hash ^= fieldOperation_.GetHashCode();
      if (Healing != false) hash ^= Healing.GetHashCode();
      if (presence_ != null) hash ^= Presence.GetHashCode();
      return hash;
    }

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

    public void WriteTo(pb::CodedOutputStream output) {
      if (entityId_ != null) {
        output.WriteRawTag(10);
        output.WriteMessage(EntityId);
      }
      fieldOperation_.WriteTo(output, _repeated_fieldOperation_codec);
      if (Healing != false) {
        output.WriteRawTag(24);
        output.WriteBool(Healing);
      }
      if (presence_ != null) {
        output.WriteRawTag(170, 6);
        output.WriteMessage(Presence);
      }
    }

    public int CalculateSize() {
      int size = 0;
      if (entityId_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(EntityId);
      }
      size += fieldOperation_.CalculateSize(_repeated_fieldOperation_codec);
      if (Healing != false) {
        size += 1 + 1;
      }
      if (presence_ != null) {
        size += 2 + pb::CodedOutputStream.ComputeMessageSize(Presence);
      }
      return size;
    }

    public void MergeFrom(ChannelState other) {
      if (other == null) {
        return;
      }
      if (other.entityId_ != null) {
        if (entityId_ == null) {
          entityId_ = new Bgs.Protocol.EntityId();
        }
        EntityId.MergeFrom(other.EntityId);
      }
      fieldOperation_.Add(other.fieldOperation_);
      if (other.Healing != false) {
        Healing = other.Healing;
      }
      if (other.presence_ != null) {
        if (presence_ == null) {
          presence_ = new Bgs.Protocol.Presence.V1.ChannelState();
        }
        Presence.MergeFrom(other.Presence);
      }
    }

    public void MergeFrom(pb::CodedInputStream input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            input.SkipLastField();
            break;
          case 10: {
            if (entityId_ == null) {
              entityId_ = new Bgs.Protocol.EntityId();
            }
            input.ReadMessage(entityId_);
            break;
          }
          case 18: {
            fieldOperation_.AddEntriesFrom(input, _repeated_fieldOperation_codec);
            break;
          }
          case 24: {
            Healing = input.ReadBool();
            break;
          }
          case 810: {
            if (presence_ == null) {
              presence_ = new Bgs.Protocol.Presence.V1.ChannelState();
            }
            input.ReadMessage(presence_);
            break;
          }
        }
      }
    }

  }

  #endregion

}

#endregion Designer generated code
