| 3992 | } |
| 3993 | |
| 3994 | func (p *TFile) Write(ctx context.Context, oprot thrift.TProtocol) error { |
| 3995 | if err := oprot.WriteStructBegin(ctx, "TFile"); err != nil { |
| 3996 | return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } |
| 3997 | if p != nil { |
| 3998 | if err := p.writeField1(ctx, oprot); err != nil { return err } |
| 3999 | if err := p.writeField2(ctx, oprot); err != nil { return err } |
| 4000 | } |
| 4001 | if err := oprot.WriteFieldStop(ctx); err != nil { |
| 4002 | return thrift.PrependError("write field stop error: ", err) } |
| 4003 | if err := oprot.WriteStructEnd(ctx); err != nil { |
| 4004 | return thrift.PrependError("write struct stop error: ", err) } |
| 4005 | return nil |
| 4006 | } |
| 4007 | |
| 4008 | func (p *TFile) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { |
| 4009 | if err := oprot.WriteFieldBegin(ctx, "fileName", thrift.STRING, 1); err != nil { |