public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                default:
                    _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
                    break;

                case 10: {
                    if (!HasAgentId)
                    {
                        AgentId = new global::Bgs.Protocol.Account.V1.AccountId();
                    }
                    input.ReadMessage(AgentId);
                    break;
                }

                case 18: {
                    UserDescription = input.ReadString();
                    break;
                }

                case 24: {
                    Program = input.ReadUInt32();
                    break;
                }

                case 82: {
                    global::Bgs.Protocol.Report.V2.UserOptions subBuilder = new global::Bgs.Protocol.Report.V2.UserOptions();
                    if (HasUserOptions)
                    {
                        subBuilder.MergeFrom(UserOptions);
                    }
                    input.ReadMessage(subBuilder);
                    UserOptions = subBuilder;
                    break;
                }

                case 90: {
                    global::Bgs.Protocol.Report.V2.ClubOptions subBuilder = new global::Bgs.Protocol.Report.V2.ClubOptions();
                    if (HasClubOptions)
                    {
                        subBuilder.MergeFrom(ClubOptions);
                    }
                    input.ReadMessage(subBuilder);
                    ClubOptions = subBuilder;
                    break;
                }
                }
            }
        }
Exemple #2
0
        public void MergeFrom(SubmitReportRequest other)
        {
            if (other == null)
            {
                return;
            }
            if (other.HasAgentId)
            {
                if (!HasAgentId)
                {
                    AgentId = new global::Bgs.Protocol.Account.V1.AccountId();
                }
                AgentId.MergeFrom(other.AgentId);
            }
            if (other.HasUserDescription)
            {
                UserDescription = other.UserDescription;
            }
            switch (other.TypeCase)
            {
            case TypeOneofCase.UserOptions:
                if (UserOptions == null)
                {
                    UserOptions = new global::Bgs.Protocol.Report.V2.UserOptions();
                }
                UserOptions.MergeFrom(other.UserOptions);
                break;

            case TypeOneofCase.ClubOptions:
                if (ClubOptions == null)
                {
                    ClubOptions = new global::Bgs.Protocol.Report.V2.ClubOptions();
                }
                ClubOptions.MergeFrom(other.ClubOptions);
                break;

            case TypeOneofCase.EntityOptions:
                if (EntityOptions == null)
                {
                    EntityOptions = new global::Bgs.Protocol.Report.V2.EntityOptions();
                }
                EntityOptions.MergeFrom(other.EntityOptions);
                break;
            }

            _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }