public Builder SetOrder(global::Trd_Common.Order.Builder builderForValue)
 {
     pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
     PrepareBuilder();
     result.hasOrder = true;
     result.order_   = builderForValue.Build();
     return(this);
 }
            public override Builder MergeFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry)
            {
                PrepareBuilder();
                pb::UnknownFieldSet.Builder unknownFields = null;
                uint   tag;
                string field_name;

                while (input.ReadTag(out tag, out field_name))
                {
                    if (tag == 0 && field_name != null)
                    {
                        int field_ordinal = global::System.Array.BinarySearch(_s2CFieldNames, field_name, global::System.StringComparer.Ordinal);
                        if (field_ordinal >= 0)
                        {
                            tag = _s2CFieldTags[field_ordinal];
                        }
                        else
                        {
                            if (unknownFields == null)
                            {
                                unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
                            }
                            ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
                            continue;
                        }
                    }
                    switch (tag)
                    {
                    case 0: {
                        throw pb::InvalidProtocolBufferException.InvalidTag();
                    }

                    default: {
                        if (pb::WireFormat.IsEndGroupTag(tag))
                        {
                            if (unknownFields != null)
                            {
                                this.UnknownFields = unknownFields.Build();
                            }
                            return(this);
                        }
                        if (unknownFields == null)
                        {
                            unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
                        }
                        ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
                        break;
                    }

                    case 10: {
                        global::Trd_Common.TrdHeader.Builder subBuilder = global::Trd_Common.TrdHeader.CreateBuilder();
                        if (result.hasHeader)
                        {
                            subBuilder.MergeFrom(Header);
                        }
                        input.ReadMessage(subBuilder, extensionRegistry);
                        Header = subBuilder.BuildPartial();
                        break;
                    }

                    case 18: {
                        global::Trd_Common.Order.Builder subBuilder = global::Trd_Common.Order.CreateBuilder();
                        if (result.hasOrder)
                        {
                            subBuilder.MergeFrom(Order);
                        }
                        input.ReadMessage(subBuilder, extensionRegistry);
                        Order = subBuilder.BuildPartial();
                        break;
                    }
                    }
                }

                if (unknownFields != null)
                {
                    this.UnknownFields = unknownFields.Build();
                }
                return(this);
            }