(ctx context.Context, iprot thrift.TProtocol)
| 17289 | } |
| 17290 | |
| 17291 | func (p *TSQueryTemplateResp) Read(ctx context.Context, iprot thrift.TProtocol) error { |
| 17292 | if _, err := iprot.ReadStructBegin(ctx); err != nil { |
| 17293 | return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) |
| 17294 | } |
| 17295 | |
| 17296 | var issetStatus bool = false; |
| 17297 | var issetQueryType bool = false; |
| 17298 | |
| 17299 | for { |
| 17300 | _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) |
| 17301 | if err != nil { |
| 17302 | return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) |
| 17303 | } |
| 17304 | if fieldTypeId == thrift.STOP { break; } |
| 17305 | switch fieldId { |
| 17306 | case 1: |
| 17307 | if fieldTypeId == thrift.STRUCT { |
| 17308 | if err := p.ReadField1(ctx, iprot); err != nil { |
| 17309 | return err |
| 17310 | } |
| 17311 | issetStatus = true |
| 17312 | } else { |
| 17313 | if err := iprot.Skip(ctx, fieldTypeId); err != nil { |
| 17314 | return err |
| 17315 | } |
| 17316 | } |
| 17317 | case 2: |
| 17318 | if fieldTypeId == thrift.I32 { |
| 17319 | if err := p.ReadField2(ctx, iprot); err != nil { |
| 17320 | return err |
| 17321 | } |
| 17322 | issetQueryType = true |
| 17323 | } else { |
| 17324 | if err := iprot.Skip(ctx, fieldTypeId); err != nil { |
| 17325 | return err |
| 17326 | } |
| 17327 | } |
| 17328 | case 3: |
| 17329 | if fieldTypeId == thrift.BOOL { |
| 17330 | if err := p.ReadField3(ctx, iprot); err != nil { |
| 17331 | return err |
| 17332 | } |
| 17333 | } else { |
| 17334 | if err := iprot.Skip(ctx, fieldTypeId); err != nil { |
| 17335 | return err |
| 17336 | } |
| 17337 | } |
| 17338 | case 4: |
| 17339 | if fieldTypeId == thrift.I32 { |
| 17340 | if err := p.ReadField4(ctx, iprot); err != nil { |
| 17341 | return err |
| 17342 | } |
| 17343 | } else { |
| 17344 | if err := iprot.Skip(ctx, fieldTypeId); err != nil { |
| 17345 | return err |
| 17346 | } |
| 17347 | } |
| 17348 | case 5: |
nothing calls this directly
no test coverage detected