(ctx context.Context, iprot thrift.TProtocol)
| 2335 | } |
| 2336 | |
| 2337 | func (p *TSOpenSessionResp) Read(ctx context.Context, iprot thrift.TProtocol) error { |
| 2338 | if _, err := iprot.ReadStructBegin(ctx); err != nil { |
| 2339 | return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) |
| 2340 | } |
| 2341 | |
| 2342 | var issetStatus bool = false; |
| 2343 | var issetServerProtocolVersion bool = false; |
| 2344 | |
| 2345 | for { |
| 2346 | _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) |
| 2347 | if err != nil { |
| 2348 | return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) |
| 2349 | } |
| 2350 | if fieldTypeId == thrift.STOP { break; } |
| 2351 | switch fieldId { |
| 2352 | case 1: |
| 2353 | if fieldTypeId == thrift.STRUCT { |
| 2354 | if err := p.ReadField1(ctx, iprot); err != nil { |
| 2355 | return err |
| 2356 | } |
| 2357 | issetStatus = true |
| 2358 | } else { |
| 2359 | if err := iprot.Skip(ctx, fieldTypeId); err != nil { |
| 2360 | return err |
| 2361 | } |
| 2362 | } |
| 2363 | case 2: |
| 2364 | if fieldTypeId == thrift.I32 { |
| 2365 | if err := p.ReadField2(ctx, iprot); err != nil { |
| 2366 | return err |
| 2367 | } |
| 2368 | issetServerProtocolVersion = true |
| 2369 | } else { |
| 2370 | if err := iprot.Skip(ctx, fieldTypeId); err != nil { |
| 2371 | return err |
| 2372 | } |
| 2373 | } |
| 2374 | case 3: |
| 2375 | if fieldTypeId == thrift.I64 { |
| 2376 | if err := p.ReadField3(ctx, iprot); err != nil { |
| 2377 | return err |
| 2378 | } |
| 2379 | } else { |
| 2380 | if err := iprot.Skip(ctx, fieldTypeId); err != nil { |
| 2381 | return err |
| 2382 | } |
| 2383 | } |
| 2384 | case 4: |
| 2385 | if fieldTypeId == thrift.MAP { |
| 2386 | if err := p.ReadField4(ctx, iprot); err != nil { |
| 2387 | return err |
| 2388 | } |
| 2389 | } else { |
| 2390 | if err := iprot.Skip(ctx, fieldTypeId); err != nil { |
| 2391 | return err |
| 2392 | } |
| 2393 | } |
| 2394 | default: |
nothing calls this directly
no test coverage detected