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

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

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

    static InvitationTypesReflection() {
      byte[] descriptorData = System.Convert.FromBase64String(
          string.Concat(
            "CihiZ3MvbG93L3BiL2NsaWVudC9pbnZpdGF0aW9uX3R5cGVzLnByb3RvEgxi",
            "Z3MucHJvdG9jb2waJGJncy9sb3cvcGIvY2xpZW50L2VudGl0eV90eXBlcy5w",
            "cm90byL0AQoKSW52aXRhdGlvbhIKCgJpZBgBIAEoBhIwChBpbnZpdGVyX2lk",
            "ZW50aXR5GAIgASgLMhYuYmdzLnByb3RvY29sLklkZW50aXR5EjAKEGludml0",
            "ZWVfaWRlbnRpdHkYAyABKAsyFi5iZ3MucHJvdG9jb2wuSWRlbnRpdHkSFAoM",
            "aW52aXRlcl9uYW1lGAQgASgJEhQKDGludml0ZWVfbmFtZRgFIAEoCRIaChJp",
            "bnZpdGF0aW9uX21lc3NhZ2UYBiABKAkSFQoNY3JlYXRpb25fdGltZRgHIAEo",
            "BBIXCg9leHBpcmF0aW9uX3RpbWUYCCABKAQihAIKFEludml0YXRpb25TdWdn",
            "ZXN0aW9uEioKCmNoYW5uZWxfaWQYASABKAsyFi5iZ3MucHJvdG9jb2wuRW50",
            "aXR5SWQSLAoMc3VnZ2VzdGVyX2lkGAIgASgLMhYuYmdzLnByb3RvY29sLkVu",
            "dGl0eUlkEiwKDHN1Z2dlc3RlZV9pZBgDIAEoCzIWLmJncy5wcm90b2NvbC5F",
            "bnRpdHlJZBIWCg5zdWdnZXN0ZXJfbmFtZRgEIAEoCRIWCg5zdWdnZXN0ZWVf",
            "bmFtZRgFIAEoCRI0ChRzdWdnZXN0ZXJfYWNjb3VudF9pZBgGIAEoCzIWLmJn",
            "cy5wcm90b2NvbC5FbnRpdHlJZCJfChBJbnZpdGF0aW9uVGFyZ2V0EigKCGlk",
            "ZW50aXR5GAEgASgLMhYuYmdzLnByb3RvY29sLklkZW50aXR5Eg0KBWVtYWls",
            "GAIgASgJEhIKCmJhdHRsZV90YWcYAyABKAkiRwoQSW52aXRhdGlvblBhcmFt",
            "cxIaChJpbnZpdGF0aW9uX21lc3NhZ2UYASABKAkSFwoPZXhwaXJhdGlvbl90",
            "aW1lGAIgASgEIoUCChVTZW5kSW52aXRhdGlvblJlcXVlc3QSLgoOYWdlbnRf",
            "aWRlbnRpdHkYASABKAsyFi5iZ3MucHJvdG9jb2wuSWRlbnRpdHkSLQoJdGFy",
            "Z2V0X2lkGAIgASgLMhYuYmdzLnByb3RvY29sLkVudGl0eUlkQgIYARIuCgZw",
            "YXJhbXMYAyABKAsyHi5iZ3MucHJvdG9jb2wuSW52aXRhdGlvblBhcmFtcxIt",
            "CgphZ2VudF9pbmZvGAQgASgLMhkuYmdzLnByb3RvY29sLkFjY291bnRJbmZv",
            "Ei4KBnRhcmdldBgFIAEoCzIeLmJncy5wcm90b2NvbC5JbnZpdGF0aW9uVGFy",
            "Z2V0IkYKFlNlbmRJbnZpdGF0aW9uUmVzcG9uc2USLAoKaW52aXRhdGlvbhgC",
            "IAEoCzIYLmJncy5wcm90b2NvbC5JbnZpdGF0aW9uIpABChdVcGRhdGVJbnZp",
            "dGF0aW9uUmVxdWVzdBIuCg5hZ2VudF9pZGVudGl0eRgBIAEoCzIWLmJncy5w",
            "cm90b2NvbC5JZGVudGl0eRIVCg1pbnZpdGF0aW9uX2lkGAIgASgGEi4KBnBh",
            "cmFtcxgDIAEoCzIeLmJncy5wcm90b2NvbC5JbnZpdGF0aW9uUGFyYW1zIvcB",
            "ChhHZW5lcmljSW52aXRhdGlvblJlcXVlc3QSKAoIYWdlbnRfaWQYASABKAsy",
            "Fi5iZ3MucHJvdG9jb2wuRW50aXR5SWQSKQoJdGFyZ2V0X2lkGAIgASgLMhYu",
            "YmdzLnByb3RvY29sLkVudGl0eUlkEhUKDWludml0YXRpb25faWQYAyABKAYS",
            "FAoMaW52aXRlZV9uYW1lGAQgASgJEhQKDGludml0ZXJfbmFtZRgFIAEoCRIZ",
            "Cg1wcmV2aW91c19yb2xlGAYgAygNQgIQARIYCgxkZXNpcmVkX3JvbGUYByAD",
            "KA1CAhABEg4KBnJlYXNvbhgIIAEoDUInCg1ibmV0LnByb3RvY29sQhRJbnZp",
            "dGF0aW9uVHlwZXNQcm90b0gCYgZwcm90bzM="));
      descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
          new pbr::FileDescriptor[] { Bgs.Protocol.EntityTypesReflection.Descriptor, },
          new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
            new pbr::GeneratedClrTypeInfo(typeof(Bgs.Protocol.Invitation), Bgs.Protocol.Invitation.Parser, new[]{ "Id", "InviterIdentity", "InviteeIdentity", "InviterName", "InviteeName", "InvitationMessage", "CreationTime", "ExpirationTime" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(Bgs.Protocol.InvitationSuggestion), Bgs.Protocol.InvitationSuggestion.Parser, new[]{ "ChannelId", "SuggesterId", "SuggesteeId", "SuggesterName", "SuggesteeName", "SuggesterAccountId" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(Bgs.Protocol.InvitationTarget), Bgs.Protocol.InvitationTarget.Parser, new[]{ "Identity", "Email", "BattleTag" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(Bgs.Protocol.InvitationParams), Bgs.Protocol.InvitationParams.Parser, new[]{ "InvitationMessage", "ExpirationTime" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(Bgs.Protocol.SendInvitationRequest), Bgs.Protocol.SendInvitationRequest.Parser, new[]{ "AgentIdentity", "TargetId", "Params", "AgentInfo", "Target" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(Bgs.Protocol.SendInvitationResponse), Bgs.Protocol.SendInvitationResponse.Parser, new[]{ "Invitation" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(Bgs.Protocol.UpdateInvitationRequest), Bgs.Protocol.UpdateInvitationRequest.Parser, new[]{ "AgentIdentity", "InvitationId", "Params" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(Bgs.Protocol.GenericInvitationRequest), Bgs.Protocol.GenericInvitationRequest.Parser, new[]{ "AgentId", "TargetId", "InvitationId", "InviteeName", "InviterName", "PreviousRole", "DesiredRole", "Reason" }, null, null, null)
          }));
    }
    #endregion

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

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

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

    public Invitation() {
      OnConstruction();
    }

    partial void OnConstruction();

    public Invitation(Invitation other) : this() {
      id_ = other.id_;
      InviterIdentity = other.inviterIdentity_ != null ? other.InviterIdentity.Clone() : null;
      InviteeIdentity = other.inviteeIdentity_ != null ? other.InviteeIdentity.Clone() : null;
      inviterName_ = other.inviterName_;
      inviteeName_ = other.inviteeName_;
      invitationMessage_ = other.invitationMessage_;
      creationTime_ = other.creationTime_;
      expirationTime_ = other.expirationTime_;
    }

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

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

    /// <summary>Field number for the "inviter_identity" field.</summary>
    public const int InviterIdentityFieldNumber = 2;
    private Bgs.Protocol.Identity inviterIdentity_;
    public Bgs.Protocol.Identity InviterIdentity {
      get { return inviterIdentity_; }
      set {
        inviterIdentity_ = value;
      }
    }

    /// <summary>Field number for the "invitee_identity" field.</summary>
    public const int InviteeIdentityFieldNumber = 3;
    private Bgs.Protocol.Identity inviteeIdentity_;
    public Bgs.Protocol.Identity InviteeIdentity {
      get { return inviteeIdentity_; }
      set {
        inviteeIdentity_ = value;
      }
    }

    /// <summary>Field number for the "inviter_name" field.</summary>
    public const int InviterNameFieldNumber = 4;
    private string inviterName_ = "";
    public string InviterName {
      get { return inviterName_; }
      set {
        inviterName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "invitee_name" field.</summary>
    public const int InviteeNameFieldNumber = 5;
    private string inviteeName_ = "";
    public string InviteeName {
      get { return inviteeName_; }
      set {
        inviteeName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "invitation_message" field.</summary>
    public const int InvitationMessageFieldNumber = 6;
    private string invitationMessage_ = "";
    public string InvitationMessage {
      get { return invitationMessage_; }
      set {
        invitationMessage_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "creation_time" field.</summary>
    public const int CreationTimeFieldNumber = 7;
    private ulong creationTime_;
    public ulong CreationTime {
      get { return creationTime_; }
      set {
        creationTime_ = value;
      }
    }

    /// <summary>Field number for the "expiration_time" field.</summary>
    public const int ExpirationTimeFieldNumber = 8;
    private ulong expirationTime_;
    public ulong ExpirationTime {
      get { return expirationTime_; }
      set {
        expirationTime_ = value;
      }
    }

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

    public bool Equals(Invitation other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (Id != other.Id) return false;
      if (!object.Equals(InviterIdentity, other.InviterIdentity)) return false;
      if (!object.Equals(InviteeIdentity, other.InviteeIdentity)) return false;
      if (InviterName != other.InviterName) return false;
      if (InviteeName != other.InviteeName) return false;
      if (InvitationMessage != other.InvitationMessage) return false;
      if (CreationTime != other.CreationTime) return false;
      if (ExpirationTime != other.ExpirationTime) return false;
      return true;
    }

    public override int GetHashCode() {
      int hash = 1;
      if (Id != 0UL) hash ^= Id.GetHashCode();
      if (inviterIdentity_ != null) hash ^= InviterIdentity.GetHashCode();
      if (inviteeIdentity_ != null) hash ^= InviteeIdentity.GetHashCode();
      if (InviterName.Length != 0) hash ^= InviterName.GetHashCode();
      if (InviteeName.Length != 0) hash ^= InviteeName.GetHashCode();
      if (InvitationMessage.Length != 0) hash ^= InvitationMessage.GetHashCode();
      if (CreationTime != 0UL) hash ^= CreationTime.GetHashCode();
      if (ExpirationTime != 0UL) hash ^= ExpirationTime.GetHashCode();
      return hash;
    }

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

    public void WriteTo(pb::CodedOutputStream output) {
      if (Id != 0UL) {
        output.WriteRawTag(9);
        output.WriteFixed64(Id);
      }
      if (inviterIdentity_ != null) {
        output.WriteRawTag(18);
        output.WriteMessage(InviterIdentity);
      }
      if (inviteeIdentity_ != null) {
        output.WriteRawTag(26);
        output.WriteMessage(InviteeIdentity);
      }
      if (InviterName.Length != 0) {
        output.WriteRawTag(34);
        output.WriteString(InviterName);
      }
      if (InviteeName.Length != 0) {
        output.WriteRawTag(42);
        output.WriteString(InviteeName);
      }
      if (InvitationMessage.Length != 0) {
        output.WriteRawTag(50);
        output.WriteString(InvitationMessage);
      }
      if (CreationTime != 0UL) {
        output.WriteRawTag(56);
        output.WriteUInt64(CreationTime);
      }
      if (ExpirationTime != 0UL) {
        output.WriteRawTag(64);
        output.WriteUInt64(ExpirationTime);
      }
    }

    public int CalculateSize() {
      int size = 0;
      if (Id != 0UL) {
        size += 1 + 8;
      }
      if (inviterIdentity_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(InviterIdentity);
      }
      if (inviteeIdentity_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(InviteeIdentity);
      }
      if (InviterName.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(InviterName);
      }
      if (InviteeName.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(InviteeName);
      }
      if (InvitationMessage.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(InvitationMessage);
      }
      if (CreationTime != 0UL) {
        size += 1 + pb::CodedOutputStream.ComputeUInt64Size(CreationTime);
      }
      if (ExpirationTime != 0UL) {
        size += 1 + pb::CodedOutputStream.ComputeUInt64Size(ExpirationTime);
      }
      return size;
    }

    public void MergeFrom(Invitation other) {
      if (other == null) {
        return;
      }
      if (other.Id != 0UL) {
        Id = other.Id;
      }
      if (other.inviterIdentity_ != null) {
        if (inviterIdentity_ == null) {
          inviterIdentity_ = new Bgs.Protocol.Identity();
        }
        InviterIdentity.MergeFrom(other.InviterIdentity);
      }
      if (other.inviteeIdentity_ != null) {
        if (inviteeIdentity_ == null) {
          inviteeIdentity_ = new Bgs.Protocol.Identity();
        }
        InviteeIdentity.MergeFrom(other.InviteeIdentity);
      }
      if (other.InviterName.Length != 0) {
        InviterName = other.InviterName;
      }
      if (other.InviteeName.Length != 0) {
        InviteeName = other.InviteeName;
      }
      if (other.InvitationMessage.Length != 0) {
        InvitationMessage = other.InvitationMessage;
      }
      if (other.CreationTime != 0UL) {
        CreationTime = other.CreationTime;
      }
      if (other.ExpirationTime != 0UL) {
        ExpirationTime = other.ExpirationTime;
      }
    }

    public void MergeFrom(pb::CodedInputStream input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            input.SkipLastField();
            break;
          case 9: {
            Id = input.ReadFixed64();
            break;
          }
          case 18: {
            if (inviterIdentity_ == null) {
              inviterIdentity_ = new Bgs.Protocol.Identity();
            }
            input.ReadMessage(inviterIdentity_);
            break;
          }
          case 26: {
            if (inviteeIdentity_ == null) {
              inviteeIdentity_ = new Bgs.Protocol.Identity();
            }
            input.ReadMessage(inviteeIdentity_);
            break;
          }
          case 34: {
            InviterName = input.ReadString();
            break;
          }
          case 42: {
            InviteeName = input.ReadString();
            break;
          }
          case 50: {
            InvitationMessage = input.ReadString();
            break;
          }
          case 56: {
            CreationTime = input.ReadUInt64();
            break;
          }
          case 64: {
            ExpirationTime = input.ReadUInt64();
            break;
          }
        }
      }
    }

  }

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

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

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

    public InvitationSuggestion() {
      OnConstruction();
    }

    partial void OnConstruction();

    public InvitationSuggestion(InvitationSuggestion other) : this() {
      ChannelId = other.channelId_ != null ? other.ChannelId.Clone() : null;
      SuggesterId = other.suggesterId_ != null ? other.SuggesterId.Clone() : null;
      SuggesteeId = other.suggesteeId_ != null ? other.SuggesteeId.Clone() : null;
      suggesterName_ = other.suggesterName_;
      suggesteeName_ = other.suggesteeName_;
      SuggesterAccountId = other.suggesterAccountId_ != null ? other.SuggesterAccountId.Clone() : null;
    }

    public InvitationSuggestion Clone() {
      return new InvitationSuggestion(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 "suggester_id" field.</summary>
    public const int SuggesterIdFieldNumber = 2;
    private Bgs.Protocol.EntityId suggesterId_;
    public Bgs.Protocol.EntityId SuggesterId {
      get { return suggesterId_; }
      set {
        suggesterId_ = value;
      }
    }

    /// <summary>Field number for the "suggestee_id" field.</summary>
    public const int SuggesteeIdFieldNumber = 3;
    private Bgs.Protocol.EntityId suggesteeId_;
    public Bgs.Protocol.EntityId SuggesteeId {
      get { return suggesteeId_; }
      set {
        suggesteeId_ = value;
      }
    }

    /// <summary>Field number for the "suggester_name" field.</summary>
    public const int SuggesterNameFieldNumber = 4;
    private string suggesterName_ = "";
    public string SuggesterName {
      get { return suggesterName_; }
      set {
        suggesterName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "suggestee_name" field.</summary>
    public const int SuggesteeNameFieldNumber = 5;
    private string suggesteeName_ = "";
    public string SuggesteeName {
      get { return suggesteeName_; }
      set {
        suggesteeName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "suggester_account_id" field.</summary>
    public const int SuggesterAccountIdFieldNumber = 6;
    private Bgs.Protocol.EntityId suggesterAccountId_;
    public Bgs.Protocol.EntityId SuggesterAccountId {
      get { return suggesterAccountId_; }
      set {
        suggesterAccountId_ = value;
      }
    }

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

    public bool Equals(InvitationSuggestion other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (!object.Equals(ChannelId, other.ChannelId)) return false;
      if (!object.Equals(SuggesterId, other.SuggesterId)) return false;
      if (!object.Equals(SuggesteeId, other.SuggesteeId)) return false;
      if (SuggesterName != other.SuggesterName) return false;
      if (SuggesteeName != other.SuggesteeName) return false;
      if (!object.Equals(SuggesterAccountId, other.SuggesterAccountId)) return false;
      return true;
    }

    public override int GetHashCode() {
      int hash = 1;
      if (channelId_ != null) hash ^= ChannelId.GetHashCode();
      if (suggesterId_ != null) hash ^= SuggesterId.GetHashCode();
      if (suggesteeId_ != null) hash ^= SuggesteeId.GetHashCode();
      if (SuggesterName.Length != 0) hash ^= SuggesterName.GetHashCode();
      if (SuggesteeName.Length != 0) hash ^= SuggesteeName.GetHashCode();
      if (suggesterAccountId_ != null) hash ^= SuggesterAccountId.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 (suggesterId_ != null) {
        output.WriteRawTag(18);
        output.WriteMessage(SuggesterId);
      }
      if (suggesteeId_ != null) {
        output.WriteRawTag(26);
        output.WriteMessage(SuggesteeId);
      }
      if (SuggesterName.Length != 0) {
        output.WriteRawTag(34);
        output.WriteString(SuggesterName);
      }
      if (SuggesteeName.Length != 0) {
        output.WriteRawTag(42);
        output.WriteString(SuggesteeName);
      }
      if (suggesterAccountId_ != null) {
        output.WriteRawTag(50);
        output.WriteMessage(SuggesterAccountId);
      }
    }

    public int CalculateSize() {
      int size = 0;
      if (channelId_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(ChannelId);
      }
      if (suggesterId_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(SuggesterId);
      }
      if (suggesteeId_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(SuggesteeId);
      }
      if (SuggesterName.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(SuggesterName);
      }
      if (SuggesteeName.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(SuggesteeName);
      }
      if (suggesterAccountId_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(SuggesterAccountId);
      }
      return size;
    }

    public void MergeFrom(InvitationSuggestion other) {
      if (other == null) {
        return;
      }
      if (other.channelId_ != null) {
        if (channelId_ == null) {
          channelId_ = new Bgs.Protocol.EntityId();
        }
        ChannelId.MergeFrom(other.ChannelId);
      }
      if (other.suggesterId_ != null) {
        if (suggesterId_ == null) {
          suggesterId_ = new Bgs.Protocol.EntityId();
        }
        SuggesterId.MergeFrom(other.SuggesterId);
      }
      if (other.suggesteeId_ != null) {
        if (suggesteeId_ == null) {
          suggesteeId_ = new Bgs.Protocol.EntityId();
        }
        SuggesteeId.MergeFrom(other.SuggesteeId);
      }
      if (other.SuggesterName.Length != 0) {
        SuggesterName = other.SuggesterName;
      }
      if (other.SuggesteeName.Length != 0) {
        SuggesteeName = other.SuggesteeName;
      }
      if (other.suggesterAccountId_ != null) {
        if (suggesterAccountId_ == null) {
          suggesterAccountId_ = new Bgs.Protocol.EntityId();
        }
        SuggesterAccountId.MergeFrom(other.SuggesterAccountId);
      }
    }

    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 18: {
            if (suggesterId_ == null) {
              suggesterId_ = new Bgs.Protocol.EntityId();
            }
            input.ReadMessage(suggesterId_);
            break;
          }
          case 26: {
            if (suggesteeId_ == null) {
              suggesteeId_ = new Bgs.Protocol.EntityId();
            }
            input.ReadMessage(suggesteeId_);
            break;
          }
          case 34: {
            SuggesterName = input.ReadString();
            break;
          }
          case 42: {
            SuggesteeName = input.ReadString();
            break;
          }
          case 50: {
            if (suggesterAccountId_ == null) {
              suggesterAccountId_ = new Bgs.Protocol.EntityId();
            }
            input.ReadMessage(suggesterAccountId_);
            break;
          }
        }
      }
    }

  }

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

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

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

    public InvitationTarget() {
      OnConstruction();
    }

    partial void OnConstruction();

    public InvitationTarget(InvitationTarget other) : this() {
      Identity = other.identity_ != null ? other.Identity.Clone() : null;
      email_ = other.email_;
      battleTag_ = other.battleTag_;
    }

    public InvitationTarget Clone() {
      return new InvitationTarget(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 "email" field.</summary>
    public const int EmailFieldNumber = 2;
    private string email_ = "";
    public string Email {
      get { return email_; }
      set {
        email_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

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

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

    public bool Equals(InvitationTarget other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (!object.Equals(Identity, other.Identity)) return false;
      if (Email != other.Email) return false;
      if (BattleTag != other.BattleTag) return false;
      return true;
    }

    public override int GetHashCode() {
      int hash = 1;
      if (identity_ != null) hash ^= Identity.GetHashCode();
      if (Email.Length != 0) hash ^= Email.GetHashCode();
      if (BattleTag.Length != 0) hash ^= BattleTag.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 (Email.Length != 0) {
        output.WriteRawTag(18);
        output.WriteString(Email);
      }
      if (BattleTag.Length != 0) {
        output.WriteRawTag(26);
        output.WriteString(BattleTag);
      }
    }

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

    public void MergeFrom(InvitationTarget other) {
      if (other == null) {
        return;
      }
      if (other.identity_ != null) {
        if (identity_ == null) {
          identity_ = new Bgs.Protocol.Identity();
        }
        Identity.MergeFrom(other.Identity);
      }
      if (other.Email.Length != 0) {
        Email = other.Email;
      }
      if (other.BattleTag.Length != 0) {
        BattleTag = other.BattleTag;
      }
    }

    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: {
            Email = input.ReadString();
            break;
          }
          case 26: {
            BattleTag = input.ReadString();
            break;
          }
        }
      }
    }

  }

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

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

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

    public InvitationParams() {
      OnConstruction();
    }

    partial void OnConstruction();

    public InvitationParams(InvitationParams other) : this() {
      invitationMessage_ = other.invitationMessage_;
      expirationTime_ = other.expirationTime_;
    }

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

    /// <summary>Field number for the "invitation_message" field.</summary>
    public const int InvitationMessageFieldNumber = 1;
    private string invitationMessage_ = "";
    public string InvitationMessage {
      get { return invitationMessage_; }
      set {
        invitationMessage_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "expiration_time" field.</summary>
    public const int ExpirationTimeFieldNumber = 2;
    private ulong expirationTime_;
    public ulong ExpirationTime {
      get { return expirationTime_; }
      set {
        expirationTime_ = value;
      }
    }

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

    public bool Equals(InvitationParams other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (InvitationMessage != other.InvitationMessage) return false;
      if (ExpirationTime != other.ExpirationTime) return false;
      return true;
    }

    public override int GetHashCode() {
      int hash = 1;
      if (InvitationMessage.Length != 0) hash ^= InvitationMessage.GetHashCode();
      if (ExpirationTime != 0UL) hash ^= ExpirationTime.GetHashCode();
      return hash;
    }

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

    public void WriteTo(pb::CodedOutputStream output) {
      if (InvitationMessage.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(InvitationMessage);
      }
      if (ExpirationTime != 0UL) {
        output.WriteRawTag(16);
        output.WriteUInt64(ExpirationTime);
      }
    }

    public int CalculateSize() {
      int size = 0;
      if (InvitationMessage.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(InvitationMessage);
      }
      if (ExpirationTime != 0UL) {
        size += 1 + pb::CodedOutputStream.ComputeUInt64Size(ExpirationTime);
      }
      return size;
    }

    public void MergeFrom(InvitationParams other) {
      if (other == null) {
        return;
      }
      if (other.InvitationMessage.Length != 0) {
        InvitationMessage = other.InvitationMessage;
      }
      if (other.ExpirationTime != 0UL) {
        ExpirationTime = other.ExpirationTime;
      }
    }

    public void MergeFrom(pb::CodedInputStream input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            input.SkipLastField();
            break;
          case 10: {
            InvitationMessage = input.ReadString();
            break;
          }
          case 16: {
            ExpirationTime = input.ReadUInt64();
            break;
          }
        }
      }
    }

  }

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

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

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

    public SendInvitationRequest() {
      OnConstruction();
    }

    partial void OnConstruction();

    public SendInvitationRequest(SendInvitationRequest other) : this() {
      AgentIdentity = other.agentIdentity_ != null ? other.AgentIdentity.Clone() : null;
      TargetId = other.targetId_ != null ? other.TargetId.Clone() : null;
      Params = other.params_ != null ? other.Params.Clone() : null;
      AgentInfo = other.agentInfo_ != null ? other.AgentInfo.Clone() : null;
      Target = other.target_ != null ? other.Target.Clone() : null;
    }

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

    /// <summary>Field number for the "agent_identity" field.</summary>
    public const int AgentIdentityFieldNumber = 1;
    private Bgs.Protocol.Identity agentIdentity_;
    public Bgs.Protocol.Identity AgentIdentity {
      get { return agentIdentity_; }
      set {
        agentIdentity_ = value;
      }
    }

    /// <summary>Field number for the "target_id" field.</summary>
    public const int TargetIdFieldNumber = 2;
    private Bgs.Protocol.EntityId targetId_;
    [System.ObsoleteAttribute()]
    public Bgs.Protocol.EntityId TargetId {
      get { return targetId_; }
      set {
        targetId_ = value;
      }
    }

    /// <summary>Field number for the "params" field.</summary>
    public const int ParamsFieldNumber = 3;
    private Bgs.Protocol.InvitationParams params_;
    public Bgs.Protocol.InvitationParams Params {
      get { return params_; }
      set {
        params_ = value;
      }
    }

    /// <summary>Field number for the "agent_info" field.</summary>
    public const int AgentInfoFieldNumber = 4;
    private Bgs.Protocol.AccountInfo agentInfo_;
    public Bgs.Protocol.AccountInfo AgentInfo {
      get { return agentInfo_; }
      set {
        agentInfo_ = value;
      }
    }

    /// <summary>Field number for the "target" field.</summary>
    public const int TargetFieldNumber = 5;
    private Bgs.Protocol.InvitationTarget target_;
    public Bgs.Protocol.InvitationTarget Target {
      get { return target_; }
      set {
        target_ = value;
      }
    }

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

    public bool Equals(SendInvitationRequest other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (!object.Equals(AgentIdentity, other.AgentIdentity)) return false;
      if (!object.Equals(TargetId, other.TargetId)) return false;
      if (!object.Equals(Params, other.Params)) return false;
      if (!object.Equals(AgentInfo, other.AgentInfo)) return false;
      if (!object.Equals(Target, other.Target)) return false;
      return true;
    }

    public override int GetHashCode() {
      int hash = 1;
      if (agentIdentity_ != null) hash ^= AgentIdentity.GetHashCode();
      if (targetId_ != null) hash ^= TargetId.GetHashCode();
      if (params_ != null) hash ^= Params.GetHashCode();
      if (agentInfo_ != null) hash ^= AgentInfo.GetHashCode();
      if (target_ != null) hash ^= Target.GetHashCode();
      return hash;
    }

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

    public void WriteTo(pb::CodedOutputStream output) {
      if (agentIdentity_ != null) {
        output.WriteRawTag(10);
        output.WriteMessage(AgentIdentity);
      }
      if (targetId_ != null) {
        output.WriteRawTag(18);
        output.WriteMessage(TargetId);
      }
      if (params_ != null) {
        output.WriteRawTag(26);
        output.WriteMessage(Params);
      }
      if (agentInfo_ != null) {
        output.WriteRawTag(34);
        output.WriteMessage(AgentInfo);
      }
      if (target_ != null) {
        output.WriteRawTag(42);
        output.WriteMessage(Target);
      }
    }

    public int CalculateSize() {
      int size = 0;
      if (agentIdentity_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(AgentIdentity);
      }
      if (targetId_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(TargetId);
      }
      if (params_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Params);
      }
      if (agentInfo_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(AgentInfo);
      }
      if (target_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Target);
      }
      return size;
    }

    public void MergeFrom(SendInvitationRequest other) {
      if (other == null) {
        return;
      }
      if (other.agentIdentity_ != null) {
        if (agentIdentity_ == null) {
          agentIdentity_ = new Bgs.Protocol.Identity();
        }
        AgentIdentity.MergeFrom(other.AgentIdentity);
      }
      if (other.targetId_ != null) {
        if (targetId_ == null) {
          targetId_ = new Bgs.Protocol.EntityId();
        }
        TargetId.MergeFrom(other.TargetId);
      }
      if (other.params_ != null) {
        if (params_ == null) {
          params_ = new Bgs.Protocol.InvitationParams();
        }
        Params.MergeFrom(other.Params);
      }
      if (other.agentInfo_ != null) {
        if (agentInfo_ == null) {
          agentInfo_ = new Bgs.Protocol.AccountInfo();
        }
        AgentInfo.MergeFrom(other.AgentInfo);
      }
      if (other.target_ != null) {
        if (target_ == null) {
          target_ = new Bgs.Protocol.InvitationTarget();
        }
        Target.MergeFrom(other.Target);
      }
    }

    public void MergeFrom(pb::CodedInputStream input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            input.SkipLastField();
            break;
          case 10: {
            if (agentIdentity_ == null) {
              agentIdentity_ = new Bgs.Protocol.Identity();
            }
            input.ReadMessage(agentIdentity_);
            break;
          }
          case 18: {
            if (targetId_ == null) {
              targetId_ = new Bgs.Protocol.EntityId();
            }
            input.ReadMessage(targetId_);
            break;
          }
          case 26: {
            if (params_ == null) {
              params_ = new Bgs.Protocol.InvitationParams();
            }
            input.ReadMessage(params_);
            break;
          }
          case 34: {
            if (agentInfo_ == null) {
              agentInfo_ = new Bgs.Protocol.AccountInfo();
            }
            input.ReadMessage(agentInfo_);
            break;
          }
          case 42: {
            if (target_ == null) {
              target_ = new Bgs.Protocol.InvitationTarget();
            }
            input.ReadMessage(target_);
            break;
          }
        }
      }
    }

  }

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

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

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

    public SendInvitationResponse() {
      OnConstruction();
    }

    partial void OnConstruction();

    public SendInvitationResponse(SendInvitationResponse other) : this() {
      Invitation = other.invitation_ != null ? other.Invitation.Clone() : null;
    }

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

    /// <summary>Field number for the "invitation" field.</summary>
    public const int InvitationFieldNumber = 2;
    private Bgs.Protocol.Invitation invitation_;
    public Bgs.Protocol.Invitation Invitation {
      get { return invitation_; }
      set {
        invitation_ = value;
      }
    }

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

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

    public override int GetHashCode() {
      int hash = 1;
      if (invitation_ != null) hash ^= Invitation.GetHashCode();
      return hash;
    }

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

    public void WriteTo(pb::CodedOutputStream output) {
      if (invitation_ != null) {
        output.WriteRawTag(18);
        output.WriteMessage(Invitation);
      }
    }

    public int CalculateSize() {
      int size = 0;
      if (invitation_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Invitation);
      }
      return size;
    }

    public void MergeFrom(SendInvitationResponse other) {
      if (other == null) {
        return;
      }
      if (other.invitation_ != null) {
        if (invitation_ == null) {
          invitation_ = new Bgs.Protocol.Invitation();
        }
        Invitation.MergeFrom(other.Invitation);
      }
    }

    public void MergeFrom(pb::CodedInputStream input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            input.SkipLastField();
            break;
          case 18: {
            if (invitation_ == null) {
              invitation_ = new Bgs.Protocol.Invitation();
            }
            input.ReadMessage(invitation_);
            break;
          }
        }
      }
    }

  }

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

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

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

    public UpdateInvitationRequest() {
      OnConstruction();
    }

    partial void OnConstruction();

    public UpdateInvitationRequest(UpdateInvitationRequest other) : this() {
      AgentIdentity = other.agentIdentity_ != null ? other.AgentIdentity.Clone() : null;
      invitationId_ = other.invitationId_;
      Params = other.params_ != null ? other.Params.Clone() : null;
    }

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

    /// <summary>Field number for the "agent_identity" field.</summary>
    public const int AgentIdentityFieldNumber = 1;
    private Bgs.Protocol.Identity agentIdentity_;
    public Bgs.Protocol.Identity AgentIdentity {
      get { return agentIdentity_; }
      set {
        agentIdentity_ = value;
      }
    }

    /// <summary>Field number for the "invitation_id" field.</summary>
    public const int InvitationIdFieldNumber = 2;
    private ulong invitationId_;
    public ulong InvitationId {
      get { return invitationId_; }
      set {
        invitationId_ = value;
      }
    }

    /// <summary>Field number for the "params" field.</summary>
    public const int ParamsFieldNumber = 3;
    private Bgs.Protocol.InvitationParams params_;
    public Bgs.Protocol.InvitationParams Params {
      get { return params_; }
      set {
        params_ = value;
      }
    }

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

    public bool Equals(UpdateInvitationRequest other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (!object.Equals(AgentIdentity, other.AgentIdentity)) return false;
      if (InvitationId != other.InvitationId) return false;
      if (!object.Equals(Params, other.Params)) return false;
      return true;
    }

    public override int GetHashCode() {
      int hash = 1;
      if (agentIdentity_ != null) hash ^= AgentIdentity.GetHashCode();
      if (InvitationId != 0UL) hash ^= InvitationId.GetHashCode();
      if (params_ != null) hash ^= Params.GetHashCode();
      return hash;
    }

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

    public void WriteTo(pb::CodedOutputStream output) {
      if (agentIdentity_ != null) {
        output.WriteRawTag(10);
        output.WriteMessage(AgentIdentity);
      }
      if (InvitationId != 0UL) {
        output.WriteRawTag(17);
        output.WriteFixed64(InvitationId);
      }
      if (params_ != null) {
        output.WriteRawTag(26);
        output.WriteMessage(Params);
      }
    }

    public int CalculateSize() {
      int size = 0;
      if (agentIdentity_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(AgentIdentity);
      }
      if (InvitationId != 0UL) {
        size += 1 + 8;
      }
      if (params_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Params);
      }
      return size;
    }

    public void MergeFrom(UpdateInvitationRequest other) {
      if (other == null) {
        return;
      }
      if (other.agentIdentity_ != null) {
        if (agentIdentity_ == null) {
          agentIdentity_ = new Bgs.Protocol.Identity();
        }
        AgentIdentity.MergeFrom(other.AgentIdentity);
      }
      if (other.InvitationId != 0UL) {
        InvitationId = other.InvitationId;
      }
      if (other.params_ != null) {
        if (params_ == null) {
          params_ = new Bgs.Protocol.InvitationParams();
        }
        Params.MergeFrom(other.Params);
      }
    }

    public void MergeFrom(pb::CodedInputStream input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            input.SkipLastField();
            break;
          case 10: {
            if (agentIdentity_ == null) {
              agentIdentity_ = new Bgs.Protocol.Identity();
            }
            input.ReadMessage(agentIdentity_);
            break;
          }
          case 17: {
            InvitationId = input.ReadFixed64();
            break;
          }
          case 26: {
            if (params_ == null) {
              params_ = new Bgs.Protocol.InvitationParams();
            }
            input.ReadMessage(params_);
            break;
          }
        }
      }
    }

  }

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

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

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

    public GenericInvitationRequest() {
      OnConstruction();
    }

    partial void OnConstruction();

    public GenericInvitationRequest(GenericInvitationRequest other) : this() {
      AgentId = other.agentId_ != null ? other.AgentId.Clone() : null;
      TargetId = other.targetId_ != null ? other.TargetId.Clone() : null;
      invitationId_ = other.invitationId_;
      inviteeName_ = other.inviteeName_;
      inviterName_ = other.inviterName_;
      previousRole_ = other.previousRole_.Clone();
      desiredRole_ = other.desiredRole_.Clone();
      reason_ = other.reason_;
    }

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

    /// <summary>Field number for the "agent_id" field.</summary>
    public const int AgentIdFieldNumber = 1;
    private Bgs.Protocol.EntityId agentId_;
    public Bgs.Protocol.EntityId AgentId {
      get { return agentId_; }
      set {
        agentId_ = value;
      }
    }

    /// <summary>Field number for the "target_id" field.</summary>
    public const int TargetIdFieldNumber = 2;
    private Bgs.Protocol.EntityId targetId_;
    public Bgs.Protocol.EntityId TargetId {
      get { return targetId_; }
      set {
        targetId_ = value;
      }
    }

    /// <summary>Field number for the "invitation_id" field.</summary>
    public const int InvitationIdFieldNumber = 3;
    private ulong invitationId_;
    public ulong InvitationId {
      get { return invitationId_; }
      set {
        invitationId_ = value;
      }
    }

    /// <summary>Field number for the "invitee_name" field.</summary>
    public const int InviteeNameFieldNumber = 4;
    private string inviteeName_ = "";
    public string InviteeName {
      get { return inviteeName_; }
      set {
        inviteeName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "inviter_name" field.</summary>
    public const int InviterNameFieldNumber = 5;
    private string inviterName_ = "";
    public string InviterName {
      get { return inviterName_; }
      set {
        inviterName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "previous_role" field.</summary>
    public const int PreviousRoleFieldNumber = 6;
    private static readonly pb::FieldCodec<uint> _repeated_previousRole_codec
        = pb::FieldCodec.ForUInt32(50);
    private readonly pbc::RepeatedField<uint> previousRole_ = new pbc::RepeatedField<uint>();
    public pbc::RepeatedField<uint> PreviousRole {
      get { return previousRole_; }
    }

    /// <summary>Field number for the "desired_role" field.</summary>
    public const int DesiredRoleFieldNumber = 7;
    private static readonly pb::FieldCodec<uint> _repeated_desiredRole_codec
        = pb::FieldCodec.ForUInt32(58);
    private readonly pbc::RepeatedField<uint> desiredRole_ = new pbc::RepeatedField<uint>();
    public pbc::RepeatedField<uint> DesiredRole {
      get { return desiredRole_; }
    }

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

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

    public bool Equals(GenericInvitationRequest other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (!object.Equals(AgentId, other.AgentId)) return false;
      if (!object.Equals(TargetId, other.TargetId)) return false;
      if (InvitationId != other.InvitationId) return false;
      if (InviteeName != other.InviteeName) return false;
      if (InviterName != other.InviterName) return false;
      if(!previousRole_.Equals(other.previousRole_)) return false;
      if(!desiredRole_.Equals(other.desiredRole_)) return false;
      if (Reason != other.Reason) return false;
      return true;
    }

    public override int GetHashCode() {
      int hash = 1;
      if (agentId_ != null) hash ^= AgentId.GetHashCode();
      if (targetId_ != null) hash ^= TargetId.GetHashCode();
      if (InvitationId != 0UL) hash ^= InvitationId.GetHashCode();
      if (InviteeName.Length != 0) hash ^= InviteeName.GetHashCode();
      if (InviterName.Length != 0) hash ^= InviterName.GetHashCode();
      hash ^= previousRole_.GetHashCode();
      hash ^= desiredRole_.GetHashCode();
      if (Reason != 0) hash ^= Reason.GetHashCode();
      return hash;
    }

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

    public void WriteTo(pb::CodedOutputStream output) {
      if (agentId_ != null) {
        output.WriteRawTag(10);
        output.WriteMessage(AgentId);
      }
      if (targetId_ != null) {
        output.WriteRawTag(18);
        output.WriteMessage(TargetId);
      }
      if (InvitationId != 0UL) {
        output.WriteRawTag(25);
        output.WriteFixed64(InvitationId);
      }
      if (InviteeName.Length != 0) {
        output.WriteRawTag(34);
        output.WriteString(InviteeName);
      }
      if (InviterName.Length != 0) {
        output.WriteRawTag(42);
        output.WriteString(InviterName);
      }
      previousRole_.WriteTo(output, _repeated_previousRole_codec);
      desiredRole_.WriteTo(output, _repeated_desiredRole_codec);
      if (Reason != 0) {
        output.WriteRawTag(64);
        output.WriteUInt32(Reason);
      }
    }

    public int CalculateSize() {
      int size = 0;
      if (agentId_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(AgentId);
      }
      if (targetId_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(TargetId);
      }
      if (InvitationId != 0UL) {
        size += 1 + 8;
      }
      if (InviteeName.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(InviteeName);
      }
      if (InviterName.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(InviterName);
      }
      size += previousRole_.CalculateSize(_repeated_previousRole_codec);
      size += desiredRole_.CalculateSize(_repeated_desiredRole_codec);
      if (Reason != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Reason);
      }
      return size;
    }

    public void MergeFrom(GenericInvitationRequest other) {
      if (other == null) {
        return;
      }
      if (other.agentId_ != null) {
        if (agentId_ == null) {
          agentId_ = new Bgs.Protocol.EntityId();
        }
        AgentId.MergeFrom(other.AgentId);
      }
      if (other.targetId_ != null) {
        if (targetId_ == null) {
          targetId_ = new Bgs.Protocol.EntityId();
        }
        TargetId.MergeFrom(other.TargetId);
      }
      if (other.InvitationId != 0UL) {
        InvitationId = other.InvitationId;
      }
      if (other.InviteeName.Length != 0) {
        InviteeName = other.InviteeName;
      }
      if (other.InviterName.Length != 0) {
        InviterName = other.InviterName;
      }
      previousRole_.Add(other.previousRole_);
      desiredRole_.Add(other.desiredRole_);
      if (other.Reason != 0) {
        Reason = other.Reason;
      }
    }

    public void MergeFrom(pb::CodedInputStream input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            input.SkipLastField();
            break;
          case 10: {
            if (agentId_ == null) {
              agentId_ = new Bgs.Protocol.EntityId();
            }
            input.ReadMessage(agentId_);
            break;
          }
          case 18: {
            if (targetId_ == null) {
              targetId_ = new Bgs.Protocol.EntityId();
            }
            input.ReadMessage(targetId_);
            break;
          }
          case 25: {
            InvitationId = input.ReadFixed64();
            break;
          }
          case 34: {
            InviteeName = input.ReadString();
            break;
          }
          case 42: {
            InviterName = input.ReadString();
            break;
          }
          case 50:
          case 48: {
            previousRole_.AddEntriesFrom(input, _repeated_previousRole_codec);
            break;
          }
          case 58:
          case 56: {
            desiredRole_.AddEntriesFrom(input, _repeated_desiredRole_codec);
            break;
          }
          case 64: {
            Reason = input.ReadUInt32();
            break;
          }
        }
      }
    }

  }

  #endregion

}

#endregion Designer generated code
