(ctx context.Context, iprot thrift.TProtocol)
| 5796 | } |
| 5797 | |
| 5798 | func (p *TSFetchMetadataResp) Read(ctx context.Context, iprot thrift.TProtocol) error { |
| 5799 | if _, err := iprot.ReadStructBegin(ctx); err != nil { |
| 5800 | return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) |
| 5801 | } |
| 5802 | |
| 5803 | var issetStatus bool = false; |
| 5804 | |
| 5805 | for { |
| 5806 | _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) |
| 5807 | if err != nil { |
| 5808 | return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) |
| 5809 | } |
| 5810 | if fieldTypeId == thrift.STOP { break; } |
| 5811 | switch fieldId { |
| 5812 | case 1: |
| 5813 | if fieldTypeId == thrift.STRUCT { |
| 5814 | if err := p.ReadField1(ctx, iprot); err != nil { |
| 5815 | return err |
| 5816 | } |
| 5817 | issetStatus = true |
| 5818 | } else { |
| 5819 | if err := iprot.Skip(ctx, fieldTypeId); err != nil { |
| 5820 | return err |
| 5821 | } |
| 5822 | } |
| 5823 | case 2: |
| 5824 | if fieldTypeId == thrift.STRING { |
| 5825 | if err := p.ReadField2(ctx, iprot); err != nil { |
| 5826 | return err |
| 5827 | } |
| 5828 | } else { |
| 5829 | if err := iprot.Skip(ctx, fieldTypeId); err != nil { |
| 5830 | return err |
| 5831 | } |
| 5832 | } |
| 5833 | case 3: |
| 5834 | if fieldTypeId == thrift.LIST { |
| 5835 | if err := p.ReadField3(ctx, iprot); err != nil { |
| 5836 | return err |
| 5837 | } |
| 5838 | } else { |
| 5839 | if err := iprot.Skip(ctx, fieldTypeId); err != nil { |
| 5840 | return err |
| 5841 | } |
| 5842 | } |
| 5843 | case 4: |
| 5844 | if fieldTypeId == thrift.STRING { |
| 5845 | if err := p.ReadField4(ctx, iprot); err != nil { |
| 5846 | return err |
| 5847 | } |
| 5848 | } else { |
| 5849 | if err := iprot.Skip(ctx, fieldTypeId); err != nil { |
| 5850 | return err |
| 5851 | } |
| 5852 | } |
| 5853 | default: |
| 5854 | if err := iprot.Skip(ctx, fieldTypeId); err != nil { |
| 5855 | return err |
nothing calls this directly
no test coverage detected