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

    /// <summary>Holder for reflection information generated from bgs/low/pb/client/challenge_service.proto</summary>
    [System.Diagnostics.DebuggerNonUserCodeAttribute()]
    public static partial class ChallengeServiceReflection
    {
        #region Descriptor
        /// <summary>File descriptor for bgs/low/pb/client/challenge_service.proto</summary>
        public static pbr::FileDescriptor Descriptor
        {
            get { return descriptor; }
        }
        private static pbr::FileDescriptor descriptor;

        static ChallengeServiceReflection()
        {
            byte[] descriptorData = System.Convert.FromBase64String(
                string.Concat(
                  "CiliZ3MvbG93L3BiL2NsaWVudC9jaGFsbGVuZ2Vfc2VydmljZS5wcm90bxIZ",
                  "YmdzLnByb3RvY29sLmNoYWxsZW5nZS52MRonYmdzL2xvdy9wYi9jbGllbnQv",
                  "YXR0cmlidXRlX3R5cGVzLnByb3RvGiRiZ3MvbG93L3BiL2NsaWVudC9lbnRp",
                  "dHlfdHlwZXMucHJvdG8aIWJncy9sb3cvcGIvY2xpZW50L3JwY190eXBlcy5w",
                  "cm90byJICglDaGFsbGVuZ2USDAoEdHlwZRgBIAEoBxIMCgRpbmZvGAIgASgJ",
                  "Eg4KBmFuc3dlchgDIAEoCRIPCgdyZXRyaWVzGAQgASgNIlcKFkNoYWxsZW5n",
                  "ZVBpY2tlZFJlcXVlc3QSEQoJY2hhbGxlbmdlGAEgASgHEgoKAmlkGAIgASgN",
                  "Eh4KFm5ld19jaGFsbGVuZ2VfcHJvdG9jb2wYAyABKAgiJwoXQ2hhbGxlbmdl",
                  "UGlja2VkUmVzcG9uc2USDAoEZGF0YRgBIAEoDCJEChhDaGFsbGVuZ2VBbnN3",
                  "ZXJlZFJlcXVlc3QSDgoGYW5zd2VyGAEgASgJEgwKBGRhdGEYAiABKAwSCgoC",
                  "aWQYAyABKA0iVQoZQ2hhbGxlbmdlQW5zd2VyZWRSZXNwb25zZRIMCgRkYXRh",
                  "GAEgASgMEhAKCGRvX3JldHJ5GAIgASgIEhgKEHJlY29yZF9ub3RfZm91bmQY",
                  "AyABKAgiJwoZQ2hhbGxlbmdlQ2FuY2VsbGVkUmVxdWVzdBIKCgJpZBgBIAEo",
                  "DSLTAgoaU2VuZENoYWxsZW5nZVRvVXNlclJlcXVlc3QSKAoHcGVlcl9pZBgB",
                  "IAEoCzIXLmJncy5wcm90b2NvbC5Qcm9jZXNzSWQSLwoPZ2FtZV9hY2NvdW50",
                  "X2lkGAIgASgLMhYuYmdzLnByb3RvY29sLkVudGl0eUlkEjgKCmNoYWxsZW5n",
                  "ZXMYAyADKAsyJC5iZ3MucHJvdG9jb2wuY2hhbGxlbmdlLnYxLkNoYWxsZW5n",
                  "ZRIPCgdjb250ZXh0GAQgASgHEg8KB3RpbWVvdXQYBSABKAQSKwoKYXR0cmli",
                  "dXRlcxgGIAMoCzIXLmJncy5wcm90b2NvbC5BdHRyaWJ1dGUSJQoEaG9zdBgH",
                  "IAEoCzIXLmJncy5wcm90b2NvbC5Qcm9jZXNzSWQSKgoKYWNjb3VudF9pZBgI",
                  "IAEoCzIWLmJncy5wcm90b2NvbC5FbnRpdHlJZCIpChtTZW5kQ2hhbGxlbmdl",
                  "VG9Vc2VyUmVzcG9uc2USCgoCaWQYASABKA0i3QEKFENoYWxsZW5nZVVzZXJS",
                  "ZXF1ZXN0EjgKCmNoYWxsZW5nZXMYASADKAsyJC5iZ3MucHJvdG9jb2wuY2hh",
                  "bGxlbmdlLnYxLkNoYWxsZW5nZRIPCgdjb250ZXh0GAIgASgHEgoKAmlkGAMg",
                  "ASgNEhAKCGRlYWRsaW5lGAQgASgEEisKCmF0dHJpYnV0ZXMYBSADKAsyFy5i",
                  "Z3MucHJvdG9jb2wuQXR0cmlidXRlEi8KD2dhbWVfYWNjb3VudF9pZBgGIAEo",
                  "CzIWLmJncy5wcm90b2NvbC5FbnRpdHlJZCJUChZDaGFsbGVuZ2VSZXN1bHRS",
                  "ZXF1ZXN0EgoKAmlkGAEgASgNEgwKBHR5cGUYAiABKAcSEAoIZXJyb3JfaWQY",
                  "AyABKA0SDgoGYW5zd2VyGAQgASgMIlgKGENoYWxsZW5nZUV4dGVybmFsUmVx",
                  "dWVzdBIVCg1yZXF1ZXN0X3Rva2VuGAEgASgJEhQKDHBheWxvYWRfdHlwZRgC",
                  "IAEoCRIPCgdwYXlsb2FkGAMgASgMIkAKF0NoYWxsZW5nZUV4dGVybmFsUmVz",
                  "dWx0EhUKDXJlcXVlc3RfdG9rZW4YASABKAkSDgoGcGFzc2VkGAIgASgIMvUD",
                  "ChBDaGFsbGVuZ2VTZXJ2aWNlEngKD0NoYWxsZW5nZVBpY2tlZBIxLmJncy5w",
                  "cm90b2NvbC5jaGFsbGVuZ2UudjEuQ2hhbGxlbmdlUGlja2VkUmVxdWVzdBoy",
                  "LmJncy5wcm90b2NvbC5jaGFsbGVuZ2UudjEuQ2hhbGxlbmdlUGlja2VkUmVz",
                  "cG9uc2USfgoRQ2hhbGxlbmdlQW5zd2VyZWQSMy5iZ3MucHJvdG9jb2wuY2hh",
                  "bGxlbmdlLnYxLkNoYWxsZW5nZUFuc3dlcmVkUmVxdWVzdBo0LmJncy5wcm90",
                  "b2NvbC5jaGFsbGVuZ2UudjEuQ2hhbGxlbmdlQW5zd2VyZWRSZXNwb25zZRJg",
                  "ChJDaGFsbGVuZ2VDYW5jZWxsZWQSNC5iZ3MucHJvdG9jb2wuY2hhbGxlbmdl",
                  "LnYxLkNoYWxsZW5nZUNhbmNlbGxlZFJlcXVlc3QaFC5iZ3MucHJvdG9jb2wu",
                  "Tm9EYXRhEoQBChNTZW5kQ2hhbGxlbmdlVG9Vc2VyEjUuYmdzLnByb3RvY29s",
                  "LmNoYWxsZW5nZS52MS5TZW5kQ2hhbGxlbmdlVG9Vc2VyUmVxdWVzdBo2LmJn",
                  "cy5wcm90b2NvbC5jaGFsbGVuZ2UudjEuU2VuZENoYWxsZW5nZVRvVXNlclJl",
                  "c3BvbnNlMqgDChFDaGFsbGVuZ2VMaXN0ZW5lchJdCg9PbkNoYWxsZW5nZVVz",
                  "ZXISLy5iZ3MucHJvdG9jb2wuY2hhbGxlbmdlLnYxLkNoYWxsZW5nZVVzZXJS",
                  "ZXF1ZXN0GhkuYmdzLnByb3RvY29sLk5PX1JFU1BPTlNFEmEKEU9uQ2hhbGxl",
                  "bmdlUmVzdWx0EjEuYmdzLnByb3RvY29sLmNoYWxsZW5nZS52MS5DaGFsbGVu",
                  "Z2VSZXN1bHRSZXF1ZXN0GhkuYmdzLnByb3RvY29sLk5PX1JFU1BPTlNFEmUK",
                  "E09uRXh0ZXJuYWxDaGFsbGVuZ2USMy5iZ3MucHJvdG9jb2wuY2hhbGxlbmdl",
                  "LnYxLkNoYWxsZW5nZUV4dGVybmFsUmVxdWVzdBoZLmJncy5wcm90b2NvbC5O",
                  "T19SRVNQT05TRRJqChlPbkV4dGVybmFsQ2hhbGxlbmdlUmVzdWx0EjIuYmdz",
                  "LnByb3RvY29sLmNoYWxsZW5nZS52MS5DaGFsbGVuZ2VFeHRlcm5hbFJlc3Vs",
                  "dBoZLmJncy5wcm90b2NvbC5OT19SRVNQT05TRUIFSAKAAQBiBnByb3RvMw=="));
            descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
                new pbr::FileDescriptor[] { Bgs.Protocol.AttributeTypesReflection.Descriptor, Bgs.Protocol.EntityTypesReflection.Descriptor, Bgs.Protocol.RpcTypesReflection.Descriptor, },
                new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
            new pbr::GeneratedClrTypeInfo(typeof(Bgs.Protocol.Challenge.V1.Challenge), Bgs.Protocol.Challenge.V1.Challenge.Parser, new[]{ "Type", "Info", "Answer", "Retries" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(Bgs.Protocol.Challenge.V1.ChallengePickedRequest), Bgs.Protocol.Challenge.V1.ChallengePickedRequest.Parser, new[]{ "Challenge", "Id", "NewChallengeProtocol" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(Bgs.Protocol.Challenge.V1.ChallengePickedResponse), Bgs.Protocol.Challenge.V1.ChallengePickedResponse.Parser, new[]{ "Data" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(Bgs.Protocol.Challenge.V1.ChallengeAnsweredRequest), Bgs.Protocol.Challenge.V1.ChallengeAnsweredRequest.Parser, new[]{ "Answer", "Data", "Id" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(Bgs.Protocol.Challenge.V1.ChallengeAnsweredResponse), Bgs.Protocol.Challenge.V1.ChallengeAnsweredResponse.Parser, new[]{ "Data", "DoRetry", "RecordNotFound" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(Bgs.Protocol.Challenge.V1.ChallengeCancelledRequest), Bgs.Protocol.Challenge.V1.ChallengeCancelledRequest.Parser, new[]{ "Id" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(Bgs.Protocol.Challenge.V1.SendChallengeToUserRequest), Bgs.Protocol.Challenge.V1.SendChallengeToUserRequest.Parser, new[]{ "PeerId", "GameAccountId", "Challenges", "Context", "Timeout", "Attributes", "Host", "AccountId" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(Bgs.Protocol.Challenge.V1.SendChallengeToUserResponse), Bgs.Protocol.Challenge.V1.SendChallengeToUserResponse.Parser, new[]{ "Id" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(Bgs.Protocol.Challenge.V1.ChallengeUserRequest), Bgs.Protocol.Challenge.V1.ChallengeUserRequest.Parser, new[]{ "Challenges", "Context", "Id", "Deadline", "Attributes", "GameAccountId" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(Bgs.Protocol.Challenge.V1.ChallengeResultRequest), Bgs.Protocol.Challenge.V1.ChallengeResultRequest.Parser, new[]{ "Id", "Type", "ErrorId", "Answer" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(Bgs.Protocol.Challenge.V1.ChallengeExternalRequest), Bgs.Protocol.Challenge.V1.ChallengeExternalRequest.Parser, new[]{ "RequestToken", "PayloadType", "Payload" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(Bgs.Protocol.Challenge.V1.ChallengeExternalResult), Bgs.Protocol.Challenge.V1.ChallengeExternalResult.Parser, new[]{ "RequestToken", "Passed" }, null, null, null)
                }));
        }
        #endregion
    }

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

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

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

        public Challenge()
        {
            OnConstruction();
        }

        partial void OnConstruction();

        public Challenge(Challenge other) : this()
        {
            type_ = other.type_;
            info_ = other.info_;
            answer_ = other.answer_;
            retries_ = other.retries_;
        }

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

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

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

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

        /// <summary>Field number for the "retries" field.</summary>
        public const int RetriesFieldNumber = 4;
        private uint retries_;
        public uint Retries
        {
            get { return retries_; }
            set
            {
                retries_ = value;
            }
        }

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

        public bool Equals(Challenge other)
        {
            if (ReferenceEquals(other, null))
            {
                return false;
            }
            if (ReferenceEquals(other, this))
            {
                return true;
            }
            if (Type != other.Type) return false;
            if (Info != other.Info) return false;
            if (Answer != other.Answer) return false;
            if (Retries != other.Retries) return false;
            return true;
        }

        public override int GetHashCode()
        {
            int hash = 1;
            if (Type != 0) hash ^= Type.GetHashCode();
            if (Info.Length != 0) hash ^= Info.GetHashCode();
            if (Answer.Length != 0) hash ^= Answer.GetHashCode();
            if (Retries != 0) hash ^= Retries.GetHashCode();
            return hash;
        }

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

        public void WriteTo(pb::CodedOutputStream output)
        {
            if (Type != 0)
            {
                output.WriteRawTag(13);
                output.WriteFixed32(Type);
            }
            if (Info.Length != 0)
            {
                output.WriteRawTag(18);
                output.WriteString(Info);
            }
            if (Answer.Length != 0)
            {
                output.WriteRawTag(26);
                output.WriteString(Answer);
            }
            if (Retries != 0)
            {
                output.WriteRawTag(32);
                output.WriteUInt32(Retries);
            }
        }

        public int CalculateSize()
        {
            int size = 0;
            if (Type != 0)
            {
                size += 1 + 4;
            }
            if (Info.Length != 0)
            {
                size += 1 + pb::CodedOutputStream.ComputeStringSize(Info);
            }
            if (Answer.Length != 0)
            {
                size += 1 + pb::CodedOutputStream.ComputeStringSize(Answer);
            }
            if (Retries != 0)
            {
                size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Retries);
            }
            return size;
        }

        public void MergeFrom(Challenge other)
        {
            if (other == null)
            {
                return;
            }
            if (other.Type != 0)
            {
                Type = other.Type;
            }
            if (other.Info.Length != 0)
            {
                Info = other.Info;
            }
            if (other.Answer.Length != 0)
            {
                Answer = other.Answer;
            }
            if (other.Retries != 0)
            {
                Retries = other.Retries;
            }
        }

        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;
            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                    default:
                        input.SkipLastField();
                        break;
                    case 13:
                        {
                            Type = input.ReadFixed32();
                            break;
                        }
                    case 18:
                        {
                            Info = input.ReadString();
                            break;
                        }
                    case 26:
                        {
                            Answer = input.ReadString();
                            break;
                        }
                    case 32:
                        {
                            Retries = input.ReadUInt32();
                            break;
                        }
                }
            }
        }

    }

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

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

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

        public ChallengePickedRequest()
        {
            OnConstruction();
        }

        partial void OnConstruction();

        public ChallengePickedRequest(ChallengePickedRequest other) : this()
        {
            challenge_ = other.challenge_;
            id_ = other.id_;
            newChallengeProtocol_ = other.newChallengeProtocol_;
        }

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

        /// <summary>Field number for the "challenge" field.</summary>
        public const int ChallengeFieldNumber = 1;
        private uint challenge_;
        public uint Challenge
        {
            get { return challenge_; }
            set
            {
                challenge_ = value;
            }
        }

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

        /// <summary>Field number for the "new_challenge_protocol" field.</summary>
        public const int NewChallengeProtocolFieldNumber = 3;
        private bool newChallengeProtocol_;
        public bool NewChallengeProtocol
        {
            get { return newChallengeProtocol_; }
            set
            {
                newChallengeProtocol_ = value;
            }
        }

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

        public bool Equals(ChallengePickedRequest other)
        {
            if (ReferenceEquals(other, null))
            {
                return false;
            }
            if (ReferenceEquals(other, this))
            {
                return true;
            }
            if (Challenge != other.Challenge) return false;
            if (Id != other.Id) return false;
            if (NewChallengeProtocol != other.NewChallengeProtocol) return false;
            return true;
        }

        public override int GetHashCode()
        {
            int hash = 1;
            if (Challenge != 0) hash ^= Challenge.GetHashCode();
            if (Id != 0) hash ^= Id.GetHashCode();
            if (NewChallengeProtocol != false) hash ^= NewChallengeProtocol.GetHashCode();
            return hash;
        }

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

        public void WriteTo(pb::CodedOutputStream output)
        {
            if (Challenge != 0)
            {
                output.WriteRawTag(13);
                output.WriteFixed32(Challenge);
            }
            if (Id != 0)
            {
                output.WriteRawTag(16);
                output.WriteUInt32(Id);
            }
            if (NewChallengeProtocol != false)
            {
                output.WriteRawTag(24);
                output.WriteBool(NewChallengeProtocol);
            }
        }

        public int CalculateSize()
        {
            int size = 0;
            if (Challenge != 0)
            {
                size += 1 + 4;
            }
            if (Id != 0)
            {
                size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Id);
            }
            if (NewChallengeProtocol != false)
            {
                size += 1 + 1;
            }
            return size;
        }

        public void MergeFrom(ChallengePickedRequest other)
        {
            if (other == null)
            {
                return;
            }
            if (other.Challenge != 0)
            {
                Challenge = other.Challenge;
            }
            if (other.Id != 0)
            {
                Id = other.Id;
            }
            if (other.NewChallengeProtocol != false)
            {
                NewChallengeProtocol = other.NewChallengeProtocol;
            }
        }

        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;
            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                    default:
                        input.SkipLastField();
                        break;
                    case 13:
                        {
                            Challenge = input.ReadFixed32();
                            break;
                        }
                    case 16:
                        {
                            Id = input.ReadUInt32();
                            break;
                        }
                    case 24:
                        {
                            NewChallengeProtocol = input.ReadBool();
                            break;
                        }
                }
            }
        }

    }

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

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

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

        public ChallengePickedResponse()
        {
            OnConstruction();
        }

        partial void OnConstruction();

        public ChallengePickedResponse(ChallengePickedResponse other) : this()
        {
            data_ = other.data_;
        }

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

        /// <summary>Field number for the "data" field.</summary>
        public const int DataFieldNumber = 1;
        private pb::ByteString data_ = pb::ByteString.Empty;
        public pb::ByteString Data
        {
            get { return data_; }
            set
            {
                data_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
            }
        }

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

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

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

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

        public void WriteTo(pb::CodedOutputStream output)
        {
            if (Data.Length != 0)
            {
                output.WriteRawTag(10);
                output.WriteBytes(Data);
            }
        }

        public int CalculateSize()
        {
            int size = 0;
            if (Data.Length != 0)
            {
                size += 1 + pb::CodedOutputStream.ComputeBytesSize(Data);
            }
            return size;
        }

        public void MergeFrom(ChallengePickedResponse other)
        {
            if (other == null)
            {
                return;
            }
            if (other.Data.Length != 0)
            {
                Data = other.Data;
            }
        }

        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;
            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                    default:
                        input.SkipLastField();
                        break;
                    case 10:
                        {
                            Data = input.ReadBytes();
                            break;
                        }
                }
            }
        }

    }

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

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

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

        public ChallengeAnsweredRequest()
        {
            OnConstruction();
        }

        partial void OnConstruction();

        public ChallengeAnsweredRequest(ChallengeAnsweredRequest other) : this()
        {
            answer_ = other.answer_;
            data_ = other.data_;
            id_ = other.id_;
        }

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

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

        /// <summary>Field number for the "data" field.</summary>
        public const int DataFieldNumber = 2;
        private pb::ByteString data_ = pb::ByteString.Empty;
        public pb::ByteString Data
        {
            get { return data_; }
            set
            {
                data_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
            }
        }

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

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

        public bool Equals(ChallengeAnsweredRequest other)
        {
            if (ReferenceEquals(other, null))
            {
                return false;
            }
            if (ReferenceEquals(other, this))
            {
                return true;
            }
            if (Answer != other.Answer) return false;
            if (Data != other.Data) return false;
            if (Id != other.Id) return false;
            return true;
        }

        public override int GetHashCode()
        {
            int hash = 1;
            if (Answer.Length != 0) hash ^= Answer.GetHashCode();
            if (Data.Length != 0) hash ^= Data.GetHashCode();
            if (Id != 0) hash ^= Id.GetHashCode();
            return hash;
        }

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

        public void WriteTo(pb::CodedOutputStream output)
        {
            if (Answer.Length != 0)
            {
                output.WriteRawTag(10);
                output.WriteString(Answer);
            }
            if (Data.Length != 0)
            {
                output.WriteRawTag(18);
                output.WriteBytes(Data);
            }
            if (Id != 0)
            {
                output.WriteRawTag(24);
                output.WriteUInt32(Id);
            }
        }

        public int CalculateSize()
        {
            int size = 0;
            if (Answer.Length != 0)
            {
                size += 1 + pb::CodedOutputStream.ComputeStringSize(Answer);
            }
            if (Data.Length != 0)
            {
                size += 1 + pb::CodedOutputStream.ComputeBytesSize(Data);
            }
            if (Id != 0)
            {
                size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Id);
            }
            return size;
        }

        public void MergeFrom(ChallengeAnsweredRequest other)
        {
            if (other == null)
            {
                return;
            }
            if (other.Answer.Length != 0)
            {
                Answer = other.Answer;
            }
            if (other.Data.Length != 0)
            {
                Data = other.Data;
            }
            if (other.Id != 0)
            {
                Id = other.Id;
            }
        }

        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;
            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                    default:
                        input.SkipLastField();
                        break;
                    case 10:
                        {
                            Answer = input.ReadString();
                            break;
                        }
                    case 18:
                        {
                            Data = input.ReadBytes();
                            break;
                        }
                    case 24:
                        {
                            Id = input.ReadUInt32();
                            break;
                        }
                }
            }
        }

    }

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

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

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

        public ChallengeAnsweredResponse()
        {
            OnConstruction();
        }

        partial void OnConstruction();

        public ChallengeAnsweredResponse(ChallengeAnsweredResponse other) : this()
        {
            data_ = other.data_;
            doRetry_ = other.doRetry_;
            recordNotFound_ = other.recordNotFound_;
        }

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

        /// <summary>Field number for the "data" field.</summary>
        public const int DataFieldNumber = 1;
        private pb::ByteString data_ = pb::ByteString.Empty;
        public pb::ByteString Data
        {
            get { return data_; }
            set
            {
                data_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
            }
        }

        /// <summary>Field number for the "do_retry" field.</summary>
        public const int DoRetryFieldNumber = 2;
        private bool doRetry_;
        public bool DoRetry
        {
            get { return doRetry_; }
            set
            {
                doRetry_ = value;
            }
        }

        /// <summary>Field number for the "record_not_found" field.</summary>
        public const int RecordNotFoundFieldNumber = 3;
        private bool recordNotFound_;
        public bool RecordNotFound
        {
            get { return recordNotFound_; }
            set
            {
                recordNotFound_ = value;
            }
        }

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

        public bool Equals(ChallengeAnsweredResponse other)
        {
            if (ReferenceEquals(other, null))
            {
                return false;
            }
            if (ReferenceEquals(other, this))
            {
                return true;
            }
            if (Data != other.Data) return false;
            if (DoRetry != other.DoRetry) return false;
            if (RecordNotFound != other.RecordNotFound) return false;
            return true;
        }

        public override int GetHashCode()
        {
            int hash = 1;
            if (Data.Length != 0) hash ^= Data.GetHashCode();
            if (DoRetry != false) hash ^= DoRetry.GetHashCode();
            if (RecordNotFound != false) hash ^= RecordNotFound.GetHashCode();
            return hash;
        }

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

        public void WriteTo(pb::CodedOutputStream output)
        {
            if (Data.Length != 0)
            {
                output.WriteRawTag(10);
                output.WriteBytes(Data);
            }
            if (DoRetry != false)
            {
                output.WriteRawTag(16);
                output.WriteBool(DoRetry);
            }
            if (RecordNotFound != false)
            {
                output.WriteRawTag(24);
                output.WriteBool(RecordNotFound);
            }
        }

        public int CalculateSize()
        {
            int size = 0;
            if (Data.Length != 0)
            {
                size += 1 + pb::CodedOutputStream.ComputeBytesSize(Data);
            }
            if (DoRetry != false)
            {
                size += 1 + 1;
            }
            if (RecordNotFound != false)
            {
                size += 1 + 1;
            }
            return size;
        }

        public void MergeFrom(ChallengeAnsweredResponse other)
        {
            if (other == null)
            {
                return;
            }
            if (other.Data.Length != 0)
            {
                Data = other.Data;
            }
            if (other.DoRetry != false)
            {
                DoRetry = other.DoRetry;
            }
            if (other.RecordNotFound != false)
            {
                RecordNotFound = other.RecordNotFound;
            }
        }

        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;
            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                    default:
                        input.SkipLastField();
                        break;
                    case 10:
                        {
                            Data = input.ReadBytes();
                            break;
                        }
                    case 16:
                        {
                            DoRetry = input.ReadBool();
                            break;
                        }
                    case 24:
                        {
                            RecordNotFound = input.ReadBool();
                            break;
                        }
                }
            }
        }

    }

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

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

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

        public ChallengeCancelledRequest()
        {
            OnConstruction();
        }

        partial void OnConstruction();

        public ChallengeCancelledRequest(ChallengeCancelledRequest other) : this()
        {
            id_ = other.id_;
        }

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

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

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

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

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

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

        public void WriteTo(pb::CodedOutputStream output)
        {
            if (Id != 0)
            {
                output.WriteRawTag(8);
                output.WriteUInt32(Id);
            }
        }

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

        public void MergeFrom(ChallengeCancelledRequest other)
        {
            if (other == null)
            {
                return;
            }
            if (other.Id != 0)
            {
                Id = other.Id;
            }
        }

        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;
            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                    default:
                        input.SkipLastField();
                        break;
                    case 8:
                        {
                            Id = input.ReadUInt32();
                            break;
                        }
                }
            }
        }

    }

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

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

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

        public SendChallengeToUserRequest()
        {
            OnConstruction();
        }

        partial void OnConstruction();

        public SendChallengeToUserRequest(SendChallengeToUserRequest other) : this()
        {
            PeerId = other.peerId_ != null ? other.PeerId.Clone() : null;
            GameAccountId = other.gameAccountId_ != null ? other.GameAccountId.Clone() : null;
            challenges_ = other.challenges_.Clone();
            context_ = other.context_;
            timeout_ = other.timeout_;
            attributes_ = other.attributes_.Clone();
            Host = other.host_ != null ? other.Host.Clone() : null;
            AccountId = other.accountId_ != null ? other.AccountId.Clone() : null;
        }

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

        /// <summary>Field number for the "peer_id" field.</summary>
        public const int PeerIdFieldNumber = 1;
        private Bgs.Protocol.ProcessId peerId_;
        public Bgs.Protocol.ProcessId PeerId
        {
            get { return peerId_; }
            set
            {
                peerId_ = value;
            }
        }

        /// <summary>Field number for the "game_account_id" field.</summary>
        public const int GameAccountIdFieldNumber = 2;
        private Bgs.Protocol.EntityId gameAccountId_;
        public Bgs.Protocol.EntityId GameAccountId
        {
            get { return gameAccountId_; }
            set
            {
                gameAccountId_ = value;
            }
        }

        /// <summary>Field number for the "challenges" field.</summary>
        public const int ChallengesFieldNumber = 3;
        private static readonly pb::FieldCodec<Bgs.Protocol.Challenge.V1.Challenge> _repeated_challenges_codec
            = pb::FieldCodec.ForMessage(26, Bgs.Protocol.Challenge.V1.Challenge.Parser);
        private readonly pbc::RepeatedField<Bgs.Protocol.Challenge.V1.Challenge> challenges_ = new pbc::RepeatedField<Bgs.Protocol.Challenge.V1.Challenge>();
        public pbc::RepeatedField<Bgs.Protocol.Challenge.V1.Challenge> Challenges
        {
            get { return challenges_; }
        }

        /// <summary>Field number for the "context" field.</summary>
        public const int ContextFieldNumber = 4;
        private uint context_;
        public uint Context
        {
            get { return context_; }
            set
            {
                context_ = value;
            }
        }

        /// <summary>Field number for the "timeout" field.</summary>
        public const int TimeoutFieldNumber = 5;
        private ulong timeout_;
        public ulong Timeout
        {
            get { return timeout_; }
            set
            {
                timeout_ = value;
            }
        }

        /// <summary>Field number for the "attributes" field.</summary>
        public const int AttributesFieldNumber = 6;
        private static readonly pb::FieldCodec<Bgs.Protocol.Attribute> _repeated_attributes_codec
            = pb::FieldCodec.ForMessage(50, Bgs.Protocol.Attribute.Parser);
        private readonly pbc::RepeatedField<Bgs.Protocol.Attribute> attributes_ = new pbc::RepeatedField<Bgs.Protocol.Attribute>();
        public pbc::RepeatedField<Bgs.Protocol.Attribute> Attributes
        {
            get { return attributes_; }
        }

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

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

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

        public bool Equals(SendChallengeToUserRequest other)
        {
            if (ReferenceEquals(other, null))
            {
                return false;
            }
            if (ReferenceEquals(other, this))
            {
                return true;
            }
            if (!object.Equals(PeerId, other.PeerId)) return false;
            if (!object.Equals(GameAccountId, other.GameAccountId)) return false;
            if (!challenges_.Equals(other.challenges_)) return false;
            if (Context != other.Context) return false;
            if (Timeout != other.Timeout) return false;
            if (!attributes_.Equals(other.attributes_)) return false;
            if (!object.Equals(Host, other.Host)) return false;
            if (!object.Equals(AccountId, other.AccountId)) return false;
            return true;
        }

        public override int GetHashCode()
        {
            int hash = 1;
            if (peerId_ != null) hash ^= PeerId.GetHashCode();
            if (gameAccountId_ != null) hash ^= GameAccountId.GetHashCode();
            hash ^= challenges_.GetHashCode();
            if (Context != 0) hash ^= Context.GetHashCode();
            if (Timeout != 0UL) hash ^= Timeout.GetHashCode();
            hash ^= attributes_.GetHashCode();
            if (host_ != null) hash ^= Host.GetHashCode();
            if (accountId_ != null) hash ^= AccountId.GetHashCode();
            return hash;
        }

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

        public void WriteTo(pb::CodedOutputStream output)
        {
            if (peerId_ != null)
            {
                output.WriteRawTag(10);
                output.WriteMessage(PeerId);
            }
            if (gameAccountId_ != null)
            {
                output.WriteRawTag(18);
                output.WriteMessage(GameAccountId);
            }
            challenges_.WriteTo(output, _repeated_challenges_codec);
            if (Context != 0)
            {
                output.WriteRawTag(37);
                output.WriteFixed32(Context);
            }
            if (Timeout != 0UL)
            {
                output.WriteRawTag(40);
                output.WriteUInt64(Timeout);
            }
            attributes_.WriteTo(output, _repeated_attributes_codec);
            if (host_ != null)
            {
                output.WriteRawTag(58);
                output.WriteMessage(Host);
            }
            if (accountId_ != null)
            {
                output.WriteRawTag(66);
                output.WriteMessage(AccountId);
            }
        }

        public int CalculateSize()
        {
            int size = 0;
            if (peerId_ != null)
            {
                size += 1 + pb::CodedOutputStream.ComputeMessageSize(PeerId);
            }
            if (gameAccountId_ != null)
            {
                size += 1 + pb::CodedOutputStream.ComputeMessageSize(GameAccountId);
            }
            size += challenges_.CalculateSize(_repeated_challenges_codec);
            if (Context != 0)
            {
                size += 1 + 4;
            }
            if (Timeout != 0UL)
            {
                size += 1 + pb::CodedOutputStream.ComputeUInt64Size(Timeout);
            }
            size += attributes_.CalculateSize(_repeated_attributes_codec);
            if (host_ != null)
            {
                size += 1 + pb::CodedOutputStream.ComputeMessageSize(Host);
            }
            if (accountId_ != null)
            {
                size += 1 + pb::CodedOutputStream.ComputeMessageSize(AccountId);
            }
            return size;
        }

        public void MergeFrom(SendChallengeToUserRequest other)
        {
            if (other == null)
            {
                return;
            }
            if (other.peerId_ != null)
            {
                if (peerId_ == null)
                {
                    peerId_ = new Bgs.Protocol.ProcessId();
                }
                PeerId.MergeFrom(other.PeerId);
            }
            if (other.gameAccountId_ != null)
            {
                if (gameAccountId_ == null)
                {
                    gameAccountId_ = new Bgs.Protocol.EntityId();
                }
                GameAccountId.MergeFrom(other.GameAccountId);
            }
            challenges_.Add(other.challenges_);
            if (other.Context != 0)
            {
                Context = other.Context;
            }
            if (other.Timeout != 0UL)
            {
                Timeout = other.Timeout;
            }
            attributes_.Add(other.attributes_);
            if (other.host_ != null)
            {
                if (host_ == null)
                {
                    host_ = new Bgs.Protocol.ProcessId();
                }
                Host.MergeFrom(other.Host);
            }
            if (other.accountId_ != null)
            {
                if (accountId_ == null)
                {
                    accountId_ = new Bgs.Protocol.EntityId();
                }
                AccountId.MergeFrom(other.AccountId);
            }
        }

        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;
            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                    default:
                        input.SkipLastField();
                        break;
                    case 10:
                        {
                            if (peerId_ == null)
                            {
                                peerId_ = new Bgs.Protocol.ProcessId();
                            }
                            input.ReadMessage(peerId_);
                            break;
                        }
                    case 18:
                        {
                            if (gameAccountId_ == null)
                            {
                                gameAccountId_ = new Bgs.Protocol.EntityId();
                            }
                            input.ReadMessage(gameAccountId_);
                            break;
                        }
                    case 26:
                        {
                            challenges_.AddEntriesFrom(input, _repeated_challenges_codec);
                            break;
                        }
                    case 37:
                        {
                            Context = input.ReadFixed32();
                            break;
                        }
                    case 40:
                        {
                            Timeout = input.ReadUInt64();
                            break;
                        }
                    case 50:
                        {
                            attributes_.AddEntriesFrom(input, _repeated_attributes_codec);
                            break;
                        }
                    case 58:
                        {
                            if (host_ == null)
                            {
                                host_ = new Bgs.Protocol.ProcessId();
                            }
                            input.ReadMessage(host_);
                            break;
                        }
                    case 66:
                        {
                            if (accountId_ == null)
                            {
                                accountId_ = new Bgs.Protocol.EntityId();
                            }
                            input.ReadMessage(accountId_);
                            break;
                        }
                }
            }
        }

    }

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

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

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

        public SendChallengeToUserResponse()
        {
            OnConstruction();
        }

        partial void OnConstruction();

        public SendChallengeToUserResponse(SendChallengeToUserResponse other) : this()
        {
            id_ = other.id_;
        }

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

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

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

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

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

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

        public void WriteTo(pb::CodedOutputStream output)
        {
            if (Id != 0)
            {
                output.WriteRawTag(8);
                output.WriteUInt32(Id);
            }
        }

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

        public void MergeFrom(SendChallengeToUserResponse other)
        {
            if (other == null)
            {
                return;
            }
            if (other.Id != 0)
            {
                Id = other.Id;
            }
        }

        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;
            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                    default:
                        input.SkipLastField();
                        break;
                    case 8:
                        {
                            Id = input.ReadUInt32();
                            break;
                        }
                }
            }
        }

    }

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

        public static pbr::MessageDescriptor Descriptor
        {
            get { return Bgs.Protocol.Challenge.V1.ChallengeServiceReflection.Descriptor.MessageTypes[8]; }
        }

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

        public ChallengeUserRequest()
        {
            OnConstruction();
        }

        partial void OnConstruction();

        public ChallengeUserRequest(ChallengeUserRequest other) : this()
        {
            challenges_ = other.challenges_.Clone();
            context_ = other.context_;
            id_ = other.id_;
            deadline_ = other.deadline_;
            attributes_ = other.attributes_.Clone();
            GameAccountId = other.gameAccountId_ != null ? other.GameAccountId.Clone() : null;
        }

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

        /// <summary>Field number for the "challenges" field.</summary>
        public const int ChallengesFieldNumber = 1;
        private static readonly pb::FieldCodec<Bgs.Protocol.Challenge.V1.Challenge> _repeated_challenges_codec
            = pb::FieldCodec.ForMessage(10, Bgs.Protocol.Challenge.V1.Challenge.Parser);
        private readonly pbc::RepeatedField<Bgs.Protocol.Challenge.V1.Challenge> challenges_ = new pbc::RepeatedField<Bgs.Protocol.Challenge.V1.Challenge>();
        public pbc::RepeatedField<Bgs.Protocol.Challenge.V1.Challenge> Challenges
        {
            get { return challenges_; }
        }

        /// <summary>Field number for the "context" field.</summary>
        public const int ContextFieldNumber = 2;
        private uint context_;
        public uint Context
        {
            get { return context_; }
            set
            {
                context_ = value;
            }
        }

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

        /// <summary>Field number for the "deadline" field.</summary>
        public const int DeadlineFieldNumber = 4;
        private ulong deadline_;
        public ulong Deadline
        {
            get { return deadline_; }
            set
            {
                deadline_ = value;
            }
        }

        /// <summary>Field number for the "attributes" field.</summary>
        public const int AttributesFieldNumber = 5;
        private static readonly pb::FieldCodec<Bgs.Protocol.Attribute> _repeated_attributes_codec
            = pb::FieldCodec.ForMessage(42, Bgs.Protocol.Attribute.Parser);
        private readonly pbc::RepeatedField<Bgs.Protocol.Attribute> attributes_ = new pbc::RepeatedField<Bgs.Protocol.Attribute>();
        public pbc::RepeatedField<Bgs.Protocol.Attribute> Attributes
        {
            get { return attributes_; }
        }

        /// <summary>Field number for the "game_account_id" field.</summary>
        public const int GameAccountIdFieldNumber = 6;
        private Bgs.Protocol.EntityId gameAccountId_;
        public Bgs.Protocol.EntityId GameAccountId
        {
            get { return gameAccountId_; }
            set
            {
                gameAccountId_ = value;
            }
        }

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

        public bool Equals(ChallengeUserRequest other)
        {
            if (ReferenceEquals(other, null))
            {
                return false;
            }
            if (ReferenceEquals(other, this))
            {
                return true;
            }
            if (!challenges_.Equals(other.challenges_)) return false;
            if (Context != other.Context) return false;
            if (Id != other.Id) return false;
            if (Deadline != other.Deadline) return false;
            if (!attributes_.Equals(other.attributes_)) return false;
            if (!object.Equals(GameAccountId, other.GameAccountId)) return false;
            return true;
        }

        public override int GetHashCode()
        {
            int hash = 1;
            hash ^= challenges_.GetHashCode();
            if (Context != 0) hash ^= Context.GetHashCode();
            if (Id != 0) hash ^= Id.GetHashCode();
            if (Deadline != 0UL) hash ^= Deadline.GetHashCode();
            hash ^= attributes_.GetHashCode();
            if (gameAccountId_ != null) hash ^= GameAccountId.GetHashCode();
            return hash;
        }

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

        public void WriteTo(pb::CodedOutputStream output)
        {
            challenges_.WriteTo(output, _repeated_challenges_codec);
            if (Context != 0)
            {
                output.WriteRawTag(21);
                output.WriteFixed32(Context);
            }
            if (Id != 0)
            {
                output.WriteRawTag(24);
                output.WriteUInt32(Id);
            }
            if (Deadline != 0UL)
            {
                output.WriteRawTag(32);
                output.WriteUInt64(Deadline);
            }
            attributes_.WriteTo(output, _repeated_attributes_codec);
            if (gameAccountId_ != null)
            {
                output.WriteRawTag(50);
                output.WriteMessage(GameAccountId);
            }
        }

        public int CalculateSize()
        {
            int size = 0;
            size += challenges_.CalculateSize(_repeated_challenges_codec);
            if (Context != 0)
            {
                size += 1 + 4;
            }
            if (Id != 0)
            {
                size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Id);
            }
            if (Deadline != 0UL)
            {
                size += 1 + pb::CodedOutputStream.ComputeUInt64Size(Deadline);
            }
            size += attributes_.CalculateSize(_repeated_attributes_codec);
            if (gameAccountId_ != null)
            {
                size += 1 + pb::CodedOutputStream.ComputeMessageSize(GameAccountId);
            }
            return size;
        }

        public void MergeFrom(ChallengeUserRequest other)
        {
            if (other == null)
            {
                return;
            }
            challenges_.Add(other.challenges_);
            if (other.Context != 0)
            {
                Context = other.Context;
            }
            if (other.Id != 0)
            {
                Id = other.Id;
            }
            if (other.Deadline != 0UL)
            {
                Deadline = other.Deadline;
            }
            attributes_.Add(other.attributes_);
            if (other.gameAccountId_ != null)
            {
                if (gameAccountId_ == null)
                {
                    gameAccountId_ = new Bgs.Protocol.EntityId();
                }
                GameAccountId.MergeFrom(other.GameAccountId);
            }
        }

        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;
            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                    default:
                        input.SkipLastField();
                        break;
                    case 10:
                        {
                            challenges_.AddEntriesFrom(input, _repeated_challenges_codec);
                            break;
                        }
                    case 21:
                        {
                            Context = input.ReadFixed32();
                            break;
                        }
                    case 24:
                        {
                            Id = input.ReadUInt32();
                            break;
                        }
                    case 32:
                        {
                            Deadline = input.ReadUInt64();
                            break;
                        }
                    case 42:
                        {
                            attributes_.AddEntriesFrom(input, _repeated_attributes_codec);
                            break;
                        }
                    case 50:
                        {
                            if (gameAccountId_ == null)
                            {
                                gameAccountId_ = new Bgs.Protocol.EntityId();
                            }
                            input.ReadMessage(gameAccountId_);
                            break;
                        }
                }
            }
        }

    }

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

        public static pbr::MessageDescriptor Descriptor
        {
            get { return Bgs.Protocol.Challenge.V1.ChallengeServiceReflection.Descriptor.MessageTypes[9]; }
        }

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

        public ChallengeResultRequest()
        {
            OnConstruction();
        }

        partial void OnConstruction();

        public ChallengeResultRequest(ChallengeResultRequest other) : this()
        {
            id_ = other.id_;
            type_ = other.type_;
            errorId_ = other.errorId_;
            answer_ = other.answer_;
        }

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

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

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

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

        /// <summary>Field number for the "answer" field.</summary>
        public const int AnswerFieldNumber = 4;
        private pb::ByteString answer_ = pb::ByteString.Empty;
        public pb::ByteString Answer
        {
            get { return answer_; }
            set
            {
                answer_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
            }
        }

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

        public bool Equals(ChallengeResultRequest other)
        {
            if (ReferenceEquals(other, null))
            {
                return false;
            }
            if (ReferenceEquals(other, this))
            {
                return true;
            }
            if (Id != other.Id) return false;
            if (Type != other.Type) return false;
            if (ErrorId != other.ErrorId) return false;
            if (Answer != other.Answer) return false;
            return true;
        }

        public override int GetHashCode()
        {
            int hash = 1;
            if (Id != 0) hash ^= Id.GetHashCode();
            if (Type != 0) hash ^= Type.GetHashCode();
            if (ErrorId != 0) hash ^= ErrorId.GetHashCode();
            if (Answer.Length != 0) hash ^= Answer.GetHashCode();
            return hash;
        }

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

        public void WriteTo(pb::CodedOutputStream output)
        {
            if (Id != 0)
            {
                output.WriteRawTag(8);
                output.WriteUInt32(Id);
            }
            if (Type != 0)
            {
                output.WriteRawTag(21);
                output.WriteFixed32(Type);
            }
            if (ErrorId != 0)
            {
                output.WriteRawTag(24);
                output.WriteUInt32(ErrorId);
            }
            if (Answer.Length != 0)
            {
                output.WriteRawTag(34);
                output.WriteBytes(Answer);
            }
        }

        public int CalculateSize()
        {
            int size = 0;
            if (Id != 0)
            {
                size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Id);
            }
            if (Type != 0)
            {
                size += 1 + 4;
            }
            if (ErrorId != 0)
            {
                size += 1 + pb::CodedOutputStream.ComputeUInt32Size(ErrorId);
            }
            if (Answer.Length != 0)
            {
                size += 1 + pb::CodedOutputStream.ComputeBytesSize(Answer);
            }
            return size;
        }

        public void MergeFrom(ChallengeResultRequest other)
        {
            if (other == null)
            {
                return;
            }
            if (other.Id != 0)
            {
                Id = other.Id;
            }
            if (other.Type != 0)
            {
                Type = other.Type;
            }
            if (other.ErrorId != 0)
            {
                ErrorId = other.ErrorId;
            }
            if (other.Answer.Length != 0)
            {
                Answer = other.Answer;
            }
        }

        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;
            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                    default:
                        input.SkipLastField();
                        break;
                    case 8:
                        {
                            Id = input.ReadUInt32();
                            break;
                        }
                    case 21:
                        {
                            Type = input.ReadFixed32();
                            break;
                        }
                    case 24:
                        {
                            ErrorId = input.ReadUInt32();
                            break;
                        }
                    case 34:
                        {
                            Answer = input.ReadBytes();
                            break;
                        }
                }
            }
        }

    }

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

        public static pbr::MessageDescriptor Descriptor
        {
            get { return Bgs.Protocol.Challenge.V1.ChallengeServiceReflection.Descriptor.MessageTypes[10]; }
        }

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

        public ChallengeExternalRequest()
        {
            OnConstruction();
        }

        partial void OnConstruction();

        public ChallengeExternalRequest(ChallengeExternalRequest other) : this()
        {
            requestToken_ = other.requestToken_;
            payloadType_ = other.payloadType_;
            payload_ = other.payload_;
        }

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

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

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

        /// <summary>Field number for the "payload" field.</summary>
        public const int PayloadFieldNumber = 3;
        private pb::ByteString payload_ = pb::ByteString.Empty;
        public pb::ByteString Payload
        {
            get { return payload_; }
            set
            {
                payload_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
            }
        }

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

        public bool Equals(ChallengeExternalRequest other)
        {
            if (ReferenceEquals(other, null))
            {
                return false;
            }
            if (ReferenceEquals(other, this))
            {
                return true;
            }
            if (RequestToken != other.RequestToken) return false;
            if (PayloadType != other.PayloadType) return false;
            if (Payload != other.Payload) return false;
            return true;
        }

        public override int GetHashCode()
        {
            int hash = 1;
            if (RequestToken.Length != 0) hash ^= RequestToken.GetHashCode();
            if (PayloadType.Length != 0) hash ^= PayloadType.GetHashCode();
            if (Payload.Length != 0) hash ^= Payload.GetHashCode();
            return hash;
        }

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

        public void WriteTo(pb::CodedOutputStream output)
        {
            if (RequestToken.Length != 0)
            {
                output.WriteRawTag(10);
                output.WriteString(RequestToken);
            }
            if (PayloadType.Length != 0)
            {
                output.WriteRawTag(18);
                output.WriteString(PayloadType);
            }
            if (Payload.Length != 0)
            {
                output.WriteRawTag(26);
                output.WriteBytes(Payload);
            }
        }

        public int CalculateSize()
        {
            int size = 0;
            if (RequestToken.Length != 0)
            {
                size += 1 + pb::CodedOutputStream.ComputeStringSize(RequestToken);
            }
            if (PayloadType.Length != 0)
            {
                size += 1 + pb::CodedOutputStream.ComputeStringSize(PayloadType);
            }
            if (Payload.Length != 0)
            {
                size += 1 + pb::CodedOutputStream.ComputeBytesSize(Payload);
            }
            return size;
        }

        public void MergeFrom(ChallengeExternalRequest other)
        {
            if (other == null)
            {
                return;
            }
            if (other.RequestToken.Length != 0)
            {
                RequestToken = other.RequestToken;
            }
            if (other.PayloadType.Length != 0)
            {
                PayloadType = other.PayloadType;
            }
            if (other.Payload.Length != 0)
            {
                Payload = other.Payload;
            }
        }

        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;
            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                    default:
                        input.SkipLastField();
                        break;
                    case 10:
                        {
                            RequestToken = input.ReadString();
                            break;
                        }
                    case 18:
                        {
                            PayloadType = input.ReadString();
                            break;
                        }
                    case 26:
                        {
                            Payload = input.ReadBytes();
                            break;
                        }
                }
            }
        }

    }

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

        public static pbr::MessageDescriptor Descriptor
        {
            get { return Bgs.Protocol.Challenge.V1.ChallengeServiceReflection.Descriptor.MessageTypes[11]; }
        }

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

        public ChallengeExternalResult()
        {
            OnConstruction();
        }

        partial void OnConstruction();

        public ChallengeExternalResult(ChallengeExternalResult other) : this()
        {
            requestToken_ = other.requestToken_;
            passed_ = other.passed_;
        }

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

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

        /// <summary>Field number for the "passed" field.</summary>
        public const int PassedFieldNumber = 2;
        private bool passed_;
        public bool Passed
        {
            get { return passed_; }
            set
            {
                passed_ = value;
            }
        }

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

        public bool Equals(ChallengeExternalResult other)
        {
            if (ReferenceEquals(other, null))
            {
                return false;
            }
            if (ReferenceEquals(other, this))
            {
                return true;
            }
            if (RequestToken != other.RequestToken) return false;
            if (Passed != other.Passed) return false;
            return true;
        }

        public override int GetHashCode()
        {
            int hash = 1;
            if (RequestToken.Length != 0) hash ^= RequestToken.GetHashCode();
            if (Passed != false) hash ^= Passed.GetHashCode();
            return hash;
        }

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

        public void WriteTo(pb::CodedOutputStream output)
        {
            if (RequestToken.Length != 0)
            {
                output.WriteRawTag(10);
                output.WriteString(RequestToken);
            }
            if (Passed != false)
            {
                output.WriteRawTag(16);
                output.WriteBool(Passed);
            }
        }

        public int CalculateSize()
        {
            int size = 0;
            if (RequestToken.Length != 0)
            {
                size += 1 + pb::CodedOutputStream.ComputeStringSize(RequestToken);
            }
            if (Passed != false)
            {
                size += 1 + 1;
            }
            return size;
        }

        public void MergeFrom(ChallengeExternalResult other)
        {
            if (other == null)
            {
                return;
            }
            if (other.RequestToken.Length != 0)
            {
                RequestToken = other.RequestToken;
            }
            if (other.Passed != false)
            {
                Passed = other.Passed;
            }
        }

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

    }

    #endregion
}

#endregion Designer generated code
