(ctx context.Context, iprot thrift.TProtocol)
| 856 | } |
| 857 | |
| 858 | func (p *TSStatus) Read(ctx context.Context, iprot thrift.TProtocol) error { |
| 859 | if _, err := iprot.ReadStructBegin(ctx); err != nil { |
| 860 | return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) |
| 861 | } |
| 862 | |
| 863 | var issetCode bool = false; |
| 864 | |
| 865 | for { |
| 866 | _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) |
| 867 | if err != nil { |
| 868 | return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) |
| 869 | } |
| 870 | if fieldTypeId == thrift.STOP { break; } |
| 871 | switch fieldId { |
| 872 | case 1: |
| 873 | if fieldTypeId == thrift.I32 { |
| 874 | if err := p.ReadField1(ctx, iprot); err != nil { |
| 875 | return err |
| 876 | } |
| 877 | issetCode = true |
| 878 | } else { |
| 879 | if err := iprot.Skip(ctx, fieldTypeId); err != nil { |
| 880 | return err |
| 881 | } |
| 882 | } |
| 883 | case 2: |
| 884 | if fieldTypeId == thrift.STRING { |
| 885 | if err := p.ReadField2(ctx, iprot); err != nil { |
| 886 | return err |
| 887 | } |
| 888 | } else { |
| 889 | if err := iprot.Skip(ctx, fieldTypeId); err != nil { |
| 890 | return err |
| 891 | } |
| 892 | } |
| 893 | case 3: |
| 894 | if fieldTypeId == thrift.LIST { |
| 895 | if err := p.ReadField3(ctx, iprot); err != nil { |
| 896 | return err |
| 897 | } |
| 898 | } else { |
| 899 | if err := iprot.Skip(ctx, fieldTypeId); err != nil { |
| 900 | return err |
| 901 | } |
| 902 | } |
| 903 | case 4: |
| 904 | if fieldTypeId == thrift.STRUCT { |
| 905 | if err := p.ReadField4(ctx, iprot); err != nil { |
| 906 | return err |
| 907 | } |
| 908 | } else { |
| 909 | if err := iprot.Skip(ctx, fieldTypeId); err != nil { |
| 910 | return err |
| 911 | } |
| 912 | } |
| 913 | case 5: |
| 914 | if fieldTypeId == thrift.BOOL { |
| 915 | if err := p.ReadField5(ctx, iprot); err != nil { |
no test coverage detected