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

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

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

    static FriendsTypesReflection() {
      byte[] descriptorData = System.Convert.FromBase64String(
          string.Concat(
            "CiViZ3MvbG93L3BiL2NsaWVudC9mcmllbmRzX3R5cGVzLnByb3RvEhdiZ3Mu",
            "cHJvdG9jb2wuZnJpZW5kcy52MRonYmdzL2xvdy9wYi9jbGllbnQvYXR0cmli",
            "dXRlX3R5cGVzLnByb3RvGiRiZ3MvbG93L3BiL2NsaWVudC9lbnRpdHlfdHlw",
            "ZXMucHJvdG8aKGJncy9sb3cvcGIvY2xpZW50L2ludml0YXRpb25fdHlwZXMu",
            "cHJvdG8ixwEKBkZyaWVuZBIqCgphY2NvdW50X2lkGAEgASgLMhYuYmdzLnBy",
            "b3RvY29sLkVudGl0eUlkEioKCWF0dHJpYnV0ZRgCIAMoCzIXLmJncy5wcm90",
            "b2NvbC5BdHRyaWJ1dGUSEAoEcm9sZRgDIAMoDUICEAESEgoKcHJpdmlsZWdl",
            "cxgEIAEoBBIYChBhdHRyaWJ1dGVzX2Vwb2NoGAUgASgEEhEKCWZ1bGxfbmFt",
            "ZRgGIAEoCRISCgpiYXR0bGVfdGFnGAcgASgJIoIBChBGcmllbmRJbnZpdGF0",
            "aW9uEhYKDmZpcnN0X3JlY2VpdmVkGAEgASgIEhAKBHJvbGUYAiADKA1CAhAB",
            "EkQKEWZyaWVuZF9pbnZpdGF0aW9uGGcgASgLMikuYmdzLnByb3RvY29sLmZy",
            "aWVuZHMudjEuRnJpZW5kSW52aXRhdGlvbiKgAgoWRnJpZW5kSW52aXRhdGlv",
            "blBhcmFtcxIUCgx0YXJnZXRfZW1haWwYASABKAkSGQoRdGFyZ2V0X2JhdHRs",
            "ZV90YWcYAiABKAkSGgoSaW52aXRlcl9iYXR0bGVfdGFnGAMgASgJEhkKEWlu",
            "dml0ZXJfZnVsbF9uYW1lGAQgASgJEhwKFGludml0ZWVfZGlzcGxheV9uYW1l",
            "GAUgASgJEhAKBHJvbGUYBiADKA1CAhABEiYKGHByZXZpb3VzX3JvbGVfZGVw",
            "cmVjYXRlZBgHIAMoDUIEEAEYARJGCg1mcmllbmRfcGFyYW1zGGcgASgLMi8u",
            "YmdzLnByb3RvY29sLmZyaWVuZHMudjEuRnJpZW5kSW52aXRhdGlvblBhcmFt",
            "c0IvChhibmV0LnByb3RvY29sLmZyaWVuZHMudjFCEUZyaWVuZHNUeXBlc1By",
            "b3RvSAJiBnByb3RvMw=="));
      descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
          new pbr::FileDescriptor[] { Bgs.Protocol.AttributeTypesReflection.Descriptor, Bgs.Protocol.EntityTypesReflection.Descriptor, Bgs.Protocol.InvitationTypesReflection.Descriptor, },
          new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
            new pbr::GeneratedClrTypeInfo(typeof(Bgs.Protocol.Friends.V1.Friend), Bgs.Protocol.Friends.V1.Friend.Parser, new[]{ "AccountId", "Attribute", "Role", "Privileges", "AttributesEpoch", "FullName", "BattleTag" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(Bgs.Protocol.Friends.V1.FriendInvitation), Bgs.Protocol.Friends.V1.FriendInvitation.Parser, new[]{ "FirstReceived", "Role", "FriendInvitation_" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(Bgs.Protocol.Friends.V1.FriendInvitationParams), Bgs.Protocol.Friends.V1.FriendInvitationParams.Parser, new[]{ "TargetEmail", "TargetBattleTag", "InviterBattleTag", "InviterFullName", "InviteeDisplayName", "Role", "PreviousRoleDeprecated", "FriendParams" }, null, null, null)
          }));
    }
    #endregion

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

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

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

    public Friend() {
      OnConstruction();
    }

    partial void OnConstruction();

    public Friend(Friend other) : this() {
      AccountId = other.accountId_ != null ? other.AccountId.Clone() : null;
      attribute_ = other.attribute_.Clone();
      role_ = other.role_.Clone();
      privileges_ = other.privileges_;
      attributesEpoch_ = other.attributesEpoch_;
      fullName_ = other.fullName_;
      battleTag_ = other.battleTag_;
    }

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

    /// <summary>Field number for the "account_id" field.</summary>
    public const int AccountIdFieldNumber = 1;
    private Bgs.Protocol.EntityId accountId_;
    public Bgs.Protocol.EntityId AccountId {
      get { return accountId_; }
      set {
        accountId_ = value;
      }
    }

    /// <summary>Field number for the "attribute" field.</summary>
    public const int AttributeFieldNumber = 2;
    private static readonly pb::FieldCodec<Bgs.Protocol.Attribute> _repeated_attribute_codec
        = pb::FieldCodec.ForMessage(18, 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 = 3;
    private static readonly pb::FieldCodec<uint> _repeated_role_codec
        = pb::FieldCodec.ForUInt32(26);
    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 = 4;
    private ulong privileges_;
    public ulong Privileges {
      get { return privileges_; }
      set {
        privileges_ = value;
      }
    }

    /// <summary>Field number for the "attributes_epoch" field.</summary>
    public const int AttributesEpochFieldNumber = 5;
    private ulong attributesEpoch_;
    public ulong AttributesEpoch {
      get { return attributesEpoch_; }
      set {
        attributesEpoch_ = value;
      }
    }

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

    /// <summary>Field number for the "battle_tag" field.</summary>
    public const int BattleTagFieldNumber = 7;
    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 Friend);
    }

    public bool Equals(Friend other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (!object.Equals(AccountId, other.AccountId)) return false;
      if(!attribute_.Equals(other.attribute_)) return false;
      if(!role_.Equals(other.role_)) return false;
      if (Privileges != other.Privileges) return false;
      if (AttributesEpoch != other.AttributesEpoch) return false;
      if (FullName != other.FullName) return false;
      if (BattleTag != other.BattleTag) return false;
      return true;
    }

    public override int GetHashCode() {
      int hash = 1;
      if (accountId_ != null) hash ^= AccountId.GetHashCode();
      hash ^= attribute_.GetHashCode();
      hash ^= role_.GetHashCode();
      if (Privileges != 0UL) hash ^= Privileges.GetHashCode();
      if (AttributesEpoch != 0UL) hash ^= AttributesEpoch.GetHashCode();
      if (FullName.Length != 0) hash ^= FullName.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 (accountId_ != null) {
        output.WriteRawTag(10);
        output.WriteMessage(AccountId);
      }
      attribute_.WriteTo(output, _repeated_attribute_codec);
      role_.WriteTo(output, _repeated_role_codec);
      if (Privileges != 0UL) {
        output.WriteRawTag(32);
        output.WriteUInt64(Privileges);
      }
      if (AttributesEpoch != 0UL) {
        output.WriteRawTag(40);
        output.WriteUInt64(AttributesEpoch);
      }
      if (FullName.Length != 0) {
        output.WriteRawTag(50);
        output.WriteString(FullName);
      }
      if (BattleTag.Length != 0) {
        output.WriteRawTag(58);
        output.WriteString(BattleTag);
      }
    }

    public int CalculateSize() {
      int size = 0;
      if (accountId_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(AccountId);
      }
      size += attribute_.CalculateSize(_repeated_attribute_codec);
      size += role_.CalculateSize(_repeated_role_codec);
      if (Privileges != 0UL) {
        size += 1 + pb::CodedOutputStream.ComputeUInt64Size(Privileges);
      }
      if (AttributesEpoch != 0UL) {
        size += 1 + pb::CodedOutputStream.ComputeUInt64Size(AttributesEpoch);
      }
      if (FullName.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(FullName);
      }
      if (BattleTag.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(BattleTag);
      }
      return size;
    }

    public void MergeFrom(Friend other) {
      if (other == null) {
        return;
      }
      if (other.accountId_ != null) {
        if (accountId_ == null) {
          accountId_ = new Bgs.Protocol.EntityId();
        }
        AccountId.MergeFrom(other.AccountId);
      }
      attribute_.Add(other.attribute_);
      role_.Add(other.role_);
      if (other.Privileges != 0UL) {
        Privileges = other.Privileges;
      }
      if (other.AttributesEpoch != 0UL) {
        AttributesEpoch = other.AttributesEpoch;
      }
      if (other.FullName.Length != 0) {
        FullName = other.FullName;
      }
      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 (accountId_ == null) {
              accountId_ = new Bgs.Protocol.EntityId();
            }
            input.ReadMessage(accountId_);
            break;
          }
          case 18: {
            attribute_.AddEntriesFrom(input, _repeated_attribute_codec);
            break;
          }
          case 26:
          case 24: {
            role_.AddEntriesFrom(input, _repeated_role_codec);
            break;
          }
          case 32: {
            Privileges = input.ReadUInt64();
            break;
          }
          case 40: {
            AttributesEpoch = input.ReadUInt64();
            break;
          }
          case 50: {
            FullName = input.ReadString();
            break;
          }
          case 58: {
            BattleTag = input.ReadString();
            break;
          }
        }
      }
    }

  }

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

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

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

    public FriendInvitation() {
      OnConstruction();
    }

    partial void OnConstruction();

    public FriendInvitation(FriendInvitation other) : this() {
      firstReceived_ = other.firstReceived_;
      role_ = other.role_.Clone();
      FriendInvitation_ = other.friendInvitation_ != null ? other.FriendInvitation_.Clone() : null;
    }

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

    /// <summary>Field number for the "first_received" field.</summary>
    public const int FirstReceivedFieldNumber = 1;
    private bool firstReceived_;
    public bool FirstReceived {
      get { return firstReceived_; }
      set {
        firstReceived_ = value;
      }
    }

    /// <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 "friend_invitation" field.</summary>
    public const int FriendInvitation_FieldNumber = 103;
    private Bgs.Protocol.Friends.V1.FriendInvitation friendInvitation_;
    public Bgs.Protocol.Friends.V1.FriendInvitation FriendInvitation_ {
      get { return friendInvitation_; }
      set {
        friendInvitation_ = value;
      }
    }

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

    public bool Equals(FriendInvitation other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (FirstReceived != other.FirstReceived) return false;
      if(!role_.Equals(other.role_)) return false;
      if (!object.Equals(FriendInvitation_, other.FriendInvitation_)) return false;
      return true;
    }

    public override int GetHashCode() {
      int hash = 1;
      if (FirstReceived != false) hash ^= FirstReceived.GetHashCode();
      hash ^= role_.GetHashCode();
      if (friendInvitation_ != null) hash ^= FriendInvitation_.GetHashCode();
      return hash;
    }

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

    public void WriteTo(pb::CodedOutputStream output) {
      if (FirstReceived != false) {
        output.WriteRawTag(8);
        output.WriteBool(FirstReceived);
      }
      role_.WriteTo(output, _repeated_role_codec);
      if (friendInvitation_ != null) {
        output.WriteRawTag(186, 6);
        output.WriteMessage(FriendInvitation_);
      }
    }

    public int CalculateSize() {
      int size = 0;
      if (FirstReceived != false) {
        size += 1 + 1;
      }
      size += role_.CalculateSize(_repeated_role_codec);
      if (friendInvitation_ != null) {
        size += 2 + pb::CodedOutputStream.ComputeMessageSize(FriendInvitation_);
      }
      return size;
    }

    public void MergeFrom(FriendInvitation other) {
      if (other == null) {
        return;
      }
      if (other.FirstReceived != false) {
        FirstReceived = other.FirstReceived;
      }
      role_.Add(other.role_);
      if (other.friendInvitation_ != null) {
        if (friendInvitation_ == null) {
          friendInvitation_ = new Bgs.Protocol.Friends.V1.FriendInvitation();
        }
        FriendInvitation_.MergeFrom(other.FriendInvitation_);
      }
    }

    public void MergeFrom(pb::CodedInputStream input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            input.SkipLastField();
            break;
          case 8: {
            FirstReceived = input.ReadBool();
            break;
          }
          case 18:
          case 16: {
            role_.AddEntriesFrom(input, _repeated_role_codec);
            break;
          }
          case 826: {
            if (friendInvitation_ == null) {
              friendInvitation_ = new Bgs.Protocol.Friends.V1.FriendInvitation();
            }
            input.ReadMessage(friendInvitation_);
            break;
          }
        }
      }
    }

  }

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

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

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

    public FriendInvitationParams() {
      OnConstruction();
    }

    partial void OnConstruction();

    public FriendInvitationParams(FriendInvitationParams other) : this() {
      targetEmail_ = other.targetEmail_;
      targetBattleTag_ = other.targetBattleTag_;
      inviterBattleTag_ = other.inviterBattleTag_;
      inviterFullName_ = other.inviterFullName_;
      inviteeDisplayName_ = other.inviteeDisplayName_;
      role_ = other.role_.Clone();
      previousRoleDeprecated_ = other.previousRoleDeprecated_.Clone();
      FriendParams = other.friendParams_ != null ? other.FriendParams.Clone() : null;
    }

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

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

    /// <summary>Field number for the "target_battle_tag" field.</summary>
    public const int TargetBattleTagFieldNumber = 2;
    private string targetBattleTag_ = "";
    public string TargetBattleTag {
      get { return targetBattleTag_; }
      set {
        targetBattleTag_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

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

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

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

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

    /// <summary>Field number for the "previous_role_deprecated" field.</summary>
    public const int PreviousRoleDeprecatedFieldNumber = 7;
    private static readonly pb::FieldCodec<uint> _repeated_previousRoleDeprecated_codec
        = pb::FieldCodec.ForUInt32(58);
    private readonly pbc::RepeatedField<uint> previousRoleDeprecated_ = new pbc::RepeatedField<uint>();
    [System.ObsoleteAttribute()]
    public pbc::RepeatedField<uint> PreviousRoleDeprecated {
      get { return previousRoleDeprecated_; }
    }

    /// <summary>Field number for the "friend_params" field.</summary>
    public const int FriendParamsFieldNumber = 103;
    private Bgs.Protocol.Friends.V1.FriendInvitationParams friendParams_;
    public Bgs.Protocol.Friends.V1.FriendInvitationParams FriendParams {
      get { return friendParams_; }
      set {
        friendParams_ = value;
      }
    }

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

    public bool Equals(FriendInvitationParams other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (TargetEmail != other.TargetEmail) return false;
      if (TargetBattleTag != other.TargetBattleTag) return false;
      if (InviterBattleTag != other.InviterBattleTag) return false;
      if (InviterFullName != other.InviterFullName) return false;
      if (InviteeDisplayName != other.InviteeDisplayName) return false;
      if(!role_.Equals(other.role_)) return false;
      if(!previousRoleDeprecated_.Equals(other.previousRoleDeprecated_)) return false;
      if (!object.Equals(FriendParams, other.FriendParams)) return false;
      return true;
    }

    public override int GetHashCode() {
      int hash = 1;
      if (TargetEmail.Length != 0) hash ^= TargetEmail.GetHashCode();
      if (TargetBattleTag.Length != 0) hash ^= TargetBattleTag.GetHashCode();
      if (InviterBattleTag.Length != 0) hash ^= InviterBattleTag.GetHashCode();
      if (InviterFullName.Length != 0) hash ^= InviterFullName.GetHashCode();
      if (InviteeDisplayName.Length != 0) hash ^= InviteeDisplayName.GetHashCode();
      hash ^= role_.GetHashCode();
      hash ^= previousRoleDeprecated_.GetHashCode();
      if (friendParams_ != null) hash ^= FriendParams.GetHashCode();
      return hash;
    }

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

    public void WriteTo(pb::CodedOutputStream output) {
      if (TargetEmail.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(TargetEmail);
      }
      if (TargetBattleTag.Length != 0) {
        output.WriteRawTag(18);
        output.WriteString(TargetBattleTag);
      }
      if (InviterBattleTag.Length != 0) {
        output.WriteRawTag(26);
        output.WriteString(InviterBattleTag);
      }
      if (InviterFullName.Length != 0) {
        output.WriteRawTag(34);
        output.WriteString(InviterFullName);
      }
      if (InviteeDisplayName.Length != 0) {
        output.WriteRawTag(42);
        output.WriteString(InviteeDisplayName);
      }
      role_.WriteTo(output, _repeated_role_codec);
      previousRoleDeprecated_.WriteTo(output, _repeated_previousRoleDeprecated_codec);
      if (friendParams_ != null) {
        output.WriteRawTag(186, 6);
        output.WriteMessage(FriendParams);
      }
    }

    public int CalculateSize() {
      int size = 0;
      if (TargetEmail.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(TargetEmail);
      }
      if (TargetBattleTag.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(TargetBattleTag);
      }
      if (InviterBattleTag.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(InviterBattleTag);
      }
      if (InviterFullName.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(InviterFullName);
      }
      if (InviteeDisplayName.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(InviteeDisplayName);
      }
      size += role_.CalculateSize(_repeated_role_codec);
      size += previousRoleDeprecated_.CalculateSize(_repeated_previousRoleDeprecated_codec);
      if (friendParams_ != null) {
        size += 2 + pb::CodedOutputStream.ComputeMessageSize(FriendParams);
      }
      return size;
    }

    public void MergeFrom(FriendInvitationParams other) {
      if (other == null) {
        return;
      }
      if (other.TargetEmail.Length != 0) {
        TargetEmail = other.TargetEmail;
      }
      if (other.TargetBattleTag.Length != 0) {
        TargetBattleTag = other.TargetBattleTag;
      }
      if (other.InviterBattleTag.Length != 0) {
        InviterBattleTag = other.InviterBattleTag;
      }
      if (other.InviterFullName.Length != 0) {
        InviterFullName = other.InviterFullName;
      }
      if (other.InviteeDisplayName.Length != 0) {
        InviteeDisplayName = other.InviteeDisplayName;
      }
      role_.Add(other.role_);
      previousRoleDeprecated_.Add(other.previousRoleDeprecated_);
      if (other.friendParams_ != null) {
        if (friendParams_ == null) {
          friendParams_ = new Bgs.Protocol.Friends.V1.FriendInvitationParams();
        }
        FriendParams.MergeFrom(other.FriendParams);
      }
    }

    public void MergeFrom(pb::CodedInputStream input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            input.SkipLastField();
            break;
          case 10: {
            TargetEmail = input.ReadString();
            break;
          }
          case 18: {
            TargetBattleTag = input.ReadString();
            break;
          }
          case 26: {
            InviterBattleTag = input.ReadString();
            break;
          }
          case 34: {
            InviterFullName = input.ReadString();
            break;
          }
          case 42: {
            InviteeDisplayName = input.ReadString();
            break;
          }
          case 50:
          case 48: {
            role_.AddEntriesFrom(input, _repeated_role_codec);
            break;
          }
          case 58:
          case 56: {
            previousRoleDeprecated_.AddEntriesFrom(input, _repeated_previousRoleDeprecated_codec);
            break;
          }
          case 826: {
            if (friendParams_ == null) {
              friendParams_ = new Bgs.Protocol.Friends.V1.FriendInvitationParams();
            }
            input.ReadMessage(friendParams_);
            break;
          }
        }
      }
    }

  }

  #endregion

}

#endregion Designer generated code
