public SendAppMsgRequest.Builder SetMsg(AppMsg.Builder builderForValue)
 {
     ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
     this.PrepareBuilder();
     this.result.hasMsg = true;
     this.result.msg_   = builderForValue.Build();
     return(this);
 }
            public override SendAppMsgRequest.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
            {
                uint   num;
                string str;

                this.PrepareBuilder();
                while (input.ReadTag(out num, out str))
                {
                    if ((num == 0) && (str != null))
                    {
                        int index = Array.BinarySearch <string>(SendAppMsgRequest._sendAppMsgRequestFieldNames, str, StringComparer.Ordinal);
                        if (index >= 0)
                        {
                            num = SendAppMsgRequest._sendAppMsgRequestFieldTags[index];
                        }
                        else
                        {
                            this.ParseUnknownField(input, extensionRegistry, num, str);
                            continue;
                        }
                    }
                    switch (num)
                    {
                    case 0:
                        throw InvalidProtocolBufferException.InvalidTag();

                    case 10:
                    {
                        micromsg.BaseRequest.Builder builder = micromsg.BaseRequest.CreateBuilder();
                        if (this.result.hasBaseRequest)
                        {
                            builder.MergeFrom(this.BaseRequest);
                        }
                        input.ReadMessage(builder, extensionRegistry);
                        this.BaseRequest = builder.BuildPartial();
                        continue;
                    }

                    case 0x12:
                    {
                        AppMsg.Builder builder2 = AppMsg.CreateBuilder();
                        if (this.result.hasMsg)
                        {
                            builder2.MergeFrom(this.Msg);
                        }
                        input.ReadMessage(builder2, extensionRegistry);
                        this.Msg = builder2.BuildPartial();
                        continue;
                    }

                    case 0x1a:
                        break;

                    default:
                    {
                        if (WireFormat.IsEndGroupTag(num))
                        {
                            return(this);
                        }
                        this.ParseUnknownField(input, extensionRegistry, num, str);
                        continue;
                    }
                    }
                    this.result.hasCommentUrl = input.ReadString(ref this.result.commentUrl_);
                }
                return(this);
            }