Example #1
0
 public SnsCommentRequest.Builder SetAction(SnsActionGroup.Builder builderForValue)
 {
     ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
     this.PrepareBuilder();
     this.result.hasAction = true;
     this.result.action_   = builderForValue.Build();
     return(this);
 }
Example #2
0
            public override SnsCommentRequest.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>(SnsCommentRequest._snsCommentRequestFieldNames, str, StringComparer.Ordinal);
                        if (index >= 0)
                        {
                            num = SnsCommentRequest._snsCommentRequestFieldTags[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:
                    {
                        SnsActionGroup.Builder builder2 = SnsActionGroup.CreateBuilder();
                        if (this.result.hasAction)
                        {
                            builder2.MergeFrom(this.Action);
                        }
                        input.ReadMessage(builder2, extensionRegistry);
                        this.Action = builder2.BuildPartial();
                        continue;
                    }

                    case 0x1a:
                        break;

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