diff --git a/CHANGELOG.md b/CHANGELOG.md index a65b6fe1..edbe03d3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,20 @@ -1.22.1 (unreleased) +1.22.5 (unreleased) + +* Upgrading to thrift 0.14.0 + +1.22.4 + +* Updates which result in a no-op now return a response value so that the caller may analyze it to determine what happened + +1.22.3 + +* Contains a monitor timeout fix. Previously an error was being left unchecked which made a specific monitor timining out not be handled properly. + +1.22.2 + +* Bug fix: Change in retry mechanism created a deadlock. This release reverts that particular change. + +1.22.1 * Adding safeguards against setting multiple constraints with the same name for a single task. diff --git a/gen-go/apache/aurora/GoUnusedProtection__.go b/gen-go/apache/aurora/GoUnusedProtection__.go index 7ac5b298..462b3b4a 100644 --- a/gen-go/apache/aurora/GoUnusedProtection__.go +++ b/gen-go/apache/aurora/GoUnusedProtection__.go @@ -1,5 +1,4 @@ -// Autogenerated by Thrift Compiler (0.13.0) -// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +// Code generated by Thrift Compiler (0.14.0). DO NOT EDIT. package aurora diff --git a/gen-go/apache/aurora/auroraAPI-consts.go b/gen-go/apache/aurora/auroraAPI-consts.go index 3db51388..d4a319e1 100644 --- a/gen-go/apache/aurora/auroraAPI-consts.go +++ b/gen-go/apache/aurora/auroraAPI-consts.go @@ -1,13 +1,12 @@ -// Autogenerated by Thrift Compiler (0.13.0) -// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +// Code generated by Thrift Compiler (0.14.0). DO NOT EDIT. package aurora import( "bytes" "context" - "reflect" "fmt" + "time" "github.com/apache/thrift/lib/go/thrift" ) @@ -15,7 +14,7 @@ import( var _ = thrift.ZERO var _ = fmt.Printf var _ = context.Background -var _ = reflect.DeepEqual +var _ = time.Now var _ = bytes.Equal const AURORA_EXECUTOR_NAME = "AuroraExecutor" diff --git a/gen-go/apache/aurora/auroraAPI.go b/gen-go/apache/aurora/auroraAPI.go index cf0b088a..914d268c 100644 --- a/gen-go/apache/aurora/auroraAPI.go +++ b/gen-go/apache/aurora/auroraAPI.go @@ -1,15 +1,14 @@ -// Autogenerated by Thrift Compiler (0.13.0) -// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +// Code generated by Thrift Compiler (0.14.0). DO NOT EDIT. package aurora import( "bytes" "context" - "reflect" "database/sql/driver" "errors" "fmt" + "time" "github.com/apache/thrift/lib/go/thrift" ) @@ -17,7 +16,7 @@ import( var _ = thrift.ZERO var _ = fmt.Printf var _ = context.Background -var _ = reflect.DeepEqual +var _ = time.Now var _ = bytes.Equal type ResponseCode int64 @@ -567,14 +566,14 @@ func NewIdentity() *Identity { func (p *Identity) GetUser() string { return p.User } -func (p *Identity) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *Identity) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -582,31 +581,31 @@ func (p *Identity) Read(iprot thrift.TProtocol) error { switch fieldId { case 2: if fieldTypeId == thrift.STRING { - if err := p.ReadField2(iprot); err != nil { + if err := p.ReadField2(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *Identity) ReadField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { +func (p *Identity) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { p.User = v @@ -614,29 +613,39 @@ func (p *Identity) ReadField2(iprot thrift.TProtocol) error { return nil } -func (p *Identity) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("Identity"); err != nil { +func (p *Identity) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "Identity"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField2(oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *Identity) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("user", thrift.STRING, 2); err != nil { +func (p *Identity) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "user", thrift.STRING, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:user: ", p), err) } - if err := oprot.WriteString(string(p.User)); err != nil { + if err := oprot.WriteString(ctx, string(p.User)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.user (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:user: ", p), err) } return err } +func (p *Identity) Equals(other *Identity) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.User != other.User { return false } + return true +} + func (p *Identity) String() string { if p == nil { return "" @@ -666,14 +675,14 @@ func (p *Attribute) GetName() string { func (p *Attribute) GetValues() []string { return p.Values } -func (p *Attribute) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *Attribute) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -681,41 +690,41 @@ func (p *Attribute) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRING { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.SET { - if err := p.ReadField2(iprot); err != nil { + if err := p.ReadField2(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *Attribute) ReadField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { +func (p *Attribute) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.Name = v @@ -723,8 +732,8 @@ func (p *Attribute) ReadField1(iprot thrift.TProtocol) error { return nil } -func (p *Attribute) ReadField2(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin() +func (p *Attribute) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin(ctx) if err != nil { return thrift.PrependError("error reading set begin: ", err) } @@ -732,68 +741,86 @@ func (p *Attribute) ReadField2(iprot thrift.TProtocol) error { p.Values = tSet for i := 0; i < size; i ++ { var _elem0 string - if v, err := iprot.ReadString(); err != nil { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { _elem0 = v } p.Values = append(p.Values, _elem0) } - if err := iprot.ReadSetEnd(); err != nil { + if err := iprot.ReadSetEnd(ctx); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *Attribute) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("Attribute"); err != nil { +func (p *Attribute) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "Attribute"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } - if err := p.writeField2(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *Attribute) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("name", thrift.STRING, 1); err != nil { +func (p *Attribute) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "name", thrift.STRING, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:name: ", p), err) } - if err := oprot.WriteString(string(p.Name)); err != nil { + if err := oprot.WriteString(ctx, string(p.Name)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.name (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:name: ", p), err) } return err } -func (p *Attribute) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("values", thrift.SET, 2); err != nil { +func (p *Attribute) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "values", thrift.SET, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:values: ", p), err) } - if err := oprot.WriteSetBegin(thrift.STRING, len(p.Values)); err != nil { + if err := oprot.WriteSetBegin(ctx, thrift.STRING, len(p.Values)); err != nil { return thrift.PrependError("error writing set begin: ", err) } for i := 0; i" @@ -849,14 +876,14 @@ func (p *HostAttributes) IsSetSlaveId() bool { return p.SlaveId != nil } -func (p *HostAttributes) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *HostAttributes) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -864,61 +891,61 @@ func (p *HostAttributes) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRING { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.SET { - if err := p.ReadField2(iprot); err != nil { + if err := p.ReadField2(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 3: if fieldTypeId == thrift.I32 { - if err := p.ReadField3(iprot); err != nil { + if err := p.ReadField3(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 4: if fieldTypeId == thrift.STRING { - if err := p.ReadField4(iprot); err != nil { + if err := p.ReadField4(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *HostAttributes) ReadField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { +func (p *HostAttributes) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.Host = v @@ -926,28 +953,28 @@ func (p *HostAttributes) ReadField1(iprot thrift.TProtocol) error { return nil } -func (p *HostAttributes) ReadField2(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin() +func (p *HostAttributes) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin(ctx) if err != nil { return thrift.PrependError("error reading set begin: ", err) } tSet := make([]*Attribute, 0, size) p.Attributes = tSet for i := 0; i < size; i ++ { - _elem1 := &Attribute{} - if err := _elem1.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem1), err) + _elem2 := &Attribute{} + if err := _elem2.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem2), err) } - p.Attributes = append(p.Attributes, _elem1) + p.Attributes = append(p.Attributes, _elem2) } - if err := iprot.ReadSetEnd(); err != nil { + if err := iprot.ReadSetEnd(ctx); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *HostAttributes) ReadField3(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { +func (p *HostAttributes) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { return thrift.PrependError("error reading field 3: ", err) } else { temp := MaintenanceMode(v) @@ -956,8 +983,8 @@ func (p *HostAttributes) ReadField3(iprot thrift.TProtocol) error { return nil } -func (p *HostAttributes) ReadField4(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { +func (p *HostAttributes) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 4: ", err) } else { p.SlaveId = &v @@ -965,82 +992,112 @@ func (p *HostAttributes) ReadField4(iprot thrift.TProtocol) error { return nil } -func (p *HostAttributes) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("HostAttributes"); err != nil { +func (p *HostAttributes) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "HostAttributes"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } - if err := p.writeField2(oprot); err != nil { return err } - if err := p.writeField3(oprot); err != nil { return err } - if err := p.writeField4(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *HostAttributes) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("host", thrift.STRING, 1); err != nil { +func (p *HostAttributes) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "host", thrift.STRING, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:host: ", p), err) } - if err := oprot.WriteString(string(p.Host)); err != nil { + if err := oprot.WriteString(ctx, string(p.Host)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.host (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:host: ", p), err) } return err } -func (p *HostAttributes) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("attributes", thrift.SET, 2); err != nil { +func (p *HostAttributes) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "attributes", thrift.SET, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:attributes: ", p), err) } - if err := oprot.WriteSetBegin(thrift.STRUCT, len(p.Attributes)); err != nil { + if err := oprot.WriteSetBegin(ctx, thrift.STRUCT, len(p.Attributes)); err != nil { return thrift.PrependError("error writing set begin: ", err) } for i := 0; i" @@ -1071,14 +1128,14 @@ func (p *ValueConstraint) GetNegated() bool { func (p *ValueConstraint) GetValues() []string { return p.Values } -func (p *ValueConstraint) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *ValueConstraint) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -1086,41 +1143,41 @@ func (p *ValueConstraint) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.BOOL { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.SET { - if err := p.ReadField2(iprot); err != nil { + if err := p.ReadField2(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ValueConstraint) ReadField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBool(); err != nil { +func (p *ValueConstraint) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBool(ctx); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.Negated = v @@ -1128,77 +1185,95 @@ func (p *ValueConstraint) ReadField1(iprot thrift.TProtocol) error { return nil } -func (p *ValueConstraint) ReadField2(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin() +func (p *ValueConstraint) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin(ctx) if err != nil { return thrift.PrependError("error reading set begin: ", err) } tSet := make([]string, 0, size) p.Values = tSet for i := 0; i < size; i ++ { -var _elem2 string - if v, err := iprot.ReadString(); err != nil { +var _elem4 string + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem2 = v + _elem4 = v } - p.Values = append(p.Values, _elem2) + p.Values = append(p.Values, _elem4) } - if err := iprot.ReadSetEnd(); err != nil { + if err := iprot.ReadSetEnd(ctx); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *ValueConstraint) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("ValueConstraint"); err != nil { +func (p *ValueConstraint) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "ValueConstraint"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } - if err := p.writeField2(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ValueConstraint) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("negated", thrift.BOOL, 1); err != nil { +func (p *ValueConstraint) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "negated", thrift.BOOL, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:negated: ", p), err) } - if err := oprot.WriteBool(bool(p.Negated)); err != nil { + if err := oprot.WriteBool(ctx, bool(p.Negated)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.negated (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:negated: ", p), err) } return err } -func (p *ValueConstraint) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("values", thrift.SET, 2); err != nil { +func (p *ValueConstraint) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "values", thrift.SET, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:values: ", p), err) } - if err := oprot.WriteSetBegin(thrift.STRING, len(p.Values)); err != nil { + if err := oprot.WriteSetBegin(ctx, thrift.STRING, len(p.Values)); err != nil { return thrift.PrependError("error writing set begin: ", err) } for i := 0; i" @@ -1223,14 +1298,14 @@ func NewLimitConstraint() *LimitConstraint { func (p *LimitConstraint) GetLimit() int32 { return p.Limit } -func (p *LimitConstraint) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *LimitConstraint) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -1238,31 +1313,31 @@ func (p *LimitConstraint) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.I32 { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *LimitConstraint) ReadField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { +func (p *LimitConstraint) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.Limit = v @@ -1270,29 +1345,39 @@ func (p *LimitConstraint) ReadField1(iprot thrift.TProtocol) error { return nil } -func (p *LimitConstraint) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("LimitConstraint"); err != nil { +func (p *LimitConstraint) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "LimitConstraint"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *LimitConstraint) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("limit", thrift.I32, 1); err != nil { +func (p *LimitConstraint) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "limit", thrift.I32, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:limit: ", p), err) } - if err := oprot.WriteI32(int32(p.Limit)); err != nil { + if err := oprot.WriteI32(ctx, int32(p.Limit)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.limit (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:limit: ", p), err) } return err } +func (p *LimitConstraint) Equals(other *LimitConstraint) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.Limit != other.Limit { return false } + return true +} + func (p *LimitConstraint) String() string { if p == nil { return "" @@ -1348,14 +1433,14 @@ func (p *TaskConstraint) IsSetLimit() bool { return p.Limit != nil } -func (p *TaskConstraint) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *TaskConstraint) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -1363,98 +1448,109 @@ func (p *TaskConstraint) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField2(iprot); err != nil { + if err := p.ReadField2(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *TaskConstraint) ReadField1(iprot thrift.TProtocol) error { +func (p *TaskConstraint) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { p.Value = &ValueConstraint{} - if err := p.Value.Read(iprot); err != nil { + if err := p.Value.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Value), err) } return nil } -func (p *TaskConstraint) ReadField2(iprot thrift.TProtocol) error { +func (p *TaskConstraint) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { p.Limit = &LimitConstraint{} - if err := p.Limit.Read(iprot); err != nil { + if err := p.Limit.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Limit), err) } return nil } -func (p *TaskConstraint) Write(oprot thrift.TProtocol) error { +func (p *TaskConstraint) Write(ctx context.Context, oprot thrift.TProtocol) error { if c := p.CountSetFieldsTaskConstraint(); c != 1 { return fmt.Errorf("%T write union: exactly one field must be set (%d set).", p, c) } - if err := oprot.WriteStructBegin("TaskConstraint"); err != nil { + if err := oprot.WriteStructBegin(ctx, "TaskConstraint"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } - if err := p.writeField2(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *TaskConstraint) writeField1(oprot thrift.TProtocol) (err error) { +func (p *TaskConstraint) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetValue() { - if err := oprot.WriteFieldBegin("value", thrift.STRUCT, 1); err != nil { + if err := oprot.WriteFieldBegin(ctx, "value", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:value: ", p), err) } - if err := p.Value.Write(oprot); err != nil { + if err := p.Value.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Value), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:value: ", p), err) } } return err } -func (p *TaskConstraint) writeField2(oprot thrift.TProtocol) (err error) { +func (p *TaskConstraint) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetLimit() { - if err := oprot.WriteFieldBegin("limit", thrift.STRUCT, 2); err != nil { + if err := oprot.WriteFieldBegin(ctx, "limit", thrift.STRUCT, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:limit: ", p), err) } - if err := p.Limit.Write(oprot); err != nil { + if err := p.Limit.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Limit), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:limit: ", p), err) } } return err } +func (p *TaskConstraint) Equals(other *TaskConstraint) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if !p.Value.Equals(other.Value) { return false } + if !p.Limit.Equals(other.Limit) { return false } + return true +} + func (p *TaskConstraint) String() string { if p == nil { return "" @@ -1491,14 +1587,14 @@ func (p *Constraint) IsSetConstraint() bool { return p.Constraint != nil } -func (p *Constraint) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *Constraint) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -1506,41 +1602,41 @@ func (p *Constraint) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRING { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField2(iprot); err != nil { + if err := p.ReadField2(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *Constraint) ReadField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { +func (p *Constraint) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.Name = v @@ -1548,49 +1644,60 @@ func (p *Constraint) ReadField1(iprot thrift.TProtocol) error { return nil } -func (p *Constraint) ReadField2(iprot thrift.TProtocol) error { +func (p *Constraint) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { p.Constraint = &TaskConstraint{} - if err := p.Constraint.Read(iprot); err != nil { + if err := p.Constraint.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Constraint), err) } return nil } -func (p *Constraint) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("Constraint"); err != nil { +func (p *Constraint) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "Constraint"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } - if err := p.writeField2(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *Constraint) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("name", thrift.STRING, 1); err != nil { +func (p *Constraint) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "name", thrift.STRING, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:name: ", p), err) } - if err := oprot.WriteString(string(p.Name)); err != nil { + if err := oprot.WriteString(ctx, string(p.Name)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.name (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:name: ", p), err) } return err } -func (p *Constraint) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("constraint", thrift.STRUCT, 2); err != nil { +func (p *Constraint) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "constraint", thrift.STRUCT, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:constraint: ", p), err) } - if err := p.Constraint.Write(oprot); err != nil { + if err := p.Constraint.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Constraint), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:constraint: ", p), err) } return err } +func (p *Constraint) Equals(other *Constraint) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.Name != other.Name { return false } + if !p.Constraint.Equals(other.Constraint) { return false } + return true +} + func (p *Constraint) String() string { if p == nil { return "" @@ -1624,14 +1731,14 @@ func (p *Package) GetName() string { func (p *Package) GetVersion() int32 { return p.Version } -func (p *Package) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *Package) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -1639,51 +1746,51 @@ func (p *Package) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRING { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.STRING { - if err := p.ReadField2(iprot); err != nil { + if err := p.ReadField2(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 3: if fieldTypeId == thrift.I32 { - if err := p.ReadField3(iprot); err != nil { + if err := p.ReadField3(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *Package) ReadField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { +func (p *Package) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.Role = v @@ -1691,8 +1798,8 @@ func (p *Package) ReadField1(iprot thrift.TProtocol) error { return nil } -func (p *Package) ReadField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { +func (p *Package) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { p.Name = v @@ -1700,8 +1807,8 @@ func (p *Package) ReadField2(iprot thrift.TProtocol) error { return nil } -func (p *Package) ReadField3(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { +func (p *Package) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { return thrift.PrependError("error reading field 3: ", err) } else { p.Version = v @@ -1709,51 +1816,63 @@ func (p *Package) ReadField3(iprot thrift.TProtocol) error { return nil } -func (p *Package) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("Package"); err != nil { +func (p *Package) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "Package"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } - if err := p.writeField2(oprot); err != nil { return err } - if err := p.writeField3(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *Package) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("role", thrift.STRING, 1); err != nil { +func (p *Package) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "role", thrift.STRING, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:role: ", p), err) } - if err := oprot.WriteString(string(p.Role)); err != nil { + if err := oprot.WriteString(ctx, string(p.Role)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.role (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:role: ", p), err) } return err } -func (p *Package) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("name", thrift.STRING, 2); err != nil { +func (p *Package) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "name", thrift.STRING, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:name: ", p), err) } - if err := oprot.WriteString(string(p.Name)); err != nil { + if err := oprot.WriteString(ctx, string(p.Name)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.name (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:name: ", p), err) } return err } -func (p *Package) writeField3(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("version", thrift.I32, 3); err != nil { +func (p *Package) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "version", thrift.I32, 3); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:version: ", p), err) } - if err := oprot.WriteI32(int32(p.Version)); err != nil { + if err := oprot.WriteI32(ctx, int32(p.Version)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.version (3) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 3:version: ", p), err) } return err } +func (p *Package) Equals(other *Package) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.Role != other.Role { return false } + if p.Name != other.Name { return false } + if p.Version != other.Version { return false } + return true +} + func (p *Package) String() string { if p == nil { return "" @@ -1783,14 +1902,14 @@ func (p *Metadata) GetKey() string { func (p *Metadata) GetValue() string { return p.Value } -func (p *Metadata) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *Metadata) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -1798,41 +1917,41 @@ func (p *Metadata) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRING { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.STRING { - if err := p.ReadField2(iprot); err != nil { + if err := p.ReadField2(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *Metadata) ReadField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { +func (p *Metadata) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.Key = v @@ -1840,8 +1959,8 @@ func (p *Metadata) ReadField1(iprot thrift.TProtocol) error { return nil } -func (p *Metadata) ReadField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { +func (p *Metadata) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { p.Value = v @@ -1849,40 +1968,51 @@ func (p *Metadata) ReadField2(iprot thrift.TProtocol) error { return nil } -func (p *Metadata) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("Metadata"); err != nil { +func (p *Metadata) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "Metadata"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } - if err := p.writeField2(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *Metadata) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("key", thrift.STRING, 1); err != nil { +func (p *Metadata) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "key", thrift.STRING, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:key: ", p), err) } - if err := oprot.WriteString(string(p.Key)); err != nil { + if err := oprot.WriteString(ctx, string(p.Key)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.key (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:key: ", p), err) } return err } -func (p *Metadata) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("value", thrift.STRING, 2); err != nil { +func (p *Metadata) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "value", thrift.STRING, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:value: ", p), err) } - if err := oprot.WriteString(string(p.Value)); err != nil { + if err := oprot.WriteString(ctx, string(p.Value)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.value (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:value: ", p), err) } return err } +func (p *Metadata) Equals(other *Metadata) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.Key != other.Key { return false } + if p.Value != other.Value { return false } + return true +} + func (p *Metadata) String() string { if p == nil { return "" @@ -1918,14 +2048,14 @@ func (p *JobKey) GetEnvironment() string { func (p *JobKey) GetName() string { return p.Name } -func (p *JobKey) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *JobKey) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -1933,51 +2063,51 @@ func (p *JobKey) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRING { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.STRING { - if err := p.ReadField2(iprot); err != nil { + if err := p.ReadField2(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 3: if fieldTypeId == thrift.STRING { - if err := p.ReadField3(iprot); err != nil { + if err := p.ReadField3(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *JobKey) ReadField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { +func (p *JobKey) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.Role = v @@ -1985,8 +2115,8 @@ func (p *JobKey) ReadField1(iprot thrift.TProtocol) error { return nil } -func (p *JobKey) ReadField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { +func (p *JobKey) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { p.Environment = v @@ -1994,8 +2124,8 @@ func (p *JobKey) ReadField2(iprot thrift.TProtocol) error { return nil } -func (p *JobKey) ReadField3(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { +func (p *JobKey) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 3: ", err) } else { p.Name = v @@ -2003,51 +2133,63 @@ func (p *JobKey) ReadField3(iprot thrift.TProtocol) error { return nil } -func (p *JobKey) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("JobKey"); err != nil { +func (p *JobKey) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "JobKey"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } - if err := p.writeField2(oprot); err != nil { return err } - if err := p.writeField3(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *JobKey) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("role", thrift.STRING, 1); err != nil { +func (p *JobKey) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "role", thrift.STRING, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:role: ", p), err) } - if err := oprot.WriteString(string(p.Role)); err != nil { + if err := oprot.WriteString(ctx, string(p.Role)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.role (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:role: ", p), err) } return err } -func (p *JobKey) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("environment", thrift.STRING, 2); err != nil { +func (p *JobKey) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "environment", thrift.STRING, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:environment: ", p), err) } - if err := oprot.WriteString(string(p.Environment)); err != nil { + if err := oprot.WriteString(ctx, string(p.Environment)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.environment (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:environment: ", p), err) } return err } -func (p *JobKey) writeField3(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("name", thrift.STRING, 3); err != nil { +func (p *JobKey) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "name", thrift.STRING, 3); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:name: ", p), err) } - if err := oprot.WriteString(string(p.Name)); err != nil { + if err := oprot.WriteString(ctx, string(p.Name)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.name (3) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 3:name: ", p), err) } return err } +func (p *JobKey) Equals(other *JobKey) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.Role != other.Role { return false } + if p.Environment != other.Environment { return false } + if p.Name != other.Name { return false } + return true +} + func (p *JobKey) String() string { if p == nil { return "" @@ -2087,14 +2229,14 @@ func (p *LockKey) IsSetJob() bool { return p.Job != nil } -func (p *LockKey) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *LockKey) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -2102,66 +2244,76 @@ func (p *LockKey) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *LockKey) ReadField1(iprot thrift.TProtocol) error { +func (p *LockKey) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { p.Job = &JobKey{} - if err := p.Job.Read(iprot); err != nil { + if err := p.Job.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Job), err) } return nil } -func (p *LockKey) Write(oprot thrift.TProtocol) error { +func (p *LockKey) Write(ctx context.Context, oprot thrift.TProtocol) error { if c := p.CountSetFieldsLockKey(); c != 1 { return fmt.Errorf("%T write union: exactly one field must be set (%d set).", p, c) } - if err := oprot.WriteStructBegin("LockKey"); err != nil { + if err := oprot.WriteStructBegin(ctx, "LockKey"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *LockKey) writeField1(oprot thrift.TProtocol) (err error) { +func (p *LockKey) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetJob() { - if err := oprot.WriteFieldBegin("job", thrift.STRUCT, 1); err != nil { + if err := oprot.WriteFieldBegin(ctx, "job", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:job: ", p), err) } - if err := p.Job.Write(oprot); err != nil { + if err := p.Job.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Job), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:job: ", p), err) } } return err } +func (p *LockKey) Equals(other *LockKey) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if !p.Job.Equals(other.Job) { return false } + return true +} + func (p *LockKey) String() string { if p == nil { return "" @@ -2223,14 +2375,14 @@ func (p *Lock) IsSetMessage() bool { return p.Message != nil } -func (p *Lock) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *Lock) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -2238,79 +2390,79 @@ func (p *Lock) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.STRING { - if err := p.ReadField2(iprot); err != nil { + if err := p.ReadField2(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 3: if fieldTypeId == thrift.STRING { - if err := p.ReadField3(iprot); err != nil { + if err := p.ReadField3(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 4: if fieldTypeId == thrift.I64 { - if err := p.ReadField4(iprot); err != nil { + if err := p.ReadField4(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 5: if fieldTypeId == thrift.STRING { - if err := p.ReadField5(iprot); err != nil { + if err := p.ReadField5(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *Lock) ReadField1(iprot thrift.TProtocol) error { +func (p *Lock) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { p.Key = &LockKey{} - if err := p.Key.Read(iprot); err != nil { + if err := p.Key.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Key), err) } return nil } -func (p *Lock) ReadField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { +func (p *Lock) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { p.Token = v @@ -2318,8 +2470,8 @@ func (p *Lock) ReadField2(iprot thrift.TProtocol) error { return nil } -func (p *Lock) ReadField3(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { +func (p *Lock) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 3: ", err) } else { p.User = v @@ -2327,8 +2479,8 @@ func (p *Lock) ReadField3(iprot thrift.TProtocol) error { return nil } -func (p *Lock) ReadField4(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI64(); err != nil { +func (p *Lock) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { return thrift.PrependError("error reading field 4: ", err) } else { p.TimestampMs = v @@ -2336,8 +2488,8 @@ func (p *Lock) ReadField4(iprot thrift.TProtocol) error { return nil } -func (p *Lock) ReadField5(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { +func (p *Lock) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 5: ", err) } else { p.Message = &v @@ -2345,76 +2497,95 @@ func (p *Lock) ReadField5(iprot thrift.TProtocol) error { return nil } -func (p *Lock) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("Lock"); err != nil { +func (p *Lock) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "Lock"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } - if err := p.writeField2(oprot); err != nil { return err } - if err := p.writeField3(oprot); err != nil { return err } - if err := p.writeField4(oprot); err != nil { return err } - if err := p.writeField5(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } + if err := p.writeField5(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *Lock) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("key", thrift.STRUCT, 1); err != nil { +func (p *Lock) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "key", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:key: ", p), err) } - if err := p.Key.Write(oprot); err != nil { + if err := p.Key.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Key), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:key: ", p), err) } return err } -func (p *Lock) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("token", thrift.STRING, 2); err != nil { +func (p *Lock) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "token", thrift.STRING, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:token: ", p), err) } - if err := oprot.WriteString(string(p.Token)); err != nil { + if err := oprot.WriteString(ctx, string(p.Token)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.token (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:token: ", p), err) } return err } -func (p *Lock) writeField3(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("user", thrift.STRING, 3); err != nil { +func (p *Lock) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "user", thrift.STRING, 3); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:user: ", p), err) } - if err := oprot.WriteString(string(p.User)); err != nil { + if err := oprot.WriteString(ctx, string(p.User)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.user (3) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 3:user: ", p), err) } return err } -func (p *Lock) writeField4(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("timestampMs", thrift.I64, 4); err != nil { +func (p *Lock) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "timestampMs", thrift.I64, 4); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:timestampMs: ", p), err) } - if err := oprot.WriteI64(int64(p.TimestampMs)); err != nil { + if err := oprot.WriteI64(ctx, int64(p.TimestampMs)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.timestampMs (4) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 4:timestampMs: ", p), err) } return err } -func (p *Lock) writeField5(oprot thrift.TProtocol) (err error) { +func (p *Lock) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetMessage() { - if err := oprot.WriteFieldBegin("message", thrift.STRING, 5); err != nil { + if err := oprot.WriteFieldBegin(ctx, "message", thrift.STRING, 5); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:message: ", p), err) } - if err := oprot.WriteString(string(*p.Message)); err != nil { + if err := oprot.WriteString(ctx, string(*p.Message)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.message (5) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 5:message: ", p), err) } } return err } +func (p *Lock) Equals(other *Lock) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if !p.Key.Equals(other.Key) { return false } + if p.Token != other.Token { return false } + if p.User != other.User { return false } + if p.TimestampMs != other.TimestampMs { return false } + if p.Message != other.Message { + if p.Message == nil || other.Message == nil { + return false + } + if (*p.Message) != (*other.Message) { return false } + } + return true +} + func (p *Lock) String() string { if p == nil { return "" @@ -2451,14 +2622,14 @@ func (p *InstanceKey) IsSetJobKey() bool { return p.JobKey != nil } -func (p *InstanceKey) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *InstanceKey) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -2466,49 +2637,49 @@ func (p *InstanceKey) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.I32 { - if err := p.ReadField2(iprot); err != nil { + if err := p.ReadField2(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *InstanceKey) ReadField1(iprot thrift.TProtocol) error { +func (p *InstanceKey) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { p.JobKey = &JobKey{} - if err := p.JobKey.Read(iprot); err != nil { + if err := p.JobKey.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.JobKey), err) } return nil } -func (p *InstanceKey) ReadField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { +func (p *InstanceKey) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { p.InstanceId = v @@ -2516,41 +2687,52 @@ func (p *InstanceKey) ReadField2(iprot thrift.TProtocol) error { return nil } -func (p *InstanceKey) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("InstanceKey"); err != nil { +func (p *InstanceKey) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "InstanceKey"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } - if err := p.writeField2(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *InstanceKey) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("jobKey", thrift.STRUCT, 1); err != nil { +func (p *InstanceKey) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "jobKey", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:jobKey: ", p), err) } - if err := p.JobKey.Write(oprot); err != nil { + if err := p.JobKey.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.JobKey), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:jobKey: ", p), err) } return err } -func (p *InstanceKey) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("instanceId", thrift.I32, 2); err != nil { +func (p *InstanceKey) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "instanceId", thrift.I32, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:instanceId: ", p), err) } - if err := oprot.WriteI32(int32(p.InstanceId)); err != nil { + if err := oprot.WriteI32(ctx, int32(p.InstanceId)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.instanceId (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:instanceId: ", p), err) } return err } +func (p *InstanceKey) Equals(other *InstanceKey) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if !p.JobKey.Equals(other.JobKey) { return false } + if p.InstanceId != other.InstanceId { return false } + return true +} + func (p *InstanceKey) String() string { if p == nil { return "" @@ -2600,14 +2782,14 @@ func (p *MesosFetcherURI) IsSetCache() bool { return p.Cache != nil } -func (p *MesosFetcherURI) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *MesosFetcherURI) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -2615,51 +2797,51 @@ func (p *MesosFetcherURI) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRING { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.BOOL { - if err := p.ReadField2(iprot); err != nil { + if err := p.ReadField2(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 3: if fieldTypeId == thrift.BOOL { - if err := p.ReadField3(iprot); err != nil { + if err := p.ReadField3(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *MesosFetcherURI) ReadField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { +func (p *MesosFetcherURI) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.Value = v @@ -2667,8 +2849,8 @@ func (p *MesosFetcherURI) ReadField1(iprot thrift.TProtocol) error { return nil } -func (p *MesosFetcherURI) ReadField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBool(); err != nil { +func (p *MesosFetcherURI) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBool(ctx); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { p.Extract = &v @@ -2676,8 +2858,8 @@ func (p *MesosFetcherURI) ReadField2(iprot thrift.TProtocol) error { return nil } -func (p *MesosFetcherURI) ReadField3(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBool(); err != nil { +func (p *MesosFetcherURI) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBool(ctx); err != nil { return thrift.PrependError("error reading field 3: ", err) } else { p.Cache = &v @@ -2685,55 +2867,77 @@ func (p *MesosFetcherURI) ReadField3(iprot thrift.TProtocol) error { return nil } -func (p *MesosFetcherURI) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("MesosFetcherURI"); err != nil { +func (p *MesosFetcherURI) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "MesosFetcherURI"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } - if err := p.writeField2(oprot); err != nil { return err } - if err := p.writeField3(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *MesosFetcherURI) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("value", thrift.STRING, 1); err != nil { +func (p *MesosFetcherURI) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "value", thrift.STRING, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:value: ", p), err) } - if err := oprot.WriteString(string(p.Value)); err != nil { + if err := oprot.WriteString(ctx, string(p.Value)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.value (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:value: ", p), err) } return err } -func (p *MesosFetcherURI) writeField2(oprot thrift.TProtocol) (err error) { +func (p *MesosFetcherURI) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetExtract() { - if err := oprot.WriteFieldBegin("extract", thrift.BOOL, 2); err != nil { + if err := oprot.WriteFieldBegin(ctx, "extract", thrift.BOOL, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:extract: ", p), err) } - if err := oprot.WriteBool(bool(*p.Extract)); err != nil { + if err := oprot.WriteBool(ctx, bool(*p.Extract)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.extract (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:extract: ", p), err) } } return err } -func (p *MesosFetcherURI) writeField3(oprot thrift.TProtocol) (err error) { +func (p *MesosFetcherURI) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetCache() { - if err := oprot.WriteFieldBegin("cache", thrift.BOOL, 3); err != nil { + if err := oprot.WriteFieldBegin(ctx, "cache", thrift.BOOL, 3); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:cache: ", p), err) } - if err := oprot.WriteBool(bool(*p.Cache)); err != nil { + if err := oprot.WriteBool(ctx, bool(*p.Cache)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.cache (3) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 3:cache: ", p), err) } } return err } +func (p *MesosFetcherURI) Equals(other *MesosFetcherURI) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.Value != other.Value { return false } + if p.Extract != other.Extract { + if p.Extract == nil || other.Extract == nil { + return false + } + if (*p.Extract) != (*other.Extract) { return false } + } + if p.Cache != other.Cache { + if p.Cache == nil || other.Cache == nil { + return false + } + if (*p.Cache) != (*other.Cache) { return false } + } + return true +} + func (p *MesosFetcherURI) String() string { if p == nil { return "" @@ -2761,14 +2965,14 @@ func (p *ExecutorConfig) GetName() string { func (p *ExecutorConfig) GetData() string { return p.Data } -func (p *ExecutorConfig) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *ExecutorConfig) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -2776,41 +2980,41 @@ func (p *ExecutorConfig) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRING { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.STRING { - if err := p.ReadField2(iprot); err != nil { + if err := p.ReadField2(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ExecutorConfig) ReadField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { +func (p *ExecutorConfig) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.Name = v @@ -2818,8 +3022,8 @@ func (p *ExecutorConfig) ReadField1(iprot thrift.TProtocol) error { return nil } -func (p *ExecutorConfig) ReadField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { +func (p *ExecutorConfig) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { p.Data = v @@ -2827,40 +3031,51 @@ func (p *ExecutorConfig) ReadField2(iprot thrift.TProtocol) error { return nil } -func (p *ExecutorConfig) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("ExecutorConfig"); err != nil { +func (p *ExecutorConfig) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "ExecutorConfig"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } - if err := p.writeField2(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ExecutorConfig) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("name", thrift.STRING, 1); err != nil { +func (p *ExecutorConfig) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "name", thrift.STRING, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:name: ", p), err) } - if err := oprot.WriteString(string(p.Name)); err != nil { + if err := oprot.WriteString(ctx, string(p.Name)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.name (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:name: ", p), err) } return err } -func (p *ExecutorConfig) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("data", thrift.STRING, 2); err != nil { +func (p *ExecutorConfig) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "data", thrift.STRING, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:data: ", p), err) } - if err := oprot.WriteString(string(p.Data)); err != nil { + if err := oprot.WriteString(ctx, string(p.Data)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.data (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:data: ", p), err) } return err } +func (p *ExecutorConfig) Equals(other *ExecutorConfig) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.Name != other.Name { return false } + if p.Data != other.Data { return false } + return true +} + func (p *ExecutorConfig) String() string { if p == nil { return "" @@ -2896,14 +3111,14 @@ func (p *Volume) GetHostPath() string { func (p *Volume) GetMode() Mode { return p.Mode } -func (p *Volume) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *Volume) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -2911,51 +3126,51 @@ func (p *Volume) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRING { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.STRING { - if err := p.ReadField2(iprot); err != nil { + if err := p.ReadField2(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 3: if fieldTypeId == thrift.I32 { - if err := p.ReadField3(iprot); err != nil { + if err := p.ReadField3(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *Volume) ReadField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { +func (p *Volume) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.ContainerPath = v @@ -2963,8 +3178,8 @@ func (p *Volume) ReadField1(iprot thrift.TProtocol) error { return nil } -func (p *Volume) ReadField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { +func (p *Volume) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { p.HostPath = v @@ -2972,8 +3187,8 @@ func (p *Volume) ReadField2(iprot thrift.TProtocol) error { return nil } -func (p *Volume) ReadField3(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { +func (p *Volume) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { return thrift.PrependError("error reading field 3: ", err) } else { temp := Mode(v) @@ -2982,51 +3197,63 @@ func (p *Volume) ReadField3(iprot thrift.TProtocol) error { return nil } -func (p *Volume) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("Volume"); err != nil { +func (p *Volume) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "Volume"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } - if err := p.writeField2(oprot); err != nil { return err } - if err := p.writeField3(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *Volume) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("containerPath", thrift.STRING, 1); err != nil { +func (p *Volume) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "containerPath", thrift.STRING, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:containerPath: ", p), err) } - if err := oprot.WriteString(string(p.ContainerPath)); err != nil { + if err := oprot.WriteString(ctx, string(p.ContainerPath)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.containerPath (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:containerPath: ", p), err) } return err } -func (p *Volume) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("hostPath", thrift.STRING, 2); err != nil { +func (p *Volume) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "hostPath", thrift.STRING, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:hostPath: ", p), err) } - if err := oprot.WriteString(string(p.HostPath)); err != nil { + if err := oprot.WriteString(ctx, string(p.HostPath)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.hostPath (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:hostPath: ", p), err) } return err } -func (p *Volume) writeField3(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("mode", thrift.I32, 3); err != nil { +func (p *Volume) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "mode", thrift.I32, 3); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:mode: ", p), err) } - if err := oprot.WriteI32(int32(p.Mode)); err != nil { + if err := oprot.WriteI32(ctx, int32(p.Mode)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.mode (3) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 3:mode: ", p), err) } return err } +func (p *Volume) Equals(other *Volume) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.ContainerPath != other.ContainerPath { return false } + if p.HostPath != other.HostPath { return false } + if p.Mode != other.Mode { return false } + return true +} + func (p *Volume) String() string { if p == nil { return "" @@ -3056,14 +3283,14 @@ func (p *DockerImage) GetName() string { func (p *DockerImage) GetTag() string { return p.Tag } -func (p *DockerImage) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *DockerImage) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -3071,41 +3298,41 @@ func (p *DockerImage) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRING { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.STRING { - if err := p.ReadField2(iprot); err != nil { + if err := p.ReadField2(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *DockerImage) ReadField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { +func (p *DockerImage) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.Name = v @@ -3113,8 +3340,8 @@ func (p *DockerImage) ReadField1(iprot thrift.TProtocol) error { return nil } -func (p *DockerImage) ReadField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { +func (p *DockerImage) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { p.Tag = v @@ -3122,40 +3349,51 @@ func (p *DockerImage) ReadField2(iprot thrift.TProtocol) error { return nil } -func (p *DockerImage) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("DockerImage"); err != nil { +func (p *DockerImage) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "DockerImage"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } - if err := p.writeField2(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *DockerImage) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("name", thrift.STRING, 1); err != nil { +func (p *DockerImage) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "name", thrift.STRING, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:name: ", p), err) } - if err := oprot.WriteString(string(p.Name)); err != nil { + if err := oprot.WriteString(ctx, string(p.Name)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.name (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:name: ", p), err) } return err } -func (p *DockerImage) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("tag", thrift.STRING, 2); err != nil { +func (p *DockerImage) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "tag", thrift.STRING, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:tag: ", p), err) } - if err := oprot.WriteString(string(p.Tag)); err != nil { + if err := oprot.WriteString(ctx, string(p.Tag)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.tag (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:tag: ", p), err) } return err } +func (p *DockerImage) Equals(other *DockerImage) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.Name != other.Name { return false } + if p.Tag != other.Tag { return false } + return true +} + func (p *DockerImage) String() string { if p == nil { return "" @@ -3185,14 +3423,14 @@ func (p *AppcImage) GetName() string { func (p *AppcImage) GetImageId() string { return p.ImageId } -func (p *AppcImage) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *AppcImage) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -3200,41 +3438,41 @@ func (p *AppcImage) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRING { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.STRING { - if err := p.ReadField2(iprot); err != nil { + if err := p.ReadField2(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AppcImage) ReadField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { +func (p *AppcImage) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.Name = v @@ -3242,8 +3480,8 @@ func (p *AppcImage) ReadField1(iprot thrift.TProtocol) error { return nil } -func (p *AppcImage) ReadField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { +func (p *AppcImage) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { p.ImageId = v @@ -3251,40 +3489,51 @@ func (p *AppcImage) ReadField2(iprot thrift.TProtocol) error { return nil } -func (p *AppcImage) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("AppcImage"); err != nil { +func (p *AppcImage) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "AppcImage"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } - if err := p.writeField2(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AppcImage) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("name", thrift.STRING, 1); err != nil { +func (p *AppcImage) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "name", thrift.STRING, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:name: ", p), err) } - if err := oprot.WriteString(string(p.Name)); err != nil { + if err := oprot.WriteString(ctx, string(p.Name)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.name (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:name: ", p), err) } return err } -func (p *AppcImage) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("imageId", thrift.STRING, 2); err != nil { +func (p *AppcImage) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "imageId", thrift.STRING, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:imageId: ", p), err) } - if err := oprot.WriteString(string(p.ImageId)); err != nil { + if err := oprot.WriteString(ctx, string(p.ImageId)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.imageId (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:imageId: ", p), err) } return err } +func (p *AppcImage) Equals(other *AppcImage) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.Name != other.Name { return false } + if p.ImageId != other.ImageId { return false } + return true +} + func (p *AppcImage) String() string { if p == nil { return "" @@ -3340,14 +3589,14 @@ func (p *Image) IsSetAppc() bool { return p.Appc != nil } -func (p *Image) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *Image) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -3355,98 +3604,109 @@ func (p *Image) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField2(iprot); err != nil { + if err := p.ReadField2(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *Image) ReadField1(iprot thrift.TProtocol) error { +func (p *Image) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { p.Docker = &DockerImage{} - if err := p.Docker.Read(iprot); err != nil { + if err := p.Docker.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Docker), err) } return nil } -func (p *Image) ReadField2(iprot thrift.TProtocol) error { +func (p *Image) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { p.Appc = &AppcImage{} - if err := p.Appc.Read(iprot); err != nil { + if err := p.Appc.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Appc), err) } return nil } -func (p *Image) Write(oprot thrift.TProtocol) error { +func (p *Image) Write(ctx context.Context, oprot thrift.TProtocol) error { if c := p.CountSetFieldsImage(); c != 1 { return fmt.Errorf("%T write union: exactly one field must be set (%d set).", p, c) } - if err := oprot.WriteStructBegin("Image"); err != nil { + if err := oprot.WriteStructBegin(ctx, "Image"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } - if err := p.writeField2(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *Image) writeField1(oprot thrift.TProtocol) (err error) { +func (p *Image) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetDocker() { - if err := oprot.WriteFieldBegin("docker", thrift.STRUCT, 1); err != nil { + if err := oprot.WriteFieldBegin(ctx, "docker", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:docker: ", p), err) } - if err := p.Docker.Write(oprot); err != nil { + if err := p.Docker.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Docker), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:docker: ", p), err) } } return err } -func (p *Image) writeField2(oprot thrift.TProtocol) (err error) { +func (p *Image) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetAppc() { - if err := oprot.WriteFieldBegin("appc", thrift.STRUCT, 2); err != nil { + if err := oprot.WriteFieldBegin(ctx, "appc", thrift.STRUCT, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:appc: ", p), err) } - if err := p.Appc.Write(oprot); err != nil { + if err := p.Appc.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Appc), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:appc: ", p), err) } } return err } +func (p *Image) Equals(other *Image) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if !p.Docker.Equals(other.Docker) { return false } + if !p.Appc.Equals(other.Appc) { return false } + return true +} + func (p *Image) String() string { if p == nil { return "" @@ -3488,14 +3748,14 @@ func (p *MesosContainer) IsSetVolumes() bool { return p.Volumes != nil } -func (p *MesosContainer) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *MesosContainer) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -3503,115 +3763,130 @@ func (p *MesosContainer) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.LIST { - if err := p.ReadField2(iprot); err != nil { + if err := p.ReadField2(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *MesosContainer) ReadField1(iprot thrift.TProtocol) error { +func (p *MesosContainer) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { p.Image = &Image{} - if err := p.Image.Read(iprot); err != nil { + if err := p.Image.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Image), err) } return nil } -func (p *MesosContainer) ReadField2(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin() +func (p *MesosContainer) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) if err != nil { return thrift.PrependError("error reading list begin: ", err) } tSlice := make([]*Volume, 0, size) p.Volumes = tSlice for i := 0; i < size; i ++ { - _elem3 := &Volume{} - if err := _elem3.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem3), err) + _elem6 := &Volume{} + if err := _elem6.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem6), err) } - p.Volumes = append(p.Volumes, _elem3) + p.Volumes = append(p.Volumes, _elem6) } - if err := iprot.ReadListEnd(); err != nil { + if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) } return nil } -func (p *MesosContainer) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("MesosContainer"); err != nil { +func (p *MesosContainer) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "MesosContainer"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } - if err := p.writeField2(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *MesosContainer) writeField1(oprot thrift.TProtocol) (err error) { +func (p *MesosContainer) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetImage() { - if err := oprot.WriteFieldBegin("image", thrift.STRUCT, 1); err != nil { + if err := oprot.WriteFieldBegin(ctx, "image", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:image: ", p), err) } - if err := p.Image.Write(oprot); err != nil { + if err := p.Image.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Image), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:image: ", p), err) } } return err } -func (p *MesosContainer) writeField2(oprot thrift.TProtocol) (err error) { +func (p *MesosContainer) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetVolumes() { - if err := oprot.WriteFieldBegin("volumes", thrift.LIST, 2); err != nil { + if err := oprot.WriteFieldBegin(ctx, "volumes", thrift.LIST, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:volumes: ", p), err) } - if err := oprot.WriteListBegin(thrift.STRUCT, len(p.Volumes)); err != nil { + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.Volumes)); err != nil { return thrift.PrependError("error writing list begin: ", err) } for _, v := range p.Volumes { - if err := v.Write(oprot); err != nil { + if err := v.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) } } - if err := oprot.WriteListEnd(); err != nil { + if err := oprot.WriteListEnd(ctx); err != nil { return thrift.PrependError("error writing list end: ", err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:volumes: ", p), err) } } return err } +func (p *MesosContainer) Equals(other *MesosContainer) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if !p.Image.Equals(other.Image) { return false } + if len(p.Volumes) != len(other.Volumes) { return false } + for i, _tgt := range p.Volumes { + _src7 := other.Volumes[i] + if !_tgt.Equals(_src7) { return false } + } + return true +} + func (p *MesosContainer) String() string { if p == nil { return "" @@ -3641,14 +3916,14 @@ func (p *DockerParameter) GetName() string { func (p *DockerParameter) GetValue() string { return p.Value } -func (p *DockerParameter) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *DockerParameter) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -3656,41 +3931,41 @@ func (p *DockerParameter) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRING { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.STRING { - if err := p.ReadField2(iprot); err != nil { + if err := p.ReadField2(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *DockerParameter) ReadField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { +func (p *DockerParameter) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.Name = v @@ -3698,8 +3973,8 @@ func (p *DockerParameter) ReadField1(iprot thrift.TProtocol) error { return nil } -func (p *DockerParameter) ReadField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { +func (p *DockerParameter) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { p.Value = v @@ -3707,40 +3982,51 @@ func (p *DockerParameter) ReadField2(iprot thrift.TProtocol) error { return nil } -func (p *DockerParameter) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("DockerParameter"); err != nil { +func (p *DockerParameter) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "DockerParameter"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } - if err := p.writeField2(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *DockerParameter) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("name", thrift.STRING, 1); err != nil { +func (p *DockerParameter) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "name", thrift.STRING, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:name: ", p), err) } - if err := oprot.WriteString(string(p.Name)); err != nil { + if err := oprot.WriteString(ctx, string(p.Name)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.name (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:name: ", p), err) } return err } -func (p *DockerParameter) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("value", thrift.STRING, 2); err != nil { +func (p *DockerParameter) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "value", thrift.STRING, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:value: ", p), err) } - if err := oprot.WriteString(string(p.Value)); err != nil { + if err := oprot.WriteString(ctx, string(p.Value)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.value (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:value: ", p), err) } return err } +func (p *DockerParameter) Equals(other *DockerParameter) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.Name != other.Name { return false } + if p.Value != other.Value { return false } + return true +} + func (p *DockerParameter) String() string { if p == nil { return "" @@ -3775,14 +4061,14 @@ func (p *DockerContainer) IsSetParameters() bool { return p.Parameters != nil } -func (p *DockerContainer) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *DockerContainer) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -3790,41 +4076,41 @@ func (p *DockerContainer) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRING { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.LIST { - if err := p.ReadField2(iprot); err != nil { + if err := p.ReadField2(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *DockerContainer) ReadField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { +func (p *DockerContainer) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.Image = v @@ -3832,71 +4118,86 @@ func (p *DockerContainer) ReadField1(iprot thrift.TProtocol) error { return nil } -func (p *DockerContainer) ReadField2(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin() +func (p *DockerContainer) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) if err != nil { return thrift.PrependError("error reading list begin: ", err) } tSlice := make([]*DockerParameter, 0, size) p.Parameters = tSlice for i := 0; i < size; i ++ { - _elem4 := &DockerParameter{} - if err := _elem4.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem4), err) + _elem8 := &DockerParameter{} + if err := _elem8.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem8), err) } - p.Parameters = append(p.Parameters, _elem4) + p.Parameters = append(p.Parameters, _elem8) } - if err := iprot.ReadListEnd(); err != nil { + if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) } return nil } -func (p *DockerContainer) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("DockerContainer"); err != nil { +func (p *DockerContainer) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "DockerContainer"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } - if err := p.writeField2(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *DockerContainer) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("image", thrift.STRING, 1); err != nil { +func (p *DockerContainer) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "image", thrift.STRING, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:image: ", p), err) } - if err := oprot.WriteString(string(p.Image)); err != nil { + if err := oprot.WriteString(ctx, string(p.Image)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.image (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:image: ", p), err) } return err } -func (p *DockerContainer) writeField2(oprot thrift.TProtocol) (err error) { +func (p *DockerContainer) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetParameters() { - if err := oprot.WriteFieldBegin("parameters", thrift.LIST, 2); err != nil { + if err := oprot.WriteFieldBegin(ctx, "parameters", thrift.LIST, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:parameters: ", p), err) } - if err := oprot.WriteListBegin(thrift.STRUCT, len(p.Parameters)); err != nil { + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.Parameters)); err != nil { return thrift.PrependError("error writing list begin: ", err) } for _, v := range p.Parameters { - if err := v.Write(oprot); err != nil { + if err := v.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) } } - if err := oprot.WriteListEnd(); err != nil { + if err := oprot.WriteListEnd(ctx); err != nil { return thrift.PrependError("error writing list end: ", err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:parameters: ", p), err) } } return err } +func (p *DockerContainer) Equals(other *DockerContainer) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.Image != other.Image { return false } + if len(p.Parameters) != len(other.Parameters) { return false } + for i, _tgt := range p.Parameters { + _src9 := other.Parameters[i] + if !_tgt.Equals(_src9) { return false } + } + return true +} + func (p *DockerContainer) String() string { if p == nil { return "" @@ -3952,14 +4253,14 @@ func (p *Container) IsSetDocker() bool { return p.Docker != nil } -func (p *Container) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *Container) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -3967,98 +4268,109 @@ func (p *Container) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField2(iprot); err != nil { + if err := p.ReadField2(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *Container) ReadField1(iprot thrift.TProtocol) error { +func (p *Container) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { p.Mesos = &MesosContainer{} - if err := p.Mesos.Read(iprot); err != nil { + if err := p.Mesos.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Mesos), err) } return nil } -func (p *Container) ReadField2(iprot thrift.TProtocol) error { +func (p *Container) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { p.Docker = &DockerContainer{} - if err := p.Docker.Read(iprot); err != nil { + if err := p.Docker.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Docker), err) } return nil } -func (p *Container) Write(oprot thrift.TProtocol) error { +func (p *Container) Write(ctx context.Context, oprot thrift.TProtocol) error { if c := p.CountSetFieldsContainer(); c != 1 { return fmt.Errorf("%T write union: exactly one field must be set (%d set).", p, c) } - if err := oprot.WriteStructBegin("Container"); err != nil { + if err := oprot.WriteStructBegin(ctx, "Container"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } - if err := p.writeField2(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *Container) writeField1(oprot thrift.TProtocol) (err error) { +func (p *Container) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetMesos() { - if err := oprot.WriteFieldBegin("mesos", thrift.STRUCT, 1); err != nil { + if err := oprot.WriteFieldBegin(ctx, "mesos", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:mesos: ", p), err) } - if err := p.Mesos.Write(oprot); err != nil { + if err := p.Mesos.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Mesos), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:mesos: ", p), err) } } return err } -func (p *Container) writeField2(oprot thrift.TProtocol) (err error) { +func (p *Container) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetDocker() { - if err := oprot.WriteFieldBegin("docker", thrift.STRUCT, 2); err != nil { + if err := oprot.WriteFieldBegin(ctx, "docker", thrift.STRUCT, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:docker: ", p), err) } - if err := p.Docker.Write(oprot); err != nil { + if err := p.Docker.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Docker), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:docker: ", p), err) } } return err } +func (p *Container) Equals(other *Container) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if !p.Mesos.Equals(other.Mesos) { return false } + if !p.Docker.Equals(other.Docker) { return false } + return true +} + func (p *Container) String() string { if p == nil { return "" @@ -4162,14 +4474,14 @@ func (p *Resource) IsSetNumGpus() bool { return p.NumGpus != nil } -func (p *Resource) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *Resource) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -4177,71 +4489,71 @@ func (p *Resource) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.DOUBLE { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.I64 { - if err := p.ReadField2(iprot); err != nil { + if err := p.ReadField2(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 3: if fieldTypeId == thrift.I64 { - if err := p.ReadField3(iprot); err != nil { + if err := p.ReadField3(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 4: if fieldTypeId == thrift.STRING { - if err := p.ReadField4(iprot); err != nil { + if err := p.ReadField4(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 5: if fieldTypeId == thrift.I64 { - if err := p.ReadField5(iprot); err != nil { + if err := p.ReadField5(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *Resource) ReadField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadDouble(); err != nil { +func (p *Resource) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadDouble(ctx); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.NumCpus = &v @@ -4249,8 +4561,8 @@ func (p *Resource) ReadField1(iprot thrift.TProtocol) error { return nil } -func (p *Resource) ReadField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI64(); err != nil { +func (p *Resource) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { p.RamMb = &v @@ -4258,8 +4570,8 @@ func (p *Resource) ReadField2(iprot thrift.TProtocol) error { return nil } -func (p *Resource) ReadField3(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI64(); err != nil { +func (p *Resource) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { return thrift.PrependError("error reading field 3: ", err) } else { p.DiskMb = &v @@ -4267,8 +4579,8 @@ func (p *Resource) ReadField3(iprot thrift.TProtocol) error { return nil } -func (p *Resource) ReadField4(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { +func (p *Resource) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 4: ", err) } else { p.NamedPort = &v @@ -4276,8 +4588,8 @@ func (p *Resource) ReadField4(iprot thrift.TProtocol) error { return nil } -func (p *Resource) ReadField5(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI64(); err != nil { +func (p *Resource) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { return thrift.PrependError("error reading field 5: ", err) } else { p.NumGpus = &v @@ -4285,86 +4597,125 @@ func (p *Resource) ReadField5(iprot thrift.TProtocol) error { return nil } -func (p *Resource) Write(oprot thrift.TProtocol) error { +func (p *Resource) Write(ctx context.Context, oprot thrift.TProtocol) error { if c := p.CountSetFieldsResource(); c != 1 { return fmt.Errorf("%T write union: exactly one field must be set (%d set).", p, c) } - if err := oprot.WriteStructBegin("Resource"); err != nil { + if err := oprot.WriteStructBegin(ctx, "Resource"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } - if err := p.writeField2(oprot); err != nil { return err } - if err := p.writeField3(oprot); err != nil { return err } - if err := p.writeField4(oprot); err != nil { return err } - if err := p.writeField5(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } + if err := p.writeField5(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *Resource) writeField1(oprot thrift.TProtocol) (err error) { +func (p *Resource) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetNumCpus() { - if err := oprot.WriteFieldBegin("numCpus", thrift.DOUBLE, 1); err != nil { + if err := oprot.WriteFieldBegin(ctx, "numCpus", thrift.DOUBLE, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:numCpus: ", p), err) } - if err := oprot.WriteDouble(float64(*p.NumCpus)); err != nil { + if err := oprot.WriteDouble(ctx, float64(*p.NumCpus)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.numCpus (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:numCpus: ", p), err) } } return err } -func (p *Resource) writeField2(oprot thrift.TProtocol) (err error) { +func (p *Resource) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetRamMb() { - if err := oprot.WriteFieldBegin("ramMb", thrift.I64, 2); err != nil { + if err := oprot.WriteFieldBegin(ctx, "ramMb", thrift.I64, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:ramMb: ", p), err) } - if err := oprot.WriteI64(int64(*p.RamMb)); err != nil { + if err := oprot.WriteI64(ctx, int64(*p.RamMb)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.ramMb (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:ramMb: ", p), err) } } return err } -func (p *Resource) writeField3(oprot thrift.TProtocol) (err error) { +func (p *Resource) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetDiskMb() { - if err := oprot.WriteFieldBegin("diskMb", thrift.I64, 3); err != nil { + if err := oprot.WriteFieldBegin(ctx, "diskMb", thrift.I64, 3); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:diskMb: ", p), err) } - if err := oprot.WriteI64(int64(*p.DiskMb)); err != nil { + if err := oprot.WriteI64(ctx, int64(*p.DiskMb)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.diskMb (3) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 3:diskMb: ", p), err) } } return err } -func (p *Resource) writeField4(oprot thrift.TProtocol) (err error) { +func (p *Resource) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetNamedPort() { - if err := oprot.WriteFieldBegin("namedPort", thrift.STRING, 4); err != nil { + if err := oprot.WriteFieldBegin(ctx, "namedPort", thrift.STRING, 4); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:namedPort: ", p), err) } - if err := oprot.WriteString(string(*p.NamedPort)); err != nil { + if err := oprot.WriteString(ctx, string(*p.NamedPort)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.namedPort (4) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 4:namedPort: ", p), err) } } return err } -func (p *Resource) writeField5(oprot thrift.TProtocol) (err error) { +func (p *Resource) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetNumGpus() { - if err := oprot.WriteFieldBegin("numGpus", thrift.I64, 5); err != nil { + if err := oprot.WriteFieldBegin(ctx, "numGpus", thrift.I64, 5); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:numGpus: ", p), err) } - if err := oprot.WriteI64(int64(*p.NumGpus)); err != nil { + if err := oprot.WriteI64(ctx, int64(*p.NumGpus)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.numGpus (5) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 5:numGpus: ", p), err) } } return err } +func (p *Resource) Equals(other *Resource) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.NumCpus != other.NumCpus { + if p.NumCpus == nil || other.NumCpus == nil { + return false + } + if (*p.NumCpus) != (*other.NumCpus) { return false } + } + if p.RamMb != other.RamMb { + if p.RamMb == nil || other.RamMb == nil { + return false + } + if (*p.RamMb) != (*other.RamMb) { return false } + } + if p.DiskMb != other.DiskMb { + if p.DiskMb == nil || other.DiskMb == nil { + return false + } + if (*p.DiskMb) != (*other.DiskMb) { return false } + } + if p.NamedPort != other.NamedPort { + if p.NamedPort == nil || other.NamedPort == nil { + return false + } + if (*p.NamedPort) != (*other.NamedPort) { return false } + } + if p.NumGpus != other.NumGpus { + if p.NumGpus == nil || other.NumGpus == nil { + return false + } + if (*p.NumGpus) != (*other.NumGpus) { return false } + } + return true +} + func (p *Resource) String() string { if p == nil { return "" @@ -4399,14 +4750,14 @@ func (p *PartitionPolicy) IsSetDelaySecs() bool { return p.DelaySecs != nil } -func (p *PartitionPolicy) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *PartitionPolicy) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -4414,41 +4765,41 @@ func (p *PartitionPolicy) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.BOOL { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.I64 { - if err := p.ReadField2(iprot); err != nil { + if err := p.ReadField2(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *PartitionPolicy) ReadField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBool(); err != nil { +func (p *PartitionPolicy) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBool(ctx); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.Reschedule = v @@ -4456,8 +4807,8 @@ func (p *PartitionPolicy) ReadField1(iprot thrift.TProtocol) error { return nil } -func (p *PartitionPolicy) ReadField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI64(); err != nil { +func (p *PartitionPolicy) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { p.DelaySecs = &v @@ -4465,42 +4816,58 @@ func (p *PartitionPolicy) ReadField2(iprot thrift.TProtocol) error { return nil } -func (p *PartitionPolicy) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("PartitionPolicy"); err != nil { +func (p *PartitionPolicy) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "PartitionPolicy"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } - if err := p.writeField2(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *PartitionPolicy) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("reschedule", thrift.BOOL, 1); err != nil { +func (p *PartitionPolicy) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "reschedule", thrift.BOOL, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:reschedule: ", p), err) } - if err := oprot.WriteBool(bool(p.Reschedule)); err != nil { + if err := oprot.WriteBool(ctx, bool(p.Reschedule)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.reschedule (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:reschedule: ", p), err) } return err } -func (p *PartitionPolicy) writeField2(oprot thrift.TProtocol) (err error) { +func (p *PartitionPolicy) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetDelaySecs() { - if err := oprot.WriteFieldBegin("delaySecs", thrift.I64, 2); err != nil { + if err := oprot.WriteFieldBegin(ctx, "delaySecs", thrift.I64, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:delaySecs: ", p), err) } - if err := oprot.WriteI64(int64(*p.DelaySecs)); err != nil { + if err := oprot.WriteI64(ctx, int64(*p.DelaySecs)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.delaySecs (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:delaySecs: ", p), err) } } return err } +func (p *PartitionPolicy) Equals(other *PartitionPolicy) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.Reschedule != other.Reschedule { return false } + if p.DelaySecs != other.DelaySecs { + if p.DelaySecs == nil || other.DelaySecs == nil { + return false + } + if (*p.DelaySecs) != (*other.DelaySecs) { return false } + } + return true +} + func (p *PartitionPolicy) String() string { if p == nil { return "" @@ -4530,14 +4897,14 @@ func (p *PercentageSlaPolicy) GetPercentage() float64 { func (p *PercentageSlaPolicy) GetDurationSecs() int64 { return p.DurationSecs } -func (p *PercentageSlaPolicy) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *PercentageSlaPolicy) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -4545,41 +4912,41 @@ func (p *PercentageSlaPolicy) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.DOUBLE { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.I64 { - if err := p.ReadField2(iprot); err != nil { + if err := p.ReadField2(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *PercentageSlaPolicy) ReadField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadDouble(); err != nil { +func (p *PercentageSlaPolicy) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadDouble(ctx); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.Percentage = v @@ -4587,8 +4954,8 @@ func (p *PercentageSlaPolicy) ReadField1(iprot thrift.TProtocol) error { return nil } -func (p *PercentageSlaPolicy) ReadField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI64(); err != nil { +func (p *PercentageSlaPolicy) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { p.DurationSecs = v @@ -4596,40 +4963,51 @@ func (p *PercentageSlaPolicy) ReadField2(iprot thrift.TProtocol) error { return nil } -func (p *PercentageSlaPolicy) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("PercentageSlaPolicy"); err != nil { +func (p *PercentageSlaPolicy) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "PercentageSlaPolicy"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } - if err := p.writeField2(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *PercentageSlaPolicy) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("percentage", thrift.DOUBLE, 1); err != nil { +func (p *PercentageSlaPolicy) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "percentage", thrift.DOUBLE, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:percentage: ", p), err) } - if err := oprot.WriteDouble(float64(p.Percentage)); err != nil { + if err := oprot.WriteDouble(ctx, float64(p.Percentage)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.percentage (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:percentage: ", p), err) } return err } -func (p *PercentageSlaPolicy) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("durationSecs", thrift.I64, 2); err != nil { +func (p *PercentageSlaPolicy) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "durationSecs", thrift.I64, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:durationSecs: ", p), err) } - if err := oprot.WriteI64(int64(p.DurationSecs)); err != nil { + if err := oprot.WriteI64(ctx, int64(p.DurationSecs)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.durationSecs (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:durationSecs: ", p), err) } return err } +func (p *PercentageSlaPolicy) Equals(other *PercentageSlaPolicy) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.Percentage != other.Percentage { return false } + if p.DurationSecs != other.DurationSecs { return false } + return true +} + func (p *PercentageSlaPolicy) String() string { if p == nil { return "" @@ -4659,14 +5037,14 @@ func (p *CountSlaPolicy) GetCount() int64 { func (p *CountSlaPolicy) GetDurationSecs() int64 { return p.DurationSecs } -func (p *CountSlaPolicy) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *CountSlaPolicy) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -4674,41 +5052,41 @@ func (p *CountSlaPolicy) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.I64 { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.I64 { - if err := p.ReadField2(iprot); err != nil { + if err := p.ReadField2(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *CountSlaPolicy) ReadField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI64(); err != nil { +func (p *CountSlaPolicy) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.Count = v @@ -4716,8 +5094,8 @@ func (p *CountSlaPolicy) ReadField1(iprot thrift.TProtocol) error { return nil } -func (p *CountSlaPolicy) ReadField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI64(); err != nil { +func (p *CountSlaPolicy) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { p.DurationSecs = v @@ -4725,40 +5103,51 @@ func (p *CountSlaPolicy) ReadField2(iprot thrift.TProtocol) error { return nil } -func (p *CountSlaPolicy) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("CountSlaPolicy"); err != nil { +func (p *CountSlaPolicy) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "CountSlaPolicy"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } - if err := p.writeField2(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *CountSlaPolicy) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("count", thrift.I64, 1); err != nil { +func (p *CountSlaPolicy) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "count", thrift.I64, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:count: ", p), err) } - if err := oprot.WriteI64(int64(p.Count)); err != nil { + if err := oprot.WriteI64(ctx, int64(p.Count)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.count (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:count: ", p), err) } return err } -func (p *CountSlaPolicy) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("durationSecs", thrift.I64, 2); err != nil { +func (p *CountSlaPolicy) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "durationSecs", thrift.I64, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:durationSecs: ", p), err) } - if err := oprot.WriteI64(int64(p.DurationSecs)); err != nil { + if err := oprot.WriteI64(ctx, int64(p.DurationSecs)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.durationSecs (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:durationSecs: ", p), err) } return err } +func (p *CountSlaPolicy) Equals(other *CountSlaPolicy) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.Count != other.Count { return false } + if p.DurationSecs != other.DurationSecs { return false } + return true +} + func (p *CountSlaPolicy) String() string { if p == nil { return "" @@ -4788,14 +5177,14 @@ func (p *CoordinatorSlaPolicy) GetCoordinatorUrl() string { func (p *CoordinatorSlaPolicy) GetStatusKey() string { return p.StatusKey } -func (p *CoordinatorSlaPolicy) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *CoordinatorSlaPolicy) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -4803,41 +5192,41 @@ func (p *CoordinatorSlaPolicy) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRING { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.STRING { - if err := p.ReadField2(iprot); err != nil { + if err := p.ReadField2(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *CoordinatorSlaPolicy) ReadField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { +func (p *CoordinatorSlaPolicy) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.CoordinatorUrl = v @@ -4845,8 +5234,8 @@ func (p *CoordinatorSlaPolicy) ReadField1(iprot thrift.TProtocol) error { return nil } -func (p *CoordinatorSlaPolicy) ReadField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { +func (p *CoordinatorSlaPolicy) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { p.StatusKey = v @@ -4854,40 +5243,51 @@ func (p *CoordinatorSlaPolicy) ReadField2(iprot thrift.TProtocol) error { return nil } -func (p *CoordinatorSlaPolicy) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("CoordinatorSlaPolicy"); err != nil { +func (p *CoordinatorSlaPolicy) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "CoordinatorSlaPolicy"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } - if err := p.writeField2(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *CoordinatorSlaPolicy) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("coordinatorUrl", thrift.STRING, 1); err != nil { +func (p *CoordinatorSlaPolicy) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "coordinatorUrl", thrift.STRING, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:coordinatorUrl: ", p), err) } - if err := oprot.WriteString(string(p.CoordinatorUrl)); err != nil { + if err := oprot.WriteString(ctx, string(p.CoordinatorUrl)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.coordinatorUrl (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:coordinatorUrl: ", p), err) } return err } -func (p *CoordinatorSlaPolicy) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("statusKey", thrift.STRING, 2); err != nil { +func (p *CoordinatorSlaPolicy) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "statusKey", thrift.STRING, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:statusKey: ", p), err) } - if err := oprot.WriteString(string(p.StatusKey)); err != nil { + if err := oprot.WriteString(ctx, string(p.StatusKey)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.statusKey (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:statusKey: ", p), err) } return err } +func (p *CoordinatorSlaPolicy) Equals(other *CoordinatorSlaPolicy) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.CoordinatorUrl != other.CoordinatorUrl { return false } + if p.StatusKey != other.StatusKey { return false } + return true +} + func (p *CoordinatorSlaPolicy) String() string { if p == nil { return "" @@ -4959,14 +5359,14 @@ func (p *SlaPolicy) IsSetCoordinatorSlaPolicy() bool { return p.CoordinatorSlaPolicy != nil } -func (p *SlaPolicy) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *SlaPolicy) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -4974,130 +5374,142 @@ func (p *SlaPolicy) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField2(iprot); err != nil { + if err := p.ReadField2(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 3: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField3(iprot); err != nil { + if err := p.ReadField3(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *SlaPolicy) ReadField1(iprot thrift.TProtocol) error { +func (p *SlaPolicy) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { p.PercentageSlaPolicy = &PercentageSlaPolicy{} - if err := p.PercentageSlaPolicy.Read(iprot); err != nil { + if err := p.PercentageSlaPolicy.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.PercentageSlaPolicy), err) } return nil } -func (p *SlaPolicy) ReadField2(iprot thrift.TProtocol) error { +func (p *SlaPolicy) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { p.CountSlaPolicy = &CountSlaPolicy{} - if err := p.CountSlaPolicy.Read(iprot); err != nil { + if err := p.CountSlaPolicy.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.CountSlaPolicy), err) } return nil } -func (p *SlaPolicy) ReadField3(iprot thrift.TProtocol) error { +func (p *SlaPolicy) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { p.CoordinatorSlaPolicy = &CoordinatorSlaPolicy{} - if err := p.CoordinatorSlaPolicy.Read(iprot); err != nil { + if err := p.CoordinatorSlaPolicy.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.CoordinatorSlaPolicy), err) } return nil } -func (p *SlaPolicy) Write(oprot thrift.TProtocol) error { +func (p *SlaPolicy) Write(ctx context.Context, oprot thrift.TProtocol) error { if c := p.CountSetFieldsSlaPolicy(); c != 1 { return fmt.Errorf("%T write union: exactly one field must be set (%d set).", p, c) } - if err := oprot.WriteStructBegin("SlaPolicy"); err != nil { + if err := oprot.WriteStructBegin(ctx, "SlaPolicy"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } - if err := p.writeField2(oprot); err != nil { return err } - if err := p.writeField3(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *SlaPolicy) writeField1(oprot thrift.TProtocol) (err error) { +func (p *SlaPolicy) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetPercentageSlaPolicy() { - if err := oprot.WriteFieldBegin("percentageSlaPolicy", thrift.STRUCT, 1); err != nil { + if err := oprot.WriteFieldBegin(ctx, "percentageSlaPolicy", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:percentageSlaPolicy: ", p), err) } - if err := p.PercentageSlaPolicy.Write(oprot); err != nil { + if err := p.PercentageSlaPolicy.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.PercentageSlaPolicy), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:percentageSlaPolicy: ", p), err) } } return err } -func (p *SlaPolicy) writeField2(oprot thrift.TProtocol) (err error) { +func (p *SlaPolicy) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetCountSlaPolicy() { - if err := oprot.WriteFieldBegin("countSlaPolicy", thrift.STRUCT, 2); err != nil { + if err := oprot.WriteFieldBegin(ctx, "countSlaPolicy", thrift.STRUCT, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:countSlaPolicy: ", p), err) } - if err := p.CountSlaPolicy.Write(oprot); err != nil { + if err := p.CountSlaPolicy.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.CountSlaPolicy), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:countSlaPolicy: ", p), err) } } return err } -func (p *SlaPolicy) writeField3(oprot thrift.TProtocol) (err error) { +func (p *SlaPolicy) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetCoordinatorSlaPolicy() { - if err := oprot.WriteFieldBegin("coordinatorSlaPolicy", thrift.STRUCT, 3); err != nil { + if err := oprot.WriteFieldBegin(ctx, "coordinatorSlaPolicy", thrift.STRUCT, 3); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:coordinatorSlaPolicy: ", p), err) } - if err := p.CoordinatorSlaPolicy.Write(oprot); err != nil { + if err := p.CoordinatorSlaPolicy.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.CoordinatorSlaPolicy), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 3:coordinatorSlaPolicy: ", p), err) } } return err } +func (p *SlaPolicy) Equals(other *SlaPolicy) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if !p.PercentageSlaPolicy.Equals(other.PercentageSlaPolicy) { return false } + if !p.CountSlaPolicy.Equals(other.CountSlaPolicy) { return false } + if !p.CoordinatorSlaPolicy.Equals(other.CoordinatorSlaPolicy) { return false } + return true +} + func (p *SlaPolicy) String() string { if p == nil { return "" @@ -5308,14 +5720,14 @@ func (p *TaskConfig) IsSetContainer() bool { return p.Container != nil } -func (p *TaskConfig) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *TaskConfig) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -5323,207 +5735,207 @@ func (p *TaskConfig) Read(iprot thrift.TProtocol) error { switch fieldId { case 28: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField28(iprot); err != nil { + if err := p.ReadField28(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 17: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField17(iprot); err != nil { + if err := p.ReadField17(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 7: if fieldTypeId == thrift.BOOL { - if err := p.ReadField7(iprot); err != nil { + if err := p.ReadField7(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 11: if fieldTypeId == thrift.I32 { - if err := p.ReadField11(iprot); err != nil { + if err := p.ReadField11(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 13: if fieldTypeId == thrift.I32 { - if err := p.ReadField13(iprot); err != nil { + if err := p.ReadField13(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 18: if fieldTypeId == thrift.BOOL { - if err := p.ReadField18(iprot); err != nil { + if err := p.ReadField18(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 30: if fieldTypeId == thrift.STRING { - if err := p.ReadField30(iprot); err != nil { + if err := p.ReadField30(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 32: if fieldTypeId == thrift.SET { - if err := p.ReadField32(iprot); err != nil { + if err := p.ReadField32(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 20: if fieldTypeId == thrift.SET { - if err := p.ReadField20(iprot); err != nil { + if err := p.ReadField20(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 33: if fieldTypeId == thrift.SET { - if err := p.ReadField33(iprot); err != nil { + if err := p.ReadField33(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 22: if fieldTypeId == thrift.MAP { - if err := p.ReadField22(iprot); err != nil { + if err := p.ReadField22(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 23: if fieldTypeId == thrift.STRING { - if err := p.ReadField23(iprot); err != nil { + if err := p.ReadField23(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 25: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField25(iprot); err != nil { + if err := p.ReadField25(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 27: if fieldTypeId == thrift.SET { - if err := p.ReadField27(iprot); err != nil { + if err := p.ReadField27(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 34: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField34(iprot); err != nil { + if err := p.ReadField34(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 35: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField35(iprot); err != nil { + if err := p.ReadField35(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 29: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField29(iprot); err != nil { + if err := p.ReadField29(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *TaskConfig) ReadField28(iprot thrift.TProtocol) error { +func (p *TaskConfig) ReadField28(ctx context.Context, iprot thrift.TProtocol) error { p.Job = &JobKey{} - if err := p.Job.Read(iprot); err != nil { + if err := p.Job.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Job), err) } return nil } -func (p *TaskConfig) ReadField17(iprot thrift.TProtocol) error { +func (p *TaskConfig) ReadField17(ctx context.Context, iprot thrift.TProtocol) error { p.Owner = &Identity{} - if err := p.Owner.Read(iprot); err != nil { + if err := p.Owner.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Owner), err) } return nil } -func (p *TaskConfig) ReadField7(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBool(); err != nil { +func (p *TaskConfig) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBool(ctx); err != nil { return thrift.PrependError("error reading field 7: ", err) } else { p.IsService = v @@ -5531,8 +5943,8 @@ func (p *TaskConfig) ReadField7(iprot thrift.TProtocol) error { return nil } -func (p *TaskConfig) ReadField11(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { +func (p *TaskConfig) ReadField11(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { return thrift.PrependError("error reading field 11: ", err) } else { p.Priority = v @@ -5540,8 +5952,8 @@ func (p *TaskConfig) ReadField11(iprot thrift.TProtocol) error { return nil } -func (p *TaskConfig) ReadField13(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { +func (p *TaskConfig) ReadField13(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { return thrift.PrependError("error reading field 13: ", err) } else { p.MaxTaskFailures = v @@ -5549,8 +5961,8 @@ func (p *TaskConfig) ReadField13(iprot thrift.TProtocol) error { return nil } -func (p *TaskConfig) ReadField18(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBool(); err != nil { +func (p *TaskConfig) ReadField18(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBool(ctx); err != nil { return thrift.PrependError("error reading field 18: ", err) } else { p.Production = &v @@ -5558,8 +5970,8 @@ func (p *TaskConfig) ReadField18(iprot thrift.TProtocol) error { return nil } -func (p *TaskConfig) ReadField30(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { +func (p *TaskConfig) ReadField30(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 30: ", err) } else { p.Tier = &v @@ -5567,96 +5979,96 @@ func (p *TaskConfig) ReadField30(iprot thrift.TProtocol) error { return nil } -func (p *TaskConfig) ReadField32(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin() +func (p *TaskConfig) ReadField32(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin(ctx) if err != nil { return thrift.PrependError("error reading set begin: ", err) } tSet := make([]*Resource, 0, size) p.Resources = tSet for i := 0; i < size; i ++ { - _elem5 := &Resource{} - if err := _elem5.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem5), err) + _elem10 := &Resource{} + if err := _elem10.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem10), err) } - p.Resources = append(p.Resources, _elem5) + p.Resources = append(p.Resources, _elem10) } - if err := iprot.ReadSetEnd(); err != nil { + if err := iprot.ReadSetEnd(ctx); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *TaskConfig) ReadField20(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin() +func (p *TaskConfig) ReadField20(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin(ctx) if err != nil { return thrift.PrependError("error reading set begin: ", err) } tSet := make([]*Constraint, 0, size) p.Constraints = tSet for i := 0; i < size; i ++ { - _elem6 := &Constraint{} - if err := _elem6.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem6), err) + _elem11 := &Constraint{} + if err := _elem11.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem11), err) } - p.Constraints = append(p.Constraints, _elem6) + p.Constraints = append(p.Constraints, _elem11) } - if err := iprot.ReadSetEnd(); err != nil { + if err := iprot.ReadSetEnd(ctx); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *TaskConfig) ReadField33(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin() +func (p *TaskConfig) ReadField33(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin(ctx) if err != nil { return thrift.PrependError("error reading set begin: ", err) } tSet := make([]*MesosFetcherURI, 0, size) p.MesosFetcherUris = tSet for i := 0; i < size; i ++ { - _elem7 := &MesosFetcherURI{} - if err := _elem7.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem7), err) + _elem12 := &MesosFetcherURI{} + if err := _elem12.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem12), err) } - p.MesosFetcherUris = append(p.MesosFetcherUris, _elem7) + p.MesosFetcherUris = append(p.MesosFetcherUris, _elem12) } - if err := iprot.ReadSetEnd(); err != nil { + if err := iprot.ReadSetEnd(ctx); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *TaskConfig) ReadField22(iprot thrift.TProtocol) error { - _, _, size, err := iprot.ReadMapBegin() +func (p *TaskConfig) ReadField22(ctx context.Context, iprot thrift.TProtocol) error { + _, _, size, err := iprot.ReadMapBegin(ctx) if err != nil { return thrift.PrependError("error reading map begin: ", err) } tMap := make(map[string]string, size) p.TaskLinks = tMap for i := 0; i < size; i ++ { -var _key8 string - if v, err := iprot.ReadString(); err != nil { +var _key13 string + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _key8 = v + _key13 = v } -var _val9 string - if v, err := iprot.ReadString(); err != nil { +var _val14 string + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _val9 = v + _val14 = v } - p.TaskLinks[_key8] = _val9 + p.TaskLinks[_key13] = _val14 } - if err := iprot.ReadMapEnd(); err != nil { + if err := iprot.ReadMapEnd(ctx); err != nil { return thrift.PrependError("error reading map end: ", err) } return nil } -func (p *TaskConfig) ReadField23(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { +func (p *TaskConfig) ReadField23(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 23: ", err) } else { p.ContactEmail = &v @@ -5664,355 +6076,428 @@ func (p *TaskConfig) ReadField23(iprot thrift.TProtocol) error { return nil } -func (p *TaskConfig) ReadField25(iprot thrift.TProtocol) error { +func (p *TaskConfig) ReadField25(ctx context.Context, iprot thrift.TProtocol) error { p.ExecutorConfig = &ExecutorConfig{} - if err := p.ExecutorConfig.Read(iprot); err != nil { + if err := p.ExecutorConfig.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.ExecutorConfig), err) } return nil } -func (p *TaskConfig) ReadField27(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin() +func (p *TaskConfig) ReadField27(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin(ctx) if err != nil { return thrift.PrependError("error reading set begin: ", err) } tSet := make([]*Metadata, 0, size) p.Metadata = tSet for i := 0; i < size; i ++ { - _elem10 := &Metadata{} - if err := _elem10.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem10), err) + _elem15 := &Metadata{} + if err := _elem15.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem15), err) } - p.Metadata = append(p.Metadata, _elem10) + p.Metadata = append(p.Metadata, _elem15) } - if err := iprot.ReadSetEnd(); err != nil { + if err := iprot.ReadSetEnd(ctx); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *TaskConfig) ReadField34(iprot thrift.TProtocol) error { +func (p *TaskConfig) ReadField34(ctx context.Context, iprot thrift.TProtocol) error { p.PartitionPolicy = &PartitionPolicy{} - if err := p.PartitionPolicy.Read(iprot); err != nil { + if err := p.PartitionPolicy.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.PartitionPolicy), err) } return nil } -func (p *TaskConfig) ReadField35(iprot thrift.TProtocol) error { +func (p *TaskConfig) ReadField35(ctx context.Context, iprot thrift.TProtocol) error { p.SlaPolicy = &SlaPolicy{} - if err := p.SlaPolicy.Read(iprot); err != nil { + if err := p.SlaPolicy.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.SlaPolicy), err) } return nil } -func (p *TaskConfig) ReadField29(iprot thrift.TProtocol) error { +func (p *TaskConfig) ReadField29(ctx context.Context, iprot thrift.TProtocol) error { p.Container = &Container{} - if err := p.Container.Read(iprot); err != nil { + if err := p.Container.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Container), err) } return nil } -func (p *TaskConfig) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TaskConfig"); err != nil { +func (p *TaskConfig) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TaskConfig"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField7(oprot); err != nil { return err } - if err := p.writeField11(oprot); err != nil { return err } - if err := p.writeField13(oprot); err != nil { return err } - if err := p.writeField17(oprot); err != nil { return err } - if err := p.writeField18(oprot); err != nil { return err } - if err := p.writeField20(oprot); err != nil { return err } - if err := p.writeField22(oprot); err != nil { return err } - if err := p.writeField23(oprot); err != nil { return err } - if err := p.writeField25(oprot); err != nil { return err } - if err := p.writeField27(oprot); err != nil { return err } - if err := p.writeField28(oprot); err != nil { return err } - if err := p.writeField29(oprot); err != nil { return err } - if err := p.writeField30(oprot); err != nil { return err } - if err := p.writeField32(oprot); err != nil { return err } - if err := p.writeField33(oprot); err != nil { return err } - if err := p.writeField34(oprot); err != nil { return err } - if err := p.writeField35(oprot); err != nil { return err } - } - if err := oprot.WriteFieldStop(); err != nil { + if err := p.writeField7(ctx, oprot); err != nil { return err } + if err := p.writeField11(ctx, oprot); err != nil { return err } + if err := p.writeField13(ctx, oprot); err != nil { return err } + if err := p.writeField17(ctx, oprot); err != nil { return err } + if err := p.writeField18(ctx, oprot); err != nil { return err } + if err := p.writeField20(ctx, oprot); err != nil { return err } + if err := p.writeField22(ctx, oprot); err != nil { return err } + if err := p.writeField23(ctx, oprot); err != nil { return err } + if err := p.writeField25(ctx, oprot); err != nil { return err } + if err := p.writeField27(ctx, oprot); err != nil { return err } + if err := p.writeField28(ctx, oprot); err != nil { return err } + if err := p.writeField29(ctx, oprot); err != nil { return err } + if err := p.writeField30(ctx, oprot); err != nil { return err } + if err := p.writeField32(ctx, oprot); err != nil { return err } + if err := p.writeField33(ctx, oprot); err != nil { return err } + if err := p.writeField34(ctx, oprot); err != nil { return err } + if err := p.writeField35(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *TaskConfig) writeField7(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("isService", thrift.BOOL, 7); err != nil { +func (p *TaskConfig) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "isService", thrift.BOOL, 7); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:isService: ", p), err) } - if err := oprot.WriteBool(bool(p.IsService)); err != nil { + if err := oprot.WriteBool(ctx, bool(p.IsService)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.isService (7) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 7:isService: ", p), err) } return err } -func (p *TaskConfig) writeField11(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("priority", thrift.I32, 11); err != nil { +func (p *TaskConfig) writeField11(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "priority", thrift.I32, 11); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 11:priority: ", p), err) } - if err := oprot.WriteI32(int32(p.Priority)); err != nil { + if err := oprot.WriteI32(ctx, int32(p.Priority)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.priority (11) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 11:priority: ", p), err) } return err } -func (p *TaskConfig) writeField13(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("maxTaskFailures", thrift.I32, 13); err != nil { +func (p *TaskConfig) writeField13(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "maxTaskFailures", thrift.I32, 13); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 13:maxTaskFailures: ", p), err) } - if err := oprot.WriteI32(int32(p.MaxTaskFailures)); err != nil { + if err := oprot.WriteI32(ctx, int32(p.MaxTaskFailures)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.maxTaskFailures (13) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 13:maxTaskFailures: ", p), err) } return err } -func (p *TaskConfig) writeField17(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("owner", thrift.STRUCT, 17); err != nil { +func (p *TaskConfig) writeField17(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "owner", thrift.STRUCT, 17); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 17:owner: ", p), err) } - if err := p.Owner.Write(oprot); err != nil { + if err := p.Owner.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Owner), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 17:owner: ", p), err) } return err } -func (p *TaskConfig) writeField18(oprot thrift.TProtocol) (err error) { +func (p *TaskConfig) writeField18(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetProduction() { - if err := oprot.WriteFieldBegin("production", thrift.BOOL, 18); err != nil { + if err := oprot.WriteFieldBegin(ctx, "production", thrift.BOOL, 18); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 18:production: ", p), err) } - if err := oprot.WriteBool(bool(*p.Production)); err != nil { + if err := oprot.WriteBool(ctx, bool(*p.Production)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.production (18) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 18:production: ", p), err) } } return err } -func (p *TaskConfig) writeField20(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("constraints", thrift.SET, 20); err != nil { +func (p *TaskConfig) writeField20(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "constraints", thrift.SET, 20); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 20:constraints: ", p), err) } - if err := oprot.WriteSetBegin(thrift.STRUCT, len(p.Constraints)); err != nil { + if err := oprot.WriteSetBegin(ctx, thrift.STRUCT, len(p.Constraints)); err != nil { return thrift.PrependError("error writing set begin: ", err) } for i := 0; i" @@ -6035,14 +6520,14 @@ func NewResourceAggregate() *ResourceAggregate { func (p *ResourceAggregate) GetResources() []*Resource { return p.Resources } -func (p *ResourceAggregate) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *ResourceAggregate) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -6050,88 +6535,105 @@ func (p *ResourceAggregate) Read(iprot thrift.TProtocol) error { switch fieldId { case 4: if fieldTypeId == thrift.SET { - if err := p.ReadField4(iprot); err != nil { + if err := p.ReadField4(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ResourceAggregate) ReadField4(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin() +func (p *ResourceAggregate) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin(ctx) if err != nil { return thrift.PrependError("error reading set begin: ", err) } tSet := make([]*Resource, 0, size) p.Resources = tSet for i := 0; i < size; i ++ { - _elem11 := &Resource{} - if err := _elem11.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem11), err) + _elem21 := &Resource{} + if err := _elem21.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem21), err) } - p.Resources = append(p.Resources, _elem11) + p.Resources = append(p.Resources, _elem21) } - if err := iprot.ReadSetEnd(); err != nil { + if err := iprot.ReadSetEnd(ctx); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *ResourceAggregate) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("ResourceAggregate"); err != nil { +func (p *ResourceAggregate) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "ResourceAggregate"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField4(oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ResourceAggregate) writeField4(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("resources", thrift.SET, 4); err != nil { +func (p *ResourceAggregate) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "resources", thrift.SET, 4); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:resources: ", p), err) } - if err := oprot.WriteSetBegin(thrift.STRUCT, len(p.Resources)); err != nil { + if err := oprot.WriteSetBegin(ctx, thrift.STRUCT, len(p.Resources)); err != nil { return thrift.PrependError("error writing set begin: ", err) } for i := 0; i" @@ -6216,14 +6718,14 @@ func (p *JobConfiguration) IsSetTaskConfig() bool { return p.TaskConfig != nil } -func (p *JobConfiguration) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *JobConfiguration) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -6231,97 +6733,97 @@ func (p *JobConfiguration) Read(iprot thrift.TProtocol) error { switch fieldId { case 9: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField9(iprot); err != nil { + if err := p.ReadField9(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 7: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField7(iprot); err != nil { + if err := p.ReadField7(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 4: if fieldTypeId == thrift.STRING { - if err := p.ReadField4(iprot); err != nil { + if err := p.ReadField4(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 5: if fieldTypeId == thrift.I32 { - if err := p.ReadField5(iprot); err != nil { + if err := p.ReadField5(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 6: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField6(iprot); err != nil { + if err := p.ReadField6(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 8: if fieldTypeId == thrift.I32 { - if err := p.ReadField8(iprot); err != nil { + if err := p.ReadField8(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *JobConfiguration) ReadField9(iprot thrift.TProtocol) error { +func (p *JobConfiguration) ReadField9(ctx context.Context, iprot thrift.TProtocol) error { p.Key = &JobKey{} - if err := p.Key.Read(iprot); err != nil { + if err := p.Key.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Key), err) } return nil } -func (p *JobConfiguration) ReadField7(iprot thrift.TProtocol) error { +func (p *JobConfiguration) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { p.Owner = &Identity{} - if err := p.Owner.Read(iprot); err != nil { + if err := p.Owner.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Owner), err) } return nil } -func (p *JobConfiguration) ReadField4(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { +func (p *JobConfiguration) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 4: ", err) } else { p.CronSchedule = &v @@ -6329,8 +6831,8 @@ func (p *JobConfiguration) ReadField4(iprot thrift.TProtocol) error { return nil } -func (p *JobConfiguration) ReadField5(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { +func (p *JobConfiguration) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { return thrift.PrependError("error reading field 5: ", err) } else { temp := CronCollisionPolicy(v) @@ -6339,16 +6841,16 @@ func (p *JobConfiguration) ReadField5(iprot thrift.TProtocol) error { return nil } -func (p *JobConfiguration) ReadField6(iprot thrift.TProtocol) error { +func (p *JobConfiguration) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { p.TaskConfig = &TaskConfig{} - if err := p.TaskConfig.Read(iprot); err != nil { + if err := p.TaskConfig.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.TaskConfig), err) } return nil } -func (p *JobConfiguration) ReadField8(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { +func (p *JobConfiguration) ReadField8(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { return thrift.PrependError("error reading field 8: ", err) } else { p.InstanceCount = v @@ -6356,89 +6858,109 @@ func (p *JobConfiguration) ReadField8(iprot thrift.TProtocol) error { return nil } -func (p *JobConfiguration) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("JobConfiguration"); err != nil { +func (p *JobConfiguration) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "JobConfiguration"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField4(oprot); err != nil { return err } - if err := p.writeField5(oprot); err != nil { return err } - if err := p.writeField6(oprot); err != nil { return err } - if err := p.writeField7(oprot); err != nil { return err } - if err := p.writeField8(oprot); err != nil { return err } - if err := p.writeField9(oprot); err != nil { return err } - } - if err := oprot.WriteFieldStop(); err != nil { + if err := p.writeField4(ctx, oprot); err != nil { return err } + if err := p.writeField5(ctx, oprot); err != nil { return err } + if err := p.writeField6(ctx, oprot); err != nil { return err } + if err := p.writeField7(ctx, oprot); err != nil { return err } + if err := p.writeField8(ctx, oprot); err != nil { return err } + if err := p.writeField9(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *JobConfiguration) writeField4(oprot thrift.TProtocol) (err error) { +func (p *JobConfiguration) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetCronSchedule() { - if err := oprot.WriteFieldBegin("cronSchedule", thrift.STRING, 4); err != nil { + if err := oprot.WriteFieldBegin(ctx, "cronSchedule", thrift.STRING, 4); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:cronSchedule: ", p), err) } - if err := oprot.WriteString(string(*p.CronSchedule)); err != nil { + if err := oprot.WriteString(ctx, string(*p.CronSchedule)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.cronSchedule (4) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 4:cronSchedule: ", p), err) } } return err } -func (p *JobConfiguration) writeField5(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("cronCollisionPolicy", thrift.I32, 5); err != nil { +func (p *JobConfiguration) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "cronCollisionPolicy", thrift.I32, 5); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:cronCollisionPolicy: ", p), err) } - if err := oprot.WriteI32(int32(p.CronCollisionPolicy)); err != nil { + if err := oprot.WriteI32(ctx, int32(p.CronCollisionPolicy)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.cronCollisionPolicy (5) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 5:cronCollisionPolicy: ", p), err) } return err } -func (p *JobConfiguration) writeField6(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("taskConfig", thrift.STRUCT, 6); err != nil { +func (p *JobConfiguration) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "taskConfig", thrift.STRUCT, 6); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:taskConfig: ", p), err) } - if err := p.TaskConfig.Write(oprot); err != nil { + if err := p.TaskConfig.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.TaskConfig), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 6:taskConfig: ", p), err) } return err } -func (p *JobConfiguration) writeField7(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("owner", thrift.STRUCT, 7); err != nil { +func (p *JobConfiguration) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "owner", thrift.STRUCT, 7); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:owner: ", p), err) } - if err := p.Owner.Write(oprot); err != nil { + if err := p.Owner.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Owner), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 7:owner: ", p), err) } return err } -func (p *JobConfiguration) writeField8(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("instanceCount", thrift.I32, 8); err != nil { +func (p *JobConfiguration) writeField8(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "instanceCount", thrift.I32, 8); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:instanceCount: ", p), err) } - if err := oprot.WriteI32(int32(p.InstanceCount)); err != nil { + if err := oprot.WriteI32(ctx, int32(p.InstanceCount)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.instanceCount (8) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 8:instanceCount: ", p), err) } return err } -func (p *JobConfiguration) writeField9(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("key", thrift.STRUCT, 9); err != nil { +func (p *JobConfiguration) writeField9(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "key", thrift.STRUCT, 9); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:key: ", p), err) } - if err := p.Key.Write(oprot); err != nil { + if err := p.Key.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Key), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 9:key: ", p), err) } return err } +func (p *JobConfiguration) Equals(other *JobConfiguration) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.CronSchedule != other.CronSchedule { + if p.CronSchedule == nil || other.CronSchedule == nil { + return false + } + if (*p.CronSchedule) != (*other.CronSchedule) { return false } + } + if p.CronCollisionPolicy != other.CronCollisionPolicy { return false } + if !p.TaskConfig.Equals(other.TaskConfig) { return false } + if !p.Owner.Equals(other.Owner) { return false } + if p.InstanceCount != other.InstanceCount { return false } + if !p.Key.Equals(other.Key) { return false } + return true +} + func (p *JobConfiguration) String() string { if p == nil { return "" @@ -6478,14 +7000,14 @@ func (p *JobStats) GetFailedTaskCount() int32 { func (p *JobStats) GetPendingTaskCount() int32 { return p.PendingTaskCount } -func (p *JobStats) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *JobStats) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -6493,61 +7015,61 @@ func (p *JobStats) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.I32 { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.I32 { - if err := p.ReadField2(iprot); err != nil { + if err := p.ReadField2(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 3: if fieldTypeId == thrift.I32 { - if err := p.ReadField3(iprot); err != nil { + if err := p.ReadField3(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 4: if fieldTypeId == thrift.I32 { - if err := p.ReadField4(iprot); err != nil { + if err := p.ReadField4(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *JobStats) ReadField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { +func (p *JobStats) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.ActiveTaskCount = v @@ -6555,8 +7077,8 @@ func (p *JobStats) ReadField1(iprot thrift.TProtocol) error { return nil } -func (p *JobStats) ReadField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { +func (p *JobStats) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { p.FinishedTaskCount = v @@ -6564,8 +7086,8 @@ func (p *JobStats) ReadField2(iprot thrift.TProtocol) error { return nil } -func (p *JobStats) ReadField3(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { +func (p *JobStats) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { return thrift.PrependError("error reading field 3: ", err) } else { p.FailedTaskCount = v @@ -6573,8 +7095,8 @@ func (p *JobStats) ReadField3(iprot thrift.TProtocol) error { return nil } -func (p *JobStats) ReadField4(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { +func (p *JobStats) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { return thrift.PrependError("error reading field 4: ", err) } else { p.PendingTaskCount = v @@ -6582,62 +7104,75 @@ func (p *JobStats) ReadField4(iprot thrift.TProtocol) error { return nil } -func (p *JobStats) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("JobStats"); err != nil { +func (p *JobStats) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "JobStats"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } - if err := p.writeField2(oprot); err != nil { return err } - if err := p.writeField3(oprot); err != nil { return err } - if err := p.writeField4(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *JobStats) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("activeTaskCount", thrift.I32, 1); err != nil { +func (p *JobStats) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "activeTaskCount", thrift.I32, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:activeTaskCount: ", p), err) } - if err := oprot.WriteI32(int32(p.ActiveTaskCount)); err != nil { + if err := oprot.WriteI32(ctx, int32(p.ActiveTaskCount)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.activeTaskCount (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:activeTaskCount: ", p), err) } return err } -func (p *JobStats) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("finishedTaskCount", thrift.I32, 2); err != nil { +func (p *JobStats) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "finishedTaskCount", thrift.I32, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:finishedTaskCount: ", p), err) } - if err := oprot.WriteI32(int32(p.FinishedTaskCount)); err != nil { + if err := oprot.WriteI32(ctx, int32(p.FinishedTaskCount)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.finishedTaskCount (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:finishedTaskCount: ", p), err) } return err } -func (p *JobStats) writeField3(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("failedTaskCount", thrift.I32, 3); err != nil { +func (p *JobStats) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "failedTaskCount", thrift.I32, 3); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:failedTaskCount: ", p), err) } - if err := oprot.WriteI32(int32(p.FailedTaskCount)); err != nil { + if err := oprot.WriteI32(ctx, int32(p.FailedTaskCount)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.failedTaskCount (3) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 3:failedTaskCount: ", p), err) } return err } -func (p *JobStats) writeField4(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("pendingTaskCount", thrift.I32, 4); err != nil { +func (p *JobStats) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "pendingTaskCount", thrift.I32, 4); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:pendingTaskCount: ", p), err) } - if err := oprot.WriteI32(int32(p.PendingTaskCount)); err != nil { + if err := oprot.WriteI32(ctx, int32(p.PendingTaskCount)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.pendingTaskCount (4) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 4:pendingTaskCount: ", p), err) } return err } +func (p *JobStats) Equals(other *JobStats) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.ActiveTaskCount != other.ActiveTaskCount { return false } + if p.FinishedTaskCount != other.FinishedTaskCount { return false } + if p.FailedTaskCount != other.FailedTaskCount { return false } + if p.PendingTaskCount != other.PendingTaskCount { return false } + return true +} + func (p *JobStats) String() string { if p == nil { return "" @@ -6692,14 +7227,14 @@ func (p *JobSummary) IsSetNextCronRunMs() bool { return p.NextCronRunMs != nil } -func (p *JobSummary) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *JobSummary) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -6707,67 +7242,67 @@ func (p *JobSummary) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField2(iprot); err != nil { + if err := p.ReadField2(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 3: if fieldTypeId == thrift.I64 { - if err := p.ReadField3(iprot); err != nil { + if err := p.ReadField3(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *JobSummary) ReadField1(iprot thrift.TProtocol) error { +func (p *JobSummary) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { p.Job = &JobConfiguration{} - if err := p.Job.Read(iprot); err != nil { + if err := p.Job.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Job), err) } return nil } -func (p *JobSummary) ReadField2(iprot thrift.TProtocol) error { +func (p *JobSummary) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { p.Stats = &JobStats{} - if err := p.Stats.Read(iprot); err != nil { + if err := p.Stats.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Stats), err) } return nil } -func (p *JobSummary) ReadField3(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI64(); err != nil { +func (p *JobSummary) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { return thrift.PrependError("error reading field 3: ", err) } else { p.NextCronRunMs = &v @@ -6775,55 +7310,72 @@ func (p *JobSummary) ReadField3(iprot thrift.TProtocol) error { return nil } -func (p *JobSummary) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("JobSummary"); err != nil { +func (p *JobSummary) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "JobSummary"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } - if err := p.writeField2(oprot); err != nil { return err } - if err := p.writeField3(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *JobSummary) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("job", thrift.STRUCT, 1); err != nil { +func (p *JobSummary) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "job", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:job: ", p), err) } - if err := p.Job.Write(oprot); err != nil { + if err := p.Job.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Job), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:job: ", p), err) } return err } -func (p *JobSummary) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("stats", thrift.STRUCT, 2); err != nil { +func (p *JobSummary) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "stats", thrift.STRUCT, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:stats: ", p), err) } - if err := p.Stats.Write(oprot); err != nil { + if err := p.Stats.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Stats), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:stats: ", p), err) } return err } -func (p *JobSummary) writeField3(oprot thrift.TProtocol) (err error) { +func (p *JobSummary) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetNextCronRunMs() { - if err := oprot.WriteFieldBegin("nextCronRunMs", thrift.I64, 3); err != nil { + if err := oprot.WriteFieldBegin(ctx, "nextCronRunMs", thrift.I64, 3); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:nextCronRunMs: ", p), err) } - if err := oprot.WriteI64(int64(*p.NextCronRunMs)); err != nil { + if err := oprot.WriteI64(ctx, int64(*p.NextCronRunMs)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.nextCronRunMs (3) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 3:nextCronRunMs: ", p), err) } } return err } +func (p *JobSummary) Equals(other *JobSummary) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if !p.Job.Equals(other.Job) { return false } + if !p.Stats.Equals(other.Stats) { return false } + if p.NextCronRunMs != other.NextCronRunMs { + if p.NextCronRunMs == nil || other.NextCronRunMs == nil { + return false + } + if (*p.NextCronRunMs) != (*other.NextCronRunMs) { return false } + } + return true +} + func (p *JobSummary) String() string { if p == nil { return "" @@ -6853,14 +7405,14 @@ func (p *Range) GetFirst() int32 { func (p *Range) GetLast() int32 { return p.Last } -func (p *Range) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *Range) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -6868,41 +7420,41 @@ func (p *Range) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.I32 { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.I32 { - if err := p.ReadField2(iprot); err != nil { + if err := p.ReadField2(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *Range) ReadField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { +func (p *Range) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.First = v @@ -6910,8 +7462,8 @@ func (p *Range) ReadField1(iprot thrift.TProtocol) error { return nil } -func (p *Range) ReadField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { +func (p *Range) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { p.Last = v @@ -6919,40 +7471,51 @@ func (p *Range) ReadField2(iprot thrift.TProtocol) error { return nil } -func (p *Range) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("Range"); err != nil { +func (p *Range) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "Range"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } - if err := p.writeField2(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *Range) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("first", thrift.I32, 1); err != nil { +func (p *Range) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "first", thrift.I32, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:first: ", p), err) } - if err := oprot.WriteI32(int32(p.First)); err != nil { + if err := oprot.WriteI32(ctx, int32(p.First)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.first (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:first: ", p), err) } return err } -func (p *Range) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("last", thrift.I32, 2); err != nil { +func (p *Range) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "last", thrift.I32, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:last: ", p), err) } - if err := oprot.WriteI32(int32(p.Last)); err != nil { + if err := oprot.WriteI32(ctx, int32(p.Last)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.last (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:last: ", p), err) } return err } +func (p *Range) Equals(other *Range) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.First != other.First { return false } + if p.Last != other.Last { return false } + return true +} + func (p *Range) String() string { if p == nil { return "" @@ -6988,14 +7551,14 @@ func (p *ConfigGroup) IsSetConfig() bool { return p.Config != nil } -func (p *ConfigGroup) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *ConfigGroup) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -7003,118 +7566,136 @@ func (p *ConfigGroup) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 3: if fieldTypeId == thrift.SET { - if err := p.ReadField3(iprot); err != nil { + if err := p.ReadField3(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ConfigGroup) ReadField1(iprot thrift.TProtocol) error { +func (p *ConfigGroup) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { p.Config = &TaskConfig{} - if err := p.Config.Read(iprot); err != nil { + if err := p.Config.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Config), err) } return nil } -func (p *ConfigGroup) ReadField3(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin() +func (p *ConfigGroup) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin(ctx) if err != nil { return thrift.PrependError("error reading set begin: ", err) } tSet := make([]*Range, 0, size) p.Instances = tSet for i := 0; i < size; i ++ { - _elem12 := &Range{} - if err := _elem12.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem12), err) + _elem23 := &Range{} + if err := _elem23.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem23), err) } - p.Instances = append(p.Instances, _elem12) + p.Instances = append(p.Instances, _elem23) } - if err := iprot.ReadSetEnd(); err != nil { + if err := iprot.ReadSetEnd(ctx); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *ConfigGroup) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("ConfigGroup"); err != nil { +func (p *ConfigGroup) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "ConfigGroup"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } - if err := p.writeField3(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ConfigGroup) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("config", thrift.STRUCT, 1); err != nil { +func (p *ConfigGroup) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "config", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:config: ", p), err) } - if err := p.Config.Write(oprot); err != nil { + if err := p.Config.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Config), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:config: ", p), err) } return err } -func (p *ConfigGroup) writeField3(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("instances", thrift.SET, 3); err != nil { +func (p *ConfigGroup) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "instances", thrift.SET, 3); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:instances: ", p), err) } - if err := oprot.WriteSetBegin(thrift.STRUCT, len(p.Instances)); err != nil { + if err := oprot.WriteSetBegin(ctx, thrift.STRUCT, len(p.Instances)); err != nil { return thrift.PrependError("error writing set begin: ", err) } for i := 0; i" @@ -7149,14 +7730,14 @@ func (p *ConfigSummary) IsSetKey() bool { return p.Key != nil } -func (p *ConfigSummary) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *ConfigSummary) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -7164,118 +7745,136 @@ func (p *ConfigSummary) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.SET { - if err := p.ReadField2(iprot); err != nil { + if err := p.ReadField2(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ConfigSummary) ReadField1(iprot thrift.TProtocol) error { +func (p *ConfigSummary) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { p.Key = &JobKey{} - if err := p.Key.Read(iprot); err != nil { + if err := p.Key.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Key), err) } return nil } -func (p *ConfigSummary) ReadField2(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin() +func (p *ConfigSummary) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin(ctx) if err != nil { return thrift.PrependError("error reading set begin: ", err) } tSet := make([]*ConfigGroup, 0, size) p.Groups = tSet for i := 0; i < size; i ++ { - _elem13 := &ConfigGroup{} - if err := _elem13.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem13), err) + _elem25 := &ConfigGroup{} + if err := _elem25.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem25), err) } - p.Groups = append(p.Groups, _elem13) + p.Groups = append(p.Groups, _elem25) } - if err := iprot.ReadSetEnd(); err != nil { + if err := iprot.ReadSetEnd(ctx); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *ConfigSummary) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("ConfigSummary"); err != nil { +func (p *ConfigSummary) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "ConfigSummary"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } - if err := p.writeField2(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ConfigSummary) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("key", thrift.STRUCT, 1); err != nil { +func (p *ConfigSummary) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "key", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:key: ", p), err) } - if err := p.Key.Write(oprot); err != nil { + if err := p.Key.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Key), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:key: ", p), err) } return err } -func (p *ConfigSummary) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("groups", thrift.SET, 2); err != nil { +func (p *ConfigSummary) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "groups", thrift.SET, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:groups: ", p), err) } - if err := oprot.WriteSetBegin(thrift.STRUCT, len(p.Groups)); err != nil { + if err := oprot.WriteSetBegin(ctx, thrift.STRUCT, len(p.Groups)); err != nil { return thrift.PrependError("error writing set begin: ", err) } for i := 0; i" @@ -7305,14 +7904,14 @@ func (p *PopulateJobResult_) IsSetTaskConfig() bool { return p.TaskConfig != nil } -func (p *PopulateJobResult_) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *PopulateJobResult_) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -7320,61 +7919,71 @@ func (p *PopulateJobResult_) Read(iprot thrift.TProtocol) error { switch fieldId { case 2: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField2(iprot); err != nil { + if err := p.ReadField2(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *PopulateJobResult_) ReadField2(iprot thrift.TProtocol) error { +func (p *PopulateJobResult_) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { p.TaskConfig = &TaskConfig{} - if err := p.TaskConfig.Read(iprot); err != nil { + if err := p.TaskConfig.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.TaskConfig), err) } return nil } -func (p *PopulateJobResult_) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("PopulateJobResult"); err != nil { +func (p *PopulateJobResult_) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "PopulateJobResult"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField2(oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *PopulateJobResult_) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("taskConfig", thrift.STRUCT, 2); err != nil { +func (p *PopulateJobResult_) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "taskConfig", thrift.STRUCT, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:taskConfig: ", p), err) } - if err := p.TaskConfig.Write(oprot); err != nil { + if err := p.TaskConfig.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.TaskConfig), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:taskConfig: ", p), err) } return err } +func (p *PopulateJobResult_) Equals(other *PopulateJobResult_) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if !p.TaskConfig.Equals(other.TaskConfig) { return false } + return true +} + func (p *PopulateJobResult_) String() string { if p == nil { return "" @@ -7455,14 +8064,14 @@ func (p *GetQuotaResult_) IsSetNonProdDedicatedConsumption() bool { return p.NonProdDedicatedConsumption != nil } -func (p *GetQuotaResult_) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *GetQuotaResult_) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -7470,189 +8079,203 @@ func (p *GetQuotaResult_) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField2(iprot); err != nil { + if err := p.ReadField2(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 3: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField3(iprot); err != nil { + if err := p.ReadField3(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 4: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField4(iprot); err != nil { + if err := p.ReadField4(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 5: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField5(iprot); err != nil { + if err := p.ReadField5(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *GetQuotaResult_) ReadField1(iprot thrift.TProtocol) error { +func (p *GetQuotaResult_) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { p.Quota = &ResourceAggregate{} - if err := p.Quota.Read(iprot); err != nil { + if err := p.Quota.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Quota), err) } return nil } -func (p *GetQuotaResult_) ReadField2(iprot thrift.TProtocol) error { +func (p *GetQuotaResult_) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { p.ProdSharedConsumption = &ResourceAggregate{} - if err := p.ProdSharedConsumption.Read(iprot); err != nil { + if err := p.ProdSharedConsumption.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.ProdSharedConsumption), err) } return nil } -func (p *GetQuotaResult_) ReadField3(iprot thrift.TProtocol) error { +func (p *GetQuotaResult_) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { p.NonProdSharedConsumption = &ResourceAggregate{} - if err := p.NonProdSharedConsumption.Read(iprot); err != nil { + if err := p.NonProdSharedConsumption.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.NonProdSharedConsumption), err) } return nil } -func (p *GetQuotaResult_) ReadField4(iprot thrift.TProtocol) error { +func (p *GetQuotaResult_) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { p.ProdDedicatedConsumption = &ResourceAggregate{} - if err := p.ProdDedicatedConsumption.Read(iprot); err != nil { + if err := p.ProdDedicatedConsumption.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.ProdDedicatedConsumption), err) } return nil } -func (p *GetQuotaResult_) ReadField5(iprot thrift.TProtocol) error { +func (p *GetQuotaResult_) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { p.NonProdDedicatedConsumption = &ResourceAggregate{} - if err := p.NonProdDedicatedConsumption.Read(iprot); err != nil { + if err := p.NonProdDedicatedConsumption.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.NonProdDedicatedConsumption), err) } return nil } -func (p *GetQuotaResult_) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("GetQuotaResult"); err != nil { +func (p *GetQuotaResult_) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "GetQuotaResult"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } - if err := p.writeField2(oprot); err != nil { return err } - if err := p.writeField3(oprot); err != nil { return err } - if err := p.writeField4(oprot); err != nil { return err } - if err := p.writeField5(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } + if err := p.writeField5(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *GetQuotaResult_) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("quota", thrift.STRUCT, 1); err != nil { +func (p *GetQuotaResult_) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "quota", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:quota: ", p), err) } - if err := p.Quota.Write(oprot); err != nil { + if err := p.Quota.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Quota), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:quota: ", p), err) } return err } -func (p *GetQuotaResult_) writeField2(oprot thrift.TProtocol) (err error) { +func (p *GetQuotaResult_) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetProdSharedConsumption() { - if err := oprot.WriteFieldBegin("prodSharedConsumption", thrift.STRUCT, 2); err != nil { + if err := oprot.WriteFieldBegin(ctx, "prodSharedConsumption", thrift.STRUCT, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:prodSharedConsumption: ", p), err) } - if err := p.ProdSharedConsumption.Write(oprot); err != nil { + if err := p.ProdSharedConsumption.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.ProdSharedConsumption), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:prodSharedConsumption: ", p), err) } } return err } -func (p *GetQuotaResult_) writeField3(oprot thrift.TProtocol) (err error) { +func (p *GetQuotaResult_) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetNonProdSharedConsumption() { - if err := oprot.WriteFieldBegin("nonProdSharedConsumption", thrift.STRUCT, 3); err != nil { + if err := oprot.WriteFieldBegin(ctx, "nonProdSharedConsumption", thrift.STRUCT, 3); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:nonProdSharedConsumption: ", p), err) } - if err := p.NonProdSharedConsumption.Write(oprot); err != nil { + if err := p.NonProdSharedConsumption.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.NonProdSharedConsumption), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 3:nonProdSharedConsumption: ", p), err) } } return err } -func (p *GetQuotaResult_) writeField4(oprot thrift.TProtocol) (err error) { +func (p *GetQuotaResult_) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetProdDedicatedConsumption() { - if err := oprot.WriteFieldBegin("prodDedicatedConsumption", thrift.STRUCT, 4); err != nil { + if err := oprot.WriteFieldBegin(ctx, "prodDedicatedConsumption", thrift.STRUCT, 4); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:prodDedicatedConsumption: ", p), err) } - if err := p.ProdDedicatedConsumption.Write(oprot); err != nil { + if err := p.ProdDedicatedConsumption.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.ProdDedicatedConsumption), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 4:prodDedicatedConsumption: ", p), err) } } return err } -func (p *GetQuotaResult_) writeField5(oprot thrift.TProtocol) (err error) { +func (p *GetQuotaResult_) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetNonProdDedicatedConsumption() { - if err := oprot.WriteFieldBegin("nonProdDedicatedConsumption", thrift.STRUCT, 5); err != nil { + if err := oprot.WriteFieldBegin(ctx, "nonProdDedicatedConsumption", thrift.STRUCT, 5); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:nonProdDedicatedConsumption: ", p), err) } - if err := p.NonProdDedicatedConsumption.Write(oprot); err != nil { + if err := p.NonProdDedicatedConsumption.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.NonProdDedicatedConsumption), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 5:nonProdDedicatedConsumption: ", p), err) } } return err } +func (p *GetQuotaResult_) Equals(other *GetQuotaResult_) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if !p.Quota.Equals(other.Quota) { return false } + if !p.ProdSharedConsumption.Equals(other.ProdSharedConsumption) { return false } + if !p.NonProdSharedConsumption.Equals(other.NonProdSharedConsumption) { return false } + if !p.ProdDedicatedConsumption.Equals(other.ProdDedicatedConsumption) { return false } + if !p.NonProdDedicatedConsumption.Equals(other.NonProdDedicatedConsumption) { return false } + return true +} + func (p *GetQuotaResult_) String() string { if p == nil { return "" @@ -7708,14 +8331,14 @@ func (p *TaskEvent) IsSetScheduler() bool { return p.Scheduler != nil } -func (p *TaskEvent) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *TaskEvent) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -7723,61 +8346,61 @@ func (p *TaskEvent) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.I64 { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.I32 { - if err := p.ReadField2(iprot); err != nil { + if err := p.ReadField2(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 3: if fieldTypeId == thrift.STRING { - if err := p.ReadField3(iprot); err != nil { + if err := p.ReadField3(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 4: if fieldTypeId == thrift.STRING { - if err := p.ReadField4(iprot); err != nil { + if err := p.ReadField4(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *TaskEvent) ReadField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI64(); err != nil { +func (p *TaskEvent) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.Timestamp = v @@ -7785,8 +8408,8 @@ func (p *TaskEvent) ReadField1(iprot thrift.TProtocol) error { return nil } -func (p *TaskEvent) ReadField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { +func (p *TaskEvent) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { temp := ScheduleStatus(v) @@ -7795,8 +8418,8 @@ func (p *TaskEvent) ReadField2(iprot thrift.TProtocol) error { return nil } -func (p *TaskEvent) ReadField3(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { +func (p *TaskEvent) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 3: ", err) } else { p.Message = &v @@ -7804,8 +8427,8 @@ func (p *TaskEvent) ReadField3(iprot thrift.TProtocol) error { return nil } -func (p *TaskEvent) ReadField4(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { +func (p *TaskEvent) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 4: ", err) } else { p.Scheduler = &v @@ -7813,66 +8436,89 @@ func (p *TaskEvent) ReadField4(iprot thrift.TProtocol) error { return nil } -func (p *TaskEvent) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TaskEvent"); err != nil { +func (p *TaskEvent) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TaskEvent"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } - if err := p.writeField2(oprot); err != nil { return err } - if err := p.writeField3(oprot); err != nil { return err } - if err := p.writeField4(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *TaskEvent) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("timestamp", thrift.I64, 1); err != nil { +func (p *TaskEvent) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "timestamp", thrift.I64, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:timestamp: ", p), err) } - if err := oprot.WriteI64(int64(p.Timestamp)); err != nil { + if err := oprot.WriteI64(ctx, int64(p.Timestamp)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.timestamp (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:timestamp: ", p), err) } return err } -func (p *TaskEvent) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("status", thrift.I32, 2); err != nil { +func (p *TaskEvent) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "status", thrift.I32, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:status: ", p), err) } - if err := oprot.WriteI32(int32(p.Status)); err != nil { + if err := oprot.WriteI32(ctx, int32(p.Status)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.status (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:status: ", p), err) } return err } -func (p *TaskEvent) writeField3(oprot thrift.TProtocol) (err error) { +func (p *TaskEvent) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetMessage() { - if err := oprot.WriteFieldBegin("message", thrift.STRING, 3); err != nil { + if err := oprot.WriteFieldBegin(ctx, "message", thrift.STRING, 3); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:message: ", p), err) } - if err := oprot.WriteString(string(*p.Message)); err != nil { + if err := oprot.WriteString(ctx, string(*p.Message)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.message (3) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 3:message: ", p), err) } } return err } -func (p *TaskEvent) writeField4(oprot thrift.TProtocol) (err error) { +func (p *TaskEvent) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetScheduler() { - if err := oprot.WriteFieldBegin("scheduler", thrift.STRING, 4); err != nil { + if err := oprot.WriteFieldBegin(ctx, "scheduler", thrift.STRING, 4); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:scheduler: ", p), err) } - if err := oprot.WriteString(string(*p.Scheduler)); err != nil { + if err := oprot.WriteString(ctx, string(*p.Scheduler)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.scheduler (4) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 4:scheduler: ", p), err) } } return err } +func (p *TaskEvent) Equals(other *TaskEvent) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.Timestamp != other.Timestamp { return false } + if p.Status != other.Status { return false } + if p.Message != other.Message { + if p.Message == nil || other.Message == nil { + return false + } + if (*p.Message) != (*other.Message) { return false } + } + if p.Scheduler != other.Scheduler { + if p.Scheduler == nil || other.Scheduler == nil { + return false + } + if (*p.Scheduler) != (*other.Scheduler) { return false } + } + return true +} + func (p *TaskEvent) String() string { if p == nil { return "" @@ -7936,14 +8582,14 @@ func (p *AssignedTask) IsSetTask() bool { return p.Task != nil } -func (p *AssignedTask) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *AssignedTask) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -7951,81 +8597,81 @@ func (p *AssignedTask) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRING { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.STRING { - if err := p.ReadField2(iprot); err != nil { + if err := p.ReadField2(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 3: if fieldTypeId == thrift.STRING { - if err := p.ReadField3(iprot); err != nil { + if err := p.ReadField3(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 4: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField4(iprot); err != nil { + if err := p.ReadField4(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 5: if fieldTypeId == thrift.MAP { - if err := p.ReadField5(iprot); err != nil { + if err := p.ReadField5(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 6: if fieldTypeId == thrift.I32 { - if err := p.ReadField6(iprot); err != nil { + if err := p.ReadField6(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AssignedTask) ReadField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { +func (p *AssignedTask) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.TaskId = v @@ -8033,8 +8679,8 @@ func (p *AssignedTask) ReadField1(iprot thrift.TProtocol) error { return nil } -func (p *AssignedTask) ReadField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { +func (p *AssignedTask) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { p.SlaveId = v @@ -8042,8 +8688,8 @@ func (p *AssignedTask) ReadField2(iprot thrift.TProtocol) error { return nil } -func (p *AssignedTask) ReadField3(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { +func (p *AssignedTask) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 3: ", err) } else { p.SlaveHost = v @@ -8051,44 +8697,44 @@ func (p *AssignedTask) ReadField3(iprot thrift.TProtocol) error { return nil } -func (p *AssignedTask) ReadField4(iprot thrift.TProtocol) error { +func (p *AssignedTask) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { p.Task = &TaskConfig{} - if err := p.Task.Read(iprot); err != nil { + if err := p.Task.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Task), err) } return nil } -func (p *AssignedTask) ReadField5(iprot thrift.TProtocol) error { - _, _, size, err := iprot.ReadMapBegin() +func (p *AssignedTask) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { + _, _, size, err := iprot.ReadMapBegin(ctx) if err != nil { return thrift.PrependError("error reading map begin: ", err) } tMap := make(map[string]int32, size) p.AssignedPorts = tMap for i := 0; i < size; i ++ { -var _key14 string - if v, err := iprot.ReadString(); err != nil { +var _key27 string + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _key14 = v + _key27 = v } -var _val15 int32 - if v, err := iprot.ReadI32(); err != nil { +var _val28 int32 + if v, err := iprot.ReadI32(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _val15 = v + _val28 = v } - p.AssignedPorts[_key14] = _val15 + p.AssignedPorts[_key27] = _val28 } - if err := iprot.ReadMapEnd(); err != nil { + if err := iprot.ReadMapEnd(ctx); err != nil { return thrift.PrependError("error reading map end: ", err) } return nil } -func (p *AssignedTask) ReadField6(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { +func (p *AssignedTask) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { return thrift.PrependError("error reading field 6: ", err) } else { p.InstanceId = v @@ -8096,95 +8742,114 @@ func (p *AssignedTask) ReadField6(iprot thrift.TProtocol) error { return nil } -func (p *AssignedTask) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("AssignedTask"); err != nil { +func (p *AssignedTask) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "AssignedTask"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } - if err := p.writeField2(oprot); err != nil { return err } - if err := p.writeField3(oprot); err != nil { return err } - if err := p.writeField4(oprot); err != nil { return err } - if err := p.writeField5(oprot); err != nil { return err } - if err := p.writeField6(oprot); err != nil { return err } - } - if err := oprot.WriteFieldStop(); err != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } + if err := p.writeField5(ctx, oprot); err != nil { return err } + if err := p.writeField6(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AssignedTask) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("taskId", thrift.STRING, 1); err != nil { +func (p *AssignedTask) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "taskId", thrift.STRING, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:taskId: ", p), err) } - if err := oprot.WriteString(string(p.TaskId)); err != nil { + if err := oprot.WriteString(ctx, string(p.TaskId)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.taskId (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:taskId: ", p), err) } return err } -func (p *AssignedTask) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("slaveId", thrift.STRING, 2); err != nil { +func (p *AssignedTask) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "slaveId", thrift.STRING, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:slaveId: ", p), err) } - if err := oprot.WriteString(string(p.SlaveId)); err != nil { + if err := oprot.WriteString(ctx, string(p.SlaveId)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.slaveId (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:slaveId: ", p), err) } return err } -func (p *AssignedTask) writeField3(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("slaveHost", thrift.STRING, 3); err != nil { +func (p *AssignedTask) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "slaveHost", thrift.STRING, 3); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:slaveHost: ", p), err) } - if err := oprot.WriteString(string(p.SlaveHost)); err != nil { + if err := oprot.WriteString(ctx, string(p.SlaveHost)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.slaveHost (3) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 3:slaveHost: ", p), err) } return err } -func (p *AssignedTask) writeField4(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("task", thrift.STRUCT, 4); err != nil { +func (p *AssignedTask) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "task", thrift.STRUCT, 4); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:task: ", p), err) } - if err := p.Task.Write(oprot); err != nil { + if err := p.Task.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Task), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 4:task: ", p), err) } return err } -func (p *AssignedTask) writeField5(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("assignedPorts", thrift.MAP, 5); err != nil { +func (p *AssignedTask) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "assignedPorts", thrift.MAP, 5); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:assignedPorts: ", p), err) } - if err := oprot.WriteMapBegin(thrift.STRING, thrift.I32, len(p.AssignedPorts)); err != nil { + if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.I32, len(p.AssignedPorts)); err != nil { return thrift.PrependError("error writing map begin: ", err) } for k, v := range p.AssignedPorts { - if err := oprot.WriteString(string(k)); err != nil { + if err := oprot.WriteString(ctx, string(k)); err != nil { return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } - if err := oprot.WriteI32(int32(v)); err != nil { + if err := oprot.WriteI32(ctx, int32(v)); err != nil { return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } } - if err := oprot.WriteMapEnd(); err != nil { + if err := oprot.WriteMapEnd(ctx); err != nil { return thrift.PrependError("error writing map end: ", err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 5:assignedPorts: ", p), err) } return err } -func (p *AssignedTask) writeField6(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("instanceId", thrift.I32, 6); err != nil { +func (p *AssignedTask) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "instanceId", thrift.I32, 6); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:instanceId: ", p), err) } - if err := oprot.WriteI32(int32(p.InstanceId)); err != nil { + if err := oprot.WriteI32(ctx, int32(p.InstanceId)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.instanceId (6) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 6:instanceId: ", p), err) } return err } +func (p *AssignedTask) Equals(other *AssignedTask) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.TaskId != other.TaskId { return false } + if p.SlaveId != other.SlaveId { return false } + if p.SlaveHost != other.SlaveHost { return false } + if !p.Task.Equals(other.Task) { return false } + if len(p.AssignedPorts) != len(other.AssignedPorts) { return false } + for k, _tgt := range p.AssignedPorts { + _src29 := other.AssignedPorts[k] + if _tgt != _src29 { return false } + } + if p.InstanceId != other.InstanceId { return false } + return true +} + func (p *AssignedTask) String() string { if p == nil { return "" @@ -8247,14 +8912,14 @@ func (p *ScheduledTask) IsSetAssignedTask() bool { return p.AssignedTask != nil } -func (p *ScheduledTask) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *ScheduledTask) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -8262,89 +8927,89 @@ func (p *ScheduledTask) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.I32 { - if err := p.ReadField2(iprot); err != nil { + if err := p.ReadField2(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 3: if fieldTypeId == thrift.I32 { - if err := p.ReadField3(iprot); err != nil { + if err := p.ReadField3(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 6: if fieldTypeId == thrift.I32 { - if err := p.ReadField6(iprot); err != nil { + if err := p.ReadField6(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 4: if fieldTypeId == thrift.LIST { - if err := p.ReadField4(iprot); err != nil { + if err := p.ReadField4(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 5: if fieldTypeId == thrift.STRING { - if err := p.ReadField5(iprot); err != nil { + if err := p.ReadField5(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ScheduledTask) ReadField1(iprot thrift.TProtocol) error { +func (p *ScheduledTask) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { p.AssignedTask = &AssignedTask{} - if err := p.AssignedTask.Read(iprot); err != nil { + if err := p.AssignedTask.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.AssignedTask), err) } return nil } -func (p *ScheduledTask) ReadField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { +func (p *ScheduledTask) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { temp := ScheduleStatus(v) @@ -8353,8 +9018,8 @@ func (p *ScheduledTask) ReadField2(iprot thrift.TProtocol) error { return nil } -func (p *ScheduledTask) ReadField3(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { +func (p *ScheduledTask) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { return thrift.PrependError("error reading field 3: ", err) } else { p.FailureCount = v @@ -8362,8 +9027,8 @@ func (p *ScheduledTask) ReadField3(iprot thrift.TProtocol) error { return nil } -func (p *ScheduledTask) ReadField6(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { +func (p *ScheduledTask) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { return thrift.PrependError("error reading field 6: ", err) } else { p.TimesPartitioned = v @@ -8371,28 +9036,28 @@ func (p *ScheduledTask) ReadField6(iprot thrift.TProtocol) error { return nil } -func (p *ScheduledTask) ReadField4(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin() +func (p *ScheduledTask) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) if err != nil { return thrift.PrependError("error reading list begin: ", err) } tSlice := make([]*TaskEvent, 0, size) p.TaskEvents = tSlice for i := 0; i < size; i ++ { - _elem16 := &TaskEvent{} - if err := _elem16.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem16), err) + _elem30 := &TaskEvent{} + if err := _elem30.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem30), err) } - p.TaskEvents = append(p.TaskEvents, _elem16) + p.TaskEvents = append(p.TaskEvents, _elem30) } - if err := iprot.ReadListEnd(); err != nil { + if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) } return nil } -func (p *ScheduledTask) ReadField5(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { +func (p *ScheduledTask) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 5: ", err) } else { p.AncestorId = v @@ -8400,94 +9065,113 @@ func (p *ScheduledTask) ReadField5(iprot thrift.TProtocol) error { return nil } -func (p *ScheduledTask) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("ScheduledTask"); err != nil { +func (p *ScheduledTask) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "ScheduledTask"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } - if err := p.writeField2(oprot); err != nil { return err } - if err := p.writeField3(oprot); err != nil { return err } - if err := p.writeField4(oprot); err != nil { return err } - if err := p.writeField5(oprot); err != nil { return err } - if err := p.writeField6(oprot); err != nil { return err } - } - if err := oprot.WriteFieldStop(); err != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } + if err := p.writeField5(ctx, oprot); err != nil { return err } + if err := p.writeField6(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ScheduledTask) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("assignedTask", thrift.STRUCT, 1); err != nil { +func (p *ScheduledTask) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "assignedTask", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:assignedTask: ", p), err) } - if err := p.AssignedTask.Write(oprot); err != nil { + if err := p.AssignedTask.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.AssignedTask), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:assignedTask: ", p), err) } return err } -func (p *ScheduledTask) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("status", thrift.I32, 2); err != nil { +func (p *ScheduledTask) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "status", thrift.I32, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:status: ", p), err) } - if err := oprot.WriteI32(int32(p.Status)); err != nil { + if err := oprot.WriteI32(ctx, int32(p.Status)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.status (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:status: ", p), err) } return err } -func (p *ScheduledTask) writeField3(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("failureCount", thrift.I32, 3); err != nil { +func (p *ScheduledTask) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "failureCount", thrift.I32, 3); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:failureCount: ", p), err) } - if err := oprot.WriteI32(int32(p.FailureCount)); err != nil { + if err := oprot.WriteI32(ctx, int32(p.FailureCount)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.failureCount (3) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 3:failureCount: ", p), err) } return err } -func (p *ScheduledTask) writeField4(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("taskEvents", thrift.LIST, 4); err != nil { +func (p *ScheduledTask) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "taskEvents", thrift.LIST, 4); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:taskEvents: ", p), err) } - if err := oprot.WriteListBegin(thrift.STRUCT, len(p.TaskEvents)); err != nil { + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.TaskEvents)); err != nil { return thrift.PrependError("error writing list begin: ", err) } for _, v := range p.TaskEvents { - if err := v.Write(oprot); err != nil { + if err := v.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) } } - if err := oprot.WriteListEnd(); err != nil { + if err := oprot.WriteListEnd(ctx); err != nil { return thrift.PrependError("error writing list end: ", err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 4:taskEvents: ", p), err) } return err } -func (p *ScheduledTask) writeField5(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("ancestorId", thrift.STRING, 5); err != nil { +func (p *ScheduledTask) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "ancestorId", thrift.STRING, 5); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:ancestorId: ", p), err) } - if err := oprot.WriteString(string(p.AncestorId)); err != nil { + if err := oprot.WriteString(ctx, string(p.AncestorId)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.ancestorId (5) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 5:ancestorId: ", p), err) } return err } -func (p *ScheduledTask) writeField6(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("timesPartitioned", thrift.I32, 6); err != nil { +func (p *ScheduledTask) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "timesPartitioned", thrift.I32, 6); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:timesPartitioned: ", p), err) } - if err := oprot.WriteI32(int32(p.TimesPartitioned)); err != nil { + if err := oprot.WriteI32(ctx, int32(p.TimesPartitioned)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.timesPartitioned (6) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 6:timesPartitioned: ", p), err) } return err } +func (p *ScheduledTask) Equals(other *ScheduledTask) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if !p.AssignedTask.Equals(other.AssignedTask) { return false } + if p.Status != other.Status { return false } + if p.FailureCount != other.FailureCount { return false } + if len(p.TaskEvents) != len(other.TaskEvents) { return false } + for i, _tgt := range p.TaskEvents { + _src31 := other.TaskEvents[i] + if !_tgt.Equals(_src31) { return false } + } + if p.AncestorId != other.AncestorId { return false } + if p.TimesPartitioned != other.TimesPartitioned { return false } + return true +} + func (p *ScheduledTask) String() string { if p == nil { return "" @@ -8509,14 +9193,14 @@ func NewScheduleStatusResult_() *ScheduleStatusResult_ { func (p *ScheduleStatusResult_) GetTasks() []*ScheduledTask { return p.Tasks } -func (p *ScheduleStatusResult_) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *ScheduleStatusResult_) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -8524,81 +9208,95 @@ func (p *ScheduleStatusResult_) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.LIST { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ScheduleStatusResult_) ReadField1(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin() +func (p *ScheduleStatusResult_) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) if err != nil { return thrift.PrependError("error reading list begin: ", err) } tSlice := make([]*ScheduledTask, 0, size) p.Tasks = tSlice for i := 0; i < size; i ++ { - _elem17 := &ScheduledTask{} - if err := _elem17.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem17), err) + _elem32 := &ScheduledTask{} + if err := _elem32.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem32), err) } - p.Tasks = append(p.Tasks, _elem17) + p.Tasks = append(p.Tasks, _elem32) } - if err := iprot.ReadListEnd(); err != nil { + if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) } return nil } -func (p *ScheduleStatusResult_) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("ScheduleStatusResult"); err != nil { +func (p *ScheduleStatusResult_) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "ScheduleStatusResult"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ScheduleStatusResult_) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("tasks", thrift.LIST, 1); err != nil { +func (p *ScheduleStatusResult_) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "tasks", thrift.LIST, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:tasks: ", p), err) } - if err := oprot.WriteListBegin(thrift.STRUCT, len(p.Tasks)); err != nil { + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.Tasks)); err != nil { return thrift.PrependError("error writing list begin: ", err) } for _, v := range p.Tasks { - if err := v.Write(oprot); err != nil { + if err := v.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) } } - if err := oprot.WriteListEnd(); err != nil { + if err := oprot.WriteListEnd(ctx); err != nil { return thrift.PrependError("error writing list end: ", err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:tasks: ", p), err) } return err } +func (p *ScheduleStatusResult_) Equals(other *ScheduleStatusResult_) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if len(p.Tasks) != len(other.Tasks) { return false } + for i, _tgt := range p.Tasks { + _src33 := other.Tasks[i] + if !_tgt.Equals(_src33) { return false } + } + return true +} + func (p *ScheduleStatusResult_) String() string { if p == nil { return "" @@ -8620,14 +9318,14 @@ func NewGetJobsResult_() *GetJobsResult_ { func (p *GetJobsResult_) GetConfigs() []*JobConfiguration { return p.Configs } -func (p *GetJobsResult_) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *GetJobsResult_) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -8635,88 +9333,105 @@ func (p *GetJobsResult_) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.SET { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *GetJobsResult_) ReadField1(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin() +func (p *GetJobsResult_) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin(ctx) if err != nil { return thrift.PrependError("error reading set begin: ", err) } tSet := make([]*JobConfiguration, 0, size) p.Configs = tSet for i := 0; i < size; i ++ { - _elem18 := &JobConfiguration{} - if err := _elem18.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem18), err) + _elem34 := &JobConfiguration{} + if err := _elem34.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem34), err) } - p.Configs = append(p.Configs, _elem18) + p.Configs = append(p.Configs, _elem34) } - if err := iprot.ReadSetEnd(); err != nil { + if err := iprot.ReadSetEnd(ctx); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *GetJobsResult_) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("GetJobsResult"); err != nil { +func (p *GetJobsResult_) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "GetJobsResult"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *GetJobsResult_) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("configs", thrift.SET, 1); err != nil { +func (p *GetJobsResult_) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "configs", thrift.SET, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:configs: ", p), err) } - if err := oprot.WriteSetBegin(thrift.STRUCT, len(p.Configs)); err != nil { + if err := oprot.WriteSetBegin(ctx, thrift.STRUCT, len(p.Configs)); err != nil { return thrift.PrependError("error writing set begin: ", err) } for i := 0; i" @@ -8859,14 +9574,14 @@ func (p *TaskQuery) IsSetLimit() bool { return p.Limit != nil } -func (p *TaskQuery) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *TaskQuery) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -8874,121 +9589,121 @@ func (p *TaskQuery) Read(iprot thrift.TProtocol) error { switch fieldId { case 14: if fieldTypeId == thrift.STRING { - if err := p.ReadField14(iprot); err != nil { + if err := p.ReadField14(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 9: if fieldTypeId == thrift.STRING { - if err := p.ReadField9(iprot); err != nil { + if err := p.ReadField9(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.STRING { - if err := p.ReadField2(iprot); err != nil { + if err := p.ReadField2(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 4: if fieldTypeId == thrift.SET { - if err := p.ReadField4(iprot); err != nil { + if err := p.ReadField4(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 5: if fieldTypeId == thrift.SET { - if err := p.ReadField5(iprot); err != nil { + if err := p.ReadField5(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 7: if fieldTypeId == thrift.SET { - if err := p.ReadField7(iprot); err != nil { + if err := p.ReadField7(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 10: if fieldTypeId == thrift.SET { - if err := p.ReadField10(iprot); err != nil { + if err := p.ReadField10(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 11: if fieldTypeId == thrift.SET { - if err := p.ReadField11(iprot); err != nil { + if err := p.ReadField11(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 12: if fieldTypeId == thrift.I32 { - if err := p.ReadField12(iprot); err != nil { + if err := p.ReadField12(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 13: if fieldTypeId == thrift.I32 { - if err := p.ReadField13(iprot); err != nil { + if err := p.ReadField13(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *TaskQuery) ReadField14(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { +func (p *TaskQuery) ReadField14(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 14: ", err) } else { p.Role = &v @@ -8996,8 +9711,8 @@ func (p *TaskQuery) ReadField14(iprot thrift.TProtocol) error { return nil } -func (p *TaskQuery) ReadField9(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { +func (p *TaskQuery) ReadField9(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 9: ", err) } else { p.Environment = &v @@ -9005,8 +9720,8 @@ func (p *TaskQuery) ReadField9(iprot thrift.TProtocol) error { return nil } -func (p *TaskQuery) ReadField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { +func (p *TaskQuery) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { p.JobName = &v @@ -9014,117 +9729,117 @@ func (p *TaskQuery) ReadField2(iprot thrift.TProtocol) error { return nil } -func (p *TaskQuery) ReadField4(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin() +func (p *TaskQuery) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin(ctx) if err != nil { return thrift.PrependError("error reading set begin: ", err) } tSet := make([]string, 0, size) p.TaskIds = tSet for i := 0; i < size; i ++ { -var _elem19 string - if v, err := iprot.ReadString(); err != nil { +var _elem36 string + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem19 = v + _elem36 = v } - p.TaskIds = append(p.TaskIds, _elem19) + p.TaskIds = append(p.TaskIds, _elem36) } - if err := iprot.ReadSetEnd(); err != nil { + if err := iprot.ReadSetEnd(ctx); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *TaskQuery) ReadField5(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin() +func (p *TaskQuery) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin(ctx) if err != nil { return thrift.PrependError("error reading set begin: ", err) } tSet := make([]ScheduleStatus, 0, size) p.Statuses = tSet for i := 0; i < size; i ++ { -var _elem20 ScheduleStatus - if v, err := iprot.ReadI32(); err != nil { +var _elem37 ScheduleStatus + if v, err := iprot.ReadI32(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { temp := ScheduleStatus(v) - _elem20 = temp + _elem37 = temp } - p.Statuses = append(p.Statuses, _elem20) + p.Statuses = append(p.Statuses, _elem37) } - if err := iprot.ReadSetEnd(); err != nil { + if err := iprot.ReadSetEnd(ctx); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *TaskQuery) ReadField7(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin() +func (p *TaskQuery) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin(ctx) if err != nil { return thrift.PrependError("error reading set begin: ", err) } tSet := make([]int32, 0, size) p.InstanceIds = tSet for i := 0; i < size; i ++ { -var _elem21 int32 - if v, err := iprot.ReadI32(); err != nil { +var _elem38 int32 + if v, err := iprot.ReadI32(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem21 = v + _elem38 = v } - p.InstanceIds = append(p.InstanceIds, _elem21) + p.InstanceIds = append(p.InstanceIds, _elem38) } - if err := iprot.ReadSetEnd(); err != nil { + if err := iprot.ReadSetEnd(ctx); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *TaskQuery) ReadField10(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin() +func (p *TaskQuery) ReadField10(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin(ctx) if err != nil { return thrift.PrependError("error reading set begin: ", err) } tSet := make([]string, 0, size) p.SlaveHosts = tSet for i := 0; i < size; i ++ { -var _elem22 string - if v, err := iprot.ReadString(); err != nil { +var _elem39 string + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem22 = v + _elem39 = v } - p.SlaveHosts = append(p.SlaveHosts, _elem22) + p.SlaveHosts = append(p.SlaveHosts, _elem39) } - if err := iprot.ReadSetEnd(); err != nil { + if err := iprot.ReadSetEnd(ctx); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *TaskQuery) ReadField11(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin() +func (p *TaskQuery) ReadField11(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin(ctx) if err != nil { return thrift.PrependError("error reading set begin: ", err) } tSet := make([]*JobKey, 0, size) p.JobKeys = tSet for i := 0; i < size; i ++ { - _elem23 := &JobKey{} - if err := _elem23.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem23), err) + _elem40 := &JobKey{} + if err := _elem40.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem40), err) } - p.JobKeys = append(p.JobKeys, _elem23) + p.JobKeys = append(p.JobKeys, _elem40) } - if err := iprot.ReadSetEnd(); err != nil { + if err := iprot.ReadSetEnd(ctx); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *TaskQuery) ReadField12(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { +func (p *TaskQuery) ReadField12(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { return thrift.PrependError("error reading field 12: ", err) } else { p.Offset = &v @@ -9132,8 +9847,8 @@ func (p *TaskQuery) ReadField12(iprot thrift.TProtocol) error { return nil } -func (p *TaskQuery) ReadField13(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { +func (p *TaskQuery) ReadField13(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { return thrift.PrependError("error reading field 13: ", err) } else { p.Limit = &v @@ -9141,224 +9856,303 @@ func (p *TaskQuery) ReadField13(iprot thrift.TProtocol) error { return nil } -func (p *TaskQuery) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TaskQuery"); err != nil { +func (p *TaskQuery) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TaskQuery"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField2(oprot); err != nil { return err } - if err := p.writeField4(oprot); err != nil { return err } - if err := p.writeField5(oprot); err != nil { return err } - if err := p.writeField7(oprot); err != nil { return err } - if err := p.writeField9(oprot); err != nil { return err } - if err := p.writeField10(oprot); err != nil { return err } - if err := p.writeField11(oprot); err != nil { return err } - if err := p.writeField12(oprot); err != nil { return err } - if err := p.writeField13(oprot); err != nil { return err } - if err := p.writeField14(oprot); err != nil { return err } - } - if err := oprot.WriteFieldStop(); err != nil { + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } + if err := p.writeField5(ctx, oprot); err != nil { return err } + if err := p.writeField7(ctx, oprot); err != nil { return err } + if err := p.writeField9(ctx, oprot); err != nil { return err } + if err := p.writeField10(ctx, oprot); err != nil { return err } + if err := p.writeField11(ctx, oprot); err != nil { return err } + if err := p.writeField12(ctx, oprot); err != nil { return err } + if err := p.writeField13(ctx, oprot); err != nil { return err } + if err := p.writeField14(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *TaskQuery) writeField2(oprot thrift.TProtocol) (err error) { +func (p *TaskQuery) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetJobName() { - if err := oprot.WriteFieldBegin("jobName", thrift.STRING, 2); err != nil { + if err := oprot.WriteFieldBegin(ctx, "jobName", thrift.STRING, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:jobName: ", p), err) } - if err := oprot.WriteString(string(*p.JobName)); err != nil { + if err := oprot.WriteString(ctx, string(*p.JobName)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.jobName (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:jobName: ", p), err) } } return err } -func (p *TaskQuery) writeField4(oprot thrift.TProtocol) (err error) { +func (p *TaskQuery) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetTaskIds() { - if err := oprot.WriteFieldBegin("taskIds", thrift.SET, 4); err != nil { + if err := oprot.WriteFieldBegin(ctx, "taskIds", thrift.SET, 4); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:taskIds: ", p), err) } - if err := oprot.WriteSetBegin(thrift.STRING, len(p.TaskIds)); err != nil { + if err := oprot.WriteSetBegin(ctx, thrift.STRING, len(p.TaskIds)); err != nil { return thrift.PrependError("error writing set begin: ", err) } for i := 0; i" @@ -9386,14 +10180,14 @@ func (p *HostStatus) GetHost() string { func (p *HostStatus) GetMode() MaintenanceMode { return p.Mode } -func (p *HostStatus) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *HostStatus) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -9401,41 +10195,41 @@ func (p *HostStatus) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRING { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.I32 { - if err := p.ReadField2(iprot); err != nil { + if err := p.ReadField2(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *HostStatus) ReadField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { +func (p *HostStatus) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.Host = v @@ -9443,8 +10237,8 @@ func (p *HostStatus) ReadField1(iprot thrift.TProtocol) error { return nil } -func (p *HostStatus) ReadField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { +func (p *HostStatus) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { temp := MaintenanceMode(v) @@ -9453,40 +10247,51 @@ func (p *HostStatus) ReadField2(iprot thrift.TProtocol) error { return nil } -func (p *HostStatus) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("HostStatus"); err != nil { +func (p *HostStatus) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "HostStatus"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } - if err := p.writeField2(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *HostStatus) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("host", thrift.STRING, 1); err != nil { +func (p *HostStatus) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "host", thrift.STRING, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:host: ", p), err) } - if err := oprot.WriteString(string(p.Host)); err != nil { + if err := oprot.WriteString(ctx, string(p.Host)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.host (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:host: ", p), err) } return err } -func (p *HostStatus) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("mode", thrift.I32, 2); err != nil { +func (p *HostStatus) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "mode", thrift.I32, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:mode: ", p), err) } - if err := oprot.WriteI32(int32(p.Mode)); err != nil { + if err := oprot.WriteI32(ctx, int32(p.Mode)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.mode (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:mode: ", p), err) } return err } +func (p *HostStatus) Equals(other *HostStatus) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.Host != other.Host { return false } + if p.Mode != other.Mode { return false } + return true +} + func (p *HostStatus) String() string { if p == nil { return "" @@ -9520,14 +10325,14 @@ func (p *RoleSummary) GetJobCount() int32 { func (p *RoleSummary) GetCronJobCount() int32 { return p.CronJobCount } -func (p *RoleSummary) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *RoleSummary) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -9535,51 +10340,51 @@ func (p *RoleSummary) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRING { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.I32 { - if err := p.ReadField2(iprot); err != nil { + if err := p.ReadField2(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 3: if fieldTypeId == thrift.I32 { - if err := p.ReadField3(iprot); err != nil { + if err := p.ReadField3(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *RoleSummary) ReadField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { +func (p *RoleSummary) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.Role = v @@ -9587,8 +10392,8 @@ func (p *RoleSummary) ReadField1(iprot thrift.TProtocol) error { return nil } -func (p *RoleSummary) ReadField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { +func (p *RoleSummary) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { p.JobCount = v @@ -9596,8 +10401,8 @@ func (p *RoleSummary) ReadField2(iprot thrift.TProtocol) error { return nil } -func (p *RoleSummary) ReadField3(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { +func (p *RoleSummary) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { return thrift.PrependError("error reading field 3: ", err) } else { p.CronJobCount = v @@ -9605,51 +10410,63 @@ func (p *RoleSummary) ReadField3(iprot thrift.TProtocol) error { return nil } -func (p *RoleSummary) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("RoleSummary"); err != nil { +func (p *RoleSummary) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "RoleSummary"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } - if err := p.writeField2(oprot); err != nil { return err } - if err := p.writeField3(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *RoleSummary) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("role", thrift.STRING, 1); err != nil { +func (p *RoleSummary) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "role", thrift.STRING, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:role: ", p), err) } - if err := oprot.WriteString(string(p.Role)); err != nil { + if err := oprot.WriteString(ctx, string(p.Role)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.role (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:role: ", p), err) } return err } -func (p *RoleSummary) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("jobCount", thrift.I32, 2); err != nil { +func (p *RoleSummary) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "jobCount", thrift.I32, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:jobCount: ", p), err) } - if err := oprot.WriteI32(int32(p.JobCount)); err != nil { + if err := oprot.WriteI32(ctx, int32(p.JobCount)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.jobCount (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:jobCount: ", p), err) } return err } -func (p *RoleSummary) writeField3(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("cronJobCount", thrift.I32, 3); err != nil { +func (p *RoleSummary) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "cronJobCount", thrift.I32, 3); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:cronJobCount: ", p), err) } - if err := oprot.WriteI32(int32(p.CronJobCount)); err != nil { + if err := oprot.WriteI32(ctx, int32(p.CronJobCount)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.cronJobCount (3) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 3:cronJobCount: ", p), err) } return err } +func (p *RoleSummary) Equals(other *RoleSummary) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.Role != other.Role { return false } + if p.JobCount != other.JobCount { return false } + if p.CronJobCount != other.CronJobCount { return false } + return true +} + func (p *RoleSummary) String() string { if p == nil { return "" @@ -9671,14 +10488,14 @@ func NewHosts() *Hosts { func (p *Hosts) GetHostNames() []string { return p.HostNames } -func (p *Hosts) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *Hosts) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -9686,89 +10503,106 @@ func (p *Hosts) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.SET { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *Hosts) ReadField1(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin() +func (p *Hosts) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin(ctx) if err != nil { return thrift.PrependError("error reading set begin: ", err) } tSet := make([]string, 0, size) p.HostNames = tSet for i := 0; i < size; i ++ { -var _elem24 string - if v, err := iprot.ReadString(); err != nil { +var _elem46 string + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem24 = v + _elem46 = v } - p.HostNames = append(p.HostNames, _elem24) + p.HostNames = append(p.HostNames, _elem46) } - if err := iprot.ReadSetEnd(); err != nil { + if err := iprot.ReadSetEnd(ctx); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *Hosts) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("Hosts"); err != nil { +func (p *Hosts) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "Hosts"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *Hosts) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("hostNames", thrift.SET, 1); err != nil { +func (p *Hosts) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "hostNames", thrift.SET, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:hostNames: ", p), err) } - if err := oprot.WriteSetBegin(thrift.STRING, len(p.HostNames)); err != nil { + if err := oprot.WriteSetBegin(ctx, thrift.STRING, len(p.HostNames)); err != nil { return thrift.PrependError("error writing set begin: ", err) } for i := 0; i" @@ -9796,14 +10630,14 @@ func (p *PendingReason) GetTaskId() string { func (p *PendingReason) GetReason() string { return p.Reason } -func (p *PendingReason) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *PendingReason) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -9811,41 +10645,41 @@ func (p *PendingReason) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRING { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.STRING { - if err := p.ReadField2(iprot); err != nil { + if err := p.ReadField2(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *PendingReason) ReadField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { +func (p *PendingReason) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.TaskId = v @@ -9853,8 +10687,8 @@ func (p *PendingReason) ReadField1(iprot thrift.TProtocol) error { return nil } -func (p *PendingReason) ReadField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { +func (p *PendingReason) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { p.Reason = v @@ -9862,40 +10696,51 @@ func (p *PendingReason) ReadField2(iprot thrift.TProtocol) error { return nil } -func (p *PendingReason) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("PendingReason"); err != nil { +func (p *PendingReason) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "PendingReason"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } - if err := p.writeField2(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *PendingReason) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("taskId", thrift.STRING, 1); err != nil { +func (p *PendingReason) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "taskId", thrift.STRING, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:taskId: ", p), err) } - if err := oprot.WriteString(string(p.TaskId)); err != nil { + if err := oprot.WriteString(ctx, string(p.TaskId)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.taskId (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:taskId: ", p), err) } return err } -func (p *PendingReason) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("reason", thrift.STRING, 2); err != nil { +func (p *PendingReason) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "reason", thrift.STRING, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:reason: ", p), err) } - if err := oprot.WriteString(string(p.Reason)); err != nil { + if err := oprot.WriteString(ctx, string(p.Reason)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.reason (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:reason: ", p), err) } return err } +func (p *PendingReason) Equals(other *PendingReason) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.TaskId != other.TaskId { return false } + if p.Reason != other.Reason { return false } + return true +} + func (p *PendingReason) String() string { if p == nil { return "" @@ -9932,14 +10777,14 @@ func (p *JobUpdateKey) IsSetJob() bool { return p.Job != nil } -func (p *JobUpdateKey) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *JobUpdateKey) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -9947,49 +10792,49 @@ func (p *JobUpdateKey) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.STRING { - if err := p.ReadField2(iprot); err != nil { + if err := p.ReadField2(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *JobUpdateKey) ReadField1(iprot thrift.TProtocol) error { +func (p *JobUpdateKey) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { p.Job = &JobKey{} - if err := p.Job.Read(iprot); err != nil { + if err := p.Job.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Job), err) } return nil } -func (p *JobUpdateKey) ReadField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { +func (p *JobUpdateKey) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { p.ID = v @@ -9997,41 +10842,52 @@ func (p *JobUpdateKey) ReadField2(iprot thrift.TProtocol) error { return nil } -func (p *JobUpdateKey) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("JobUpdateKey"); err != nil { +func (p *JobUpdateKey) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "JobUpdateKey"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } - if err := p.writeField2(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *JobUpdateKey) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("job", thrift.STRUCT, 1); err != nil { +func (p *JobUpdateKey) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "job", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:job: ", p), err) } - if err := p.Job.Write(oprot); err != nil { + if err := p.Job.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Job), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:job: ", p), err) } return err } -func (p *JobUpdateKey) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("id", thrift.STRING, 2); err != nil { +func (p *JobUpdateKey) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "id", thrift.STRING, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:id: ", p), err) } - if err := oprot.WriteString(string(p.ID)); err != nil { + if err := oprot.WriteString(ctx, string(p.ID)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.id (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:id: ", p), err) } return err } +func (p *JobUpdateKey) Equals(other *JobUpdateKey) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if !p.Job.Equals(other.Job) { return false } + if p.ID != other.ID { return false } + return true +} + func (p *JobUpdateKey) String() string { if p == nil { return "" @@ -10055,14 +10911,14 @@ func NewQueueJobUpdateStrategy() *QueueJobUpdateStrategy { func (p *QueueJobUpdateStrategy) GetGroupSize() int32 { return p.GroupSize } -func (p *QueueJobUpdateStrategy) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *QueueJobUpdateStrategy) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -10070,31 +10926,31 @@ func (p *QueueJobUpdateStrategy) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.I32 { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *QueueJobUpdateStrategy) ReadField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { +func (p *QueueJobUpdateStrategy) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.GroupSize = v @@ -10102,29 +10958,39 @@ func (p *QueueJobUpdateStrategy) ReadField1(iprot thrift.TProtocol) error { return nil } -func (p *QueueJobUpdateStrategy) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("QueueJobUpdateStrategy"); err != nil { +func (p *QueueJobUpdateStrategy) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "QueueJobUpdateStrategy"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *QueueJobUpdateStrategy) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("groupSize", thrift.I32, 1); err != nil { +func (p *QueueJobUpdateStrategy) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "groupSize", thrift.I32, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:groupSize: ", p), err) } - if err := oprot.WriteI32(int32(p.GroupSize)); err != nil { + if err := oprot.WriteI32(ctx, int32(p.GroupSize)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.groupSize (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:groupSize: ", p), err) } return err } +func (p *QueueJobUpdateStrategy) Equals(other *QueueJobUpdateStrategy) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.GroupSize != other.GroupSize { return false } + return true +} + func (p *QueueJobUpdateStrategy) String() string { if p == nil { return "" @@ -10155,14 +11021,14 @@ func (p *BatchJobUpdateStrategy) GetGroupSize() int32 { func (p *BatchJobUpdateStrategy) GetAutopauseAfterBatch() bool { return p.AutopauseAfterBatch } -func (p *BatchJobUpdateStrategy) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *BatchJobUpdateStrategy) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -10170,41 +11036,41 @@ func (p *BatchJobUpdateStrategy) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.I32 { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.BOOL { - if err := p.ReadField2(iprot); err != nil { + if err := p.ReadField2(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *BatchJobUpdateStrategy) ReadField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { +func (p *BatchJobUpdateStrategy) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.GroupSize = v @@ -10212,8 +11078,8 @@ func (p *BatchJobUpdateStrategy) ReadField1(iprot thrift.TProtocol) error { return nil } -func (p *BatchJobUpdateStrategy) ReadField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBool(); err != nil { +func (p *BatchJobUpdateStrategy) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBool(ctx); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { p.AutopauseAfterBatch = v @@ -10221,40 +11087,51 @@ func (p *BatchJobUpdateStrategy) ReadField2(iprot thrift.TProtocol) error { return nil } -func (p *BatchJobUpdateStrategy) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("BatchJobUpdateStrategy"); err != nil { +func (p *BatchJobUpdateStrategy) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "BatchJobUpdateStrategy"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } - if err := p.writeField2(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *BatchJobUpdateStrategy) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("groupSize", thrift.I32, 1); err != nil { +func (p *BatchJobUpdateStrategy) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "groupSize", thrift.I32, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:groupSize: ", p), err) } - if err := oprot.WriteI32(int32(p.GroupSize)); err != nil { + if err := oprot.WriteI32(ctx, int32(p.GroupSize)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.groupSize (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:groupSize: ", p), err) } return err } -func (p *BatchJobUpdateStrategy) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("autopauseAfterBatch", thrift.BOOL, 2); err != nil { +func (p *BatchJobUpdateStrategy) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "autopauseAfterBatch", thrift.BOOL, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:autopauseAfterBatch: ", p), err) } - if err := oprot.WriteBool(bool(p.AutopauseAfterBatch)); err != nil { + if err := oprot.WriteBool(ctx, bool(p.AutopauseAfterBatch)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.autopauseAfterBatch (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:autopauseAfterBatch: ", p), err) } return err } +func (p *BatchJobUpdateStrategy) Equals(other *BatchJobUpdateStrategy) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.GroupSize != other.GroupSize { return false } + if p.AutopauseAfterBatch != other.AutopauseAfterBatch { return false } + return true +} + func (p *BatchJobUpdateStrategy) String() string { if p == nil { return "" @@ -10285,14 +11162,14 @@ func (p *VariableBatchJobUpdateStrategy) GetGroupSizes() []int32 { func (p *VariableBatchJobUpdateStrategy) GetAutopauseAfterBatch() bool { return p.AutopauseAfterBatch } -func (p *VariableBatchJobUpdateStrategy) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *VariableBatchJobUpdateStrategy) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -10300,63 +11177,63 @@ func (p *VariableBatchJobUpdateStrategy) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.LIST { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.BOOL { - if err := p.ReadField2(iprot); err != nil { + if err := p.ReadField2(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *VariableBatchJobUpdateStrategy) ReadField1(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin() +func (p *VariableBatchJobUpdateStrategy) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) if err != nil { return thrift.PrependError("error reading list begin: ", err) } tSlice := make([]int32, 0, size) p.GroupSizes = tSlice for i := 0; i < size; i ++ { -var _elem25 int32 - if v, err := iprot.ReadI32(); err != nil { +var _elem48 int32 + if v, err := iprot.ReadI32(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem25 = v + _elem48 = v } - p.GroupSizes = append(p.GroupSizes, _elem25) + p.GroupSizes = append(p.GroupSizes, _elem48) } - if err := iprot.ReadListEnd(); err != nil { + if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) } return nil } -func (p *VariableBatchJobUpdateStrategy) ReadField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBool(); err != nil { +func (p *VariableBatchJobUpdateStrategy) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBool(ctx); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { p.AutopauseAfterBatch = v @@ -10364,48 +11241,63 @@ func (p *VariableBatchJobUpdateStrategy) ReadField2(iprot thrift.TProtocol) err return nil } -func (p *VariableBatchJobUpdateStrategy) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("VariableBatchJobUpdateStrategy"); err != nil { +func (p *VariableBatchJobUpdateStrategy) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "VariableBatchJobUpdateStrategy"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } - if err := p.writeField2(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *VariableBatchJobUpdateStrategy) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("groupSizes", thrift.LIST, 1); err != nil { +func (p *VariableBatchJobUpdateStrategy) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "groupSizes", thrift.LIST, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:groupSizes: ", p), err) } - if err := oprot.WriteListBegin(thrift.I32, len(p.GroupSizes)); err != nil { + if err := oprot.WriteListBegin(ctx, thrift.I32, len(p.GroupSizes)); err != nil { return thrift.PrependError("error writing list begin: ", err) } for _, v := range p.GroupSizes { - if err := oprot.WriteI32(int32(v)); err != nil { + if err := oprot.WriteI32(ctx, int32(v)); err != nil { return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } } - if err := oprot.WriteListEnd(); err != nil { + if err := oprot.WriteListEnd(ctx); err != nil { return thrift.PrependError("error writing list end: ", err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:groupSizes: ", p), err) } return err } -func (p *VariableBatchJobUpdateStrategy) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("autopauseAfterBatch", thrift.BOOL, 2); err != nil { +func (p *VariableBatchJobUpdateStrategy) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "autopauseAfterBatch", thrift.BOOL, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:autopauseAfterBatch: ", p), err) } - if err := oprot.WriteBool(bool(p.AutopauseAfterBatch)); err != nil { + if err := oprot.WriteBool(ctx, bool(p.AutopauseAfterBatch)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.autopauseAfterBatch (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:autopauseAfterBatch: ", p), err) } return err } +func (p *VariableBatchJobUpdateStrategy) Equals(other *VariableBatchJobUpdateStrategy) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if len(p.GroupSizes) != len(other.GroupSizes) { return false } + for i, _tgt := range p.GroupSizes { + _src49 := other.GroupSizes[i] + if _tgt != _src49 { return false } + } + if p.AutopauseAfterBatch != other.AutopauseAfterBatch { return false } + return true +} + func (p *VariableBatchJobUpdateStrategy) String() string { if p == nil { return "" @@ -10475,14 +11367,14 @@ func (p *JobUpdateStrategy) IsSetVarBatchStrategy() bool { return p.VarBatchStrategy != nil } -func (p *JobUpdateStrategy) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *JobUpdateStrategy) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -10490,130 +11382,142 @@ func (p *JobUpdateStrategy) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField2(iprot); err != nil { + if err := p.ReadField2(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 3: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField3(iprot); err != nil { + if err := p.ReadField3(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *JobUpdateStrategy) ReadField1(iprot thrift.TProtocol) error { +func (p *JobUpdateStrategy) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { p.QueueStrategy = &QueueJobUpdateStrategy{} - if err := p.QueueStrategy.Read(iprot); err != nil { + if err := p.QueueStrategy.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.QueueStrategy), err) } return nil } -func (p *JobUpdateStrategy) ReadField2(iprot thrift.TProtocol) error { +func (p *JobUpdateStrategy) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { p.BatchStrategy = &BatchJobUpdateStrategy{} - if err := p.BatchStrategy.Read(iprot); err != nil { + if err := p.BatchStrategy.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.BatchStrategy), err) } return nil } -func (p *JobUpdateStrategy) ReadField3(iprot thrift.TProtocol) error { +func (p *JobUpdateStrategy) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { p.VarBatchStrategy = &VariableBatchJobUpdateStrategy{} - if err := p.VarBatchStrategy.Read(iprot); err != nil { + if err := p.VarBatchStrategy.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.VarBatchStrategy), err) } return nil } -func (p *JobUpdateStrategy) Write(oprot thrift.TProtocol) error { +func (p *JobUpdateStrategy) Write(ctx context.Context, oprot thrift.TProtocol) error { if c := p.CountSetFieldsJobUpdateStrategy(); c != 1 { return fmt.Errorf("%T write union: exactly one field must be set (%d set).", p, c) } - if err := oprot.WriteStructBegin("JobUpdateStrategy"); err != nil { + if err := oprot.WriteStructBegin(ctx, "JobUpdateStrategy"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } - if err := p.writeField2(oprot); err != nil { return err } - if err := p.writeField3(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *JobUpdateStrategy) writeField1(oprot thrift.TProtocol) (err error) { +func (p *JobUpdateStrategy) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetQueueStrategy() { - if err := oprot.WriteFieldBegin("queueStrategy", thrift.STRUCT, 1); err != nil { + if err := oprot.WriteFieldBegin(ctx, "queueStrategy", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:queueStrategy: ", p), err) } - if err := p.QueueStrategy.Write(oprot); err != nil { + if err := p.QueueStrategy.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.QueueStrategy), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:queueStrategy: ", p), err) } } return err } -func (p *JobUpdateStrategy) writeField2(oprot thrift.TProtocol) (err error) { +func (p *JobUpdateStrategy) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetBatchStrategy() { - if err := oprot.WriteFieldBegin("batchStrategy", thrift.STRUCT, 2); err != nil { + if err := oprot.WriteFieldBegin(ctx, "batchStrategy", thrift.STRUCT, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:batchStrategy: ", p), err) } - if err := p.BatchStrategy.Write(oprot); err != nil { + if err := p.BatchStrategy.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.BatchStrategy), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:batchStrategy: ", p), err) } } return err } -func (p *JobUpdateStrategy) writeField3(oprot thrift.TProtocol) (err error) { +func (p *JobUpdateStrategy) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetVarBatchStrategy() { - if err := oprot.WriteFieldBegin("varBatchStrategy", thrift.STRUCT, 3); err != nil { + if err := oprot.WriteFieldBegin(ctx, "varBatchStrategy", thrift.STRUCT, 3); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:varBatchStrategy: ", p), err) } - if err := p.VarBatchStrategy.Write(oprot); err != nil { + if err := p.VarBatchStrategy.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.VarBatchStrategy), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 3:varBatchStrategy: ", p), err) } } return err } +func (p *JobUpdateStrategy) Equals(other *JobUpdateStrategy) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if !p.QueueStrategy.Equals(other.QueueStrategy) { return false } + if !p.BatchStrategy.Equals(other.BatchStrategy) { return false } + if !p.VarBatchStrategy.Equals(other.VarBatchStrategy) { return false } + return true +} + func (p *JobUpdateStrategy) String() string { if p == nil { return "" @@ -10720,14 +11624,14 @@ func (p *JobUpdateSettings) IsSetUpdateStrategy() bool { return p.UpdateStrategy != nil } -func (p *JobUpdateSettings) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *JobUpdateSettings) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -10735,121 +11639,121 @@ func (p *JobUpdateSettings) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.I32 { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.I32 { - if err := p.ReadField2(iprot); err != nil { + if err := p.ReadField2(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 3: if fieldTypeId == thrift.I32 { - if err := p.ReadField3(iprot); err != nil { + if err := p.ReadField3(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 5: if fieldTypeId == thrift.I32 { - if err := p.ReadField5(iprot); err != nil { + if err := p.ReadField5(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 6: if fieldTypeId == thrift.BOOL { - if err := p.ReadField6(iprot); err != nil { + if err := p.ReadField6(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 7: if fieldTypeId == thrift.SET { - if err := p.ReadField7(iprot); err != nil { + if err := p.ReadField7(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 8: if fieldTypeId == thrift.BOOL { - if err := p.ReadField8(iprot); err != nil { + if err := p.ReadField8(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 9: if fieldTypeId == thrift.I32 { - if err := p.ReadField9(iprot); err != nil { + if err := p.ReadField9(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 10: if fieldTypeId == thrift.BOOL { - if err := p.ReadField10(iprot); err != nil { + if err := p.ReadField10(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 11: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField11(iprot); err != nil { + if err := p.ReadField11(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *JobUpdateSettings) ReadField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { +func (p *JobUpdateSettings) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.UpdateGroupSize = v @@ -10857,8 +11761,8 @@ func (p *JobUpdateSettings) ReadField1(iprot thrift.TProtocol) error { return nil } -func (p *JobUpdateSettings) ReadField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { +func (p *JobUpdateSettings) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { p.MaxPerInstanceFailures = v @@ -10866,8 +11770,8 @@ func (p *JobUpdateSettings) ReadField2(iprot thrift.TProtocol) error { return nil } -func (p *JobUpdateSettings) ReadField3(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { +func (p *JobUpdateSettings) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { return thrift.PrependError("error reading field 3: ", err) } else { p.MaxFailedInstances = v @@ -10875,8 +11779,8 @@ func (p *JobUpdateSettings) ReadField3(iprot thrift.TProtocol) error { return nil } -func (p *JobUpdateSettings) ReadField5(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { +func (p *JobUpdateSettings) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { return thrift.PrependError("error reading field 5: ", err) } else { p.MinWaitInInstanceRunningMs = v @@ -10884,8 +11788,8 @@ func (p *JobUpdateSettings) ReadField5(iprot thrift.TProtocol) error { return nil } -func (p *JobUpdateSettings) ReadField6(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBool(); err != nil { +func (p *JobUpdateSettings) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBool(ctx); err != nil { return thrift.PrependError("error reading field 6: ", err) } else { p.RollbackOnFailure = v @@ -10893,28 +11797,28 @@ func (p *JobUpdateSettings) ReadField6(iprot thrift.TProtocol) error { return nil } -func (p *JobUpdateSettings) ReadField7(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin() +func (p *JobUpdateSettings) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin(ctx) if err != nil { return thrift.PrependError("error reading set begin: ", err) } tSet := make([]*Range, 0, size) p.UpdateOnlyTheseInstances = tSet for i := 0; i < size; i ++ { - _elem26 := &Range{} - if err := _elem26.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem26), err) + _elem50 := &Range{} + if err := _elem50.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem50), err) } - p.UpdateOnlyTheseInstances = append(p.UpdateOnlyTheseInstances, _elem26) + p.UpdateOnlyTheseInstances = append(p.UpdateOnlyTheseInstances, _elem50) } - if err := iprot.ReadSetEnd(); err != nil { + if err := iprot.ReadSetEnd(ctx); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *JobUpdateSettings) ReadField8(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBool(); err != nil { +func (p *JobUpdateSettings) ReadField8(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBool(ctx); err != nil { return thrift.PrependError("error reading field 8: ", err) } else { p.WaitForBatchCompletion = v @@ -10922,8 +11826,8 @@ func (p *JobUpdateSettings) ReadField8(iprot thrift.TProtocol) error { return nil } -func (p *JobUpdateSettings) ReadField9(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { +func (p *JobUpdateSettings) ReadField9(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { return thrift.PrependError("error reading field 9: ", err) } else { p.BlockIfNoPulsesAfterMs = &v @@ -10931,8 +11835,8 @@ func (p *JobUpdateSettings) ReadField9(iprot thrift.TProtocol) error { return nil } -func (p *JobUpdateSettings) ReadField10(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBool(); err != nil { +func (p *JobUpdateSettings) ReadField10(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBool(ctx); err != nil { return thrift.PrependError("error reading field 10: ", err) } else { p.SlaAware = &v @@ -10940,159 +11844,195 @@ func (p *JobUpdateSettings) ReadField10(iprot thrift.TProtocol) error { return nil } -func (p *JobUpdateSettings) ReadField11(iprot thrift.TProtocol) error { +func (p *JobUpdateSettings) ReadField11(ctx context.Context, iprot thrift.TProtocol) error { p.UpdateStrategy = &JobUpdateStrategy{} - if err := p.UpdateStrategy.Read(iprot); err != nil { + if err := p.UpdateStrategy.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.UpdateStrategy), err) } return nil } -func (p *JobUpdateSettings) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("JobUpdateSettings"); err != nil { +func (p *JobUpdateSettings) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "JobUpdateSettings"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } - if err := p.writeField2(oprot); err != nil { return err } - if err := p.writeField3(oprot); err != nil { return err } - if err := p.writeField5(oprot); err != nil { return err } - if err := p.writeField6(oprot); err != nil { return err } - if err := p.writeField7(oprot); err != nil { return err } - if err := p.writeField8(oprot); err != nil { return err } - if err := p.writeField9(oprot); err != nil { return err } - if err := p.writeField10(oprot); err != nil { return err } - if err := p.writeField11(oprot); err != nil { return err } - } - if err := oprot.WriteFieldStop(); err != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField5(ctx, oprot); err != nil { return err } + if err := p.writeField6(ctx, oprot); err != nil { return err } + if err := p.writeField7(ctx, oprot); err != nil { return err } + if err := p.writeField8(ctx, oprot); err != nil { return err } + if err := p.writeField9(ctx, oprot); err != nil { return err } + if err := p.writeField10(ctx, oprot); err != nil { return err } + if err := p.writeField11(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *JobUpdateSettings) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("updateGroupSize", thrift.I32, 1); err != nil { +func (p *JobUpdateSettings) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "updateGroupSize", thrift.I32, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:updateGroupSize: ", p), err) } - if err := oprot.WriteI32(int32(p.UpdateGroupSize)); err != nil { + if err := oprot.WriteI32(ctx, int32(p.UpdateGroupSize)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.updateGroupSize (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:updateGroupSize: ", p), err) } return err } -func (p *JobUpdateSettings) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("maxPerInstanceFailures", thrift.I32, 2); err != nil { +func (p *JobUpdateSettings) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "maxPerInstanceFailures", thrift.I32, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:maxPerInstanceFailures: ", p), err) } - if err := oprot.WriteI32(int32(p.MaxPerInstanceFailures)); err != nil { + if err := oprot.WriteI32(ctx, int32(p.MaxPerInstanceFailures)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.maxPerInstanceFailures (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:maxPerInstanceFailures: ", p), err) } return err } -func (p *JobUpdateSettings) writeField3(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("maxFailedInstances", thrift.I32, 3); err != nil { +func (p *JobUpdateSettings) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "maxFailedInstances", thrift.I32, 3); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:maxFailedInstances: ", p), err) } - if err := oprot.WriteI32(int32(p.MaxFailedInstances)); err != nil { + if err := oprot.WriteI32(ctx, int32(p.MaxFailedInstances)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.maxFailedInstances (3) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 3:maxFailedInstances: ", p), err) } return err } -func (p *JobUpdateSettings) writeField5(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("minWaitInInstanceRunningMs", thrift.I32, 5); err != nil { +func (p *JobUpdateSettings) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "minWaitInInstanceRunningMs", thrift.I32, 5); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:minWaitInInstanceRunningMs: ", p), err) } - if err := oprot.WriteI32(int32(p.MinWaitInInstanceRunningMs)); err != nil { + if err := oprot.WriteI32(ctx, int32(p.MinWaitInInstanceRunningMs)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.minWaitInInstanceRunningMs (5) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 5:minWaitInInstanceRunningMs: ", p), err) } return err } -func (p *JobUpdateSettings) writeField6(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("rollbackOnFailure", thrift.BOOL, 6); err != nil { +func (p *JobUpdateSettings) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "rollbackOnFailure", thrift.BOOL, 6); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:rollbackOnFailure: ", p), err) } - if err := oprot.WriteBool(bool(p.RollbackOnFailure)); err != nil { + if err := oprot.WriteBool(ctx, bool(p.RollbackOnFailure)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.rollbackOnFailure (6) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 6:rollbackOnFailure: ", p), err) } return err } -func (p *JobUpdateSettings) writeField7(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("updateOnlyTheseInstances", thrift.SET, 7); err != nil { +func (p *JobUpdateSettings) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "updateOnlyTheseInstances", thrift.SET, 7); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:updateOnlyTheseInstances: ", p), err) } - if err := oprot.WriteSetBegin(thrift.STRUCT, len(p.UpdateOnlyTheseInstances)); err != nil { + if err := oprot.WriteSetBegin(ctx, thrift.STRUCT, len(p.UpdateOnlyTheseInstances)); err != nil { return thrift.PrependError("error writing set begin: ", err) } for i := 0; i" @@ -11149,14 +12089,14 @@ func (p *JobUpdateEvent) IsSetMessage() bool { return p.Message != nil } -func (p *JobUpdateEvent) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *JobUpdateEvent) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -11164,61 +12104,61 @@ func (p *JobUpdateEvent) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.I32 { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.I64 { - if err := p.ReadField2(iprot); err != nil { + if err := p.ReadField2(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 3: if fieldTypeId == thrift.STRING { - if err := p.ReadField3(iprot); err != nil { + if err := p.ReadField3(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 4: if fieldTypeId == thrift.STRING { - if err := p.ReadField4(iprot); err != nil { + if err := p.ReadField4(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *JobUpdateEvent) ReadField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { +func (p *JobUpdateEvent) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { temp := JobUpdateStatus(v) @@ -11227,8 +12167,8 @@ func (p *JobUpdateEvent) ReadField1(iprot thrift.TProtocol) error { return nil } -func (p *JobUpdateEvent) ReadField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI64(); err != nil { +func (p *JobUpdateEvent) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { p.TimestampMs = v @@ -11236,8 +12176,8 @@ func (p *JobUpdateEvent) ReadField2(iprot thrift.TProtocol) error { return nil } -func (p *JobUpdateEvent) ReadField3(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { +func (p *JobUpdateEvent) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 3: ", err) } else { p.User = &v @@ -11245,8 +12185,8 @@ func (p *JobUpdateEvent) ReadField3(iprot thrift.TProtocol) error { return nil } -func (p *JobUpdateEvent) ReadField4(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { +func (p *JobUpdateEvent) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 4: ", err) } else { p.Message = &v @@ -11254,69 +12194,92 @@ func (p *JobUpdateEvent) ReadField4(iprot thrift.TProtocol) error { return nil } -func (p *JobUpdateEvent) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("JobUpdateEvent"); err != nil { +func (p *JobUpdateEvent) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "JobUpdateEvent"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } - if err := p.writeField2(oprot); err != nil { return err } - if err := p.writeField3(oprot); err != nil { return err } - if err := p.writeField4(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *JobUpdateEvent) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("status", thrift.I32, 1); err != nil { +func (p *JobUpdateEvent) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "status", thrift.I32, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:status: ", p), err) } - if err := oprot.WriteI32(int32(p.Status)); err != nil { + if err := oprot.WriteI32(ctx, int32(p.Status)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.status (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:status: ", p), err) } return err } -func (p *JobUpdateEvent) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("timestampMs", thrift.I64, 2); err != nil { +func (p *JobUpdateEvent) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "timestampMs", thrift.I64, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:timestampMs: ", p), err) } - if err := oprot.WriteI64(int64(p.TimestampMs)); err != nil { + if err := oprot.WriteI64(ctx, int64(p.TimestampMs)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.timestampMs (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:timestampMs: ", p), err) } return err } -func (p *JobUpdateEvent) writeField3(oprot thrift.TProtocol) (err error) { +func (p *JobUpdateEvent) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetUser() { - if err := oprot.WriteFieldBegin("user", thrift.STRING, 3); err != nil { + if err := oprot.WriteFieldBegin(ctx, "user", thrift.STRING, 3); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:user: ", p), err) } - if err := oprot.WriteString(string(*p.User)); err != nil { + if err := oprot.WriteString(ctx, string(*p.User)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.user (3) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 3:user: ", p), err) } } return err } -func (p *JobUpdateEvent) writeField4(oprot thrift.TProtocol) (err error) { +func (p *JobUpdateEvent) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetMessage() { - if err := oprot.WriteFieldBegin("message", thrift.STRING, 4); err != nil { + if err := oprot.WriteFieldBegin(ctx, "message", thrift.STRING, 4); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:message: ", p), err) } - if err := oprot.WriteString(string(*p.Message)); err != nil { + if err := oprot.WriteString(ctx, string(*p.Message)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.message (4) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 4:message: ", p), err) } } return err } -func (p *JobUpdateEvent) String() string { - if p == nil { - return "" +func (p *JobUpdateEvent) Equals(other *JobUpdateEvent) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.Status != other.Status { return false } + if p.TimestampMs != other.TimestampMs { return false } + if p.User != other.User { + if p.User == nil || other.User == nil { + return false + } + if (*p.User) != (*other.User) { return false } + } + if p.Message != other.Message { + if p.Message == nil || other.Message == nil { + return false + } + if (*p.Message) != (*other.Message) { return false } + } + return true +} + +func (p *JobUpdateEvent) String() string { + if p == nil { + return "" } return fmt.Sprintf("JobUpdateEvent(%+v)", *p) } @@ -11362,14 +12325,14 @@ func (p *JobInstanceUpdateEvent) IsSetMessage() bool { return p.Message != nil } -func (p *JobInstanceUpdateEvent) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *JobInstanceUpdateEvent) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -11377,61 +12340,61 @@ func (p *JobInstanceUpdateEvent) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.I32 { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.I64 { - if err := p.ReadField2(iprot); err != nil { + if err := p.ReadField2(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 3: if fieldTypeId == thrift.I32 { - if err := p.ReadField3(iprot); err != nil { + if err := p.ReadField3(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 4: if fieldTypeId == thrift.STRING { - if err := p.ReadField4(iprot); err != nil { + if err := p.ReadField4(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *JobInstanceUpdateEvent) ReadField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { +func (p *JobInstanceUpdateEvent) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.InstanceId = v @@ -11439,8 +12402,8 @@ func (p *JobInstanceUpdateEvent) ReadField1(iprot thrift.TProtocol) error { return nil } -func (p *JobInstanceUpdateEvent) ReadField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI64(); err != nil { +func (p *JobInstanceUpdateEvent) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { p.TimestampMs = v @@ -11448,8 +12411,8 @@ func (p *JobInstanceUpdateEvent) ReadField2(iprot thrift.TProtocol) error { return nil } -func (p *JobInstanceUpdateEvent) ReadField3(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { +func (p *JobInstanceUpdateEvent) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { return thrift.PrependError("error reading field 3: ", err) } else { temp := JobUpdateAction(v) @@ -11458,8 +12421,8 @@ func (p *JobInstanceUpdateEvent) ReadField3(iprot thrift.TProtocol) error { return nil } -func (p *JobInstanceUpdateEvent) ReadField4(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { +func (p *JobInstanceUpdateEvent) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 4: ", err) } else { p.Message = &v @@ -11467,64 +12430,82 @@ func (p *JobInstanceUpdateEvent) ReadField4(iprot thrift.TProtocol) error { return nil } -func (p *JobInstanceUpdateEvent) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("JobInstanceUpdateEvent"); err != nil { +func (p *JobInstanceUpdateEvent) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "JobInstanceUpdateEvent"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } - if err := p.writeField2(oprot); err != nil { return err } - if err := p.writeField3(oprot); err != nil { return err } - if err := p.writeField4(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *JobInstanceUpdateEvent) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("instanceId", thrift.I32, 1); err != nil { +func (p *JobInstanceUpdateEvent) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "instanceId", thrift.I32, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:instanceId: ", p), err) } - if err := oprot.WriteI32(int32(p.InstanceId)); err != nil { + if err := oprot.WriteI32(ctx, int32(p.InstanceId)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.instanceId (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:instanceId: ", p), err) } return err } -func (p *JobInstanceUpdateEvent) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("timestampMs", thrift.I64, 2); err != nil { +func (p *JobInstanceUpdateEvent) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "timestampMs", thrift.I64, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:timestampMs: ", p), err) } - if err := oprot.WriteI64(int64(p.TimestampMs)); err != nil { + if err := oprot.WriteI64(ctx, int64(p.TimestampMs)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.timestampMs (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:timestampMs: ", p), err) } return err } -func (p *JobInstanceUpdateEvent) writeField3(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("action", thrift.I32, 3); err != nil { +func (p *JobInstanceUpdateEvent) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "action", thrift.I32, 3); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:action: ", p), err) } - if err := oprot.WriteI32(int32(p.Action)); err != nil { + if err := oprot.WriteI32(ctx, int32(p.Action)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.action (3) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 3:action: ", p), err) } return err } -func (p *JobInstanceUpdateEvent) writeField4(oprot thrift.TProtocol) (err error) { +func (p *JobInstanceUpdateEvent) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetMessage() { - if err := oprot.WriteFieldBegin("message", thrift.STRING, 4); err != nil { + if err := oprot.WriteFieldBegin(ctx, "message", thrift.STRING, 4); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:message: ", p), err) } - if err := oprot.WriteString(string(*p.Message)); err != nil { + if err := oprot.WriteString(ctx, string(*p.Message)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.message (4) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 4:message: ", p), err) } } return err } +func (p *JobInstanceUpdateEvent) Equals(other *JobInstanceUpdateEvent) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.InstanceId != other.InstanceId { return false } + if p.TimestampMs != other.TimestampMs { return false } + if p.Action != other.Action { return false } + if p.Message != other.Message { + if p.Message == nil || other.Message == nil { + return false + } + if (*p.Message) != (*other.Message) { return false } + } + return true +} + func (p *JobInstanceUpdateEvent) String() string { if p == nil { return "" @@ -11561,14 +12542,14 @@ func (p *InstanceTaskConfig) IsSetTask() bool { return p.Task != nil } -func (p *InstanceTaskConfig) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *InstanceTaskConfig) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -11576,118 +12557,136 @@ func (p *InstanceTaskConfig) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.SET { - if err := p.ReadField2(iprot); err != nil { + if err := p.ReadField2(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *InstanceTaskConfig) ReadField1(iprot thrift.TProtocol) error { +func (p *InstanceTaskConfig) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { p.Task = &TaskConfig{} - if err := p.Task.Read(iprot); err != nil { + if err := p.Task.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Task), err) } return nil } -func (p *InstanceTaskConfig) ReadField2(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin() +func (p *InstanceTaskConfig) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin(ctx) if err != nil { return thrift.PrependError("error reading set begin: ", err) } tSet := make([]*Range, 0, size) p.Instances = tSet for i := 0; i < size; i ++ { - _elem27 := &Range{} - if err := _elem27.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem27), err) + _elem52 := &Range{} + if err := _elem52.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem52), err) } - p.Instances = append(p.Instances, _elem27) + p.Instances = append(p.Instances, _elem52) } - if err := iprot.ReadSetEnd(); err != nil { + if err := iprot.ReadSetEnd(ctx); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *InstanceTaskConfig) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("InstanceTaskConfig"); err != nil { +func (p *InstanceTaskConfig) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "InstanceTaskConfig"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } - if err := p.writeField2(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *InstanceTaskConfig) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("task", thrift.STRUCT, 1); err != nil { +func (p *InstanceTaskConfig) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "task", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:task: ", p), err) } - if err := p.Task.Write(oprot); err != nil { + if err := p.Task.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Task), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:task: ", p), err) } return err } -func (p *InstanceTaskConfig) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("instances", thrift.SET, 2); err != nil { +func (p *InstanceTaskConfig) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "instances", thrift.SET, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:instances: ", p), err) } - if err := oprot.WriteSetBegin(thrift.STRUCT, len(p.Instances)); err != nil { + if err := oprot.WriteSetBegin(ctx, thrift.STRUCT, len(p.Instances)); err != nil { return thrift.PrependError("error writing set begin: ", err) } for i := 0; i" @@ -11723,14 +12722,14 @@ func (p *JobUpdateState) GetCreatedTimestampMs() int64 { func (p *JobUpdateState) GetLastModifiedTimestampMs() int64 { return p.LastModifiedTimestampMs } -func (p *JobUpdateState) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *JobUpdateState) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -11738,51 +12737,51 @@ func (p *JobUpdateState) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.I32 { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.I64 { - if err := p.ReadField2(iprot); err != nil { + if err := p.ReadField2(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 3: if fieldTypeId == thrift.I64 { - if err := p.ReadField3(iprot); err != nil { + if err := p.ReadField3(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *JobUpdateState) ReadField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { +func (p *JobUpdateState) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { temp := JobUpdateStatus(v) @@ -11791,8 +12790,8 @@ func (p *JobUpdateState) ReadField1(iprot thrift.TProtocol) error { return nil } -func (p *JobUpdateState) ReadField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI64(); err != nil { +func (p *JobUpdateState) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { p.CreatedTimestampMs = v @@ -11800,8 +12799,8 @@ func (p *JobUpdateState) ReadField2(iprot thrift.TProtocol) error { return nil } -func (p *JobUpdateState) ReadField3(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI64(); err != nil { +func (p *JobUpdateState) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { return thrift.PrependError("error reading field 3: ", err) } else { p.LastModifiedTimestampMs = v @@ -11809,51 +12808,63 @@ func (p *JobUpdateState) ReadField3(iprot thrift.TProtocol) error { return nil } -func (p *JobUpdateState) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("JobUpdateState"); err != nil { +func (p *JobUpdateState) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "JobUpdateState"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } - if err := p.writeField2(oprot); err != nil { return err } - if err := p.writeField3(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *JobUpdateState) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("status", thrift.I32, 1); err != nil { +func (p *JobUpdateState) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "status", thrift.I32, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:status: ", p), err) } - if err := oprot.WriteI32(int32(p.Status)); err != nil { + if err := oprot.WriteI32(ctx, int32(p.Status)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.status (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:status: ", p), err) } return err } -func (p *JobUpdateState) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("createdTimestampMs", thrift.I64, 2); err != nil { +func (p *JobUpdateState) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "createdTimestampMs", thrift.I64, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:createdTimestampMs: ", p), err) } - if err := oprot.WriteI64(int64(p.CreatedTimestampMs)); err != nil { + if err := oprot.WriteI64(ctx, int64(p.CreatedTimestampMs)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.createdTimestampMs (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:createdTimestampMs: ", p), err) } return err } -func (p *JobUpdateState) writeField3(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("lastModifiedTimestampMs", thrift.I64, 3); err != nil { +func (p *JobUpdateState) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "lastModifiedTimestampMs", thrift.I64, 3); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:lastModifiedTimestampMs: ", p), err) } - if err := oprot.WriteI64(int64(p.LastModifiedTimestampMs)); err != nil { + if err := oprot.WriteI64(ctx, int64(p.LastModifiedTimestampMs)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.lastModifiedTimestampMs (3) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 3:lastModifiedTimestampMs: ", p), err) } return err } +func (p *JobUpdateState) Equals(other *JobUpdateState) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.Status != other.Status { return false } + if p.CreatedTimestampMs != other.CreatedTimestampMs { return false } + if p.LastModifiedTimestampMs != other.LastModifiedTimestampMs { return false } + return true +} + func (p *JobUpdateState) String() string { if p == nil { return "" @@ -11915,14 +12926,14 @@ func (p *JobUpdateSummary) IsSetMetadata() bool { return p.Metadata != nil } -func (p *JobUpdateSummary) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *JobUpdateSummary) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -11930,69 +12941,69 @@ func (p *JobUpdateSummary) Read(iprot thrift.TProtocol) error { switch fieldId { case 5: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField5(iprot); err != nil { + if err := p.ReadField5(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 3: if fieldTypeId == thrift.STRING { - if err := p.ReadField3(iprot); err != nil { + if err := p.ReadField3(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 4: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField4(iprot); err != nil { + if err := p.ReadField4(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 6: if fieldTypeId == thrift.SET { - if err := p.ReadField6(iprot); err != nil { + if err := p.ReadField6(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *JobUpdateSummary) ReadField5(iprot thrift.TProtocol) error { +func (p *JobUpdateSummary) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { p.Key = &JobUpdateKey{} - if err := p.Key.Read(iprot); err != nil { + if err := p.Key.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Key), err) } return nil } -func (p *JobUpdateSummary) ReadField3(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { +func (p *JobUpdateSummary) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 3: ", err) } else { p.User = v @@ -12000,110 +13011,130 @@ func (p *JobUpdateSummary) ReadField3(iprot thrift.TProtocol) error { return nil } -func (p *JobUpdateSummary) ReadField4(iprot thrift.TProtocol) error { +func (p *JobUpdateSummary) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { p.State = &JobUpdateState{} - if err := p.State.Read(iprot); err != nil { + if err := p.State.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.State), err) } return nil } -func (p *JobUpdateSummary) ReadField6(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin() +func (p *JobUpdateSummary) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin(ctx) if err != nil { return thrift.PrependError("error reading set begin: ", err) } tSet := make([]*Metadata, 0, size) p.Metadata = tSet for i := 0; i < size; i ++ { - _elem28 := &Metadata{} - if err := _elem28.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem28), err) + _elem54 := &Metadata{} + if err := _elem54.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem54), err) } - p.Metadata = append(p.Metadata, _elem28) + p.Metadata = append(p.Metadata, _elem54) } - if err := iprot.ReadSetEnd(); err != nil { + if err := iprot.ReadSetEnd(ctx); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *JobUpdateSummary) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("JobUpdateSummary"); err != nil { +func (p *JobUpdateSummary) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "JobUpdateSummary"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField3(oprot); err != nil { return err } - if err := p.writeField4(oprot); err != nil { return err } - if err := p.writeField5(oprot); err != nil { return err } - if err := p.writeField6(oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } + if err := p.writeField5(ctx, oprot); err != nil { return err } + if err := p.writeField6(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *JobUpdateSummary) writeField3(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("user", thrift.STRING, 3); err != nil { +func (p *JobUpdateSummary) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "user", thrift.STRING, 3); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:user: ", p), err) } - if err := oprot.WriteString(string(p.User)); err != nil { + if err := oprot.WriteString(ctx, string(p.User)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.user (3) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 3:user: ", p), err) } return err } -func (p *JobUpdateSummary) writeField4(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("state", thrift.STRUCT, 4); err != nil { +func (p *JobUpdateSummary) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "state", thrift.STRUCT, 4); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:state: ", p), err) } - if err := p.State.Write(oprot); err != nil { + if err := p.State.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.State), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 4:state: ", p), err) } return err } -func (p *JobUpdateSummary) writeField5(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("key", thrift.STRUCT, 5); err != nil { +func (p *JobUpdateSummary) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "key", thrift.STRUCT, 5); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:key: ", p), err) } - if err := p.Key.Write(oprot); err != nil { + if err := p.Key.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Key), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 5:key: ", p), err) } return err } -func (p *JobUpdateSummary) writeField6(oprot thrift.TProtocol) (err error) { +func (p *JobUpdateSummary) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetMetadata() { - if err := oprot.WriteFieldBegin("metadata", thrift.SET, 6); err != nil { + if err := oprot.WriteFieldBegin(ctx, "metadata", thrift.SET, 6); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:metadata: ", p), err) } - if err := oprot.WriteSetBegin(thrift.STRUCT, len(p.Metadata)); err != nil { + if err := oprot.WriteSetBegin(ctx, thrift.STRUCT, len(p.Metadata)); err != nil { return thrift.PrependError("error writing set begin: ", err) } for i := 0; i" @@ -12153,14 +13184,14 @@ func (p *JobUpdateInstructions) IsSetSettings() bool { return p.Settings != nil } -func (p *JobUpdateInstructions) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *JobUpdateInstructions) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -12168,148 +13199,167 @@ func (p *JobUpdateInstructions) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.SET { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField2(iprot); err != nil { + if err := p.ReadField2(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 3: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField3(iprot); err != nil { + if err := p.ReadField3(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *JobUpdateInstructions) ReadField1(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin() +func (p *JobUpdateInstructions) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin(ctx) if err != nil { return thrift.PrependError("error reading set begin: ", err) } tSet := make([]*InstanceTaskConfig, 0, size) p.InitialState = tSet for i := 0; i < size; i ++ { - _elem29 := &InstanceTaskConfig{} - if err := _elem29.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem29), err) + _elem56 := &InstanceTaskConfig{} + if err := _elem56.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem56), err) } - p.InitialState = append(p.InitialState, _elem29) + p.InitialState = append(p.InitialState, _elem56) } - if err := iprot.ReadSetEnd(); err != nil { + if err := iprot.ReadSetEnd(ctx); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *JobUpdateInstructions) ReadField2(iprot thrift.TProtocol) error { +func (p *JobUpdateInstructions) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { p.DesiredState = &InstanceTaskConfig{} - if err := p.DesiredState.Read(iprot); err != nil { + if err := p.DesiredState.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.DesiredState), err) } return nil } -func (p *JobUpdateInstructions) ReadField3(iprot thrift.TProtocol) error { +func (p *JobUpdateInstructions) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { p.Settings = &JobUpdateSettings{} - if err := p.Settings.Read(iprot); err != nil { + if err := p.Settings.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Settings), err) } return nil } -func (p *JobUpdateInstructions) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("JobUpdateInstructions"); err != nil { +func (p *JobUpdateInstructions) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "JobUpdateInstructions"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } - if err := p.writeField2(oprot); err != nil { return err } - if err := p.writeField3(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *JobUpdateInstructions) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("initialState", thrift.SET, 1); err != nil { +func (p *JobUpdateInstructions) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "initialState", thrift.SET, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:initialState: ", p), err) } - if err := oprot.WriteSetBegin(thrift.STRUCT, len(p.InitialState)); err != nil { + if err := oprot.WriteSetBegin(ctx, thrift.STRUCT, len(p.InitialState)); err != nil { return thrift.PrependError("error writing set begin: ", err) } for i := 0; i" @@ -12353,14 +13403,14 @@ func (p *JobUpdate) IsSetInstructions() bool { return p.Instructions != nil } -func (p *JobUpdate) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *JobUpdate) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -12368,91 +13418,102 @@ func (p *JobUpdate) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField2(iprot); err != nil { + if err := p.ReadField2(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *JobUpdate) ReadField1(iprot thrift.TProtocol) error { +func (p *JobUpdate) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { p.Summary = &JobUpdateSummary{} - if err := p.Summary.Read(iprot); err != nil { + if err := p.Summary.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Summary), err) } return nil } -func (p *JobUpdate) ReadField2(iprot thrift.TProtocol) error { +func (p *JobUpdate) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { p.Instructions = &JobUpdateInstructions{} - if err := p.Instructions.Read(iprot); err != nil { + if err := p.Instructions.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Instructions), err) } return nil } -func (p *JobUpdate) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("JobUpdate"); err != nil { +func (p *JobUpdate) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "JobUpdate"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } - if err := p.writeField2(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *JobUpdate) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("summary", thrift.STRUCT, 1); err != nil { +func (p *JobUpdate) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "summary", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:summary: ", p), err) } - if err := p.Summary.Write(oprot); err != nil { + if err := p.Summary.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Summary), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:summary: ", p), err) } return err } -func (p *JobUpdate) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("instructions", thrift.STRUCT, 2); err != nil { +func (p *JobUpdate) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "instructions", thrift.STRUCT, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:instructions: ", p), err) } - if err := p.Instructions.Write(oprot); err != nil { + if err := p.Instructions.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Instructions), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:instructions: ", p), err) } return err } +func (p *JobUpdate) Equals(other *JobUpdate) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if !p.Summary.Equals(other.Summary) { return false } + if !p.Instructions.Equals(other.Instructions) { return false } + return true +} + func (p *JobUpdate) String() string { if p == nil { return "" @@ -12493,14 +13554,14 @@ func (p *JobUpdateDetails) IsSetUpdate() bool { return p.Update != nil } -func (p *JobUpdateDetails) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *JobUpdateDetails) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -12508,161 +13569,181 @@ func (p *JobUpdateDetails) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.LIST { - if err := p.ReadField2(iprot); err != nil { + if err := p.ReadField2(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 3: if fieldTypeId == thrift.LIST { - if err := p.ReadField3(iprot); err != nil { + if err := p.ReadField3(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *JobUpdateDetails) ReadField1(iprot thrift.TProtocol) error { +func (p *JobUpdateDetails) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { p.Update = &JobUpdate{} - if err := p.Update.Read(iprot); err != nil { + if err := p.Update.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Update), err) } return nil } -func (p *JobUpdateDetails) ReadField2(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin() +func (p *JobUpdateDetails) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) if err != nil { return thrift.PrependError("error reading list begin: ", err) } tSlice := make([]*JobUpdateEvent, 0, size) p.UpdateEvents = tSlice for i := 0; i < size; i ++ { - _elem30 := &JobUpdateEvent{} - if err := _elem30.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem30), err) + _elem58 := &JobUpdateEvent{} + if err := _elem58.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem58), err) } - p.UpdateEvents = append(p.UpdateEvents, _elem30) + p.UpdateEvents = append(p.UpdateEvents, _elem58) } - if err := iprot.ReadListEnd(); err != nil { + if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) } return nil } -func (p *JobUpdateDetails) ReadField3(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin() +func (p *JobUpdateDetails) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) if err != nil { return thrift.PrependError("error reading list begin: ", err) } tSlice := make([]*JobInstanceUpdateEvent, 0, size) p.InstanceEvents = tSlice for i := 0; i < size; i ++ { - _elem31 := &JobInstanceUpdateEvent{} - if err := _elem31.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem31), err) + _elem59 := &JobInstanceUpdateEvent{} + if err := _elem59.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem59), err) } - p.InstanceEvents = append(p.InstanceEvents, _elem31) + p.InstanceEvents = append(p.InstanceEvents, _elem59) } - if err := iprot.ReadListEnd(); err != nil { + if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) } return nil } -func (p *JobUpdateDetails) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("JobUpdateDetails"); err != nil { +func (p *JobUpdateDetails) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "JobUpdateDetails"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } - if err := p.writeField2(oprot); err != nil { return err } - if err := p.writeField3(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *JobUpdateDetails) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("update", thrift.STRUCT, 1); err != nil { +func (p *JobUpdateDetails) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "update", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:update: ", p), err) } - if err := p.Update.Write(oprot); err != nil { + if err := p.Update.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Update), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:update: ", p), err) } return err } -func (p *JobUpdateDetails) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("updateEvents", thrift.LIST, 2); err != nil { +func (p *JobUpdateDetails) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "updateEvents", thrift.LIST, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:updateEvents: ", p), err) } - if err := oprot.WriteListBegin(thrift.STRUCT, len(p.UpdateEvents)); err != nil { + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.UpdateEvents)); err != nil { return thrift.PrependError("error writing list begin: ", err) } for _, v := range p.UpdateEvents { - if err := v.Write(oprot); err != nil { + if err := v.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) } } - if err := oprot.WriteListEnd(); err != nil { + if err := oprot.WriteListEnd(ctx); err != nil { return thrift.PrependError("error writing list end: ", err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:updateEvents: ", p), err) } return err } -func (p *JobUpdateDetails) writeField3(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("instanceEvents", thrift.LIST, 3); err != nil { +func (p *JobUpdateDetails) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "instanceEvents", thrift.LIST, 3); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:instanceEvents: ", p), err) } - if err := oprot.WriteListBegin(thrift.STRUCT, len(p.InstanceEvents)); err != nil { + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.InstanceEvents)); err != nil { return thrift.PrependError("error writing list begin: ", err) } for _, v := range p.InstanceEvents { - if err := v.Write(oprot); err != nil { + if err := v.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) } } - if err := oprot.WriteListEnd(); err != nil { + if err := oprot.WriteListEnd(ctx); err != nil { return thrift.PrependError("error writing list end: ", err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 3:instanceEvents: ", p), err) } return err } +func (p *JobUpdateDetails) Equals(other *JobUpdateDetails) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if !p.Update.Equals(other.Update) { return false } + if len(p.UpdateEvents) != len(other.UpdateEvents) { return false } + for i, _tgt := range p.UpdateEvents { + _src60 := other.UpdateEvents[i] + if !_tgt.Equals(_src60) { return false } + } + if len(p.InstanceEvents) != len(other.InstanceEvents) { return false } + for i, _tgt := range p.InstanceEvents { + _src61 := other.InstanceEvents[i] + if !_tgt.Equals(_src61) { return false } + } + return true +} + func (p *JobUpdateDetails) String() string { if p == nil { return "" @@ -12723,14 +13804,14 @@ func (p *JobUpdateRequest) IsSetMetadata() bool { return p.Metadata != nil } -func (p *JobUpdateRequest) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *JobUpdateRequest) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -12738,69 +13819,69 @@ func (p *JobUpdateRequest) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.I32 { - if err := p.ReadField2(iprot); err != nil { + if err := p.ReadField2(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 3: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField3(iprot); err != nil { + if err := p.ReadField3(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 4: if fieldTypeId == thrift.SET { - if err := p.ReadField4(iprot); err != nil { + if err := p.ReadField4(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *JobUpdateRequest) ReadField1(iprot thrift.TProtocol) error { +func (p *JobUpdateRequest) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { p.TaskConfig = &TaskConfig{} - if err := p.TaskConfig.Read(iprot); err != nil { + if err := p.TaskConfig.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.TaskConfig), err) } return nil } -func (p *JobUpdateRequest) ReadField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { +func (p *JobUpdateRequest) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { p.InstanceCount = v @@ -12808,110 +13889,130 @@ func (p *JobUpdateRequest) ReadField2(iprot thrift.TProtocol) error { return nil } -func (p *JobUpdateRequest) ReadField3(iprot thrift.TProtocol) error { +func (p *JobUpdateRequest) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { p.Settings = &JobUpdateSettings{} - if err := p.Settings.Read(iprot); err != nil { + if err := p.Settings.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Settings), err) } return nil } -func (p *JobUpdateRequest) ReadField4(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin() +func (p *JobUpdateRequest) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin(ctx) if err != nil { return thrift.PrependError("error reading set begin: ", err) } tSet := make([]*Metadata, 0, size) p.Metadata = tSet for i := 0; i < size; i ++ { - _elem32 := &Metadata{} - if err := _elem32.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem32), err) + _elem62 := &Metadata{} + if err := _elem62.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem62), err) } - p.Metadata = append(p.Metadata, _elem32) + p.Metadata = append(p.Metadata, _elem62) } - if err := iprot.ReadSetEnd(); err != nil { + if err := iprot.ReadSetEnd(ctx); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *JobUpdateRequest) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("JobUpdateRequest"); err != nil { +func (p *JobUpdateRequest) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "JobUpdateRequest"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } - if err := p.writeField2(oprot); err != nil { return err } - if err := p.writeField3(oprot); err != nil { return err } - if err := p.writeField4(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *JobUpdateRequest) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("taskConfig", thrift.STRUCT, 1); err != nil { +func (p *JobUpdateRequest) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "taskConfig", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:taskConfig: ", p), err) } - if err := p.TaskConfig.Write(oprot); err != nil { + if err := p.TaskConfig.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.TaskConfig), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:taskConfig: ", p), err) } return err } -func (p *JobUpdateRequest) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("instanceCount", thrift.I32, 2); err != nil { +func (p *JobUpdateRequest) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "instanceCount", thrift.I32, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:instanceCount: ", p), err) } - if err := oprot.WriteI32(int32(p.InstanceCount)); err != nil { + if err := oprot.WriteI32(ctx, int32(p.InstanceCount)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.instanceCount (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:instanceCount: ", p), err) } return err } -func (p *JobUpdateRequest) writeField3(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("settings", thrift.STRUCT, 3); err != nil { +func (p *JobUpdateRequest) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "settings", thrift.STRUCT, 3); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:settings: ", p), err) } - if err := p.Settings.Write(oprot); err != nil { + if err := p.Settings.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Settings), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 3:settings: ", p), err) } return err } -func (p *JobUpdateRequest) writeField4(oprot thrift.TProtocol) (err error) { +func (p *JobUpdateRequest) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetMetadata() { - if err := oprot.WriteFieldBegin("metadata", thrift.SET, 4); err != nil { + if err := oprot.WriteFieldBegin(ctx, "metadata", thrift.SET, 4); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:metadata: ", p), err) } - if err := oprot.WriteSetBegin(thrift.STRUCT, len(p.Metadata)); err != nil { + if err := oprot.WriteSetBegin(ctx, thrift.STRUCT, len(p.Metadata)); err != nil { return thrift.PrependError("error writing set begin: ", err) } for i := 0; i" @@ -13006,14 +14107,14 @@ func (p *JobUpdateQuery) IsSetUpdateStatuses() bool { return p.UpdateStatuses != nil } -func (p *JobUpdateQuery) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *JobUpdateQuery) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -13021,91 +14122,91 @@ func (p *JobUpdateQuery) Read(iprot thrift.TProtocol) error { switch fieldId { case 2: if fieldTypeId == thrift.STRING { - if err := p.ReadField2(iprot); err != nil { + if err := p.ReadField2(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 8: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField8(iprot); err != nil { + if err := p.ReadField8(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 3: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField3(iprot); err != nil { + if err := p.ReadField3(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 4: if fieldTypeId == thrift.STRING { - if err := p.ReadField4(iprot); err != nil { + if err := p.ReadField4(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 5: if fieldTypeId == thrift.SET { - if err := p.ReadField5(iprot); err != nil { + if err := p.ReadField5(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 6: if fieldTypeId == thrift.I32 { - if err := p.ReadField6(iprot); err != nil { + if err := p.ReadField6(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 7: if fieldTypeId == thrift.I32 { - if err := p.ReadField7(iprot); err != nil { + if err := p.ReadField7(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *JobUpdateQuery) ReadField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { +func (p *JobUpdateQuery) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { p.Role = &v @@ -13113,24 +14214,24 @@ func (p *JobUpdateQuery) ReadField2(iprot thrift.TProtocol) error { return nil } -func (p *JobUpdateQuery) ReadField8(iprot thrift.TProtocol) error { +func (p *JobUpdateQuery) ReadField8(ctx context.Context, iprot thrift.TProtocol) error { p.Key = &JobUpdateKey{} - if err := p.Key.Read(iprot); err != nil { + if err := p.Key.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Key), err) } return nil } -func (p *JobUpdateQuery) ReadField3(iprot thrift.TProtocol) error { +func (p *JobUpdateQuery) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { p.JobKey = &JobKey{} - if err := p.JobKey.Read(iprot); err != nil { + if err := p.JobKey.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.JobKey), err) } return nil } -func (p *JobUpdateQuery) ReadField4(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { +func (p *JobUpdateQuery) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 4: ", err) } else { p.User = &v @@ -13138,31 +14239,31 @@ func (p *JobUpdateQuery) ReadField4(iprot thrift.TProtocol) error { return nil } -func (p *JobUpdateQuery) ReadField5(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin() +func (p *JobUpdateQuery) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin(ctx) if err != nil { return thrift.PrependError("error reading set begin: ", err) } tSet := make([]JobUpdateStatus, 0, size) p.UpdateStatuses = tSet for i := 0; i < size; i ++ { -var _elem33 JobUpdateStatus - if v, err := iprot.ReadI32(); err != nil { +var _elem64 JobUpdateStatus + if v, err := iprot.ReadI32(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { temp := JobUpdateStatus(v) - _elem33 = temp + _elem64 = temp } - p.UpdateStatuses = append(p.UpdateStatuses, _elem33) + p.UpdateStatuses = append(p.UpdateStatuses, _elem64) } - if err := iprot.ReadSetEnd(); err != nil { + if err := iprot.ReadSetEnd(ctx); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *JobUpdateQuery) ReadField6(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { +func (p *JobUpdateQuery) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { return thrift.PrependError("error reading field 6: ", err) } else { p.Offset = v @@ -13170,8 +14271,8 @@ func (p *JobUpdateQuery) ReadField6(iprot thrift.TProtocol) error { return nil } -func (p *JobUpdateQuery) ReadField7(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { +func (p *JobUpdateQuery) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { return thrift.PrependError("error reading field 7: ", err) } else { p.Limit = v @@ -13179,122 +14280,155 @@ func (p *JobUpdateQuery) ReadField7(iprot thrift.TProtocol) error { return nil } -func (p *JobUpdateQuery) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("JobUpdateQuery"); err != nil { +func (p *JobUpdateQuery) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "JobUpdateQuery"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField2(oprot); err != nil { return err } - if err := p.writeField3(oprot); err != nil { return err } - if err := p.writeField4(oprot); err != nil { return err } - if err := p.writeField5(oprot); err != nil { return err } - if err := p.writeField6(oprot); err != nil { return err } - if err := p.writeField7(oprot); err != nil { return err } - if err := p.writeField8(oprot); err != nil { return err } - } - if err := oprot.WriteFieldStop(); err != nil { + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } + if err := p.writeField5(ctx, oprot); err != nil { return err } + if err := p.writeField6(ctx, oprot); err != nil { return err } + if err := p.writeField7(ctx, oprot); err != nil { return err } + if err := p.writeField8(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *JobUpdateQuery) writeField2(oprot thrift.TProtocol) (err error) { +func (p *JobUpdateQuery) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetRole() { - if err := oprot.WriteFieldBegin("role", thrift.STRING, 2); err != nil { + if err := oprot.WriteFieldBegin(ctx, "role", thrift.STRING, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:role: ", p), err) } - if err := oprot.WriteString(string(*p.Role)); err != nil { + if err := oprot.WriteString(ctx, string(*p.Role)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.role (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:role: ", p), err) } } return err } -func (p *JobUpdateQuery) writeField3(oprot thrift.TProtocol) (err error) { +func (p *JobUpdateQuery) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetJobKey() { - if err := oprot.WriteFieldBegin("jobKey", thrift.STRUCT, 3); err != nil { + if err := oprot.WriteFieldBegin(ctx, "jobKey", thrift.STRUCT, 3); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:jobKey: ", p), err) } - if err := p.JobKey.Write(oprot); err != nil { + if err := p.JobKey.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.JobKey), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 3:jobKey: ", p), err) } } return err } -func (p *JobUpdateQuery) writeField4(oprot thrift.TProtocol) (err error) { +func (p *JobUpdateQuery) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetUser() { - if err := oprot.WriteFieldBegin("user", thrift.STRING, 4); err != nil { + if err := oprot.WriteFieldBegin(ctx, "user", thrift.STRING, 4); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:user: ", p), err) } - if err := oprot.WriteString(string(*p.User)); err != nil { + if err := oprot.WriteString(ctx, string(*p.User)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.user (4) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 4:user: ", p), err) } } return err } -func (p *JobUpdateQuery) writeField5(oprot thrift.TProtocol) (err error) { +func (p *JobUpdateQuery) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetUpdateStatuses() { - if err := oprot.WriteFieldBegin("updateStatuses", thrift.SET, 5); err != nil { + if err := oprot.WriteFieldBegin(ctx, "updateStatuses", thrift.SET, 5); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:updateStatuses: ", p), err) } - if err := oprot.WriteSetBegin(thrift.I32, len(p.UpdateStatuses)); err != nil { + if err := oprot.WriteSetBegin(ctx, thrift.I32, len(p.UpdateStatuses)); err != nil { return thrift.PrependError("error writing set begin: ", err) } for i := 0; i" @@ -13341,14 +14475,14 @@ func (p *HostMaintenanceRequest) IsSetDefaultSlaPolicy() bool { return p.DefaultSlaPolicy != nil } -func (p *HostMaintenanceRequest) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *HostMaintenanceRequest) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -13356,61 +14490,61 @@ func (p *HostMaintenanceRequest) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRING { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField2(iprot); err != nil { + if err := p.ReadField2(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 3: if fieldTypeId == thrift.I64 { - if err := p.ReadField3(iprot); err != nil { + if err := p.ReadField3(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 4: if fieldTypeId == thrift.I64 { - if err := p.ReadField4(iprot); err != nil { + if err := p.ReadField4(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *HostMaintenanceRequest) ReadField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { +func (p *HostMaintenanceRequest) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.Host = v @@ -13418,16 +14552,16 @@ func (p *HostMaintenanceRequest) ReadField1(iprot thrift.TProtocol) error { return nil } -func (p *HostMaintenanceRequest) ReadField2(iprot thrift.TProtocol) error { +func (p *HostMaintenanceRequest) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { p.DefaultSlaPolicy = &SlaPolicy{} - if err := p.DefaultSlaPolicy.Read(iprot); err != nil { + if err := p.DefaultSlaPolicy.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.DefaultSlaPolicy), err) } return nil } -func (p *HostMaintenanceRequest) ReadField3(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI64(); err != nil { +func (p *HostMaintenanceRequest) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { return thrift.PrependError("error reading field 3: ", err) } else { p.TimeoutSecs = v @@ -13435,8 +14569,8 @@ func (p *HostMaintenanceRequest) ReadField3(iprot thrift.TProtocol) error { return nil } -func (p *HostMaintenanceRequest) ReadField4(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI64(); err != nil { +func (p *HostMaintenanceRequest) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { return thrift.PrependError("error reading field 4: ", err) } else { p.CreatedTimestampMs = v @@ -13444,63 +14578,76 @@ func (p *HostMaintenanceRequest) ReadField4(iprot thrift.TProtocol) error { return nil } -func (p *HostMaintenanceRequest) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("HostMaintenanceRequest"); err != nil { +func (p *HostMaintenanceRequest) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "HostMaintenanceRequest"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } - if err := p.writeField2(oprot); err != nil { return err } - if err := p.writeField3(oprot); err != nil { return err } - if err := p.writeField4(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *HostMaintenanceRequest) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("host", thrift.STRING, 1); err != nil { +func (p *HostMaintenanceRequest) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "host", thrift.STRING, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:host: ", p), err) } - if err := oprot.WriteString(string(p.Host)); err != nil { + if err := oprot.WriteString(ctx, string(p.Host)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.host (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:host: ", p), err) } return err } -func (p *HostMaintenanceRequest) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("defaultSlaPolicy", thrift.STRUCT, 2); err != nil { +func (p *HostMaintenanceRequest) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "defaultSlaPolicy", thrift.STRUCT, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:defaultSlaPolicy: ", p), err) } - if err := p.DefaultSlaPolicy.Write(oprot); err != nil { + if err := p.DefaultSlaPolicy.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.DefaultSlaPolicy), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:defaultSlaPolicy: ", p), err) } return err } -func (p *HostMaintenanceRequest) writeField3(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("timeoutSecs", thrift.I64, 3); err != nil { +func (p *HostMaintenanceRequest) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "timeoutSecs", thrift.I64, 3); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:timeoutSecs: ", p), err) } - if err := oprot.WriteI64(int64(p.TimeoutSecs)); err != nil { + if err := oprot.WriteI64(ctx, int64(p.TimeoutSecs)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.timeoutSecs (3) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 3:timeoutSecs: ", p), err) } return err } -func (p *HostMaintenanceRequest) writeField4(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("createdTimestampMs", thrift.I64, 4); err != nil { +func (p *HostMaintenanceRequest) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "createdTimestampMs", thrift.I64, 4); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:createdTimestampMs: ", p), err) } - if err := oprot.WriteI64(int64(p.CreatedTimestampMs)); err != nil { + if err := oprot.WriteI64(ctx, int64(p.CreatedTimestampMs)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.createdTimestampMs (4) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 4:createdTimestampMs: ", p), err) } return err } +func (p *HostMaintenanceRequest) Equals(other *HostMaintenanceRequest) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.Host != other.Host { return false } + if !p.DefaultSlaPolicy.Equals(other.DefaultSlaPolicy) { return false } + if p.TimeoutSecs != other.TimeoutSecs { return false } + if p.CreatedTimestampMs != other.CreatedTimestampMs { return false } + return true +} + func (p *HostMaintenanceRequest) String() string { if p == nil { return "" @@ -13522,14 +14669,14 @@ func NewListBackupsResult_() *ListBackupsResult_ { func (p *ListBackupsResult_) GetBackups() []string { return p.Backups } -func (p *ListBackupsResult_) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *ListBackupsResult_) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -13537,89 +14684,106 @@ func (p *ListBackupsResult_) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.SET { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ListBackupsResult_) ReadField1(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin() +func (p *ListBackupsResult_) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin(ctx) if err != nil { return thrift.PrependError("error reading set begin: ", err) } tSet := make([]string, 0, size) p.Backups = tSet for i := 0; i < size; i ++ { -var _elem34 string - if v, err := iprot.ReadString(); err != nil { +var _elem66 string + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem34 = v + _elem66 = v } - p.Backups = append(p.Backups, _elem34) + p.Backups = append(p.Backups, _elem66) } - if err := iprot.ReadSetEnd(); err != nil { + if err := iprot.ReadSetEnd(ctx); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *ListBackupsResult_) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("ListBackupsResult"); err != nil { +func (p *ListBackupsResult_) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "ListBackupsResult"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ListBackupsResult_) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("backups", thrift.SET, 1); err != nil { +func (p *ListBackupsResult_) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "backups", thrift.SET, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:backups: ", p), err) } - if err := oprot.WriteSetBegin(thrift.STRING, len(p.Backups)); err != nil { + if err := oprot.WriteSetBegin(ctx, thrift.STRING, len(p.Backups)); err != nil { return thrift.PrependError("error writing set begin: ", err) } for i := 0; i" @@ -13641,14 +14805,14 @@ func NewStartMaintenanceResult_() *StartMaintenanceResult_ { func (p *StartMaintenanceResult_) GetStatuses() []*HostStatus { return p.Statuses } -func (p *StartMaintenanceResult_) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *StartMaintenanceResult_) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -13656,88 +14820,105 @@ func (p *StartMaintenanceResult_) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.SET { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *StartMaintenanceResult_) ReadField1(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin() +func (p *StartMaintenanceResult_) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin(ctx) if err != nil { return thrift.PrependError("error reading set begin: ", err) } tSet := make([]*HostStatus, 0, size) p.Statuses = tSet for i := 0; i < size; i ++ { - _elem35 := &HostStatus{} - if err := _elem35.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem35), err) + _elem68 := &HostStatus{} + if err := _elem68.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem68), err) } - p.Statuses = append(p.Statuses, _elem35) + p.Statuses = append(p.Statuses, _elem68) } - if err := iprot.ReadSetEnd(); err != nil { + if err := iprot.ReadSetEnd(ctx); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *StartMaintenanceResult_) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("StartMaintenanceResult"); err != nil { +func (p *StartMaintenanceResult_) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "StartMaintenanceResult"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *StartMaintenanceResult_) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("statuses", thrift.SET, 1); err != nil { +func (p *StartMaintenanceResult_) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "statuses", thrift.SET, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:statuses: ", p), err) } - if err := oprot.WriteSetBegin(thrift.STRUCT, len(p.Statuses)); err != nil { + if err := oprot.WriteSetBegin(ctx, thrift.STRUCT, len(p.Statuses)); err != nil { return thrift.PrependError("error writing set begin: ", err) } for i := 0; i" @@ -13759,14 +14940,14 @@ func NewDrainHostsResult_() *DrainHostsResult_ { func (p *DrainHostsResult_) GetStatuses() []*HostStatus { return p.Statuses } -func (p *DrainHostsResult_) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *DrainHostsResult_) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -13774,88 +14955,105 @@ func (p *DrainHostsResult_) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.SET { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *DrainHostsResult_) ReadField1(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin() +func (p *DrainHostsResult_) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin(ctx) if err != nil { return thrift.PrependError("error reading set begin: ", err) } tSet := make([]*HostStatus, 0, size) p.Statuses = tSet for i := 0; i < size; i ++ { - _elem36 := &HostStatus{} - if err := _elem36.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem36), err) + _elem70 := &HostStatus{} + if err := _elem70.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem70), err) } - p.Statuses = append(p.Statuses, _elem36) + p.Statuses = append(p.Statuses, _elem70) } - if err := iprot.ReadSetEnd(); err != nil { + if err := iprot.ReadSetEnd(ctx); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *DrainHostsResult_) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("DrainHostsResult"); err != nil { +func (p *DrainHostsResult_) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "DrainHostsResult"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *DrainHostsResult_) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("statuses", thrift.SET, 1); err != nil { +func (p *DrainHostsResult_) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "statuses", thrift.SET, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:statuses: ", p), err) } - if err := oprot.WriteSetBegin(thrift.STRUCT, len(p.Statuses)); err != nil { + if err := oprot.WriteSetBegin(ctx, thrift.STRUCT, len(p.Statuses)); err != nil { return thrift.PrependError("error writing set begin: ", err) } for i := 0; i" @@ -13877,14 +15075,14 @@ func NewQueryRecoveryResult_() *QueryRecoveryResult_ { func (p *QueryRecoveryResult_) GetTasks() []*ScheduledTask { return p.Tasks } -func (p *QueryRecoveryResult_) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *QueryRecoveryResult_) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -13892,88 +15090,105 @@ func (p *QueryRecoveryResult_) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.SET { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *QueryRecoveryResult_) ReadField1(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin() +func (p *QueryRecoveryResult_) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin(ctx) if err != nil { return thrift.PrependError("error reading set begin: ", err) } tSet := make([]*ScheduledTask, 0, size) p.Tasks = tSet for i := 0; i < size; i ++ { - _elem37 := &ScheduledTask{} - if err := _elem37.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem37), err) + _elem72 := &ScheduledTask{} + if err := _elem72.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem72), err) } - p.Tasks = append(p.Tasks, _elem37) + p.Tasks = append(p.Tasks, _elem72) } - if err := iprot.ReadSetEnd(); err != nil { + if err := iprot.ReadSetEnd(ctx); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *QueryRecoveryResult_) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("QueryRecoveryResult"); err != nil { +func (p *QueryRecoveryResult_) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "QueryRecoveryResult"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *QueryRecoveryResult_) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("tasks", thrift.SET, 1); err != nil { +func (p *QueryRecoveryResult_) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "tasks", thrift.SET, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:tasks: ", p), err) } - if err := oprot.WriteSetBegin(thrift.STRUCT, len(p.Tasks)); err != nil { + if err := oprot.WriteSetBegin(ctx, thrift.STRUCT, len(p.Tasks)); err != nil { return thrift.PrependError("error writing set begin: ", err) } for i := 0; i" @@ -13995,14 +15210,14 @@ func NewMaintenanceStatusResult_() *MaintenanceStatusResult_ { func (p *MaintenanceStatusResult_) GetStatuses() []*HostStatus { return p.Statuses } -func (p *MaintenanceStatusResult_) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *MaintenanceStatusResult_) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -14010,88 +15225,105 @@ func (p *MaintenanceStatusResult_) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.SET { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *MaintenanceStatusResult_) ReadField1(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin() +func (p *MaintenanceStatusResult_) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin(ctx) if err != nil { return thrift.PrependError("error reading set begin: ", err) } tSet := make([]*HostStatus, 0, size) p.Statuses = tSet for i := 0; i < size; i ++ { - _elem38 := &HostStatus{} - if err := _elem38.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem38), err) + _elem74 := &HostStatus{} + if err := _elem74.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem74), err) } - p.Statuses = append(p.Statuses, _elem38) + p.Statuses = append(p.Statuses, _elem74) } - if err := iprot.ReadSetEnd(); err != nil { + if err := iprot.ReadSetEnd(ctx); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *MaintenanceStatusResult_) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("MaintenanceStatusResult"); err != nil { +func (p *MaintenanceStatusResult_) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "MaintenanceStatusResult"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *MaintenanceStatusResult_) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("statuses", thrift.SET, 1); err != nil { +func (p *MaintenanceStatusResult_) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "statuses", thrift.SET, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:statuses: ", p), err) } - if err := oprot.WriteSetBegin(thrift.STRUCT, len(p.Statuses)); err != nil { + if err := oprot.WriteSetBegin(ctx, thrift.STRUCT, len(p.Statuses)); err != nil { return thrift.PrependError("error writing set begin: ", err) } for i := 0; i" @@ -14113,14 +15345,14 @@ func NewEndMaintenanceResult_() *EndMaintenanceResult_ { func (p *EndMaintenanceResult_) GetStatuses() []*HostStatus { return p.Statuses } -func (p *EndMaintenanceResult_) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *EndMaintenanceResult_) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -14128,88 +15360,105 @@ func (p *EndMaintenanceResult_) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.SET { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *EndMaintenanceResult_) ReadField1(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin() +func (p *EndMaintenanceResult_) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin(ctx) if err != nil { return thrift.PrependError("error reading set begin: ", err) } tSet := make([]*HostStatus, 0, size) p.Statuses = tSet for i := 0; i < size; i ++ { - _elem39 := &HostStatus{} - if err := _elem39.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem39), err) + _elem76 := &HostStatus{} + if err := _elem76.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem76), err) } - p.Statuses = append(p.Statuses, _elem39) + p.Statuses = append(p.Statuses, _elem76) } - if err := iprot.ReadSetEnd(); err != nil { + if err := iprot.ReadSetEnd(ctx); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *EndMaintenanceResult_) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("EndMaintenanceResult"); err != nil { +func (p *EndMaintenanceResult_) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "EndMaintenanceResult"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *EndMaintenanceResult_) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("statuses", thrift.SET, 1); err != nil { +func (p *EndMaintenanceResult_) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "statuses", thrift.SET, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:statuses: ", p), err) } - if err := oprot.WriteSetBegin(thrift.STRUCT, len(p.Statuses)); err != nil { + if err := oprot.WriteSetBegin(ctx, thrift.STRUCT, len(p.Statuses)); err != nil { return thrift.PrependError("error writing set begin: ", err) } for i := 0; i" @@ -14231,14 +15480,14 @@ func NewRoleSummaryResult_() *RoleSummaryResult_ { func (p *RoleSummaryResult_) GetSummaries() []*RoleSummary { return p.Summaries } -func (p *RoleSummaryResult_) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *RoleSummaryResult_) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -14246,88 +15495,105 @@ func (p *RoleSummaryResult_) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.SET { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *RoleSummaryResult_) ReadField1(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin() +func (p *RoleSummaryResult_) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin(ctx) if err != nil { return thrift.PrependError("error reading set begin: ", err) } tSet := make([]*RoleSummary, 0, size) p.Summaries = tSet for i := 0; i < size; i ++ { - _elem40 := &RoleSummary{} - if err := _elem40.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem40), err) + _elem78 := &RoleSummary{} + if err := _elem78.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem78), err) } - p.Summaries = append(p.Summaries, _elem40) + p.Summaries = append(p.Summaries, _elem78) } - if err := iprot.ReadSetEnd(); err != nil { + if err := iprot.ReadSetEnd(ctx); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *RoleSummaryResult_) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("RoleSummaryResult"); err != nil { +func (p *RoleSummaryResult_) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "RoleSummaryResult"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *RoleSummaryResult_) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("summaries", thrift.SET, 1); err != nil { +func (p *RoleSummaryResult_) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "summaries", thrift.SET, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:summaries: ", p), err) } - if err := oprot.WriteSetBegin(thrift.STRUCT, len(p.Summaries)); err != nil { + if err := oprot.WriteSetBegin(ctx, thrift.STRUCT, len(p.Summaries)); err != nil { return thrift.PrependError("error writing set begin: ", err) } for i := 0; i" @@ -14349,14 +15615,14 @@ func NewJobSummaryResult_() *JobSummaryResult_ { func (p *JobSummaryResult_) GetSummaries() []*JobSummary { return p.Summaries } -func (p *JobSummaryResult_) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *JobSummaryResult_) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -14364,88 +15630,105 @@ func (p *JobSummaryResult_) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.SET { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *JobSummaryResult_) ReadField1(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin() +func (p *JobSummaryResult_) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin(ctx) if err != nil { return thrift.PrependError("error reading set begin: ", err) } tSet := make([]*JobSummary, 0, size) p.Summaries = tSet for i := 0; i < size; i ++ { - _elem41 := &JobSummary{} - if err := _elem41.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem41), err) + _elem80 := &JobSummary{} + if err := _elem80.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem80), err) } - p.Summaries = append(p.Summaries, _elem41) + p.Summaries = append(p.Summaries, _elem80) } - if err := iprot.ReadSetEnd(); err != nil { + if err := iprot.ReadSetEnd(ctx); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *JobSummaryResult_) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("JobSummaryResult"); err != nil { +func (p *JobSummaryResult_) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "JobSummaryResult"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *JobSummaryResult_) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("summaries", thrift.SET, 1); err != nil { +func (p *JobSummaryResult_) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "summaries", thrift.SET, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:summaries: ", p), err) } - if err := oprot.WriteSetBegin(thrift.STRUCT, len(p.Summaries)); err != nil { + if err := oprot.WriteSetBegin(ctx, thrift.STRUCT, len(p.Summaries)); err != nil { return thrift.PrependError("error writing set begin: ", err) } for i := 0; i" @@ -14474,14 +15757,14 @@ func (p *ConfigSummaryResult_) IsSetSummary() bool { return p.Summary != nil } -func (p *ConfigSummaryResult_) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *ConfigSummaryResult_) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -14489,61 +15772,71 @@ func (p *ConfigSummaryResult_) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ConfigSummaryResult_) ReadField1(iprot thrift.TProtocol) error { +func (p *ConfigSummaryResult_) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { p.Summary = &ConfigSummary{} - if err := p.Summary.Read(iprot); err != nil { + if err := p.Summary.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Summary), err) } return nil } -func (p *ConfigSummaryResult_) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("ConfigSummaryResult"); err != nil { +func (p *ConfigSummaryResult_) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "ConfigSummaryResult"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ConfigSummaryResult_) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("summary", thrift.STRUCT, 1); err != nil { +func (p *ConfigSummaryResult_) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "summary", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:summary: ", p), err) } - if err := p.Summary.Write(oprot); err != nil { + if err := p.Summary.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Summary), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:summary: ", p), err) } return err } +func (p *ConfigSummaryResult_) Equals(other *ConfigSummaryResult_) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if !p.Summary.Equals(other.Summary) { return false } + return true +} + func (p *ConfigSummaryResult_) String() string { if p == nil { return "" @@ -14565,14 +15858,14 @@ func NewGetPendingReasonResult_() *GetPendingReasonResult_ { func (p *GetPendingReasonResult_) GetReasons() []*PendingReason { return p.Reasons } -func (p *GetPendingReasonResult_) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *GetPendingReasonResult_) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -14580,88 +15873,105 @@ func (p *GetPendingReasonResult_) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.SET { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *GetPendingReasonResult_) ReadField1(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin() +func (p *GetPendingReasonResult_) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin(ctx) if err != nil { return thrift.PrependError("error reading set begin: ", err) } tSet := make([]*PendingReason, 0, size) p.Reasons = tSet for i := 0; i < size; i ++ { - _elem42 := &PendingReason{} - if err := _elem42.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem42), err) + _elem82 := &PendingReason{} + if err := _elem82.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem82), err) } - p.Reasons = append(p.Reasons, _elem42) + p.Reasons = append(p.Reasons, _elem82) } - if err := iprot.ReadSetEnd(); err != nil { + if err := iprot.ReadSetEnd(ctx); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *GetPendingReasonResult_) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("GetPendingReasonResult"); err != nil { +func (p *GetPendingReasonResult_) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "GetPendingReasonResult"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *GetPendingReasonResult_) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("reasons", thrift.SET, 1); err != nil { +func (p *GetPendingReasonResult_) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "reasons", thrift.SET, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:reasons: ", p), err) } - if err := oprot.WriteSetBegin(thrift.STRUCT, len(p.Reasons)); err != nil { + if err := oprot.WriteSetBegin(ctx, thrift.STRUCT, len(p.Reasons)); err != nil { return thrift.PrependError("error writing set begin: ", err) } for i := 0; i" @@ -14705,14 +16015,14 @@ func (p *StartJobUpdateResult_) IsSetUpdateSummary() bool { return p.UpdateSummary != nil } -func (p *StartJobUpdateResult_) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *StartJobUpdateResult_) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -14720,93 +16030,104 @@ func (p *StartJobUpdateResult_) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField2(iprot); err != nil { + if err := p.ReadField2(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *StartJobUpdateResult_) ReadField1(iprot thrift.TProtocol) error { +func (p *StartJobUpdateResult_) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { p.Key = &JobUpdateKey{} - if err := p.Key.Read(iprot); err != nil { + if err := p.Key.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Key), err) } return nil } -func (p *StartJobUpdateResult_) ReadField2(iprot thrift.TProtocol) error { +func (p *StartJobUpdateResult_) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { p.UpdateSummary = &JobUpdateSummary{} - if err := p.UpdateSummary.Read(iprot); err != nil { + if err := p.UpdateSummary.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.UpdateSummary), err) } return nil } -func (p *StartJobUpdateResult_) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("StartJobUpdateResult"); err != nil { +func (p *StartJobUpdateResult_) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "StartJobUpdateResult"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } - if err := p.writeField2(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *StartJobUpdateResult_) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("key", thrift.STRUCT, 1); err != nil { +func (p *StartJobUpdateResult_) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "key", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:key: ", p), err) } - if err := p.Key.Write(oprot); err != nil { + if err := p.Key.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Key), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:key: ", p), err) } return err } -func (p *StartJobUpdateResult_) writeField2(oprot thrift.TProtocol) (err error) { +func (p *StartJobUpdateResult_) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetUpdateSummary() { - if err := oprot.WriteFieldBegin("updateSummary", thrift.STRUCT, 2); err != nil { + if err := oprot.WriteFieldBegin(ctx, "updateSummary", thrift.STRUCT, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:updateSummary: ", p), err) } - if err := p.UpdateSummary.Write(oprot); err != nil { + if err := p.UpdateSummary.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.UpdateSummary), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:updateSummary: ", p), err) } } return err } +func (p *StartJobUpdateResult_) Equals(other *StartJobUpdateResult_) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if !p.Key.Equals(other.Key) { return false } + if !p.UpdateSummary.Equals(other.UpdateSummary) { return false } + return true +} + func (p *StartJobUpdateResult_) String() string { if p == nil { return "" @@ -14830,14 +16151,14 @@ func NewGetJobUpdateSummariesResult_() *GetJobUpdateSummariesResult_ { func (p *GetJobUpdateSummariesResult_) GetUpdateSummaries() []*JobUpdateSummary { return p.UpdateSummaries } -func (p *GetJobUpdateSummariesResult_) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *GetJobUpdateSummariesResult_) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -14845,81 +16166,95 @@ func (p *GetJobUpdateSummariesResult_) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.LIST { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *GetJobUpdateSummariesResult_) ReadField1(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin() +func (p *GetJobUpdateSummariesResult_) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) if err != nil { return thrift.PrependError("error reading list begin: ", err) } tSlice := make([]*JobUpdateSummary, 0, size) p.UpdateSummaries = tSlice for i := 0; i < size; i ++ { - _elem43 := &JobUpdateSummary{} - if err := _elem43.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem43), err) + _elem84 := &JobUpdateSummary{} + if err := _elem84.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem84), err) } - p.UpdateSummaries = append(p.UpdateSummaries, _elem43) + p.UpdateSummaries = append(p.UpdateSummaries, _elem84) } - if err := iprot.ReadListEnd(); err != nil { + if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) } return nil } -func (p *GetJobUpdateSummariesResult_) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("GetJobUpdateSummariesResult"); err != nil { +func (p *GetJobUpdateSummariesResult_) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "GetJobUpdateSummariesResult"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *GetJobUpdateSummariesResult_) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("updateSummaries", thrift.LIST, 1); err != nil { +func (p *GetJobUpdateSummariesResult_) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "updateSummaries", thrift.LIST, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:updateSummaries: ", p), err) } - if err := oprot.WriteListBegin(thrift.STRUCT, len(p.UpdateSummaries)); err != nil { + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.UpdateSummaries)); err != nil { return thrift.PrependError("error writing list begin: ", err) } for _, v := range p.UpdateSummaries { - if err := v.Write(oprot); err != nil { + if err := v.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) } } - if err := oprot.WriteListEnd(); err != nil { + if err := oprot.WriteListEnd(ctx); err != nil { return thrift.PrependError("error writing list end: ", err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:updateSummaries: ", p), err) } return err } +func (p *GetJobUpdateSummariesResult_) Equals(other *GetJobUpdateSummariesResult_) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if len(p.UpdateSummaries) != len(other.UpdateSummaries) { return false } + for i, _tgt := range p.UpdateSummaries { + _src85 := other.UpdateSummaries[i] + if !_tgt.Equals(_src85) { return false } + } + return true +} + func (p *GetJobUpdateSummariesResult_) String() string { if p == nil { return "" @@ -14956,14 +16291,14 @@ func (p *GetJobUpdateDetailsResult_) IsSetDetails() bool { return p.Details != nil } -func (p *GetJobUpdateDetailsResult_) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *GetJobUpdateDetailsResult_) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -14971,111 +16306,126 @@ func (p *GetJobUpdateDetailsResult_) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.LIST { - if err := p.ReadField2(iprot); err != nil { + if err := p.ReadField2(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *GetJobUpdateDetailsResult_) ReadField1(iprot thrift.TProtocol) error { +func (p *GetJobUpdateDetailsResult_) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { p.Details = &JobUpdateDetails{} - if err := p.Details.Read(iprot); err != nil { + if err := p.Details.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Details), err) } return nil } -func (p *GetJobUpdateDetailsResult_) ReadField2(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin() +func (p *GetJobUpdateDetailsResult_) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) if err != nil { return thrift.PrependError("error reading list begin: ", err) } tSlice := make([]*JobUpdateDetails, 0, size) p.DetailsList = tSlice for i := 0; i < size; i ++ { - _elem44 := &JobUpdateDetails{} - if err := _elem44.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem44), err) + _elem86 := &JobUpdateDetails{} + if err := _elem86.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem86), err) } - p.DetailsList = append(p.DetailsList, _elem44) + p.DetailsList = append(p.DetailsList, _elem86) } - if err := iprot.ReadListEnd(); err != nil { + if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) } return nil } -func (p *GetJobUpdateDetailsResult_) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("GetJobUpdateDetailsResult"); err != nil { +func (p *GetJobUpdateDetailsResult_) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "GetJobUpdateDetailsResult"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } - if err := p.writeField2(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *GetJobUpdateDetailsResult_) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("details", thrift.STRUCT, 1); err != nil { +func (p *GetJobUpdateDetailsResult_) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "details", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:details: ", p), err) } - if err := p.Details.Write(oprot); err != nil { + if err := p.Details.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Details), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:details: ", p), err) } return err } -func (p *GetJobUpdateDetailsResult_) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("detailsList", thrift.LIST, 2); err != nil { +func (p *GetJobUpdateDetailsResult_) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "detailsList", thrift.LIST, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:detailsList: ", p), err) } - if err := oprot.WriteListBegin(thrift.STRUCT, len(p.DetailsList)); err != nil { + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.DetailsList)); err != nil { return thrift.PrependError("error writing list begin: ", err) } for _, v := range p.DetailsList { - if err := v.Write(oprot); err != nil { + if err := v.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) } } - if err := oprot.WriteListEnd(); err != nil { + if err := oprot.WriteListEnd(ctx); err != nil { return thrift.PrependError("error writing list end: ", err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:detailsList: ", p), err) } return err } +func (p *GetJobUpdateDetailsResult_) Equals(other *GetJobUpdateDetailsResult_) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if !p.Details.Equals(other.Details) { return false } + if len(p.DetailsList) != len(other.DetailsList) { return false } + for i, _tgt := range p.DetailsList { + _src87 := other.DetailsList[i] + if !_tgt.Equals(_src87) { return false } + } + return true +} + func (p *GetJobUpdateDetailsResult_) String() string { if p == nil { return "" @@ -15099,14 +16449,14 @@ func NewPulseJobUpdateResult_() *PulseJobUpdateResult_ { func (p *PulseJobUpdateResult_) GetStatus() JobUpdatePulseStatus { return p.Status } -func (p *PulseJobUpdateResult_) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *PulseJobUpdateResult_) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -15114,31 +16464,31 @@ func (p *PulseJobUpdateResult_) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.I32 { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *PulseJobUpdateResult_) ReadField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { +func (p *PulseJobUpdateResult_) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { temp := JobUpdatePulseStatus(v) @@ -15147,29 +16497,39 @@ func (p *PulseJobUpdateResult_) ReadField1(iprot thrift.TProtocol) error { return nil } -func (p *PulseJobUpdateResult_) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("PulseJobUpdateResult"); err != nil { +func (p *PulseJobUpdateResult_) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "PulseJobUpdateResult"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *PulseJobUpdateResult_) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("status", thrift.I32, 1); err != nil { +func (p *PulseJobUpdateResult_) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "status", thrift.I32, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:status: ", p), err) } - if err := oprot.WriteI32(int32(p.Status)); err != nil { + if err := oprot.WriteI32(ctx, int32(p.Status)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.status (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:status: ", p), err) } return err } +func (p *PulseJobUpdateResult_) Equals(other *PulseJobUpdateResult_) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.Status != other.Status { return false } + return true +} + func (p *PulseJobUpdateResult_) String() string { if p == nil { return "" @@ -15209,14 +16569,14 @@ func (p *GetJobUpdateDiffResult_) GetUpdate() []*ConfigGroup { func (p *GetJobUpdateDiffResult_) GetUnchanged() []*ConfigGroup { return p.Unchanged } -func (p *GetJobUpdateDiffResult_) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *GetJobUpdateDiffResult_) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -15224,259 +16584,300 @@ func (p *GetJobUpdateDiffResult_) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.SET { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.SET { - if err := p.ReadField2(iprot); err != nil { + if err := p.ReadField2(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 3: if fieldTypeId == thrift.SET { - if err := p.ReadField3(iprot); err != nil { + if err := p.ReadField3(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 4: if fieldTypeId == thrift.SET { - if err := p.ReadField4(iprot); err != nil { + if err := p.ReadField4(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *GetJobUpdateDiffResult_) ReadField1(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin() +func (p *GetJobUpdateDiffResult_) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin(ctx) if err != nil { return thrift.PrependError("error reading set begin: ", err) } tSet := make([]*ConfigGroup, 0, size) p.Add = tSet for i := 0; i < size; i ++ { - _elem45 := &ConfigGroup{} - if err := _elem45.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem45), err) + _elem88 := &ConfigGroup{} + if err := _elem88.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem88), err) } - p.Add = append(p.Add, _elem45) + p.Add = append(p.Add, _elem88) } - if err := iprot.ReadSetEnd(); err != nil { + if err := iprot.ReadSetEnd(ctx); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *GetJobUpdateDiffResult_) ReadField2(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin() +func (p *GetJobUpdateDiffResult_) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin(ctx) if err != nil { return thrift.PrependError("error reading set begin: ", err) } tSet := make([]*ConfigGroup, 0, size) p.Remove = tSet for i := 0; i < size; i ++ { - _elem46 := &ConfigGroup{} - if err := _elem46.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem46), err) + _elem89 := &ConfigGroup{} + if err := _elem89.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem89), err) } - p.Remove = append(p.Remove, _elem46) + p.Remove = append(p.Remove, _elem89) } - if err := iprot.ReadSetEnd(); err != nil { + if err := iprot.ReadSetEnd(ctx); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *GetJobUpdateDiffResult_) ReadField3(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin() +func (p *GetJobUpdateDiffResult_) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin(ctx) if err != nil { return thrift.PrependError("error reading set begin: ", err) } tSet := make([]*ConfigGroup, 0, size) p.Update = tSet for i := 0; i < size; i ++ { - _elem47 := &ConfigGroup{} - if err := _elem47.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem47), err) + _elem90 := &ConfigGroup{} + if err := _elem90.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem90), err) } - p.Update = append(p.Update, _elem47) + p.Update = append(p.Update, _elem90) } - if err := iprot.ReadSetEnd(); err != nil { + if err := iprot.ReadSetEnd(ctx); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *GetJobUpdateDiffResult_) ReadField4(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin() +func (p *GetJobUpdateDiffResult_) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin(ctx) if err != nil { return thrift.PrependError("error reading set begin: ", err) } tSet := make([]*ConfigGroup, 0, size) p.Unchanged = tSet for i := 0; i < size; i ++ { - _elem48 := &ConfigGroup{} - if err := _elem48.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem48), err) + _elem91 := &ConfigGroup{} + if err := _elem91.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem91), err) } - p.Unchanged = append(p.Unchanged, _elem48) + p.Unchanged = append(p.Unchanged, _elem91) } - if err := iprot.ReadSetEnd(); err != nil { + if err := iprot.ReadSetEnd(ctx); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *GetJobUpdateDiffResult_) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("GetJobUpdateDiffResult"); err != nil { +func (p *GetJobUpdateDiffResult_) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "GetJobUpdateDiffResult"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } - if err := p.writeField2(oprot); err != nil { return err } - if err := p.writeField3(oprot); err != nil { return err } - if err := p.writeField4(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *GetJobUpdateDiffResult_) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("add", thrift.SET, 1); err != nil { +func (p *GetJobUpdateDiffResult_) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "add", thrift.SET, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:add: ", p), err) } - if err := oprot.WriteSetBegin(thrift.STRUCT, len(p.Add)); err != nil { + if err := oprot.WriteSetBegin(ctx, thrift.STRUCT, len(p.Add)); err != nil { return thrift.PrependError("error writing set begin: ", err) } for i := 0; i" @@ -15506,14 +16907,14 @@ func (p *TierConfig) GetName() string { func (p *TierConfig) GetSettings() map[string]string { return p.Settings } -func (p *TierConfig) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *TierConfig) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -15521,41 +16922,41 @@ func (p *TierConfig) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRING { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.MAP { - if err := p.ReadField2(iprot); err != nil { + if err := p.ReadField2(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *TierConfig) ReadField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { +func (p *TierConfig) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.Name = v @@ -15563,78 +16964,93 @@ func (p *TierConfig) ReadField1(iprot thrift.TProtocol) error { return nil } -func (p *TierConfig) ReadField2(iprot thrift.TProtocol) error { - _, _, size, err := iprot.ReadMapBegin() +func (p *TierConfig) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + _, _, size, err := iprot.ReadMapBegin(ctx) if err != nil { return thrift.PrependError("error reading map begin: ", err) } tMap := make(map[string]string, size) p.Settings = tMap for i := 0; i < size; i ++ { -var _key49 string - if v, err := iprot.ReadString(); err != nil { +var _key96 string + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _key49 = v + _key96 = v } -var _val50 string - if v, err := iprot.ReadString(); err != nil { +var _val97 string + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _val50 = v + _val97 = v } - p.Settings[_key49] = _val50 + p.Settings[_key96] = _val97 } - if err := iprot.ReadMapEnd(); err != nil { + if err := iprot.ReadMapEnd(ctx); err != nil { return thrift.PrependError("error reading map end: ", err) } return nil } -func (p *TierConfig) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TierConfig"); err != nil { +func (p *TierConfig) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TierConfig"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } - if err := p.writeField2(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *TierConfig) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("name", thrift.STRING, 1); err != nil { +func (p *TierConfig) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "name", thrift.STRING, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:name: ", p), err) } - if err := oprot.WriteString(string(p.Name)); err != nil { + if err := oprot.WriteString(ctx, string(p.Name)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.name (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:name: ", p), err) } return err } -func (p *TierConfig) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("settings", thrift.MAP, 2); err != nil { +func (p *TierConfig) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "settings", thrift.MAP, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:settings: ", p), err) } - if err := oprot.WriteMapBegin(thrift.STRING, thrift.STRING, len(p.Settings)); err != nil { + if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.Settings)); err != nil { return thrift.PrependError("error writing map begin: ", err) } for k, v := range p.Settings { - if err := oprot.WriteString(string(k)); err != nil { + if err := oprot.WriteString(ctx, string(k)); err != nil { return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } - if err := oprot.WriteString(string(v)); err != nil { + if err := oprot.WriteString(ctx, string(v)); err != nil { return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } } - if err := oprot.WriteMapEnd(); err != nil { + if err := oprot.WriteMapEnd(ctx); err != nil { return thrift.PrependError("error writing map end: ", err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:settings: ", p), err) } return err } +func (p *TierConfig) Equals(other *TierConfig) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.Name != other.Name { return false } + if len(p.Settings) != len(other.Settings) { return false } + for k, _tgt := range p.Settings { + _src98 := other.Settings[k] + if _tgt != _src98 { return false } + } + return true +} + func (p *TierConfig) String() string { if p == nil { return "" @@ -15664,14 +17080,14 @@ func (p *GetTierConfigResult_) GetDefaultTierName() string { func (p *GetTierConfigResult_) GetTiers() []*TierConfig { return p.Tiers } -func (p *GetTierConfigResult_) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *GetTierConfigResult_) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -15679,41 +17095,41 @@ func (p *GetTierConfigResult_) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRING { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.SET { - if err := p.ReadField2(iprot); err != nil { + if err := p.ReadField2(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *GetTierConfigResult_) ReadField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { +func (p *GetTierConfigResult_) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.DefaultTierName = v @@ -15721,76 +17137,94 @@ func (p *GetTierConfigResult_) ReadField1(iprot thrift.TProtocol) error { return nil } -func (p *GetTierConfigResult_) ReadField2(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin() +func (p *GetTierConfigResult_) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin(ctx) if err != nil { return thrift.PrependError("error reading set begin: ", err) } tSet := make([]*TierConfig, 0, size) p.Tiers = tSet for i := 0; i < size; i ++ { - _elem51 := &TierConfig{} - if err := _elem51.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem51), err) + _elem99 := &TierConfig{} + if err := _elem99.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem99), err) } - p.Tiers = append(p.Tiers, _elem51) + p.Tiers = append(p.Tiers, _elem99) } - if err := iprot.ReadSetEnd(); err != nil { + if err := iprot.ReadSetEnd(ctx); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *GetTierConfigResult_) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("GetTierConfigResult"); err != nil { +func (p *GetTierConfigResult_) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "GetTierConfigResult"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } - if err := p.writeField2(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *GetTierConfigResult_) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("defaultTierName", thrift.STRING, 1); err != nil { +func (p *GetTierConfigResult_) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "defaultTierName", thrift.STRING, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:defaultTierName: ", p), err) } - if err := oprot.WriteString(string(p.DefaultTierName)); err != nil { + if err := oprot.WriteString(ctx, string(p.DefaultTierName)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.defaultTierName (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:defaultTierName: ", p), err) } return err } -func (p *GetTierConfigResult_) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("tiers", thrift.SET, 2); err != nil { +func (p *GetTierConfigResult_) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "tiers", thrift.SET, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:tiers: ", p), err) } - if err := oprot.WriteSetBegin(thrift.STRUCT, len(p.Tiers)); err != nil { + if err := oprot.WriteSetBegin(ctx, thrift.STRUCT, len(p.Tiers)); err != nil { return thrift.PrependError("error writing set begin: ", err) } for i := 0; i" @@ -15821,14 +17255,14 @@ func (p *ServerInfo) GetClusterName() string { func (p *ServerInfo) GetStatsUrlPrefix() string { return p.StatsUrlPrefix } -func (p *ServerInfo) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *ServerInfo) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -15836,41 +17270,41 @@ func (p *ServerInfo) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRING { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 3: if fieldTypeId == thrift.STRING { - if err := p.ReadField3(iprot); err != nil { + if err := p.ReadField3(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ServerInfo) ReadField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { +func (p *ServerInfo) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.ClusterName = v @@ -15878,8 +17312,8 @@ func (p *ServerInfo) ReadField1(iprot thrift.TProtocol) error { return nil } -func (p *ServerInfo) ReadField3(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { +func (p *ServerInfo) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 3: ", err) } else { p.StatsUrlPrefix = v @@ -15887,40 +17321,51 @@ func (p *ServerInfo) ReadField3(iprot thrift.TProtocol) error { return nil } -func (p *ServerInfo) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("ServerInfo"); err != nil { +func (p *ServerInfo) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "ServerInfo"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } - if err := p.writeField3(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ServerInfo) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("clusterName", thrift.STRING, 1); err != nil { +func (p *ServerInfo) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "clusterName", thrift.STRING, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:clusterName: ", p), err) } - if err := oprot.WriteString(string(p.ClusterName)); err != nil { + if err := oprot.WriteString(ctx, string(p.ClusterName)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.clusterName (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:clusterName: ", p), err) } return err } -func (p *ServerInfo) writeField3(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("statsUrlPrefix", thrift.STRING, 3); err != nil { +func (p *ServerInfo) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "statsUrlPrefix", thrift.STRING, 3); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:statsUrlPrefix: ", p), err) } - if err := oprot.WriteString(string(p.StatsUrlPrefix)); err != nil { + if err := oprot.WriteString(ctx, string(p.StatsUrlPrefix)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.statsUrlPrefix (3) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 3:statsUrlPrefix: ", p), err) } return err } +func (p *ServerInfo) Equals(other *ServerInfo) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.ClusterName != other.ClusterName { return false } + if p.StatsUrlPrefix != other.StatsUrlPrefix { return false } + return true +} + func (p *ServerInfo) String() string { if p == nil { return "" @@ -16265,14 +17710,14 @@ func (p *Result_) IsSetGetTierConfigResult_() bool { return p.GetTierConfigResult_ != nil } -func (p *Result_) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *Result_) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -16280,674 +17725,703 @@ func (p *Result_) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 3: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField3(iprot); err != nil { + if err := p.ReadField3(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 4: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField4(iprot); err != nil { + if err := p.ReadField4(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 5: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField5(iprot); err != nil { + if err := p.ReadField5(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 6: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField6(iprot); err != nil { + if err := p.ReadField6(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 7: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField7(iprot); err != nil { + if err := p.ReadField7(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 8: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField8(iprot); err != nil { + if err := p.ReadField8(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 9: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField9(iprot); err != nil { + if err := p.ReadField9(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 10: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField10(iprot); err != nil { + if err := p.ReadField10(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 11: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField11(iprot); err != nil { + if err := p.ReadField11(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 17: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField17(iprot); err != nil { + if err := p.ReadField17(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 18: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField18(iprot); err != nil { + if err := p.ReadField18(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 20: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField20(iprot); err != nil { + if err := p.ReadField20(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 21: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField21(iprot); err != nil { + if err := p.ReadField21(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 22: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField22(iprot); err != nil { + if err := p.ReadField22(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 23: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField23(iprot); err != nil { + if err := p.ReadField23(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 24: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField24(iprot); err != nil { + if err := p.ReadField24(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 25: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField25(iprot); err != nil { + if err := p.ReadField25(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 26: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField26(iprot); err != nil { + if err := p.ReadField26(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 27: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField27(iprot); err != nil { + if err := p.ReadField27(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *Result_) ReadField1(iprot thrift.TProtocol) error { +func (p *Result_) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { p.PopulateJobResult_ = &PopulateJobResult_{} - if err := p.PopulateJobResult_.Read(iprot); err != nil { + if err := p.PopulateJobResult_.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.PopulateJobResult_), err) } return nil } -func (p *Result_) ReadField3(iprot thrift.TProtocol) error { +func (p *Result_) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { p.ScheduleStatusResult_ = &ScheduleStatusResult_{} - if err := p.ScheduleStatusResult_.Read(iprot); err != nil { + if err := p.ScheduleStatusResult_.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.ScheduleStatusResult_), err) } return nil } -func (p *Result_) ReadField4(iprot thrift.TProtocol) error { +func (p *Result_) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { p.GetJobsResult_ = &GetJobsResult_{} - if err := p.GetJobsResult_.Read(iprot); err != nil { + if err := p.GetJobsResult_.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.GetJobsResult_), err) } return nil } -func (p *Result_) ReadField5(iprot thrift.TProtocol) error { +func (p *Result_) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { p.GetQuotaResult_ = &GetQuotaResult_{} - if err := p.GetQuotaResult_.Read(iprot); err != nil { + if err := p.GetQuotaResult_.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.GetQuotaResult_), err) } return nil } -func (p *Result_) ReadField6(iprot thrift.TProtocol) error { +func (p *Result_) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { p.ListBackupsResult_ = &ListBackupsResult_{} - if err := p.ListBackupsResult_.Read(iprot); err != nil { + if err := p.ListBackupsResult_.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.ListBackupsResult_), err) } return nil } -func (p *Result_) ReadField7(iprot thrift.TProtocol) error { +func (p *Result_) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { p.StartMaintenanceResult_ = &StartMaintenanceResult_{} - if err := p.StartMaintenanceResult_.Read(iprot); err != nil { + if err := p.StartMaintenanceResult_.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.StartMaintenanceResult_), err) } return nil } -func (p *Result_) ReadField8(iprot thrift.TProtocol) error { +func (p *Result_) ReadField8(ctx context.Context, iprot thrift.TProtocol) error { p.DrainHostsResult_ = &DrainHostsResult_{} - if err := p.DrainHostsResult_.Read(iprot); err != nil { + if err := p.DrainHostsResult_.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.DrainHostsResult_), err) } return nil } -func (p *Result_) ReadField9(iprot thrift.TProtocol) error { +func (p *Result_) ReadField9(ctx context.Context, iprot thrift.TProtocol) error { p.QueryRecoveryResult_ = &QueryRecoveryResult_{} - if err := p.QueryRecoveryResult_.Read(iprot); err != nil { + if err := p.QueryRecoveryResult_.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.QueryRecoveryResult_), err) } return nil } -func (p *Result_) ReadField10(iprot thrift.TProtocol) error { +func (p *Result_) ReadField10(ctx context.Context, iprot thrift.TProtocol) error { p.MaintenanceStatusResult_ = &MaintenanceStatusResult_{} - if err := p.MaintenanceStatusResult_.Read(iprot); err != nil { + if err := p.MaintenanceStatusResult_.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.MaintenanceStatusResult_), err) } return nil } -func (p *Result_) ReadField11(iprot thrift.TProtocol) error { +func (p *Result_) ReadField11(ctx context.Context, iprot thrift.TProtocol) error { p.EndMaintenanceResult_ = &EndMaintenanceResult_{} - if err := p.EndMaintenanceResult_.Read(iprot); err != nil { + if err := p.EndMaintenanceResult_.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.EndMaintenanceResult_), err) } return nil } -func (p *Result_) ReadField17(iprot thrift.TProtocol) error { +func (p *Result_) ReadField17(ctx context.Context, iprot thrift.TProtocol) error { p.RoleSummaryResult_ = &RoleSummaryResult_{} - if err := p.RoleSummaryResult_.Read(iprot); err != nil { + if err := p.RoleSummaryResult_.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.RoleSummaryResult_), err) } return nil } -func (p *Result_) ReadField18(iprot thrift.TProtocol) error { +func (p *Result_) ReadField18(ctx context.Context, iprot thrift.TProtocol) error { p.JobSummaryResult_ = &JobSummaryResult_{} - if err := p.JobSummaryResult_.Read(iprot); err != nil { + if err := p.JobSummaryResult_.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.JobSummaryResult_), err) } return nil } -func (p *Result_) ReadField20(iprot thrift.TProtocol) error { +func (p *Result_) ReadField20(ctx context.Context, iprot thrift.TProtocol) error { p.ConfigSummaryResult_ = &ConfigSummaryResult_{} - if err := p.ConfigSummaryResult_.Read(iprot); err != nil { + if err := p.ConfigSummaryResult_.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.ConfigSummaryResult_), err) } return nil } -func (p *Result_) ReadField21(iprot thrift.TProtocol) error { +func (p *Result_) ReadField21(ctx context.Context, iprot thrift.TProtocol) error { p.GetPendingReasonResult_ = &GetPendingReasonResult_{} - if err := p.GetPendingReasonResult_.Read(iprot); err != nil { + if err := p.GetPendingReasonResult_.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.GetPendingReasonResult_), err) } return nil } -func (p *Result_) ReadField22(iprot thrift.TProtocol) error { +func (p *Result_) ReadField22(ctx context.Context, iprot thrift.TProtocol) error { p.StartJobUpdateResult_ = &StartJobUpdateResult_{} - if err := p.StartJobUpdateResult_.Read(iprot); err != nil { + if err := p.StartJobUpdateResult_.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.StartJobUpdateResult_), err) } return nil } -func (p *Result_) ReadField23(iprot thrift.TProtocol) error { +func (p *Result_) ReadField23(ctx context.Context, iprot thrift.TProtocol) error { p.GetJobUpdateSummariesResult_ = &GetJobUpdateSummariesResult_{} - if err := p.GetJobUpdateSummariesResult_.Read(iprot); err != nil { + if err := p.GetJobUpdateSummariesResult_.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.GetJobUpdateSummariesResult_), err) } return nil } -func (p *Result_) ReadField24(iprot thrift.TProtocol) error { +func (p *Result_) ReadField24(ctx context.Context, iprot thrift.TProtocol) error { p.GetJobUpdateDetailsResult_ = &GetJobUpdateDetailsResult_{} - if err := p.GetJobUpdateDetailsResult_.Read(iprot); err != nil { + if err := p.GetJobUpdateDetailsResult_.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.GetJobUpdateDetailsResult_), err) } return nil } -func (p *Result_) ReadField25(iprot thrift.TProtocol) error { +func (p *Result_) ReadField25(ctx context.Context, iprot thrift.TProtocol) error { p.PulseJobUpdateResult_ = &PulseJobUpdateResult_{} - if err := p.PulseJobUpdateResult_.Read(iprot); err != nil { + if err := p.PulseJobUpdateResult_.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.PulseJobUpdateResult_), err) } return nil } -func (p *Result_) ReadField26(iprot thrift.TProtocol) error { +func (p *Result_) ReadField26(ctx context.Context, iprot thrift.TProtocol) error { p.GetJobUpdateDiffResult_ = &GetJobUpdateDiffResult_{} - if err := p.GetJobUpdateDiffResult_.Read(iprot); err != nil { + if err := p.GetJobUpdateDiffResult_.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.GetJobUpdateDiffResult_), err) } return nil } -func (p *Result_) ReadField27(iprot thrift.TProtocol) error { +func (p *Result_) ReadField27(ctx context.Context, iprot thrift.TProtocol) error { p.GetTierConfigResult_ = &GetTierConfigResult_{} - if err := p.GetTierConfigResult_.Read(iprot); err != nil { + if err := p.GetTierConfigResult_.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.GetTierConfigResult_), err) } return nil } -func (p *Result_) Write(oprot thrift.TProtocol) error { +func (p *Result_) Write(ctx context.Context, oprot thrift.TProtocol) error { if c := p.CountSetFieldsResult_(); c != 1 { return fmt.Errorf("%T write union: exactly one field must be set (%d set).", p, c) } - if err := oprot.WriteStructBegin("Result"); err != nil { + if err := oprot.WriteStructBegin(ctx, "Result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } - if err := p.writeField3(oprot); err != nil { return err } - if err := p.writeField4(oprot); err != nil { return err } - if err := p.writeField5(oprot); err != nil { return err } - if err := p.writeField6(oprot); err != nil { return err } - if err := p.writeField7(oprot); err != nil { return err } - if err := p.writeField8(oprot); err != nil { return err } - if err := p.writeField9(oprot); err != nil { return err } - if err := p.writeField10(oprot); err != nil { return err } - if err := p.writeField11(oprot); err != nil { return err } - if err := p.writeField17(oprot); err != nil { return err } - if err := p.writeField18(oprot); err != nil { return err } - if err := p.writeField20(oprot); err != nil { return err } - if err := p.writeField21(oprot); err != nil { return err } - if err := p.writeField22(oprot); err != nil { return err } - if err := p.writeField23(oprot); err != nil { return err } - if err := p.writeField24(oprot); err != nil { return err } - if err := p.writeField25(oprot); err != nil { return err } - if err := p.writeField26(oprot); err != nil { return err } - if err := p.writeField27(oprot); err != nil { return err } - } - if err := oprot.WriteFieldStop(); err != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } + if err := p.writeField5(ctx, oprot); err != nil { return err } + if err := p.writeField6(ctx, oprot); err != nil { return err } + if err := p.writeField7(ctx, oprot); err != nil { return err } + if err := p.writeField8(ctx, oprot); err != nil { return err } + if err := p.writeField9(ctx, oprot); err != nil { return err } + if err := p.writeField10(ctx, oprot); err != nil { return err } + if err := p.writeField11(ctx, oprot); err != nil { return err } + if err := p.writeField17(ctx, oprot); err != nil { return err } + if err := p.writeField18(ctx, oprot); err != nil { return err } + if err := p.writeField20(ctx, oprot); err != nil { return err } + if err := p.writeField21(ctx, oprot); err != nil { return err } + if err := p.writeField22(ctx, oprot); err != nil { return err } + if err := p.writeField23(ctx, oprot); err != nil { return err } + if err := p.writeField24(ctx, oprot); err != nil { return err } + if err := p.writeField25(ctx, oprot); err != nil { return err } + if err := p.writeField26(ctx, oprot); err != nil { return err } + if err := p.writeField27(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *Result_) writeField1(oprot thrift.TProtocol) (err error) { +func (p *Result_) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetPopulateJobResult_() { - if err := oprot.WriteFieldBegin("populateJobResult", thrift.STRUCT, 1); err != nil { + if err := oprot.WriteFieldBegin(ctx, "populateJobResult", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:populateJobResult: ", p), err) } - if err := p.PopulateJobResult_.Write(oprot); err != nil { + if err := p.PopulateJobResult_.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.PopulateJobResult_), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:populateJobResult: ", p), err) } } return err } -func (p *Result_) writeField3(oprot thrift.TProtocol) (err error) { +func (p *Result_) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetScheduleStatusResult_() { - if err := oprot.WriteFieldBegin("scheduleStatusResult", thrift.STRUCT, 3); err != nil { + if err := oprot.WriteFieldBegin(ctx, "scheduleStatusResult", thrift.STRUCT, 3); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:scheduleStatusResult: ", p), err) } - if err := p.ScheduleStatusResult_.Write(oprot); err != nil { + if err := p.ScheduleStatusResult_.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.ScheduleStatusResult_), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 3:scheduleStatusResult: ", p), err) } } return err } -func (p *Result_) writeField4(oprot thrift.TProtocol) (err error) { +func (p *Result_) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetGetJobsResult_() { - if err := oprot.WriteFieldBegin("getJobsResult", thrift.STRUCT, 4); err != nil { + if err := oprot.WriteFieldBegin(ctx, "getJobsResult", thrift.STRUCT, 4); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:getJobsResult: ", p), err) } - if err := p.GetJobsResult_.Write(oprot); err != nil { + if err := p.GetJobsResult_.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.GetJobsResult_), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 4:getJobsResult: ", p), err) } } return err } -func (p *Result_) writeField5(oprot thrift.TProtocol) (err error) { +func (p *Result_) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetGetQuotaResult_() { - if err := oprot.WriteFieldBegin("getQuotaResult", thrift.STRUCT, 5); err != nil { + if err := oprot.WriteFieldBegin(ctx, "getQuotaResult", thrift.STRUCT, 5); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:getQuotaResult: ", p), err) } - if err := p.GetQuotaResult_.Write(oprot); err != nil { + if err := p.GetQuotaResult_.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.GetQuotaResult_), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 5:getQuotaResult: ", p), err) } } return err } -func (p *Result_) writeField6(oprot thrift.TProtocol) (err error) { +func (p *Result_) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetListBackupsResult_() { - if err := oprot.WriteFieldBegin("listBackupsResult", thrift.STRUCT, 6); err != nil { + if err := oprot.WriteFieldBegin(ctx, "listBackupsResult", thrift.STRUCT, 6); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:listBackupsResult: ", p), err) } - if err := p.ListBackupsResult_.Write(oprot); err != nil { + if err := p.ListBackupsResult_.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.ListBackupsResult_), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 6:listBackupsResult: ", p), err) } } return err } -func (p *Result_) writeField7(oprot thrift.TProtocol) (err error) { +func (p *Result_) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetStartMaintenanceResult_() { - if err := oprot.WriteFieldBegin("startMaintenanceResult", thrift.STRUCT, 7); err != nil { + if err := oprot.WriteFieldBegin(ctx, "startMaintenanceResult", thrift.STRUCT, 7); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:startMaintenanceResult: ", p), err) } - if err := p.StartMaintenanceResult_.Write(oprot); err != nil { + if err := p.StartMaintenanceResult_.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.StartMaintenanceResult_), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 7:startMaintenanceResult: ", p), err) } } return err } -func (p *Result_) writeField8(oprot thrift.TProtocol) (err error) { +func (p *Result_) writeField8(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetDrainHostsResult_() { - if err := oprot.WriteFieldBegin("drainHostsResult", thrift.STRUCT, 8); err != nil { + if err := oprot.WriteFieldBegin(ctx, "drainHostsResult", thrift.STRUCT, 8); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:drainHostsResult: ", p), err) } - if err := p.DrainHostsResult_.Write(oprot); err != nil { + if err := p.DrainHostsResult_.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.DrainHostsResult_), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 8:drainHostsResult: ", p), err) } } return err } -func (p *Result_) writeField9(oprot thrift.TProtocol) (err error) { +func (p *Result_) writeField9(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetQueryRecoveryResult_() { - if err := oprot.WriteFieldBegin("queryRecoveryResult", thrift.STRUCT, 9); err != nil { + if err := oprot.WriteFieldBegin(ctx, "queryRecoveryResult", thrift.STRUCT, 9); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:queryRecoveryResult: ", p), err) } - if err := p.QueryRecoveryResult_.Write(oprot); err != nil { + if err := p.QueryRecoveryResult_.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.QueryRecoveryResult_), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 9:queryRecoveryResult: ", p), err) } } return err } -func (p *Result_) writeField10(oprot thrift.TProtocol) (err error) { +func (p *Result_) writeField10(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetMaintenanceStatusResult_() { - if err := oprot.WriteFieldBegin("maintenanceStatusResult", thrift.STRUCT, 10); err != nil { + if err := oprot.WriteFieldBegin(ctx, "maintenanceStatusResult", thrift.STRUCT, 10); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 10:maintenanceStatusResult: ", p), err) } - if err := p.MaintenanceStatusResult_.Write(oprot); err != nil { + if err := p.MaintenanceStatusResult_.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.MaintenanceStatusResult_), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 10:maintenanceStatusResult: ", p), err) } } return err } -func (p *Result_) writeField11(oprot thrift.TProtocol) (err error) { +func (p *Result_) writeField11(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetEndMaintenanceResult_() { - if err := oprot.WriteFieldBegin("endMaintenanceResult", thrift.STRUCT, 11); err != nil { + if err := oprot.WriteFieldBegin(ctx, "endMaintenanceResult", thrift.STRUCT, 11); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 11:endMaintenanceResult: ", p), err) } - if err := p.EndMaintenanceResult_.Write(oprot); err != nil { + if err := p.EndMaintenanceResult_.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.EndMaintenanceResult_), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 11:endMaintenanceResult: ", p), err) } } return err } -func (p *Result_) writeField17(oprot thrift.TProtocol) (err error) { +func (p *Result_) writeField17(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetRoleSummaryResult_() { - if err := oprot.WriteFieldBegin("roleSummaryResult", thrift.STRUCT, 17); err != nil { + if err := oprot.WriteFieldBegin(ctx, "roleSummaryResult", thrift.STRUCT, 17); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 17:roleSummaryResult: ", p), err) } - if err := p.RoleSummaryResult_.Write(oprot); err != nil { + if err := p.RoleSummaryResult_.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.RoleSummaryResult_), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 17:roleSummaryResult: ", p), err) } } return err } -func (p *Result_) writeField18(oprot thrift.TProtocol) (err error) { +func (p *Result_) writeField18(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetJobSummaryResult_() { - if err := oprot.WriteFieldBegin("jobSummaryResult", thrift.STRUCT, 18); err != nil { + if err := oprot.WriteFieldBegin(ctx, "jobSummaryResult", thrift.STRUCT, 18); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 18:jobSummaryResult: ", p), err) } - if err := p.JobSummaryResult_.Write(oprot); err != nil { + if err := p.JobSummaryResult_.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.JobSummaryResult_), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 18:jobSummaryResult: ", p), err) } } return err } -func (p *Result_) writeField20(oprot thrift.TProtocol) (err error) { +func (p *Result_) writeField20(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetConfigSummaryResult_() { - if err := oprot.WriteFieldBegin("configSummaryResult", thrift.STRUCT, 20); err != nil { + if err := oprot.WriteFieldBegin(ctx, "configSummaryResult", thrift.STRUCT, 20); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 20:configSummaryResult: ", p), err) } - if err := p.ConfigSummaryResult_.Write(oprot); err != nil { + if err := p.ConfigSummaryResult_.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.ConfigSummaryResult_), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 20:configSummaryResult: ", p), err) } } return err } -func (p *Result_) writeField21(oprot thrift.TProtocol) (err error) { +func (p *Result_) writeField21(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetGetPendingReasonResult_() { - if err := oprot.WriteFieldBegin("getPendingReasonResult", thrift.STRUCT, 21); err != nil { + if err := oprot.WriteFieldBegin(ctx, "getPendingReasonResult", thrift.STRUCT, 21); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 21:getPendingReasonResult: ", p), err) } - if err := p.GetPendingReasonResult_.Write(oprot); err != nil { + if err := p.GetPendingReasonResult_.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.GetPendingReasonResult_), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 21:getPendingReasonResult: ", p), err) } } return err } -func (p *Result_) writeField22(oprot thrift.TProtocol) (err error) { +func (p *Result_) writeField22(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetStartJobUpdateResult_() { - if err := oprot.WriteFieldBegin("startJobUpdateResult", thrift.STRUCT, 22); err != nil { + if err := oprot.WriteFieldBegin(ctx, "startJobUpdateResult", thrift.STRUCT, 22); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 22:startJobUpdateResult: ", p), err) } - if err := p.StartJobUpdateResult_.Write(oprot); err != nil { + if err := p.StartJobUpdateResult_.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.StartJobUpdateResult_), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 22:startJobUpdateResult: ", p), err) } } return err } -func (p *Result_) writeField23(oprot thrift.TProtocol) (err error) { +func (p *Result_) writeField23(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetGetJobUpdateSummariesResult_() { - if err := oprot.WriteFieldBegin("getJobUpdateSummariesResult", thrift.STRUCT, 23); err != nil { + if err := oprot.WriteFieldBegin(ctx, "getJobUpdateSummariesResult", thrift.STRUCT, 23); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 23:getJobUpdateSummariesResult: ", p), err) } - if err := p.GetJobUpdateSummariesResult_.Write(oprot); err != nil { + if err := p.GetJobUpdateSummariesResult_.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.GetJobUpdateSummariesResult_), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 23:getJobUpdateSummariesResult: ", p), err) } } return err } -func (p *Result_) writeField24(oprot thrift.TProtocol) (err error) { +func (p *Result_) writeField24(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetGetJobUpdateDetailsResult_() { - if err := oprot.WriteFieldBegin("getJobUpdateDetailsResult", thrift.STRUCT, 24); err != nil { + if err := oprot.WriteFieldBegin(ctx, "getJobUpdateDetailsResult", thrift.STRUCT, 24); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 24:getJobUpdateDetailsResult: ", p), err) } - if err := p.GetJobUpdateDetailsResult_.Write(oprot); err != nil { + if err := p.GetJobUpdateDetailsResult_.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.GetJobUpdateDetailsResult_), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 24:getJobUpdateDetailsResult: ", p), err) } } return err } -func (p *Result_) writeField25(oprot thrift.TProtocol) (err error) { +func (p *Result_) writeField25(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetPulseJobUpdateResult_() { - if err := oprot.WriteFieldBegin("pulseJobUpdateResult", thrift.STRUCT, 25); err != nil { + if err := oprot.WriteFieldBegin(ctx, "pulseJobUpdateResult", thrift.STRUCT, 25); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 25:pulseJobUpdateResult: ", p), err) } - if err := p.PulseJobUpdateResult_.Write(oprot); err != nil { + if err := p.PulseJobUpdateResult_.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.PulseJobUpdateResult_), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 25:pulseJobUpdateResult: ", p), err) } } return err } -func (p *Result_) writeField26(oprot thrift.TProtocol) (err error) { +func (p *Result_) writeField26(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetGetJobUpdateDiffResult_() { - if err := oprot.WriteFieldBegin("getJobUpdateDiffResult", thrift.STRUCT, 26); err != nil { + if err := oprot.WriteFieldBegin(ctx, "getJobUpdateDiffResult", thrift.STRUCT, 26); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 26:getJobUpdateDiffResult: ", p), err) } - if err := p.GetJobUpdateDiffResult_.Write(oprot); err != nil { + if err := p.GetJobUpdateDiffResult_.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.GetJobUpdateDiffResult_), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 26:getJobUpdateDiffResult: ", p), err) } } return err } -func (p *Result_) writeField27(oprot thrift.TProtocol) (err error) { +func (p *Result_) writeField27(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetGetTierConfigResult_() { - if err := oprot.WriteFieldBegin("getTierConfigResult", thrift.STRUCT, 27); err != nil { + if err := oprot.WriteFieldBegin(ctx, "getTierConfigResult", thrift.STRUCT, 27); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 27:getTierConfigResult: ", p), err) } - if err := p.GetTierConfigResult_.Write(oprot); err != nil { + if err := p.GetTierConfigResult_.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.GetTierConfigResult_), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 27:getTierConfigResult: ", p), err) } } return err } +func (p *Result_) Equals(other *Result_) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if !p.PopulateJobResult_.Equals(other.PopulateJobResult_) { return false } + if !p.ScheduleStatusResult_.Equals(other.ScheduleStatusResult_) { return false } + if !p.GetJobsResult_.Equals(other.GetJobsResult_) { return false } + if !p.GetQuotaResult_.Equals(other.GetQuotaResult_) { return false } + if !p.ListBackupsResult_.Equals(other.ListBackupsResult_) { return false } + if !p.StartMaintenanceResult_.Equals(other.StartMaintenanceResult_) { return false } + if !p.DrainHostsResult_.Equals(other.DrainHostsResult_) { return false } + if !p.QueryRecoveryResult_.Equals(other.QueryRecoveryResult_) { return false } + if !p.MaintenanceStatusResult_.Equals(other.MaintenanceStatusResult_) { return false } + if !p.EndMaintenanceResult_.Equals(other.EndMaintenanceResult_) { return false } + if !p.RoleSummaryResult_.Equals(other.RoleSummaryResult_) { return false } + if !p.JobSummaryResult_.Equals(other.JobSummaryResult_) { return false } + if !p.ConfigSummaryResult_.Equals(other.ConfigSummaryResult_) { return false } + if !p.GetPendingReasonResult_.Equals(other.GetPendingReasonResult_) { return false } + if !p.StartJobUpdateResult_.Equals(other.StartJobUpdateResult_) { return false } + if !p.GetJobUpdateSummariesResult_.Equals(other.GetJobUpdateSummariesResult_) { return false } + if !p.GetJobUpdateDetailsResult_.Equals(other.GetJobUpdateDetailsResult_) { return false } + if !p.PulseJobUpdateResult_.Equals(other.PulseJobUpdateResult_) { return false } + if !p.GetJobUpdateDiffResult_.Equals(other.GetJobUpdateDiffResult_) { return false } + if !p.GetTierConfigResult_.Equals(other.GetTierConfigResult_) { return false } + return true +} + func (p *Result_) String() string { if p == nil { return "" @@ -16969,14 +18443,14 @@ func NewResponseDetail() *ResponseDetail { func (p *ResponseDetail) GetMessage() string { return p.Message } -func (p *ResponseDetail) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *ResponseDetail) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -16984,31 +18458,31 @@ func (p *ResponseDetail) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRING { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ResponseDetail) ReadField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { +func (p *ResponseDetail) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.Message = v @@ -17016,29 +18490,39 @@ func (p *ResponseDetail) ReadField1(iprot thrift.TProtocol) error { return nil } -func (p *ResponseDetail) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("ResponseDetail"); err != nil { +func (p *ResponseDetail) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "ResponseDetail"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ResponseDetail) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("message", thrift.STRING, 1); err != nil { +func (p *ResponseDetail) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "message", thrift.STRING, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:message: ", p), err) } - if err := oprot.WriteString(string(p.Message)); err != nil { + if err := oprot.WriteString(ctx, string(p.Message)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.message (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:message: ", p), err) } return err } +func (p *ResponseDetail) Equals(other *ResponseDetail) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.Message != other.Message { return false } + return true +} + func (p *ResponseDetail) String() string { if p == nil { return "" @@ -17095,14 +18579,14 @@ func (p *Response) IsSetResult_() bool { return p.Result_ != nil } -func (p *Response) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *Response) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -17110,61 +18594,61 @@ func (p *Response) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.I32 { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 5: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField5(iprot); err != nil { + if err := p.ReadField5(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 3: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField3(iprot); err != nil { + if err := p.ReadField3(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 6: if fieldTypeId == thrift.LIST { - if err := p.ReadField6(iprot); err != nil { + if err := p.ReadField6(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *Response) ReadField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { +func (p *Response) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { temp := ResponseCode(v) @@ -17173,111 +18657,128 @@ func (p *Response) ReadField1(iprot thrift.TProtocol) error { return nil } -func (p *Response) ReadField5(iprot thrift.TProtocol) error { +func (p *Response) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { p.ServerInfo = &ServerInfo{} - if err := p.ServerInfo.Read(iprot); err != nil { + if err := p.ServerInfo.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.ServerInfo), err) } return nil } -func (p *Response) ReadField3(iprot thrift.TProtocol) error { +func (p *Response) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { p.Result_ = &Result_{} - if err := p.Result_.Read(iprot); err != nil { + if err := p.Result_.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Result_), err) } return nil } -func (p *Response) ReadField6(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin() +func (p *Response) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) if err != nil { return thrift.PrependError("error reading list begin: ", err) } tSlice := make([]*ResponseDetail, 0, size) p.Details = tSlice for i := 0; i < size; i ++ { - _elem52 := &ResponseDetail{} - if err := _elem52.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem52), err) + _elem101 := &ResponseDetail{} + if err := _elem101.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem101), err) } - p.Details = append(p.Details, _elem52) + p.Details = append(p.Details, _elem101) } - if err := iprot.ReadListEnd(); err != nil { + if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) } return nil } -func (p *Response) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("Response"); err != nil { +func (p *Response) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "Response"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } - if err := p.writeField3(oprot); err != nil { return err } - if err := p.writeField5(oprot); err != nil { return err } - if err := p.writeField6(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField5(ctx, oprot); err != nil { return err } + if err := p.writeField6(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *Response) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("responseCode", thrift.I32, 1); err != nil { +func (p *Response) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "responseCode", thrift.I32, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:responseCode: ", p), err) } - if err := oprot.WriteI32(int32(p.ResponseCode)); err != nil { + if err := oprot.WriteI32(ctx, int32(p.ResponseCode)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.responseCode (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:responseCode: ", p), err) } return err } -func (p *Response) writeField3(oprot thrift.TProtocol) (err error) { +func (p *Response) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetResult_() { - if err := oprot.WriteFieldBegin("result", thrift.STRUCT, 3); err != nil { + if err := oprot.WriteFieldBegin(ctx, "result", thrift.STRUCT, 3); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:result: ", p), err) } - if err := p.Result_.Write(oprot); err != nil { + if err := p.Result_.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Result_), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 3:result: ", p), err) } } return err } -func (p *Response) writeField5(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("serverInfo", thrift.STRUCT, 5); err != nil { +func (p *Response) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "serverInfo", thrift.STRUCT, 5); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:serverInfo: ", p), err) } - if err := p.ServerInfo.Write(oprot); err != nil { + if err := p.ServerInfo.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.ServerInfo), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 5:serverInfo: ", p), err) } return err } -func (p *Response) writeField6(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("details", thrift.LIST, 6); err != nil { +func (p *Response) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "details", thrift.LIST, 6); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:details: ", p), err) } - if err := oprot.WriteListBegin(thrift.STRUCT, len(p.Details)); err != nil { + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.Details)); err != nil { return thrift.PrependError("error writing list begin: ", err) } for _, v := range p.Details { - if err := v.Write(oprot); err != nil { + if err := v.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) } } - if err := oprot.WriteListEnd(); err != nil { + if err := oprot.WriteListEnd(ctx); err != nil { return thrift.PrependError("error writing list end: ", err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 6:details: ", p), err) } return err } +func (p *Response) Equals(other *Response) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.ResponseCode != other.ResponseCode { return false } + if !p.Result_.Equals(other.Result_) { return false } + if !p.ServerInfo.Equals(other.ServerInfo) { return false } + if len(p.Details) != len(other.Details) { return false } + for i, _tgt := range p.Details { + _src102 := other.Details[i] + if !_tgt.Equals(_src102) { return false } + } + return true +} + func (p *Response) String() string { if p == nil { return "" @@ -17306,14 +18807,14 @@ func (p *ExplicitReconciliationSettings) IsSetBatchSize() bool { return p.BatchSize != nil } -func (p *ExplicitReconciliationSettings) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *ExplicitReconciliationSettings) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -17321,31 +18822,31 @@ func (p *ExplicitReconciliationSettings) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.I32 { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ExplicitReconciliationSettings) ReadField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { +func (p *ExplicitReconciliationSettings) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.BatchSize = &v @@ -17353,31 +18854,46 @@ func (p *ExplicitReconciliationSettings) ReadField1(iprot thrift.TProtocol) err return nil } -func (p *ExplicitReconciliationSettings) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("ExplicitReconciliationSettings"); err != nil { +func (p *ExplicitReconciliationSettings) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "ExplicitReconciliationSettings"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ExplicitReconciliationSettings) writeField1(oprot thrift.TProtocol) (err error) { +func (p *ExplicitReconciliationSettings) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetBatchSize() { - if err := oprot.WriteFieldBegin("batchSize", thrift.I32, 1); err != nil { + if err := oprot.WriteFieldBegin(ctx, "batchSize", thrift.I32, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:batchSize: ", p), err) } - if err := oprot.WriteI32(int32(*p.BatchSize)); err != nil { + if err := oprot.WriteI32(ctx, int32(*p.BatchSize)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.batchSize (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:batchSize: ", p), err) } } return err } +func (p *ExplicitReconciliationSettings) Equals(other *ExplicitReconciliationSettings) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.BatchSize != other.BatchSize { + if p.BatchSize == nil || other.BatchSize == nil { + return false + } + if (*p.BatchSize) != (*other.BatchSize) { return false } + } + return true +} + func (p *ExplicitReconciliationSettings) String() string { if p == nil { return "" @@ -17452,6 +18968,7 @@ type ReadOnlyScheduler interface { type ReadOnlySchedulerClient struct { c thrift.TClient + meta thrift.ResponseMeta } func NewReadOnlySchedulerClientFactory(t thrift.TTransport, f thrift.TProtocolFactory) *ReadOnlySchedulerClient { @@ -17475,14 +18992,26 @@ func NewReadOnlySchedulerClient(c thrift.TClient) *ReadOnlySchedulerClient { func (p *ReadOnlySchedulerClient) Client_() thrift.TClient { return p.c } + +func (p *ReadOnlySchedulerClient) LastResponseMeta_() thrift.ResponseMeta { + return p.meta +} + +func (p *ReadOnlySchedulerClient) SetLastResponseMeta_(meta thrift.ResponseMeta) { + p.meta = meta +} + // Returns a summary of the jobs grouped by role. func (p *ReadOnlySchedulerClient) GetRoleSummary(ctx context.Context) (r *Response, err error) { - var _args53 ReadOnlySchedulerGetRoleSummaryArgs - var _result54 ReadOnlySchedulerGetRoleSummaryResult - if err = p.Client_().Call(ctx, "getRoleSummary", &_args53, &_result54); err != nil { + var _args103 ReadOnlySchedulerGetRoleSummaryArgs + var _result104 ReadOnlySchedulerGetRoleSummaryResult + var meta thrift.ResponseMeta + meta, err = p.Client_().Call(ctx, "getRoleSummary", &_args103, &_result104) + p.SetLastResponseMeta_(meta) + if err != nil { return } - return _result54.GetSuccess(), nil + return _result104.GetSuccess(), nil } // Returns a summary of jobs, optionally only those owned by a specific role. @@ -17490,13 +19019,16 @@ func (p *ReadOnlySchedulerClient) GetRoleSummary(ctx context.Context) (r *Respon // Parameters: // - Role func (p *ReadOnlySchedulerClient) GetJobSummary(ctx context.Context, role string) (r *Response, err error) { - var _args55 ReadOnlySchedulerGetJobSummaryArgs - _args55.Role = role - var _result56 ReadOnlySchedulerGetJobSummaryResult - if err = p.Client_().Call(ctx, "getJobSummary", &_args55, &_result56); err != nil { + var _args105 ReadOnlySchedulerGetJobSummaryArgs + _args105.Role = role + var _result106 ReadOnlySchedulerGetJobSummaryResult + var meta thrift.ResponseMeta + meta, err = p.Client_().Call(ctx, "getJobSummary", &_args105, &_result106) + p.SetLastResponseMeta_(meta) + if err != nil { return } - return _result56.GetSuccess(), nil + return _result106.GetSuccess(), nil } // Fetches the status of tasks. @@ -17504,13 +19036,16 @@ func (p *ReadOnlySchedulerClient) GetJobSummary(ctx context.Context, role string // Parameters: // - Query func (p *ReadOnlySchedulerClient) GetTasksStatus(ctx context.Context, query *TaskQuery) (r *Response, err error) { - var _args57 ReadOnlySchedulerGetTasksStatusArgs - _args57.Query = query - var _result58 ReadOnlySchedulerGetTasksStatusResult - if err = p.Client_().Call(ctx, "getTasksStatus", &_args57, &_result58); err != nil { + var _args107 ReadOnlySchedulerGetTasksStatusArgs + _args107.Query = query + var _result108 ReadOnlySchedulerGetTasksStatusResult + var meta thrift.ResponseMeta + meta, err = p.Client_().Call(ctx, "getTasksStatus", &_args107, &_result108) + p.SetLastResponseMeta_(meta) + if err != nil { return } - return _result58.GetSuccess(), nil + return _result108.GetSuccess(), nil } // Same as getTaskStatus but without the TaskConfig.ExecutorConfig data set. @@ -17519,13 +19054,16 @@ func (p *ReadOnlySchedulerClient) GetTasksStatus(ctx context.Context, query *Tas // Parameters: // - Query func (p *ReadOnlySchedulerClient) GetTasksWithoutConfigs(ctx context.Context, query *TaskQuery) (r *Response, err error) { - var _args59 ReadOnlySchedulerGetTasksWithoutConfigsArgs - _args59.Query = query - var _result60 ReadOnlySchedulerGetTasksWithoutConfigsResult - if err = p.Client_().Call(ctx, "getTasksWithoutConfigs", &_args59, &_result60); err != nil { + var _args109 ReadOnlySchedulerGetTasksWithoutConfigsArgs + _args109.Query = query + var _result110 ReadOnlySchedulerGetTasksWithoutConfigsResult + var meta thrift.ResponseMeta + meta, err = p.Client_().Call(ctx, "getTasksWithoutConfigs", &_args109, &_result110) + p.SetLastResponseMeta_(meta) + if err != nil { return } - return _result60.GetSuccess(), nil + return _result110.GetSuccess(), nil } // Returns user-friendly reasons (if available) for tasks retained in PENDING state. @@ -17533,13 +19071,16 @@ func (p *ReadOnlySchedulerClient) GetTasksWithoutConfigs(ctx context.Context, qu // Parameters: // - Query func (p *ReadOnlySchedulerClient) GetPendingReason(ctx context.Context, query *TaskQuery) (r *Response, err error) { - var _args61 ReadOnlySchedulerGetPendingReasonArgs - _args61.Query = query - var _result62 ReadOnlySchedulerGetPendingReasonResult - if err = p.Client_().Call(ctx, "getPendingReason", &_args61, &_result62); err != nil { + var _args111 ReadOnlySchedulerGetPendingReasonArgs + _args111.Query = query + var _result112 ReadOnlySchedulerGetPendingReasonResult + var meta thrift.ResponseMeta + meta, err = p.Client_().Call(ctx, "getPendingReason", &_args111, &_result112) + p.SetLastResponseMeta_(meta) + if err != nil { return } - return _result62.GetSuccess(), nil + return _result112.GetSuccess(), nil } // Fetches the configuration summary of active tasks for the specified job. @@ -17547,13 +19088,16 @@ func (p *ReadOnlySchedulerClient) GetPendingReason(ctx context.Context, query *T // Parameters: // - Job func (p *ReadOnlySchedulerClient) GetConfigSummary(ctx context.Context, job *JobKey) (r *Response, err error) { - var _args63 ReadOnlySchedulerGetConfigSummaryArgs - _args63.Job = job - var _result64 ReadOnlySchedulerGetConfigSummaryResult - if err = p.Client_().Call(ctx, "getConfigSummary", &_args63, &_result64); err != nil { + var _args113 ReadOnlySchedulerGetConfigSummaryArgs + _args113.Job = job + var _result114 ReadOnlySchedulerGetConfigSummaryResult + var meta thrift.ResponseMeta + meta, err = p.Client_().Call(ctx, "getConfigSummary", &_args113, &_result114) + p.SetLastResponseMeta_(meta) + if err != nil { return } - return _result64.GetSuccess(), nil + return _result114.GetSuccess(), nil } // Fetches the status of jobs. @@ -17562,13 +19106,16 @@ func (p *ReadOnlySchedulerClient) GetConfigSummary(ctx context.Context, job *Job // Parameters: // - OwnerRole func (p *ReadOnlySchedulerClient) GetJobs(ctx context.Context, ownerRole string) (r *Response, err error) { - var _args65 ReadOnlySchedulerGetJobsArgs - _args65.OwnerRole = ownerRole - var _result66 ReadOnlySchedulerGetJobsResult - if err = p.Client_().Call(ctx, "getJobs", &_args65, &_result66); err != nil { + var _args115 ReadOnlySchedulerGetJobsArgs + _args115.OwnerRole = ownerRole + var _result116 ReadOnlySchedulerGetJobsResult + var meta thrift.ResponseMeta + meta, err = p.Client_().Call(ctx, "getJobs", &_args115, &_result116) + p.SetLastResponseMeta_(meta) + if err != nil { return } - return _result66.GetSuccess(), nil + return _result116.GetSuccess(), nil } // Fetches the quota allocated for a user. @@ -17576,13 +19123,16 @@ func (p *ReadOnlySchedulerClient) GetJobs(ctx context.Context, ownerRole string) // Parameters: // - OwnerRole func (p *ReadOnlySchedulerClient) GetQuota(ctx context.Context, ownerRole string) (r *Response, err error) { - var _args67 ReadOnlySchedulerGetQuotaArgs - _args67.OwnerRole = ownerRole - var _result68 ReadOnlySchedulerGetQuotaResult - if err = p.Client_().Call(ctx, "getQuota", &_args67, &_result68); err != nil { + var _args117 ReadOnlySchedulerGetQuotaArgs + _args117.OwnerRole = ownerRole + var _result118 ReadOnlySchedulerGetQuotaResult + var meta thrift.ResponseMeta + meta, err = p.Client_().Call(ctx, "getQuota", &_args117, &_result118) + p.SetLastResponseMeta_(meta) + if err != nil { return } - return _result68.GetSuccess(), nil + return _result118.GetSuccess(), nil } // Populates fields in a job configuration as though it were about to be run. @@ -17591,13 +19141,16 @@ func (p *ReadOnlySchedulerClient) GetQuota(ctx context.Context, ownerRole string // Parameters: // - Description func (p *ReadOnlySchedulerClient) PopulateJobConfig(ctx context.Context, description *JobConfiguration) (r *Response, err error) { - var _args69 ReadOnlySchedulerPopulateJobConfigArgs - _args69.Description = description - var _result70 ReadOnlySchedulerPopulateJobConfigResult - if err = p.Client_().Call(ctx, "populateJobConfig", &_args69, &_result70); err != nil { + var _args119 ReadOnlySchedulerPopulateJobConfigArgs + _args119.Description = description + var _result120 ReadOnlySchedulerPopulateJobConfigResult + var meta thrift.ResponseMeta + meta, err = p.Client_().Call(ctx, "populateJobConfig", &_args119, &_result120) + p.SetLastResponseMeta_(meta) + if err != nil { return } - return _result70.GetSuccess(), nil + return _result120.GetSuccess(), nil } // Gets job update summaries. @@ -17605,13 +19158,16 @@ func (p *ReadOnlySchedulerClient) PopulateJobConfig(ctx context.Context, descrip // Parameters: // - JobUpdateQuery func (p *ReadOnlySchedulerClient) GetJobUpdateSummaries(ctx context.Context, jobUpdateQuery *JobUpdateQuery) (r *Response, err error) { - var _args71 ReadOnlySchedulerGetJobUpdateSummariesArgs - _args71.JobUpdateQuery = jobUpdateQuery - var _result72 ReadOnlySchedulerGetJobUpdateSummariesResult - if err = p.Client_().Call(ctx, "getJobUpdateSummaries", &_args71, &_result72); err != nil { + var _args121 ReadOnlySchedulerGetJobUpdateSummariesArgs + _args121.JobUpdateQuery = jobUpdateQuery + var _result122 ReadOnlySchedulerGetJobUpdateSummariesResult + var meta thrift.ResponseMeta + meta, err = p.Client_().Call(ctx, "getJobUpdateSummaries", &_args121, &_result122) + p.SetLastResponseMeta_(meta) + if err != nil { return } - return _result72.GetSuccess(), nil + return _result122.GetSuccess(), nil } // Gets job update details. @@ -17619,13 +19175,16 @@ func (p *ReadOnlySchedulerClient) GetJobUpdateSummaries(ctx context.Context, job // Parameters: // - Query func (p *ReadOnlySchedulerClient) GetJobUpdateDetails(ctx context.Context, query *JobUpdateQuery) (r *Response, err error) { - var _args73 ReadOnlySchedulerGetJobUpdateDetailsArgs - _args73.Query = query - var _result74 ReadOnlySchedulerGetJobUpdateDetailsResult - if err = p.Client_().Call(ctx, "getJobUpdateDetails", &_args73, &_result74); err != nil { + var _args123 ReadOnlySchedulerGetJobUpdateDetailsArgs + _args123.Query = query + var _result124 ReadOnlySchedulerGetJobUpdateDetailsResult + var meta thrift.ResponseMeta + meta, err = p.Client_().Call(ctx, "getJobUpdateDetails", &_args123, &_result124) + p.SetLastResponseMeta_(meta) + if err != nil { return } - return _result74.GetSuccess(), nil + return _result124.GetSuccess(), nil } // Gets the diff between client (desired) and server (current) job states. @@ -17633,23 +19192,29 @@ func (p *ReadOnlySchedulerClient) GetJobUpdateDetails(ctx context.Context, query // Parameters: // - Request func (p *ReadOnlySchedulerClient) GetJobUpdateDiff(ctx context.Context, request *JobUpdateRequest) (r *Response, err error) { - var _args75 ReadOnlySchedulerGetJobUpdateDiffArgs - _args75.Request = request - var _result76 ReadOnlySchedulerGetJobUpdateDiffResult - if err = p.Client_().Call(ctx, "getJobUpdateDiff", &_args75, &_result76); err != nil { + var _args125 ReadOnlySchedulerGetJobUpdateDiffArgs + _args125.Request = request + var _result126 ReadOnlySchedulerGetJobUpdateDiffResult + var meta thrift.ResponseMeta + meta, err = p.Client_().Call(ctx, "getJobUpdateDiff", &_args125, &_result126) + p.SetLastResponseMeta_(meta) + if err != nil { return } - return _result76.GetSuccess(), nil + return _result126.GetSuccess(), nil } // Gets tier configurations. func (p *ReadOnlySchedulerClient) GetTierConfigs(ctx context.Context) (r *Response, err error) { - var _args77 ReadOnlySchedulerGetTierConfigsArgs - var _result78 ReadOnlySchedulerGetTierConfigsResult - if err = p.Client_().Call(ctx, "getTierConfigs", &_args77, &_result78); err != nil { + var _args127 ReadOnlySchedulerGetTierConfigsArgs + var _result128 ReadOnlySchedulerGetTierConfigsResult + var meta thrift.ResponseMeta + meta, err = p.Client_().Call(ctx, "getTierConfigs", &_args127, &_result128) + p.SetLastResponseMeta_(meta) + if err != nil { return } - return _result78.GetSuccess(), nil + return _result128.GetSuccess(), nil } type ReadOnlySchedulerProcessor struct { @@ -17672,37 +19237,37 @@ func (p *ReadOnlySchedulerProcessor) ProcessorMap() map[string]thrift.TProcessor func NewReadOnlySchedulerProcessor(handler ReadOnlyScheduler) *ReadOnlySchedulerProcessor { - self79 := &ReadOnlySchedulerProcessor{handler:handler, processorMap:make(map[string]thrift.TProcessorFunction)} - self79.processorMap["getRoleSummary"] = &readOnlySchedulerProcessorGetRoleSummary{handler:handler} - self79.processorMap["getJobSummary"] = &readOnlySchedulerProcessorGetJobSummary{handler:handler} - self79.processorMap["getTasksStatus"] = &readOnlySchedulerProcessorGetTasksStatus{handler:handler} - self79.processorMap["getTasksWithoutConfigs"] = &readOnlySchedulerProcessorGetTasksWithoutConfigs{handler:handler} - self79.processorMap["getPendingReason"] = &readOnlySchedulerProcessorGetPendingReason{handler:handler} - self79.processorMap["getConfigSummary"] = &readOnlySchedulerProcessorGetConfigSummary{handler:handler} - self79.processorMap["getJobs"] = &readOnlySchedulerProcessorGetJobs{handler:handler} - self79.processorMap["getQuota"] = &readOnlySchedulerProcessorGetQuota{handler:handler} - self79.processorMap["populateJobConfig"] = &readOnlySchedulerProcessorPopulateJobConfig{handler:handler} - self79.processorMap["getJobUpdateSummaries"] = &readOnlySchedulerProcessorGetJobUpdateSummaries{handler:handler} - self79.processorMap["getJobUpdateDetails"] = &readOnlySchedulerProcessorGetJobUpdateDetails{handler:handler} - self79.processorMap["getJobUpdateDiff"] = &readOnlySchedulerProcessorGetJobUpdateDiff{handler:handler} - self79.processorMap["getTierConfigs"] = &readOnlySchedulerProcessorGetTierConfigs{handler:handler} -return self79 + self129 := &ReadOnlySchedulerProcessor{handler:handler, processorMap:make(map[string]thrift.TProcessorFunction)} + self129.processorMap["getRoleSummary"] = &readOnlySchedulerProcessorGetRoleSummary{handler:handler} + self129.processorMap["getJobSummary"] = &readOnlySchedulerProcessorGetJobSummary{handler:handler} + self129.processorMap["getTasksStatus"] = &readOnlySchedulerProcessorGetTasksStatus{handler:handler} + self129.processorMap["getTasksWithoutConfigs"] = &readOnlySchedulerProcessorGetTasksWithoutConfigs{handler:handler} + self129.processorMap["getPendingReason"] = &readOnlySchedulerProcessorGetPendingReason{handler:handler} + self129.processorMap["getConfigSummary"] = &readOnlySchedulerProcessorGetConfigSummary{handler:handler} + self129.processorMap["getJobs"] = &readOnlySchedulerProcessorGetJobs{handler:handler} + self129.processorMap["getQuota"] = &readOnlySchedulerProcessorGetQuota{handler:handler} + self129.processorMap["populateJobConfig"] = &readOnlySchedulerProcessorPopulateJobConfig{handler:handler} + self129.processorMap["getJobUpdateSummaries"] = &readOnlySchedulerProcessorGetJobUpdateSummaries{handler:handler} + self129.processorMap["getJobUpdateDetails"] = &readOnlySchedulerProcessorGetJobUpdateDetails{handler:handler} + self129.processorMap["getJobUpdateDiff"] = &readOnlySchedulerProcessorGetJobUpdateDiff{handler:handler} + self129.processorMap["getTierConfigs"] = &readOnlySchedulerProcessorGetTierConfigs{handler:handler} +return self129 } func (p *ReadOnlySchedulerProcessor) Process(ctx context.Context, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - name, _, seqId, err := iprot.ReadMessageBegin() - if err != nil { return false, err } + name, _, seqId, err2 := iprot.ReadMessageBegin(ctx) + if err2 != nil { return false, thrift.WrapTException(err2) } if processor, ok := p.GetProcessorFunction(name); ok { return processor.Process(ctx, seqId, iprot, oprot) } - iprot.Skip(thrift.STRUCT) - iprot.ReadMessageEnd() - x80 := thrift.NewTApplicationException(thrift.UNKNOWN_METHOD, "Unknown function " + name) - oprot.WriteMessageBegin(name, thrift.EXCEPTION, seqId) - x80.Write(oprot) - oprot.WriteMessageEnd() + iprot.Skip(ctx, thrift.STRUCT) + iprot.ReadMessageEnd(ctx) + x130 := thrift.NewTApplicationException(thrift.UNKNOWN_METHOD, "Unknown function " + name) + oprot.WriteMessageBegin(ctx, name, thrift.EXCEPTION, seqId) + x130.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return false, x80 + return false, x130 } @@ -17712,41 +19277,72 @@ type readOnlySchedulerProcessorGetRoleSummary struct { func (p *readOnlySchedulerProcessorGetRoleSummary) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := ReadOnlySchedulerGetRoleSummaryArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("getRoleSummary", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "getRoleSummary", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return false, err + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) } - iprot.ReadMessageEnd() result := ReadOnlySchedulerGetRoleSummaryResult{} -var retval *Response - var err2 error + var retval *Response if retval, err2 = p.handler.GetRoleSummary(ctx); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing getRoleSummary: " + err2.Error()) - oprot.WriteMessageBegin("getRoleSummary", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + oprot.WriteMessageBegin(ctx, "getRoleSummary", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return true, err2 + return true, thrift.WrapTException(err2) } else { result.Success = retval -} - if err2 = oprot.WriteMessageBegin("getRoleSummary", thrift.REPLY, seqId); err2 != nil { - err = err2 } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "getRoleSummary", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = err2 + err = thrift.WrapTException(err2) } if err != nil { return @@ -17760,41 +19356,72 @@ type readOnlySchedulerProcessorGetJobSummary struct { func (p *readOnlySchedulerProcessorGetJobSummary) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := ReadOnlySchedulerGetJobSummaryArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("getJobSummary", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "getJobSummary", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return false, err + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) } - iprot.ReadMessageEnd() result := ReadOnlySchedulerGetJobSummaryResult{} -var retval *Response - var err2 error + var retval *Response if retval, err2 = p.handler.GetJobSummary(ctx, args.Role); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing getJobSummary: " + err2.Error()) - oprot.WriteMessageBegin("getJobSummary", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + oprot.WriteMessageBegin(ctx, "getJobSummary", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return true, err2 + return true, thrift.WrapTException(err2) } else { result.Success = retval -} - if err2 = oprot.WriteMessageBegin("getJobSummary", thrift.REPLY, seqId); err2 != nil { - err = err2 } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "getJobSummary", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = err2 + err = thrift.WrapTException(err2) } if err != nil { return @@ -17808,41 +19435,72 @@ type readOnlySchedulerProcessorGetTasksStatus struct { func (p *readOnlySchedulerProcessorGetTasksStatus) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := ReadOnlySchedulerGetTasksStatusArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("getTasksStatus", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "getTasksStatus", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return false, err + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) } - iprot.ReadMessageEnd() result := ReadOnlySchedulerGetTasksStatusResult{} -var retval *Response - var err2 error + var retval *Response if retval, err2 = p.handler.GetTasksStatus(ctx, args.Query); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing getTasksStatus: " + err2.Error()) - oprot.WriteMessageBegin("getTasksStatus", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + oprot.WriteMessageBegin(ctx, "getTasksStatus", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return true, err2 + return true, thrift.WrapTException(err2) } else { result.Success = retval -} - if err2 = oprot.WriteMessageBegin("getTasksStatus", thrift.REPLY, seqId); err2 != nil { - err = err2 } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "getTasksStatus", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = err2 + err = thrift.WrapTException(err2) } if err != nil { return @@ -17856,41 +19514,72 @@ type readOnlySchedulerProcessorGetTasksWithoutConfigs struct { func (p *readOnlySchedulerProcessorGetTasksWithoutConfigs) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := ReadOnlySchedulerGetTasksWithoutConfigsArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("getTasksWithoutConfigs", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "getTasksWithoutConfigs", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return false, err + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) } - iprot.ReadMessageEnd() result := ReadOnlySchedulerGetTasksWithoutConfigsResult{} -var retval *Response - var err2 error + var retval *Response if retval, err2 = p.handler.GetTasksWithoutConfigs(ctx, args.Query); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing getTasksWithoutConfigs: " + err2.Error()) - oprot.WriteMessageBegin("getTasksWithoutConfigs", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + oprot.WriteMessageBegin(ctx, "getTasksWithoutConfigs", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return true, err2 + return true, thrift.WrapTException(err2) } else { result.Success = retval -} - if err2 = oprot.WriteMessageBegin("getTasksWithoutConfigs", thrift.REPLY, seqId); err2 != nil { - err = err2 } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "getTasksWithoutConfigs", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = err2 + err = thrift.WrapTException(err2) } if err != nil { return @@ -17904,41 +19593,72 @@ type readOnlySchedulerProcessorGetPendingReason struct { func (p *readOnlySchedulerProcessorGetPendingReason) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := ReadOnlySchedulerGetPendingReasonArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("getPendingReason", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "getPendingReason", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return false, err + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) } - iprot.ReadMessageEnd() result := ReadOnlySchedulerGetPendingReasonResult{} -var retval *Response - var err2 error + var retval *Response if retval, err2 = p.handler.GetPendingReason(ctx, args.Query); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing getPendingReason: " + err2.Error()) - oprot.WriteMessageBegin("getPendingReason", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + oprot.WriteMessageBegin(ctx, "getPendingReason", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return true, err2 + return true, thrift.WrapTException(err2) } else { result.Success = retval -} - if err2 = oprot.WriteMessageBegin("getPendingReason", thrift.REPLY, seqId); err2 != nil { - err = err2 } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "getPendingReason", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = err2 + err = thrift.WrapTException(err2) } if err != nil { return @@ -17952,41 +19672,72 @@ type readOnlySchedulerProcessorGetConfigSummary struct { func (p *readOnlySchedulerProcessorGetConfigSummary) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := ReadOnlySchedulerGetConfigSummaryArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("getConfigSummary", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "getConfigSummary", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return false, err + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) } - iprot.ReadMessageEnd() result := ReadOnlySchedulerGetConfigSummaryResult{} -var retval *Response - var err2 error + var retval *Response if retval, err2 = p.handler.GetConfigSummary(ctx, args.Job); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing getConfigSummary: " + err2.Error()) - oprot.WriteMessageBegin("getConfigSummary", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + oprot.WriteMessageBegin(ctx, "getConfigSummary", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return true, err2 + return true, thrift.WrapTException(err2) } else { result.Success = retval -} - if err2 = oprot.WriteMessageBegin("getConfigSummary", thrift.REPLY, seqId); err2 != nil { - err = err2 } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "getConfigSummary", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = err2 + err = thrift.WrapTException(err2) } if err != nil { return @@ -18000,41 +19751,72 @@ type readOnlySchedulerProcessorGetJobs struct { func (p *readOnlySchedulerProcessorGetJobs) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := ReadOnlySchedulerGetJobsArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("getJobs", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "getJobs", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return false, err + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) } - iprot.ReadMessageEnd() result := ReadOnlySchedulerGetJobsResult{} -var retval *Response - var err2 error + var retval *Response if retval, err2 = p.handler.GetJobs(ctx, args.OwnerRole); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing getJobs: " + err2.Error()) - oprot.WriteMessageBegin("getJobs", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + oprot.WriteMessageBegin(ctx, "getJobs", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return true, err2 + return true, thrift.WrapTException(err2) } else { result.Success = retval -} - if err2 = oprot.WriteMessageBegin("getJobs", thrift.REPLY, seqId); err2 != nil { - err = err2 } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "getJobs", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = err2 + err = thrift.WrapTException(err2) } if err != nil { return @@ -18048,41 +19830,72 @@ type readOnlySchedulerProcessorGetQuota struct { func (p *readOnlySchedulerProcessorGetQuota) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := ReadOnlySchedulerGetQuotaArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("getQuota", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "getQuota", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return false, err + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) } - iprot.ReadMessageEnd() result := ReadOnlySchedulerGetQuotaResult{} -var retval *Response - var err2 error + var retval *Response if retval, err2 = p.handler.GetQuota(ctx, args.OwnerRole); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing getQuota: " + err2.Error()) - oprot.WriteMessageBegin("getQuota", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + oprot.WriteMessageBegin(ctx, "getQuota", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return true, err2 + return true, thrift.WrapTException(err2) } else { result.Success = retval -} - if err2 = oprot.WriteMessageBegin("getQuota", thrift.REPLY, seqId); err2 != nil { - err = err2 } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "getQuota", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = err2 + err = thrift.WrapTException(err2) } if err != nil { return @@ -18096,41 +19909,72 @@ type readOnlySchedulerProcessorPopulateJobConfig struct { func (p *readOnlySchedulerProcessorPopulateJobConfig) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := ReadOnlySchedulerPopulateJobConfigArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("populateJobConfig", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "populateJobConfig", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return false, err + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) } - iprot.ReadMessageEnd() result := ReadOnlySchedulerPopulateJobConfigResult{} -var retval *Response - var err2 error + var retval *Response if retval, err2 = p.handler.PopulateJobConfig(ctx, args.Description); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing populateJobConfig: " + err2.Error()) - oprot.WriteMessageBegin("populateJobConfig", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + oprot.WriteMessageBegin(ctx, "populateJobConfig", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return true, err2 + return true, thrift.WrapTException(err2) } else { result.Success = retval -} - if err2 = oprot.WriteMessageBegin("populateJobConfig", thrift.REPLY, seqId); err2 != nil { - err = err2 } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "populateJobConfig", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = err2 + err = thrift.WrapTException(err2) } if err != nil { return @@ -18144,41 +19988,72 @@ type readOnlySchedulerProcessorGetJobUpdateSummaries struct { func (p *readOnlySchedulerProcessorGetJobUpdateSummaries) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := ReadOnlySchedulerGetJobUpdateSummariesArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("getJobUpdateSummaries", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "getJobUpdateSummaries", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return false, err + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) } - iprot.ReadMessageEnd() result := ReadOnlySchedulerGetJobUpdateSummariesResult{} -var retval *Response - var err2 error + var retval *Response if retval, err2 = p.handler.GetJobUpdateSummaries(ctx, args.JobUpdateQuery); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing getJobUpdateSummaries: " + err2.Error()) - oprot.WriteMessageBegin("getJobUpdateSummaries", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + oprot.WriteMessageBegin(ctx, "getJobUpdateSummaries", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return true, err2 + return true, thrift.WrapTException(err2) } else { result.Success = retval -} - if err2 = oprot.WriteMessageBegin("getJobUpdateSummaries", thrift.REPLY, seqId); err2 != nil { - err = err2 } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "getJobUpdateSummaries", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = err2 + err = thrift.WrapTException(err2) } if err != nil { return @@ -18192,41 +20067,72 @@ type readOnlySchedulerProcessorGetJobUpdateDetails struct { func (p *readOnlySchedulerProcessorGetJobUpdateDetails) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := ReadOnlySchedulerGetJobUpdateDetailsArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("getJobUpdateDetails", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "getJobUpdateDetails", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return false, err + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) } - iprot.ReadMessageEnd() result := ReadOnlySchedulerGetJobUpdateDetailsResult{} -var retval *Response - var err2 error + var retval *Response if retval, err2 = p.handler.GetJobUpdateDetails(ctx, args.Query); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing getJobUpdateDetails: " + err2.Error()) - oprot.WriteMessageBegin("getJobUpdateDetails", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + oprot.WriteMessageBegin(ctx, "getJobUpdateDetails", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return true, err2 + return true, thrift.WrapTException(err2) } else { result.Success = retval -} - if err2 = oprot.WriteMessageBegin("getJobUpdateDetails", thrift.REPLY, seqId); err2 != nil { - err = err2 } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "getJobUpdateDetails", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = err2 + err = thrift.WrapTException(err2) } if err != nil { return @@ -18240,41 +20146,72 @@ type readOnlySchedulerProcessorGetJobUpdateDiff struct { func (p *readOnlySchedulerProcessorGetJobUpdateDiff) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := ReadOnlySchedulerGetJobUpdateDiffArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("getJobUpdateDiff", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "getJobUpdateDiff", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return false, err + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) } - iprot.ReadMessageEnd() result := ReadOnlySchedulerGetJobUpdateDiffResult{} -var retval *Response - var err2 error + var retval *Response if retval, err2 = p.handler.GetJobUpdateDiff(ctx, args.Request); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing getJobUpdateDiff: " + err2.Error()) - oprot.WriteMessageBegin("getJobUpdateDiff", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + oprot.WriteMessageBegin(ctx, "getJobUpdateDiff", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return true, err2 + return true, thrift.WrapTException(err2) } else { result.Success = retval -} - if err2 = oprot.WriteMessageBegin("getJobUpdateDiff", thrift.REPLY, seqId); err2 != nil { - err = err2 } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "getJobUpdateDiff", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = err2 + err = thrift.WrapTException(err2) } if err != nil { return @@ -18288,41 +20225,72 @@ type readOnlySchedulerProcessorGetTierConfigs struct { func (p *readOnlySchedulerProcessorGetTierConfigs) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := ReadOnlySchedulerGetTierConfigsArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("getTierConfigs", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "getTierConfigs", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return false, err + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) } - iprot.ReadMessageEnd() result := ReadOnlySchedulerGetTierConfigsResult{} -var retval *Response - var err2 error + var retval *Response if retval, err2 = p.handler.GetTierConfigs(ctx); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing getTierConfigs: " + err2.Error()) - oprot.WriteMessageBegin("getTierConfigs", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + oprot.WriteMessageBegin(ctx, "getTierConfigs", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return true, err2 + return true, thrift.WrapTException(err2) } else { result.Success = retval -} - if err2 = oprot.WriteMessageBegin("getTierConfigs", thrift.REPLY, seqId); err2 != nil { - err = err2 } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "getTierConfigs", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = err2 + err = thrift.WrapTException(err2) } if err != nil { return @@ -18340,39 +20308,39 @@ func NewReadOnlySchedulerGetRoleSummaryArgs() *ReadOnlySchedulerGetRoleSummaryAr return &ReadOnlySchedulerGetRoleSummaryArgs{} } -func (p *ReadOnlySchedulerGetRoleSummaryArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *ReadOnlySchedulerGetRoleSummaryArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } if fieldTypeId == thrift.STOP { break; } - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ReadOnlySchedulerGetRoleSummaryArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("getRoleSummary_args"); err != nil { +func (p *ReadOnlySchedulerGetRoleSummaryArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "getRoleSummary_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } @@ -18405,14 +20373,14 @@ func (p *ReadOnlySchedulerGetRoleSummaryResult) IsSetSuccess() bool { return p.Success != nil } -func (p *ReadOnlySchedulerGetRoleSummaryResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *ReadOnlySchedulerGetRoleSummaryResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -18420,58 +20388,58 @@ func (p *ReadOnlySchedulerGetRoleSummaryResult) Read(iprot thrift.TProtocol) err switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(iprot); err != nil { + if err := p.ReadField0(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ReadOnlySchedulerGetRoleSummaryResult) ReadField0(iprot thrift.TProtocol) error { +func (p *ReadOnlySchedulerGetRoleSummaryResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(iprot); err != nil { + if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *ReadOnlySchedulerGetRoleSummaryResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("getRoleSummary_result"); err != nil { +func (p *ReadOnlySchedulerGetRoleSummaryResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "getRoleSummary_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(oprot); err != nil { return err } + if err := p.writeField0(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ReadOnlySchedulerGetRoleSummaryResult) writeField0(oprot thrift.TProtocol) (err error) { +func (p *ReadOnlySchedulerGetRoleSummaryResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } - if err := p.Success.Write(oprot); err != nil { + if err := p.Success.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err @@ -18498,14 +20466,14 @@ func NewReadOnlySchedulerGetJobSummaryArgs() *ReadOnlySchedulerGetJobSummaryArgs func (p *ReadOnlySchedulerGetJobSummaryArgs) GetRole() string { return p.Role } -func (p *ReadOnlySchedulerGetJobSummaryArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *ReadOnlySchedulerGetJobSummaryArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -18513,31 +20481,31 @@ func (p *ReadOnlySchedulerGetJobSummaryArgs) Read(iprot thrift.TProtocol) error switch fieldId { case 1: if fieldTypeId == thrift.STRING { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ReadOnlySchedulerGetJobSummaryArgs) ReadField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { +func (p *ReadOnlySchedulerGetJobSummaryArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.Role = v @@ -18545,25 +20513,25 @@ func (p *ReadOnlySchedulerGetJobSummaryArgs) ReadField1(iprot thrift.TProtocol) return nil } -func (p *ReadOnlySchedulerGetJobSummaryArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("getJobSummary_args"); err != nil { +func (p *ReadOnlySchedulerGetJobSummaryArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "getJobSummary_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ReadOnlySchedulerGetJobSummaryArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("role", thrift.STRING, 1); err != nil { +func (p *ReadOnlySchedulerGetJobSummaryArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "role", thrift.STRING, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:role: ", p), err) } - if err := oprot.WriteString(string(p.Role)); err != nil { + if err := oprot.WriteString(ctx, string(p.Role)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.role (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:role: ", p), err) } return err } @@ -18596,14 +20564,14 @@ func (p *ReadOnlySchedulerGetJobSummaryResult) IsSetSuccess() bool { return p.Success != nil } -func (p *ReadOnlySchedulerGetJobSummaryResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *ReadOnlySchedulerGetJobSummaryResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -18611,58 +20579,58 @@ func (p *ReadOnlySchedulerGetJobSummaryResult) Read(iprot thrift.TProtocol) erro switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(iprot); err != nil { + if err := p.ReadField0(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ReadOnlySchedulerGetJobSummaryResult) ReadField0(iprot thrift.TProtocol) error { +func (p *ReadOnlySchedulerGetJobSummaryResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(iprot); err != nil { + if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *ReadOnlySchedulerGetJobSummaryResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("getJobSummary_result"); err != nil { +func (p *ReadOnlySchedulerGetJobSummaryResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "getJobSummary_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(oprot); err != nil { return err } + if err := p.writeField0(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ReadOnlySchedulerGetJobSummaryResult) writeField0(oprot thrift.TProtocol) (err error) { +func (p *ReadOnlySchedulerGetJobSummaryResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } - if err := p.Success.Write(oprot); err != nil { + if err := p.Success.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err @@ -18696,14 +20664,14 @@ func (p *ReadOnlySchedulerGetTasksStatusArgs) IsSetQuery() bool { return p.Query != nil } -func (p *ReadOnlySchedulerGetTasksStatusArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *ReadOnlySchedulerGetTasksStatusArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -18711,57 +20679,57 @@ func (p *ReadOnlySchedulerGetTasksStatusArgs) Read(iprot thrift.TProtocol) error switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ReadOnlySchedulerGetTasksStatusArgs) ReadField1(iprot thrift.TProtocol) error { +func (p *ReadOnlySchedulerGetTasksStatusArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { p.Query = &TaskQuery{} - if err := p.Query.Read(iprot); err != nil { + if err := p.Query.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Query), err) } return nil } -func (p *ReadOnlySchedulerGetTasksStatusArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("getTasksStatus_args"); err != nil { +func (p *ReadOnlySchedulerGetTasksStatusArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "getTasksStatus_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ReadOnlySchedulerGetTasksStatusArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("query", thrift.STRUCT, 1); err != nil { +func (p *ReadOnlySchedulerGetTasksStatusArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "query", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:query: ", p), err) } - if err := p.Query.Write(oprot); err != nil { + if err := p.Query.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Query), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:query: ", p), err) } return err } @@ -18794,14 +20762,14 @@ func (p *ReadOnlySchedulerGetTasksStatusResult) IsSetSuccess() bool { return p.Success != nil } -func (p *ReadOnlySchedulerGetTasksStatusResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *ReadOnlySchedulerGetTasksStatusResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -18809,58 +20777,58 @@ func (p *ReadOnlySchedulerGetTasksStatusResult) Read(iprot thrift.TProtocol) err switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(iprot); err != nil { + if err := p.ReadField0(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ReadOnlySchedulerGetTasksStatusResult) ReadField0(iprot thrift.TProtocol) error { +func (p *ReadOnlySchedulerGetTasksStatusResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(iprot); err != nil { + if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *ReadOnlySchedulerGetTasksStatusResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("getTasksStatus_result"); err != nil { +func (p *ReadOnlySchedulerGetTasksStatusResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "getTasksStatus_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(oprot); err != nil { return err } + if err := p.writeField0(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ReadOnlySchedulerGetTasksStatusResult) writeField0(oprot thrift.TProtocol) (err error) { +func (p *ReadOnlySchedulerGetTasksStatusResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } - if err := p.Success.Write(oprot); err != nil { + if err := p.Success.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err @@ -18894,14 +20862,14 @@ func (p *ReadOnlySchedulerGetTasksWithoutConfigsArgs) IsSetQuery() bool { return p.Query != nil } -func (p *ReadOnlySchedulerGetTasksWithoutConfigsArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *ReadOnlySchedulerGetTasksWithoutConfigsArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -18909,57 +20877,57 @@ func (p *ReadOnlySchedulerGetTasksWithoutConfigsArgs) Read(iprot thrift.TProtoco switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ReadOnlySchedulerGetTasksWithoutConfigsArgs) ReadField1(iprot thrift.TProtocol) error { +func (p *ReadOnlySchedulerGetTasksWithoutConfigsArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { p.Query = &TaskQuery{} - if err := p.Query.Read(iprot); err != nil { + if err := p.Query.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Query), err) } return nil } -func (p *ReadOnlySchedulerGetTasksWithoutConfigsArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("getTasksWithoutConfigs_args"); err != nil { +func (p *ReadOnlySchedulerGetTasksWithoutConfigsArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "getTasksWithoutConfigs_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ReadOnlySchedulerGetTasksWithoutConfigsArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("query", thrift.STRUCT, 1); err != nil { +func (p *ReadOnlySchedulerGetTasksWithoutConfigsArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "query", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:query: ", p), err) } - if err := p.Query.Write(oprot); err != nil { + if err := p.Query.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Query), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:query: ", p), err) } return err } @@ -18992,14 +20960,14 @@ func (p *ReadOnlySchedulerGetTasksWithoutConfigsResult) IsSetSuccess() bool { return p.Success != nil } -func (p *ReadOnlySchedulerGetTasksWithoutConfigsResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *ReadOnlySchedulerGetTasksWithoutConfigsResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -19007,58 +20975,58 @@ func (p *ReadOnlySchedulerGetTasksWithoutConfigsResult) Read(iprot thrift.TProto switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(iprot); err != nil { + if err := p.ReadField0(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ReadOnlySchedulerGetTasksWithoutConfigsResult) ReadField0(iprot thrift.TProtocol) error { +func (p *ReadOnlySchedulerGetTasksWithoutConfigsResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(iprot); err != nil { + if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *ReadOnlySchedulerGetTasksWithoutConfigsResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("getTasksWithoutConfigs_result"); err != nil { +func (p *ReadOnlySchedulerGetTasksWithoutConfigsResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "getTasksWithoutConfigs_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(oprot); err != nil { return err } + if err := p.writeField0(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ReadOnlySchedulerGetTasksWithoutConfigsResult) writeField0(oprot thrift.TProtocol) (err error) { +func (p *ReadOnlySchedulerGetTasksWithoutConfigsResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } - if err := p.Success.Write(oprot); err != nil { + if err := p.Success.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err @@ -19092,14 +21060,14 @@ func (p *ReadOnlySchedulerGetPendingReasonArgs) IsSetQuery() bool { return p.Query != nil } -func (p *ReadOnlySchedulerGetPendingReasonArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *ReadOnlySchedulerGetPendingReasonArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -19107,57 +21075,57 @@ func (p *ReadOnlySchedulerGetPendingReasonArgs) Read(iprot thrift.TProtocol) err switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ReadOnlySchedulerGetPendingReasonArgs) ReadField1(iprot thrift.TProtocol) error { +func (p *ReadOnlySchedulerGetPendingReasonArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { p.Query = &TaskQuery{} - if err := p.Query.Read(iprot); err != nil { + if err := p.Query.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Query), err) } return nil } -func (p *ReadOnlySchedulerGetPendingReasonArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("getPendingReason_args"); err != nil { +func (p *ReadOnlySchedulerGetPendingReasonArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "getPendingReason_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ReadOnlySchedulerGetPendingReasonArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("query", thrift.STRUCT, 1); err != nil { +func (p *ReadOnlySchedulerGetPendingReasonArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "query", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:query: ", p), err) } - if err := p.Query.Write(oprot); err != nil { + if err := p.Query.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Query), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:query: ", p), err) } return err } @@ -19190,14 +21158,14 @@ func (p *ReadOnlySchedulerGetPendingReasonResult) IsSetSuccess() bool { return p.Success != nil } -func (p *ReadOnlySchedulerGetPendingReasonResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *ReadOnlySchedulerGetPendingReasonResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -19205,58 +21173,58 @@ func (p *ReadOnlySchedulerGetPendingReasonResult) Read(iprot thrift.TProtocol) e switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(iprot); err != nil { + if err := p.ReadField0(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ReadOnlySchedulerGetPendingReasonResult) ReadField0(iprot thrift.TProtocol) error { +func (p *ReadOnlySchedulerGetPendingReasonResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(iprot); err != nil { + if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *ReadOnlySchedulerGetPendingReasonResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("getPendingReason_result"); err != nil { +func (p *ReadOnlySchedulerGetPendingReasonResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "getPendingReason_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(oprot); err != nil { return err } + if err := p.writeField0(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ReadOnlySchedulerGetPendingReasonResult) writeField0(oprot thrift.TProtocol) (err error) { +func (p *ReadOnlySchedulerGetPendingReasonResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } - if err := p.Success.Write(oprot); err != nil { + if err := p.Success.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err @@ -19290,14 +21258,14 @@ func (p *ReadOnlySchedulerGetConfigSummaryArgs) IsSetJob() bool { return p.Job != nil } -func (p *ReadOnlySchedulerGetConfigSummaryArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *ReadOnlySchedulerGetConfigSummaryArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -19305,57 +21273,57 @@ func (p *ReadOnlySchedulerGetConfigSummaryArgs) Read(iprot thrift.TProtocol) err switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ReadOnlySchedulerGetConfigSummaryArgs) ReadField1(iprot thrift.TProtocol) error { +func (p *ReadOnlySchedulerGetConfigSummaryArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { p.Job = &JobKey{} - if err := p.Job.Read(iprot); err != nil { + if err := p.Job.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Job), err) } return nil } -func (p *ReadOnlySchedulerGetConfigSummaryArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("getConfigSummary_args"); err != nil { +func (p *ReadOnlySchedulerGetConfigSummaryArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "getConfigSummary_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ReadOnlySchedulerGetConfigSummaryArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("job", thrift.STRUCT, 1); err != nil { +func (p *ReadOnlySchedulerGetConfigSummaryArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "job", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:job: ", p), err) } - if err := p.Job.Write(oprot); err != nil { + if err := p.Job.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Job), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:job: ", p), err) } return err } @@ -19388,14 +21356,14 @@ func (p *ReadOnlySchedulerGetConfigSummaryResult) IsSetSuccess() bool { return p.Success != nil } -func (p *ReadOnlySchedulerGetConfigSummaryResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *ReadOnlySchedulerGetConfigSummaryResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -19403,58 +21371,58 @@ func (p *ReadOnlySchedulerGetConfigSummaryResult) Read(iprot thrift.TProtocol) e switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(iprot); err != nil { + if err := p.ReadField0(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ReadOnlySchedulerGetConfigSummaryResult) ReadField0(iprot thrift.TProtocol) error { +func (p *ReadOnlySchedulerGetConfigSummaryResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(iprot); err != nil { + if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *ReadOnlySchedulerGetConfigSummaryResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("getConfigSummary_result"); err != nil { +func (p *ReadOnlySchedulerGetConfigSummaryResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "getConfigSummary_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(oprot); err != nil { return err } + if err := p.writeField0(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ReadOnlySchedulerGetConfigSummaryResult) writeField0(oprot thrift.TProtocol) (err error) { +func (p *ReadOnlySchedulerGetConfigSummaryResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } - if err := p.Success.Write(oprot); err != nil { + if err := p.Success.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err @@ -19481,14 +21449,14 @@ func NewReadOnlySchedulerGetJobsArgs() *ReadOnlySchedulerGetJobsArgs { func (p *ReadOnlySchedulerGetJobsArgs) GetOwnerRole() string { return p.OwnerRole } -func (p *ReadOnlySchedulerGetJobsArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *ReadOnlySchedulerGetJobsArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -19496,31 +21464,31 @@ func (p *ReadOnlySchedulerGetJobsArgs) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRING { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ReadOnlySchedulerGetJobsArgs) ReadField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { +func (p *ReadOnlySchedulerGetJobsArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.OwnerRole = v @@ -19528,25 +21496,25 @@ func (p *ReadOnlySchedulerGetJobsArgs) ReadField1(iprot thrift.TProtocol) error return nil } -func (p *ReadOnlySchedulerGetJobsArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("getJobs_args"); err != nil { +func (p *ReadOnlySchedulerGetJobsArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "getJobs_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ReadOnlySchedulerGetJobsArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("ownerRole", thrift.STRING, 1); err != nil { +func (p *ReadOnlySchedulerGetJobsArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "ownerRole", thrift.STRING, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:ownerRole: ", p), err) } - if err := oprot.WriteString(string(p.OwnerRole)); err != nil { + if err := oprot.WriteString(ctx, string(p.OwnerRole)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.ownerRole (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:ownerRole: ", p), err) } return err } @@ -19579,14 +21547,14 @@ func (p *ReadOnlySchedulerGetJobsResult) IsSetSuccess() bool { return p.Success != nil } -func (p *ReadOnlySchedulerGetJobsResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *ReadOnlySchedulerGetJobsResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -19594,58 +21562,58 @@ func (p *ReadOnlySchedulerGetJobsResult) Read(iprot thrift.TProtocol) error { switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(iprot); err != nil { + if err := p.ReadField0(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ReadOnlySchedulerGetJobsResult) ReadField0(iprot thrift.TProtocol) error { +func (p *ReadOnlySchedulerGetJobsResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(iprot); err != nil { + if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *ReadOnlySchedulerGetJobsResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("getJobs_result"); err != nil { +func (p *ReadOnlySchedulerGetJobsResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "getJobs_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(oprot); err != nil { return err } + if err := p.writeField0(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ReadOnlySchedulerGetJobsResult) writeField0(oprot thrift.TProtocol) (err error) { +func (p *ReadOnlySchedulerGetJobsResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } - if err := p.Success.Write(oprot); err != nil { + if err := p.Success.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err @@ -19672,14 +21640,14 @@ func NewReadOnlySchedulerGetQuotaArgs() *ReadOnlySchedulerGetQuotaArgs { func (p *ReadOnlySchedulerGetQuotaArgs) GetOwnerRole() string { return p.OwnerRole } -func (p *ReadOnlySchedulerGetQuotaArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *ReadOnlySchedulerGetQuotaArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -19687,31 +21655,31 @@ func (p *ReadOnlySchedulerGetQuotaArgs) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRING { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ReadOnlySchedulerGetQuotaArgs) ReadField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { +func (p *ReadOnlySchedulerGetQuotaArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.OwnerRole = v @@ -19719,25 +21687,25 @@ func (p *ReadOnlySchedulerGetQuotaArgs) ReadField1(iprot thrift.TProtocol) erro return nil } -func (p *ReadOnlySchedulerGetQuotaArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("getQuota_args"); err != nil { +func (p *ReadOnlySchedulerGetQuotaArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "getQuota_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ReadOnlySchedulerGetQuotaArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("ownerRole", thrift.STRING, 1); err != nil { +func (p *ReadOnlySchedulerGetQuotaArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "ownerRole", thrift.STRING, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:ownerRole: ", p), err) } - if err := oprot.WriteString(string(p.OwnerRole)); err != nil { + if err := oprot.WriteString(ctx, string(p.OwnerRole)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.ownerRole (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:ownerRole: ", p), err) } return err } @@ -19770,14 +21738,14 @@ func (p *ReadOnlySchedulerGetQuotaResult) IsSetSuccess() bool { return p.Success != nil } -func (p *ReadOnlySchedulerGetQuotaResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *ReadOnlySchedulerGetQuotaResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -19785,58 +21753,58 @@ func (p *ReadOnlySchedulerGetQuotaResult) Read(iprot thrift.TProtocol) error { switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(iprot); err != nil { + if err := p.ReadField0(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ReadOnlySchedulerGetQuotaResult) ReadField0(iprot thrift.TProtocol) error { +func (p *ReadOnlySchedulerGetQuotaResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(iprot); err != nil { + if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *ReadOnlySchedulerGetQuotaResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("getQuota_result"); err != nil { +func (p *ReadOnlySchedulerGetQuotaResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "getQuota_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(oprot); err != nil { return err } + if err := p.writeField0(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ReadOnlySchedulerGetQuotaResult) writeField0(oprot thrift.TProtocol) (err error) { +func (p *ReadOnlySchedulerGetQuotaResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } - if err := p.Success.Write(oprot); err != nil { + if err := p.Success.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err @@ -19870,14 +21838,14 @@ func (p *ReadOnlySchedulerPopulateJobConfigArgs) IsSetDescription() bool { return p.Description != nil } -func (p *ReadOnlySchedulerPopulateJobConfigArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *ReadOnlySchedulerPopulateJobConfigArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -19885,57 +21853,57 @@ func (p *ReadOnlySchedulerPopulateJobConfigArgs) Read(iprot thrift.TProtocol) er switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ReadOnlySchedulerPopulateJobConfigArgs) ReadField1(iprot thrift.TProtocol) error { +func (p *ReadOnlySchedulerPopulateJobConfigArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { p.Description = &JobConfiguration{} - if err := p.Description.Read(iprot); err != nil { + if err := p.Description.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Description), err) } return nil } -func (p *ReadOnlySchedulerPopulateJobConfigArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("populateJobConfig_args"); err != nil { +func (p *ReadOnlySchedulerPopulateJobConfigArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "populateJobConfig_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ReadOnlySchedulerPopulateJobConfigArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("description", thrift.STRUCT, 1); err != nil { +func (p *ReadOnlySchedulerPopulateJobConfigArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "description", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:description: ", p), err) } - if err := p.Description.Write(oprot); err != nil { + if err := p.Description.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Description), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:description: ", p), err) } return err } @@ -19968,14 +21936,14 @@ func (p *ReadOnlySchedulerPopulateJobConfigResult) IsSetSuccess() bool { return p.Success != nil } -func (p *ReadOnlySchedulerPopulateJobConfigResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *ReadOnlySchedulerPopulateJobConfigResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -19983,58 +21951,58 @@ func (p *ReadOnlySchedulerPopulateJobConfigResult) Read(iprot thrift.TProtocol) switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(iprot); err != nil { + if err := p.ReadField0(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ReadOnlySchedulerPopulateJobConfigResult) ReadField0(iprot thrift.TProtocol) error { +func (p *ReadOnlySchedulerPopulateJobConfigResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(iprot); err != nil { + if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *ReadOnlySchedulerPopulateJobConfigResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("populateJobConfig_result"); err != nil { +func (p *ReadOnlySchedulerPopulateJobConfigResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "populateJobConfig_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(oprot); err != nil { return err } + if err := p.writeField0(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ReadOnlySchedulerPopulateJobConfigResult) writeField0(oprot thrift.TProtocol) (err error) { +func (p *ReadOnlySchedulerPopulateJobConfigResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } - if err := p.Success.Write(oprot); err != nil { + if err := p.Success.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err @@ -20068,14 +22036,14 @@ func (p *ReadOnlySchedulerGetJobUpdateSummariesArgs) IsSetJobUpdateQuery() bool return p.JobUpdateQuery != nil } -func (p *ReadOnlySchedulerGetJobUpdateSummariesArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *ReadOnlySchedulerGetJobUpdateSummariesArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -20083,57 +22051,57 @@ func (p *ReadOnlySchedulerGetJobUpdateSummariesArgs) Read(iprot thrift.TProtocol switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ReadOnlySchedulerGetJobUpdateSummariesArgs) ReadField1(iprot thrift.TProtocol) error { +func (p *ReadOnlySchedulerGetJobUpdateSummariesArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { p.JobUpdateQuery = &JobUpdateQuery{} - if err := p.JobUpdateQuery.Read(iprot); err != nil { + if err := p.JobUpdateQuery.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.JobUpdateQuery), err) } return nil } -func (p *ReadOnlySchedulerGetJobUpdateSummariesArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("getJobUpdateSummaries_args"); err != nil { +func (p *ReadOnlySchedulerGetJobUpdateSummariesArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "getJobUpdateSummaries_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ReadOnlySchedulerGetJobUpdateSummariesArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("jobUpdateQuery", thrift.STRUCT, 1); err != nil { +func (p *ReadOnlySchedulerGetJobUpdateSummariesArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "jobUpdateQuery", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:jobUpdateQuery: ", p), err) } - if err := p.JobUpdateQuery.Write(oprot); err != nil { + if err := p.JobUpdateQuery.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.JobUpdateQuery), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:jobUpdateQuery: ", p), err) } return err } @@ -20166,14 +22134,14 @@ func (p *ReadOnlySchedulerGetJobUpdateSummariesResult) IsSetSuccess() bool { return p.Success != nil } -func (p *ReadOnlySchedulerGetJobUpdateSummariesResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *ReadOnlySchedulerGetJobUpdateSummariesResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -20181,58 +22149,58 @@ func (p *ReadOnlySchedulerGetJobUpdateSummariesResult) Read(iprot thrift.TProtoc switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(iprot); err != nil { + if err := p.ReadField0(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ReadOnlySchedulerGetJobUpdateSummariesResult) ReadField0(iprot thrift.TProtocol) error { +func (p *ReadOnlySchedulerGetJobUpdateSummariesResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(iprot); err != nil { + if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *ReadOnlySchedulerGetJobUpdateSummariesResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("getJobUpdateSummaries_result"); err != nil { +func (p *ReadOnlySchedulerGetJobUpdateSummariesResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "getJobUpdateSummaries_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(oprot); err != nil { return err } + if err := p.writeField0(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ReadOnlySchedulerGetJobUpdateSummariesResult) writeField0(oprot thrift.TProtocol) (err error) { +func (p *ReadOnlySchedulerGetJobUpdateSummariesResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } - if err := p.Success.Write(oprot); err != nil { + if err := p.Success.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err @@ -20267,14 +22235,14 @@ func (p *ReadOnlySchedulerGetJobUpdateDetailsArgs) IsSetQuery() bool { return p.Query != nil } -func (p *ReadOnlySchedulerGetJobUpdateDetailsArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *ReadOnlySchedulerGetJobUpdateDetailsArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -20282,57 +22250,57 @@ func (p *ReadOnlySchedulerGetJobUpdateDetailsArgs) Read(iprot thrift.TProtocol) switch fieldId { case 2: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField2(iprot); err != nil { + if err := p.ReadField2(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ReadOnlySchedulerGetJobUpdateDetailsArgs) ReadField2(iprot thrift.TProtocol) error { +func (p *ReadOnlySchedulerGetJobUpdateDetailsArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { p.Query = &JobUpdateQuery{} - if err := p.Query.Read(iprot); err != nil { + if err := p.Query.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Query), err) } return nil } -func (p *ReadOnlySchedulerGetJobUpdateDetailsArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("getJobUpdateDetails_args"); err != nil { +func (p *ReadOnlySchedulerGetJobUpdateDetailsArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "getJobUpdateDetails_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField2(oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ReadOnlySchedulerGetJobUpdateDetailsArgs) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("query", thrift.STRUCT, 2); err != nil { +func (p *ReadOnlySchedulerGetJobUpdateDetailsArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "query", thrift.STRUCT, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:query: ", p), err) } - if err := p.Query.Write(oprot); err != nil { + if err := p.Query.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Query), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:query: ", p), err) } return err } @@ -20365,14 +22333,14 @@ func (p *ReadOnlySchedulerGetJobUpdateDetailsResult) IsSetSuccess() bool { return p.Success != nil } -func (p *ReadOnlySchedulerGetJobUpdateDetailsResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *ReadOnlySchedulerGetJobUpdateDetailsResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -20380,58 +22348,58 @@ func (p *ReadOnlySchedulerGetJobUpdateDetailsResult) Read(iprot thrift.TProtocol switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(iprot); err != nil { + if err := p.ReadField0(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ReadOnlySchedulerGetJobUpdateDetailsResult) ReadField0(iprot thrift.TProtocol) error { +func (p *ReadOnlySchedulerGetJobUpdateDetailsResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(iprot); err != nil { + if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *ReadOnlySchedulerGetJobUpdateDetailsResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("getJobUpdateDetails_result"); err != nil { +func (p *ReadOnlySchedulerGetJobUpdateDetailsResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "getJobUpdateDetails_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(oprot); err != nil { return err } + if err := p.writeField0(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ReadOnlySchedulerGetJobUpdateDetailsResult) writeField0(oprot thrift.TProtocol) (err error) { +func (p *ReadOnlySchedulerGetJobUpdateDetailsResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } - if err := p.Success.Write(oprot); err != nil { + if err := p.Success.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err @@ -20465,14 +22433,14 @@ func (p *ReadOnlySchedulerGetJobUpdateDiffArgs) IsSetRequest() bool { return p.Request != nil } -func (p *ReadOnlySchedulerGetJobUpdateDiffArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *ReadOnlySchedulerGetJobUpdateDiffArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -20480,57 +22448,57 @@ func (p *ReadOnlySchedulerGetJobUpdateDiffArgs) Read(iprot thrift.TProtocol) err switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ReadOnlySchedulerGetJobUpdateDiffArgs) ReadField1(iprot thrift.TProtocol) error { +func (p *ReadOnlySchedulerGetJobUpdateDiffArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { p.Request = &JobUpdateRequest{} - if err := p.Request.Read(iprot); err != nil { + if err := p.Request.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Request), err) } return nil } -func (p *ReadOnlySchedulerGetJobUpdateDiffArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("getJobUpdateDiff_args"); err != nil { +func (p *ReadOnlySchedulerGetJobUpdateDiffArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "getJobUpdateDiff_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ReadOnlySchedulerGetJobUpdateDiffArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("request", thrift.STRUCT, 1); err != nil { +func (p *ReadOnlySchedulerGetJobUpdateDiffArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "request", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:request: ", p), err) } - if err := p.Request.Write(oprot); err != nil { + if err := p.Request.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Request), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:request: ", p), err) } return err } @@ -20563,14 +22531,14 @@ func (p *ReadOnlySchedulerGetJobUpdateDiffResult) IsSetSuccess() bool { return p.Success != nil } -func (p *ReadOnlySchedulerGetJobUpdateDiffResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *ReadOnlySchedulerGetJobUpdateDiffResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -20578,58 +22546,58 @@ func (p *ReadOnlySchedulerGetJobUpdateDiffResult) Read(iprot thrift.TProtocol) e switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(iprot); err != nil { + if err := p.ReadField0(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ReadOnlySchedulerGetJobUpdateDiffResult) ReadField0(iprot thrift.TProtocol) error { +func (p *ReadOnlySchedulerGetJobUpdateDiffResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(iprot); err != nil { + if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *ReadOnlySchedulerGetJobUpdateDiffResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("getJobUpdateDiff_result"); err != nil { +func (p *ReadOnlySchedulerGetJobUpdateDiffResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "getJobUpdateDiff_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(oprot); err != nil { return err } + if err := p.writeField0(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ReadOnlySchedulerGetJobUpdateDiffResult) writeField0(oprot thrift.TProtocol) (err error) { +func (p *ReadOnlySchedulerGetJobUpdateDiffResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } - if err := p.Success.Write(oprot); err != nil { + if err := p.Success.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err @@ -20649,39 +22617,39 @@ func NewReadOnlySchedulerGetTierConfigsArgs() *ReadOnlySchedulerGetTierConfigsAr return &ReadOnlySchedulerGetTierConfigsArgs{} } -func (p *ReadOnlySchedulerGetTierConfigsArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *ReadOnlySchedulerGetTierConfigsArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } if fieldTypeId == thrift.STOP { break; } - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ReadOnlySchedulerGetTierConfigsArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("getTierConfigs_args"); err != nil { +func (p *ReadOnlySchedulerGetTierConfigsArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "getTierConfigs_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } @@ -20714,14 +22682,14 @@ func (p *ReadOnlySchedulerGetTierConfigsResult) IsSetSuccess() bool { return p.Success != nil } -func (p *ReadOnlySchedulerGetTierConfigsResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *ReadOnlySchedulerGetTierConfigsResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -20729,58 +22697,58 @@ func (p *ReadOnlySchedulerGetTierConfigsResult) Read(iprot thrift.TProtocol) err switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(iprot); err != nil { + if err := p.ReadField0(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ReadOnlySchedulerGetTierConfigsResult) ReadField0(iprot thrift.TProtocol) error { +func (p *ReadOnlySchedulerGetTierConfigsResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(iprot); err != nil { + if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *ReadOnlySchedulerGetTierConfigsResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("getTierConfigs_result"); err != nil { +func (p *ReadOnlySchedulerGetTierConfigsResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "getTierConfigs_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(oprot); err != nil { return err } + if err := p.writeField0(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ReadOnlySchedulerGetTierConfigsResult) writeField0(oprot thrift.TProtocol) (err error) { +func (p *ReadOnlySchedulerGetTierConfigsResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } - if err := p.Success.Write(oprot); err != nil { + if err := p.Success.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err @@ -20909,13 +22877,16 @@ func NewAuroraSchedulerManagerClient(c thrift.TClient) *AuroraSchedulerManagerCl // Parameters: // - Description func (p *AuroraSchedulerManagerClient) CreateJob(ctx context.Context, description *JobConfiguration) (r *Response, err error) { - var _args132 AuroraSchedulerManagerCreateJobArgs - _args132.Description = description - var _result133 AuroraSchedulerManagerCreateJobResult - if err = p.Client_().Call(ctx, "createJob", &_args132, &_result133); err != nil { + var _args182 AuroraSchedulerManagerCreateJobArgs + _args182.Description = description + var _result183 AuroraSchedulerManagerCreateJobResult + var meta thrift.ResponseMeta + meta, err = p.Client_().Call(ctx, "createJob", &_args182, &_result183) + p.SetLastResponseMeta_(meta) + if err != nil { return } - return _result133.GetSuccess(), nil + return _result183.GetSuccess(), nil } // Enters a job into the cron schedule, without actually starting the job. @@ -20925,13 +22896,16 @@ func (p *AuroraSchedulerManagerClient) CreateJob(ctx context.Context, descriptio // Parameters: // - Description func (p *AuroraSchedulerManagerClient) ScheduleCronJob(ctx context.Context, description *JobConfiguration) (r *Response, err error) { - var _args134 AuroraSchedulerManagerScheduleCronJobArgs - _args134.Description = description - var _result135 AuroraSchedulerManagerScheduleCronJobResult - if err = p.Client_().Call(ctx, "scheduleCronJob", &_args134, &_result135); err != nil { + var _args184 AuroraSchedulerManagerScheduleCronJobArgs + _args184.Description = description + var _result185 AuroraSchedulerManagerScheduleCronJobResult + var meta thrift.ResponseMeta + meta, err = p.Client_().Call(ctx, "scheduleCronJob", &_args184, &_result185) + p.SetLastResponseMeta_(meta) + if err != nil { return } - return _result135.GetSuccess(), nil + return _result185.GetSuccess(), nil } // Removes a job from the cron schedule. The request will be denied if the job was not previously @@ -20940,13 +22914,16 @@ func (p *AuroraSchedulerManagerClient) ScheduleCronJob(ctx context.Context, desc // Parameters: // - Job func (p *AuroraSchedulerManagerClient) DescheduleCronJob(ctx context.Context, job *JobKey) (r *Response, err error) { - var _args136 AuroraSchedulerManagerDescheduleCronJobArgs - _args136.Job = job - var _result137 AuroraSchedulerManagerDescheduleCronJobResult - if err = p.Client_().Call(ctx, "descheduleCronJob", &_args136, &_result137); err != nil { + var _args186 AuroraSchedulerManagerDescheduleCronJobArgs + _args186.Job = job + var _result187 AuroraSchedulerManagerDescheduleCronJobResult + var meta thrift.ResponseMeta + meta, err = p.Client_().Call(ctx, "descheduleCronJob", &_args186, &_result187) + p.SetLastResponseMeta_(meta) + if err != nil { return } - return _result137.GetSuccess(), nil + return _result187.GetSuccess(), nil } // Starts a cron job immediately. The request will be denied if the specified job does not @@ -20955,13 +22932,16 @@ func (p *AuroraSchedulerManagerClient) DescheduleCronJob(ctx context.Context, jo // Parameters: // - Job func (p *AuroraSchedulerManagerClient) StartCronJob(ctx context.Context, job *JobKey) (r *Response, err error) { - var _args138 AuroraSchedulerManagerStartCronJobArgs - _args138.Job = job - var _result139 AuroraSchedulerManagerStartCronJobResult - if err = p.Client_().Call(ctx, "startCronJob", &_args138, &_result139); err != nil { + var _args188 AuroraSchedulerManagerStartCronJobArgs + _args188.Job = job + var _result189 AuroraSchedulerManagerStartCronJobResult + var meta thrift.ResponseMeta + meta, err = p.Client_().Call(ctx, "startCronJob", &_args188, &_result189) + p.SetLastResponseMeta_(meta) + if err != nil { return } - return _result139.GetSuccess(), nil + return _result189.GetSuccess(), nil } // Restarts a batch of shards. @@ -20970,14 +22950,17 @@ func (p *AuroraSchedulerManagerClient) StartCronJob(ctx context.Context, job *Jo // - Job // - ShardIds func (p *AuroraSchedulerManagerClient) RestartShards(ctx context.Context, job *JobKey, shardIds []int32) (r *Response, err error) { - var _args140 AuroraSchedulerManagerRestartShardsArgs - _args140.Job = job - _args140.ShardIds = shardIds - var _result141 AuroraSchedulerManagerRestartShardsResult - if err = p.Client_().Call(ctx, "restartShards", &_args140, &_result141); err != nil { + var _args190 AuroraSchedulerManagerRestartShardsArgs + _args190.Job = job + _args190.ShardIds = shardIds + var _result191 AuroraSchedulerManagerRestartShardsResult + var meta thrift.ResponseMeta + meta, err = p.Client_().Call(ctx, "restartShards", &_args190, &_result191) + p.SetLastResponseMeta_(meta) + if err != nil { return } - return _result141.GetSuccess(), nil + return _result191.GetSuccess(), nil } // Initiates a kill on tasks. @@ -20987,15 +22970,18 @@ func (p *AuroraSchedulerManagerClient) RestartShards(ctx context.Context, job *J // - Instances // - Message func (p *AuroraSchedulerManagerClient) KillTasks(ctx context.Context, job *JobKey, instances []int32, message string) (r *Response, err error) { - var _args142 AuroraSchedulerManagerKillTasksArgs - _args142.Job = job - _args142.Instances = instances - _args142.Message = message - var _result143 AuroraSchedulerManagerKillTasksResult - if err = p.Client_().Call(ctx, "killTasks", &_args142, &_result143); err != nil { + var _args192 AuroraSchedulerManagerKillTasksArgs + _args192.Job = job + _args192.Instances = instances + _args192.Message = message + var _result193 AuroraSchedulerManagerKillTasksResult + var meta thrift.ResponseMeta + meta, err = p.Client_().Call(ctx, "killTasks", &_args192, &_result193) + p.SetLastResponseMeta_(meta) + if err != nil { return } - return _result143.GetSuccess(), nil + return _result193.GetSuccess(), nil } // Adds new instances with the TaskConfig of the existing instance pointed by the key. @@ -21004,14 +22990,17 @@ func (p *AuroraSchedulerManagerClient) KillTasks(ctx context.Context, job *JobKe // - Key // - Count func (p *AuroraSchedulerManagerClient) AddInstances(ctx context.Context, key *InstanceKey, count int32) (r *Response, err error) { - var _args144 AuroraSchedulerManagerAddInstancesArgs - _args144.Key = key - _args144.Count = count - var _result145 AuroraSchedulerManagerAddInstancesResult - if err = p.Client_().Call(ctx, "addInstances", &_args144, &_result145); err != nil { + var _args194 AuroraSchedulerManagerAddInstancesArgs + _args194.Key = key + _args194.Count = count + var _result195 AuroraSchedulerManagerAddInstancesResult + var meta thrift.ResponseMeta + meta, err = p.Client_().Call(ctx, "addInstances", &_args194, &_result195) + p.SetLastResponseMeta_(meta) + if err != nil { return } - return _result145.GetSuccess(), nil + return _result195.GetSuccess(), nil } // Replaces the template (configuration) for the existing cron job. @@ -21020,13 +23009,16 @@ func (p *AuroraSchedulerManagerClient) AddInstances(ctx context.Context, key *In // Parameters: // - Config func (p *AuroraSchedulerManagerClient) ReplaceCronTemplate(ctx context.Context, config *JobConfiguration) (r *Response, err error) { - var _args146 AuroraSchedulerManagerReplaceCronTemplateArgs - _args146.Config = config - var _result147 AuroraSchedulerManagerReplaceCronTemplateResult - if err = p.Client_().Call(ctx, "replaceCronTemplate", &_args146, &_result147); err != nil { + var _args196 AuroraSchedulerManagerReplaceCronTemplateArgs + _args196.Config = config + var _result197 AuroraSchedulerManagerReplaceCronTemplateResult + var meta thrift.ResponseMeta + meta, err = p.Client_().Call(ctx, "replaceCronTemplate", &_args196, &_result197) + p.SetLastResponseMeta_(meta) + if err != nil { return } - return _result147.GetSuccess(), nil + return _result197.GetSuccess(), nil } // Starts update of the existing service job. @@ -21035,14 +23027,17 @@ func (p *AuroraSchedulerManagerClient) ReplaceCronTemplate(ctx context.Context, // - Request: A description of how to change the job. // - Message: A user-specified message to include with the induced job update state change. func (p *AuroraSchedulerManagerClient) StartJobUpdate(ctx context.Context, request *JobUpdateRequest, message string) (r *Response, err error) { - var _args148 AuroraSchedulerManagerStartJobUpdateArgs - _args148.Request = request - _args148.Message = message - var _result149 AuroraSchedulerManagerStartJobUpdateResult - if err = p.Client_().Call(ctx, "startJobUpdate", &_args148, &_result149); err != nil { + var _args198 AuroraSchedulerManagerStartJobUpdateArgs + _args198.Request = request + _args198.Message = message + var _result199 AuroraSchedulerManagerStartJobUpdateResult + var meta thrift.ResponseMeta + meta, err = p.Client_().Call(ctx, "startJobUpdate", &_args198, &_result199) + p.SetLastResponseMeta_(meta) + if err != nil { return } - return _result149.GetSuccess(), nil + return _result199.GetSuccess(), nil } // Pauses the specified job update. Can be resumed by resumeUpdate call. @@ -21051,14 +23046,17 @@ func (p *AuroraSchedulerManagerClient) StartJobUpdate(ctx context.Context, reque // - Key: The update to pause. // - Message: A user-specified message to include with the induced job update state change. func (p *AuroraSchedulerManagerClient) PauseJobUpdate(ctx context.Context, key *JobUpdateKey, message string) (r *Response, err error) { - var _args150 AuroraSchedulerManagerPauseJobUpdateArgs - _args150.Key = key - _args150.Message = message - var _result151 AuroraSchedulerManagerPauseJobUpdateResult - if err = p.Client_().Call(ctx, "pauseJobUpdate", &_args150, &_result151); err != nil { + var _args200 AuroraSchedulerManagerPauseJobUpdateArgs + _args200.Key = key + _args200.Message = message + var _result201 AuroraSchedulerManagerPauseJobUpdateResult + var meta thrift.ResponseMeta + meta, err = p.Client_().Call(ctx, "pauseJobUpdate", &_args200, &_result201) + p.SetLastResponseMeta_(meta) + if err != nil { return } - return _result151.GetSuccess(), nil + return _result201.GetSuccess(), nil } // Resumes progress of a previously paused job update. @@ -21067,14 +23065,17 @@ func (p *AuroraSchedulerManagerClient) PauseJobUpdate(ctx context.Context, key * // - Key: The update to resume. // - Message: A user-specified message to include with the induced job update state change. func (p *AuroraSchedulerManagerClient) ResumeJobUpdate(ctx context.Context, key *JobUpdateKey, message string) (r *Response, err error) { - var _args152 AuroraSchedulerManagerResumeJobUpdateArgs - _args152.Key = key - _args152.Message = message - var _result153 AuroraSchedulerManagerResumeJobUpdateResult - if err = p.Client_().Call(ctx, "resumeJobUpdate", &_args152, &_result153); err != nil { + var _args202 AuroraSchedulerManagerResumeJobUpdateArgs + _args202.Key = key + _args202.Message = message + var _result203 AuroraSchedulerManagerResumeJobUpdateResult + var meta thrift.ResponseMeta + meta, err = p.Client_().Call(ctx, "resumeJobUpdate", &_args202, &_result203) + p.SetLastResponseMeta_(meta) + if err != nil { return } - return _result153.GetSuccess(), nil + return _result203.GetSuccess(), nil } // Permanently aborts the job update. Does not remove the update history. @@ -21083,14 +23084,17 @@ func (p *AuroraSchedulerManagerClient) ResumeJobUpdate(ctx context.Context, key // - Key: The update to abort. // - Message: A user-specified message to include with the induced job update state change. func (p *AuroraSchedulerManagerClient) AbortJobUpdate(ctx context.Context, key *JobUpdateKey, message string) (r *Response, err error) { - var _args154 AuroraSchedulerManagerAbortJobUpdateArgs - _args154.Key = key - _args154.Message = message - var _result155 AuroraSchedulerManagerAbortJobUpdateResult - if err = p.Client_().Call(ctx, "abortJobUpdate", &_args154, &_result155); err != nil { + var _args204 AuroraSchedulerManagerAbortJobUpdateArgs + _args204.Key = key + _args204.Message = message + var _result205 AuroraSchedulerManagerAbortJobUpdateResult + var meta thrift.ResponseMeta + meta, err = p.Client_().Call(ctx, "abortJobUpdate", &_args204, &_result205) + p.SetLastResponseMeta_(meta) + if err != nil { return } - return _result155.GetSuccess(), nil + return _result205.GetSuccess(), nil } // Rollbacks the specified active job update to the initial state. @@ -21099,14 +23103,17 @@ func (p *AuroraSchedulerManagerClient) AbortJobUpdate(ctx context.Context, key * // - Key: The update to rollback. // - Message: A user-specified message to include with the induced job update state change. func (p *AuroraSchedulerManagerClient) RollbackJobUpdate(ctx context.Context, key *JobUpdateKey, message string) (r *Response, err error) { - var _args156 AuroraSchedulerManagerRollbackJobUpdateArgs - _args156.Key = key - _args156.Message = message - var _result157 AuroraSchedulerManagerRollbackJobUpdateResult - if err = p.Client_().Call(ctx, "rollbackJobUpdate", &_args156, &_result157); err != nil { + var _args206 AuroraSchedulerManagerRollbackJobUpdateArgs + _args206.Key = key + _args206.Message = message + var _result207 AuroraSchedulerManagerRollbackJobUpdateResult + var meta thrift.ResponseMeta + meta, err = p.Client_().Call(ctx, "rollbackJobUpdate", &_args206, &_result207) + p.SetLastResponseMeta_(meta) + if err != nil { return } - return _result157.GetSuccess(), nil + return _result207.GetSuccess(), nil } // Allows progress of the job update in case blockIfNoPulsesAfterMs is specified in @@ -21116,13 +23123,16 @@ func (p *AuroraSchedulerManagerClient) RollbackJobUpdate(ctx context.Context, ke // Parameters: // - Key func (p *AuroraSchedulerManagerClient) PulseJobUpdate(ctx context.Context, key *JobUpdateKey) (r *Response, err error) { - var _args158 AuroraSchedulerManagerPulseJobUpdateArgs - _args158.Key = key - var _result159 AuroraSchedulerManagerPulseJobUpdateResult - if err = p.Client_().Call(ctx, "pulseJobUpdate", &_args158, &_result159); err != nil { + var _args208 AuroraSchedulerManagerPulseJobUpdateArgs + _args208.Key = key + var _result209 AuroraSchedulerManagerPulseJobUpdateResult + var meta thrift.ResponseMeta + meta, err = p.Client_().Call(ctx, "pulseJobUpdate", &_args208, &_result209) + p.SetLastResponseMeta_(meta) + if err != nil { return } - return _result159.GetSuccess(), nil + return _result209.GetSuccess(), nil } type AuroraSchedulerManagerProcessor struct { @@ -21130,22 +23140,22 @@ type AuroraSchedulerManagerProcessor struct { } func NewAuroraSchedulerManagerProcessor(handler AuroraSchedulerManager) *AuroraSchedulerManagerProcessor { - self160 := &AuroraSchedulerManagerProcessor{NewReadOnlySchedulerProcessor(handler)} - self160.AddToProcessorMap("createJob", &auroraSchedulerManagerProcessorCreateJob{handler:handler}) - self160.AddToProcessorMap("scheduleCronJob", &auroraSchedulerManagerProcessorScheduleCronJob{handler:handler}) - self160.AddToProcessorMap("descheduleCronJob", &auroraSchedulerManagerProcessorDescheduleCronJob{handler:handler}) - self160.AddToProcessorMap("startCronJob", &auroraSchedulerManagerProcessorStartCronJob{handler:handler}) - self160.AddToProcessorMap("restartShards", &auroraSchedulerManagerProcessorRestartShards{handler:handler}) - self160.AddToProcessorMap("killTasks", &auroraSchedulerManagerProcessorKillTasks{handler:handler}) - self160.AddToProcessorMap("addInstances", &auroraSchedulerManagerProcessorAddInstances{handler:handler}) - self160.AddToProcessorMap("replaceCronTemplate", &auroraSchedulerManagerProcessorReplaceCronTemplate{handler:handler}) - self160.AddToProcessorMap("startJobUpdate", &auroraSchedulerManagerProcessorStartJobUpdate{handler:handler}) - self160.AddToProcessorMap("pauseJobUpdate", &auroraSchedulerManagerProcessorPauseJobUpdate{handler:handler}) - self160.AddToProcessorMap("resumeJobUpdate", &auroraSchedulerManagerProcessorResumeJobUpdate{handler:handler}) - self160.AddToProcessorMap("abortJobUpdate", &auroraSchedulerManagerProcessorAbortJobUpdate{handler:handler}) - self160.AddToProcessorMap("rollbackJobUpdate", &auroraSchedulerManagerProcessorRollbackJobUpdate{handler:handler}) - self160.AddToProcessorMap("pulseJobUpdate", &auroraSchedulerManagerProcessorPulseJobUpdate{handler:handler}) - return self160 + self210 := &AuroraSchedulerManagerProcessor{NewReadOnlySchedulerProcessor(handler)} + self210.AddToProcessorMap("createJob", &auroraSchedulerManagerProcessorCreateJob{handler:handler}) + self210.AddToProcessorMap("scheduleCronJob", &auroraSchedulerManagerProcessorScheduleCronJob{handler:handler}) + self210.AddToProcessorMap("descheduleCronJob", &auroraSchedulerManagerProcessorDescheduleCronJob{handler:handler}) + self210.AddToProcessorMap("startCronJob", &auroraSchedulerManagerProcessorStartCronJob{handler:handler}) + self210.AddToProcessorMap("restartShards", &auroraSchedulerManagerProcessorRestartShards{handler:handler}) + self210.AddToProcessorMap("killTasks", &auroraSchedulerManagerProcessorKillTasks{handler:handler}) + self210.AddToProcessorMap("addInstances", &auroraSchedulerManagerProcessorAddInstances{handler:handler}) + self210.AddToProcessorMap("replaceCronTemplate", &auroraSchedulerManagerProcessorReplaceCronTemplate{handler:handler}) + self210.AddToProcessorMap("startJobUpdate", &auroraSchedulerManagerProcessorStartJobUpdate{handler:handler}) + self210.AddToProcessorMap("pauseJobUpdate", &auroraSchedulerManagerProcessorPauseJobUpdate{handler:handler}) + self210.AddToProcessorMap("resumeJobUpdate", &auroraSchedulerManagerProcessorResumeJobUpdate{handler:handler}) + self210.AddToProcessorMap("abortJobUpdate", &auroraSchedulerManagerProcessorAbortJobUpdate{handler:handler}) + self210.AddToProcessorMap("rollbackJobUpdate", &auroraSchedulerManagerProcessorRollbackJobUpdate{handler:handler}) + self210.AddToProcessorMap("pulseJobUpdate", &auroraSchedulerManagerProcessorPulseJobUpdate{handler:handler}) + return self210 } type auroraSchedulerManagerProcessorCreateJob struct { @@ -21154,41 +23164,72 @@ type auroraSchedulerManagerProcessorCreateJob struct { func (p *auroraSchedulerManagerProcessorCreateJob) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := AuroraSchedulerManagerCreateJobArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("createJob", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "createJob", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return false, err + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) } - iprot.ReadMessageEnd() result := AuroraSchedulerManagerCreateJobResult{} -var retval *Response - var err2 error + var retval *Response if retval, err2 = p.handler.CreateJob(ctx, args.Description); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing createJob: " + err2.Error()) - oprot.WriteMessageBegin("createJob", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + oprot.WriteMessageBegin(ctx, "createJob", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return true, err2 + return true, thrift.WrapTException(err2) } else { result.Success = retval -} - if err2 = oprot.WriteMessageBegin("createJob", thrift.REPLY, seqId); err2 != nil { - err = err2 } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "createJob", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = err2 + err = thrift.WrapTException(err2) } if err != nil { return @@ -21202,41 +23243,72 @@ type auroraSchedulerManagerProcessorScheduleCronJob struct { func (p *auroraSchedulerManagerProcessorScheduleCronJob) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := AuroraSchedulerManagerScheduleCronJobArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("scheduleCronJob", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "scheduleCronJob", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return false, err + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) } - iprot.ReadMessageEnd() result := AuroraSchedulerManagerScheduleCronJobResult{} -var retval *Response - var err2 error + var retval *Response if retval, err2 = p.handler.ScheduleCronJob(ctx, args.Description); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing scheduleCronJob: " + err2.Error()) - oprot.WriteMessageBegin("scheduleCronJob", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + oprot.WriteMessageBegin(ctx, "scheduleCronJob", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return true, err2 + return true, thrift.WrapTException(err2) } else { result.Success = retval -} - if err2 = oprot.WriteMessageBegin("scheduleCronJob", thrift.REPLY, seqId); err2 != nil { - err = err2 } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "scheduleCronJob", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = err2 + err = thrift.WrapTException(err2) } if err != nil { return @@ -21250,41 +23322,72 @@ type auroraSchedulerManagerProcessorDescheduleCronJob struct { func (p *auroraSchedulerManagerProcessorDescheduleCronJob) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := AuroraSchedulerManagerDescheduleCronJobArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("descheduleCronJob", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "descheduleCronJob", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return false, err + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) } - iprot.ReadMessageEnd() result := AuroraSchedulerManagerDescheduleCronJobResult{} -var retval *Response - var err2 error + var retval *Response if retval, err2 = p.handler.DescheduleCronJob(ctx, args.Job); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing descheduleCronJob: " + err2.Error()) - oprot.WriteMessageBegin("descheduleCronJob", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + oprot.WriteMessageBegin(ctx, "descheduleCronJob", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return true, err2 + return true, thrift.WrapTException(err2) } else { result.Success = retval -} - if err2 = oprot.WriteMessageBegin("descheduleCronJob", thrift.REPLY, seqId); err2 != nil { - err = err2 } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "descheduleCronJob", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = err2 + err = thrift.WrapTException(err2) } if err != nil { return @@ -21298,41 +23401,72 @@ type auroraSchedulerManagerProcessorStartCronJob struct { func (p *auroraSchedulerManagerProcessorStartCronJob) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := AuroraSchedulerManagerStartCronJobArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("startCronJob", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "startCronJob", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return false, err + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) } - iprot.ReadMessageEnd() result := AuroraSchedulerManagerStartCronJobResult{} -var retval *Response - var err2 error + var retval *Response if retval, err2 = p.handler.StartCronJob(ctx, args.Job); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing startCronJob: " + err2.Error()) - oprot.WriteMessageBegin("startCronJob", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + oprot.WriteMessageBegin(ctx, "startCronJob", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return true, err2 + return true, thrift.WrapTException(err2) } else { result.Success = retval -} - if err2 = oprot.WriteMessageBegin("startCronJob", thrift.REPLY, seqId); err2 != nil { - err = err2 } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "startCronJob", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = err2 + err = thrift.WrapTException(err2) } if err != nil { return @@ -21346,41 +23480,72 @@ type auroraSchedulerManagerProcessorRestartShards struct { func (p *auroraSchedulerManagerProcessorRestartShards) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := AuroraSchedulerManagerRestartShardsArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("restartShards", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "restartShards", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return false, err + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) } - iprot.ReadMessageEnd() result := AuroraSchedulerManagerRestartShardsResult{} -var retval *Response - var err2 error + var retval *Response if retval, err2 = p.handler.RestartShards(ctx, args.Job, args.ShardIds); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing restartShards: " + err2.Error()) - oprot.WriteMessageBegin("restartShards", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + oprot.WriteMessageBegin(ctx, "restartShards", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return true, err2 + return true, thrift.WrapTException(err2) } else { result.Success = retval -} - if err2 = oprot.WriteMessageBegin("restartShards", thrift.REPLY, seqId); err2 != nil { - err = err2 } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "restartShards", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = err2 + err = thrift.WrapTException(err2) } if err != nil { return @@ -21394,41 +23559,72 @@ type auroraSchedulerManagerProcessorKillTasks struct { func (p *auroraSchedulerManagerProcessorKillTasks) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := AuroraSchedulerManagerKillTasksArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("killTasks", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "killTasks", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return false, err + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) } - iprot.ReadMessageEnd() result := AuroraSchedulerManagerKillTasksResult{} -var retval *Response - var err2 error + var retval *Response if retval, err2 = p.handler.KillTasks(ctx, args.Job, args.Instances, args.Message); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing killTasks: " + err2.Error()) - oprot.WriteMessageBegin("killTasks", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + oprot.WriteMessageBegin(ctx, "killTasks", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return true, err2 + return true, thrift.WrapTException(err2) } else { result.Success = retval -} - if err2 = oprot.WriteMessageBegin("killTasks", thrift.REPLY, seqId); err2 != nil { - err = err2 } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "killTasks", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = err2 + err = thrift.WrapTException(err2) } if err != nil { return @@ -21442,41 +23638,72 @@ type auroraSchedulerManagerProcessorAddInstances struct { func (p *auroraSchedulerManagerProcessorAddInstances) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := AuroraSchedulerManagerAddInstancesArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("addInstances", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "addInstances", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return false, err + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) } - iprot.ReadMessageEnd() result := AuroraSchedulerManagerAddInstancesResult{} -var retval *Response - var err2 error + var retval *Response if retval, err2 = p.handler.AddInstances(ctx, args.Key, args.Count); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing addInstances: " + err2.Error()) - oprot.WriteMessageBegin("addInstances", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + oprot.WriteMessageBegin(ctx, "addInstances", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return true, err2 + return true, thrift.WrapTException(err2) } else { result.Success = retval -} - if err2 = oprot.WriteMessageBegin("addInstances", thrift.REPLY, seqId); err2 != nil { - err = err2 } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "addInstances", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = err2 + err = thrift.WrapTException(err2) } if err != nil { return @@ -21490,41 +23717,72 @@ type auroraSchedulerManagerProcessorReplaceCronTemplate struct { func (p *auroraSchedulerManagerProcessorReplaceCronTemplate) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := AuroraSchedulerManagerReplaceCronTemplateArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("replaceCronTemplate", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "replaceCronTemplate", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return false, err + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) } - iprot.ReadMessageEnd() result := AuroraSchedulerManagerReplaceCronTemplateResult{} -var retval *Response - var err2 error + var retval *Response if retval, err2 = p.handler.ReplaceCronTemplate(ctx, args.Config); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing replaceCronTemplate: " + err2.Error()) - oprot.WriteMessageBegin("replaceCronTemplate", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + oprot.WriteMessageBegin(ctx, "replaceCronTemplate", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return true, err2 + return true, thrift.WrapTException(err2) } else { result.Success = retval -} - if err2 = oprot.WriteMessageBegin("replaceCronTemplate", thrift.REPLY, seqId); err2 != nil { - err = err2 } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "replaceCronTemplate", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = err2 + err = thrift.WrapTException(err2) } if err != nil { return @@ -21538,41 +23796,72 @@ type auroraSchedulerManagerProcessorStartJobUpdate struct { func (p *auroraSchedulerManagerProcessorStartJobUpdate) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := AuroraSchedulerManagerStartJobUpdateArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("startJobUpdate", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "startJobUpdate", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return false, err + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) } - iprot.ReadMessageEnd() result := AuroraSchedulerManagerStartJobUpdateResult{} -var retval *Response - var err2 error + var retval *Response if retval, err2 = p.handler.StartJobUpdate(ctx, args.Request, args.Message); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing startJobUpdate: " + err2.Error()) - oprot.WriteMessageBegin("startJobUpdate", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + oprot.WriteMessageBegin(ctx, "startJobUpdate", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return true, err2 + return true, thrift.WrapTException(err2) } else { result.Success = retval -} - if err2 = oprot.WriteMessageBegin("startJobUpdate", thrift.REPLY, seqId); err2 != nil { - err = err2 } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "startJobUpdate", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = err2 + err = thrift.WrapTException(err2) } if err != nil { return @@ -21586,41 +23875,72 @@ type auroraSchedulerManagerProcessorPauseJobUpdate struct { func (p *auroraSchedulerManagerProcessorPauseJobUpdate) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := AuroraSchedulerManagerPauseJobUpdateArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("pauseJobUpdate", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "pauseJobUpdate", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return false, err + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) } - iprot.ReadMessageEnd() result := AuroraSchedulerManagerPauseJobUpdateResult{} -var retval *Response - var err2 error + var retval *Response if retval, err2 = p.handler.PauseJobUpdate(ctx, args.Key, args.Message); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing pauseJobUpdate: " + err2.Error()) - oprot.WriteMessageBegin("pauseJobUpdate", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + oprot.WriteMessageBegin(ctx, "pauseJobUpdate", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return true, err2 + return true, thrift.WrapTException(err2) } else { result.Success = retval -} - if err2 = oprot.WriteMessageBegin("pauseJobUpdate", thrift.REPLY, seqId); err2 != nil { - err = err2 } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "pauseJobUpdate", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = err2 + err = thrift.WrapTException(err2) } if err != nil { return @@ -21634,41 +23954,72 @@ type auroraSchedulerManagerProcessorResumeJobUpdate struct { func (p *auroraSchedulerManagerProcessorResumeJobUpdate) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := AuroraSchedulerManagerResumeJobUpdateArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("resumeJobUpdate", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "resumeJobUpdate", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return false, err + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) } - iprot.ReadMessageEnd() result := AuroraSchedulerManagerResumeJobUpdateResult{} -var retval *Response - var err2 error + var retval *Response if retval, err2 = p.handler.ResumeJobUpdate(ctx, args.Key, args.Message); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing resumeJobUpdate: " + err2.Error()) - oprot.WriteMessageBegin("resumeJobUpdate", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + oprot.WriteMessageBegin(ctx, "resumeJobUpdate", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return true, err2 + return true, thrift.WrapTException(err2) } else { result.Success = retval -} - if err2 = oprot.WriteMessageBegin("resumeJobUpdate", thrift.REPLY, seqId); err2 != nil { - err = err2 } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "resumeJobUpdate", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = err2 + err = thrift.WrapTException(err2) } if err != nil { return @@ -21682,41 +24033,72 @@ type auroraSchedulerManagerProcessorAbortJobUpdate struct { func (p *auroraSchedulerManagerProcessorAbortJobUpdate) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := AuroraSchedulerManagerAbortJobUpdateArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("abortJobUpdate", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "abortJobUpdate", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return false, err + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) } - iprot.ReadMessageEnd() result := AuroraSchedulerManagerAbortJobUpdateResult{} -var retval *Response - var err2 error + var retval *Response if retval, err2 = p.handler.AbortJobUpdate(ctx, args.Key, args.Message); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing abortJobUpdate: " + err2.Error()) - oprot.WriteMessageBegin("abortJobUpdate", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + oprot.WriteMessageBegin(ctx, "abortJobUpdate", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return true, err2 + return true, thrift.WrapTException(err2) } else { result.Success = retval -} - if err2 = oprot.WriteMessageBegin("abortJobUpdate", thrift.REPLY, seqId); err2 != nil { - err = err2 } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "abortJobUpdate", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = err2 + err = thrift.WrapTException(err2) } if err != nil { return @@ -21730,41 +24112,72 @@ type auroraSchedulerManagerProcessorRollbackJobUpdate struct { func (p *auroraSchedulerManagerProcessorRollbackJobUpdate) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := AuroraSchedulerManagerRollbackJobUpdateArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("rollbackJobUpdate", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "rollbackJobUpdate", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return false, err + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) } - iprot.ReadMessageEnd() result := AuroraSchedulerManagerRollbackJobUpdateResult{} -var retval *Response - var err2 error + var retval *Response if retval, err2 = p.handler.RollbackJobUpdate(ctx, args.Key, args.Message); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing rollbackJobUpdate: " + err2.Error()) - oprot.WriteMessageBegin("rollbackJobUpdate", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + oprot.WriteMessageBegin(ctx, "rollbackJobUpdate", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return true, err2 + return true, thrift.WrapTException(err2) } else { result.Success = retval -} - if err2 = oprot.WriteMessageBegin("rollbackJobUpdate", thrift.REPLY, seqId); err2 != nil { - err = err2 } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "rollbackJobUpdate", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = err2 + err = thrift.WrapTException(err2) } if err != nil { return @@ -21778,41 +24191,72 @@ type auroraSchedulerManagerProcessorPulseJobUpdate struct { func (p *auroraSchedulerManagerProcessorPulseJobUpdate) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := AuroraSchedulerManagerPulseJobUpdateArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("pulseJobUpdate", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "pulseJobUpdate", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return false, err + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) } - iprot.ReadMessageEnd() result := AuroraSchedulerManagerPulseJobUpdateResult{} -var retval *Response - var err2 error + var retval *Response if retval, err2 = p.handler.PulseJobUpdate(ctx, args.Key); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing pulseJobUpdate: " + err2.Error()) - oprot.WriteMessageBegin("pulseJobUpdate", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + oprot.WriteMessageBegin(ctx, "pulseJobUpdate", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return true, err2 + return true, thrift.WrapTException(err2) } else { result.Success = retval -} - if err2 = oprot.WriteMessageBegin("pulseJobUpdate", thrift.REPLY, seqId); err2 != nil { - err = err2 } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "pulseJobUpdate", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = err2 + err = thrift.WrapTException(err2) } if err != nil { return @@ -21844,14 +24288,14 @@ func (p *AuroraSchedulerManagerCreateJobArgs) IsSetDescription() bool { return p.Description != nil } -func (p *AuroraSchedulerManagerCreateJobArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *AuroraSchedulerManagerCreateJobArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -21859,57 +24303,57 @@ func (p *AuroraSchedulerManagerCreateJobArgs) Read(iprot thrift.TProtocol) error switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraSchedulerManagerCreateJobArgs) ReadField1(iprot thrift.TProtocol) error { +func (p *AuroraSchedulerManagerCreateJobArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { p.Description = &JobConfiguration{} - if err := p.Description.Read(iprot); err != nil { + if err := p.Description.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Description), err) } return nil } -func (p *AuroraSchedulerManagerCreateJobArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("createJob_args"); err != nil { +func (p *AuroraSchedulerManagerCreateJobArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "createJob_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraSchedulerManagerCreateJobArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("description", thrift.STRUCT, 1); err != nil { +func (p *AuroraSchedulerManagerCreateJobArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "description", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:description: ", p), err) } - if err := p.Description.Write(oprot); err != nil { + if err := p.Description.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Description), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:description: ", p), err) } return err } @@ -21942,14 +24386,14 @@ func (p *AuroraSchedulerManagerCreateJobResult) IsSetSuccess() bool { return p.Success != nil } -func (p *AuroraSchedulerManagerCreateJobResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *AuroraSchedulerManagerCreateJobResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -21957,58 +24401,58 @@ func (p *AuroraSchedulerManagerCreateJobResult) Read(iprot thrift.TProtocol) err switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(iprot); err != nil { + if err := p.ReadField0(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraSchedulerManagerCreateJobResult) ReadField0(iprot thrift.TProtocol) error { +func (p *AuroraSchedulerManagerCreateJobResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(iprot); err != nil { + if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *AuroraSchedulerManagerCreateJobResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("createJob_result"); err != nil { +func (p *AuroraSchedulerManagerCreateJobResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "createJob_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(oprot); err != nil { return err } + if err := p.writeField0(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraSchedulerManagerCreateJobResult) writeField0(oprot thrift.TProtocol) (err error) { +func (p *AuroraSchedulerManagerCreateJobResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } - if err := p.Success.Write(oprot); err != nil { + if err := p.Success.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err @@ -22042,14 +24486,14 @@ func (p *AuroraSchedulerManagerScheduleCronJobArgs) IsSetDescription() bool { return p.Description != nil } -func (p *AuroraSchedulerManagerScheduleCronJobArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *AuroraSchedulerManagerScheduleCronJobArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -22057,57 +24501,57 @@ func (p *AuroraSchedulerManagerScheduleCronJobArgs) Read(iprot thrift.TProtocol) switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraSchedulerManagerScheduleCronJobArgs) ReadField1(iprot thrift.TProtocol) error { +func (p *AuroraSchedulerManagerScheduleCronJobArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { p.Description = &JobConfiguration{} - if err := p.Description.Read(iprot); err != nil { + if err := p.Description.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Description), err) } return nil } -func (p *AuroraSchedulerManagerScheduleCronJobArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("scheduleCronJob_args"); err != nil { +func (p *AuroraSchedulerManagerScheduleCronJobArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "scheduleCronJob_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraSchedulerManagerScheduleCronJobArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("description", thrift.STRUCT, 1); err != nil { +func (p *AuroraSchedulerManagerScheduleCronJobArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "description", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:description: ", p), err) } - if err := p.Description.Write(oprot); err != nil { + if err := p.Description.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Description), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:description: ", p), err) } return err } @@ -22140,14 +24584,14 @@ func (p *AuroraSchedulerManagerScheduleCronJobResult) IsSetSuccess() bool { return p.Success != nil } -func (p *AuroraSchedulerManagerScheduleCronJobResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *AuroraSchedulerManagerScheduleCronJobResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -22155,58 +24599,58 @@ func (p *AuroraSchedulerManagerScheduleCronJobResult) Read(iprot thrift.TProtoco switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(iprot); err != nil { + if err := p.ReadField0(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraSchedulerManagerScheduleCronJobResult) ReadField0(iprot thrift.TProtocol) error { +func (p *AuroraSchedulerManagerScheduleCronJobResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(iprot); err != nil { + if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *AuroraSchedulerManagerScheduleCronJobResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("scheduleCronJob_result"); err != nil { +func (p *AuroraSchedulerManagerScheduleCronJobResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "scheduleCronJob_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(oprot); err != nil { return err } + if err := p.writeField0(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraSchedulerManagerScheduleCronJobResult) writeField0(oprot thrift.TProtocol) (err error) { +func (p *AuroraSchedulerManagerScheduleCronJobResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } - if err := p.Success.Write(oprot); err != nil { + if err := p.Success.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err @@ -22241,14 +24685,14 @@ func (p *AuroraSchedulerManagerDescheduleCronJobArgs) IsSetJob() bool { return p.Job != nil } -func (p *AuroraSchedulerManagerDescheduleCronJobArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *AuroraSchedulerManagerDescheduleCronJobArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -22256,57 +24700,57 @@ func (p *AuroraSchedulerManagerDescheduleCronJobArgs) Read(iprot thrift.TProtoco switch fieldId { case 4: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField4(iprot); err != nil { + if err := p.ReadField4(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraSchedulerManagerDescheduleCronJobArgs) ReadField4(iprot thrift.TProtocol) error { +func (p *AuroraSchedulerManagerDescheduleCronJobArgs) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { p.Job = &JobKey{} - if err := p.Job.Read(iprot); err != nil { + if err := p.Job.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Job), err) } return nil } -func (p *AuroraSchedulerManagerDescheduleCronJobArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("descheduleCronJob_args"); err != nil { +func (p *AuroraSchedulerManagerDescheduleCronJobArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "descheduleCronJob_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField4(oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraSchedulerManagerDescheduleCronJobArgs) writeField4(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("job", thrift.STRUCT, 4); err != nil { +func (p *AuroraSchedulerManagerDescheduleCronJobArgs) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "job", thrift.STRUCT, 4); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:job: ", p), err) } - if err := p.Job.Write(oprot); err != nil { + if err := p.Job.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Job), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 4:job: ", p), err) } return err } @@ -22339,14 +24783,14 @@ func (p *AuroraSchedulerManagerDescheduleCronJobResult) IsSetSuccess() bool { return p.Success != nil } -func (p *AuroraSchedulerManagerDescheduleCronJobResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *AuroraSchedulerManagerDescheduleCronJobResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -22354,58 +24798,58 @@ func (p *AuroraSchedulerManagerDescheduleCronJobResult) Read(iprot thrift.TProto switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(iprot); err != nil { + if err := p.ReadField0(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraSchedulerManagerDescheduleCronJobResult) ReadField0(iprot thrift.TProtocol) error { +func (p *AuroraSchedulerManagerDescheduleCronJobResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(iprot); err != nil { + if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *AuroraSchedulerManagerDescheduleCronJobResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("descheduleCronJob_result"); err != nil { +func (p *AuroraSchedulerManagerDescheduleCronJobResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "descheduleCronJob_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(oprot); err != nil { return err } + if err := p.writeField0(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraSchedulerManagerDescheduleCronJobResult) writeField0(oprot thrift.TProtocol) (err error) { +func (p *AuroraSchedulerManagerDescheduleCronJobResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } - if err := p.Success.Write(oprot); err != nil { + if err := p.Success.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err @@ -22440,14 +24884,14 @@ func (p *AuroraSchedulerManagerStartCronJobArgs) IsSetJob() bool { return p.Job != nil } -func (p *AuroraSchedulerManagerStartCronJobArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *AuroraSchedulerManagerStartCronJobArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -22455,57 +24899,57 @@ func (p *AuroraSchedulerManagerStartCronJobArgs) Read(iprot thrift.TProtocol) er switch fieldId { case 4: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField4(iprot); err != nil { + if err := p.ReadField4(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraSchedulerManagerStartCronJobArgs) ReadField4(iprot thrift.TProtocol) error { +func (p *AuroraSchedulerManagerStartCronJobArgs) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { p.Job = &JobKey{} - if err := p.Job.Read(iprot); err != nil { + if err := p.Job.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Job), err) } return nil } -func (p *AuroraSchedulerManagerStartCronJobArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("startCronJob_args"); err != nil { +func (p *AuroraSchedulerManagerStartCronJobArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "startCronJob_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField4(oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraSchedulerManagerStartCronJobArgs) writeField4(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("job", thrift.STRUCT, 4); err != nil { +func (p *AuroraSchedulerManagerStartCronJobArgs) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "job", thrift.STRUCT, 4); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:job: ", p), err) } - if err := p.Job.Write(oprot); err != nil { + if err := p.Job.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Job), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 4:job: ", p), err) } return err } @@ -22538,14 +24982,14 @@ func (p *AuroraSchedulerManagerStartCronJobResult) IsSetSuccess() bool { return p.Success != nil } -func (p *AuroraSchedulerManagerStartCronJobResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *AuroraSchedulerManagerStartCronJobResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -22553,58 +24997,58 @@ func (p *AuroraSchedulerManagerStartCronJobResult) Read(iprot thrift.TProtocol) switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(iprot); err != nil { + if err := p.ReadField0(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraSchedulerManagerStartCronJobResult) ReadField0(iprot thrift.TProtocol) error { +func (p *AuroraSchedulerManagerStartCronJobResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(iprot); err != nil { + if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *AuroraSchedulerManagerStartCronJobResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("startCronJob_result"); err != nil { +func (p *AuroraSchedulerManagerStartCronJobResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "startCronJob_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(oprot); err != nil { return err } + if err := p.writeField0(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraSchedulerManagerStartCronJobResult) writeField0(oprot thrift.TProtocol) (err error) { +func (p *AuroraSchedulerManagerStartCronJobResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } - if err := p.Success.Write(oprot); err != nil { + if err := p.Success.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err @@ -22646,14 +25090,14 @@ func (p *AuroraSchedulerManagerRestartShardsArgs) IsSetJob() bool { return p.Job != nil } -func (p *AuroraSchedulerManagerRestartShardsArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *AuroraSchedulerManagerRestartShardsArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -22661,115 +25105,118 @@ func (p *AuroraSchedulerManagerRestartShardsArgs) Read(iprot thrift.TProtocol) e switch fieldId { case 5: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField5(iprot); err != nil { + if err := p.ReadField5(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 3: if fieldTypeId == thrift.SET { - if err := p.ReadField3(iprot); err != nil { + if err := p.ReadField3(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraSchedulerManagerRestartShardsArgs) ReadField5(iprot thrift.TProtocol) error { +func (p *AuroraSchedulerManagerRestartShardsArgs) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { p.Job = &JobKey{} - if err := p.Job.Read(iprot); err != nil { + if err := p.Job.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Job), err) } return nil } -func (p *AuroraSchedulerManagerRestartShardsArgs) ReadField3(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin() +func (p *AuroraSchedulerManagerRestartShardsArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin(ctx) if err != nil { return thrift.PrependError("error reading set begin: ", err) } tSet := make([]int32, 0, size) p.ShardIds = tSet for i := 0; i < size; i ++ { -var _elem161 int32 - if v, err := iprot.ReadI32(); err != nil { +var _elem211 int32 + if v, err := iprot.ReadI32(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem161 = v + _elem211 = v } - p.ShardIds = append(p.ShardIds, _elem161) + p.ShardIds = append(p.ShardIds, _elem211) } - if err := iprot.ReadSetEnd(); err != nil { + if err := iprot.ReadSetEnd(ctx); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *AuroraSchedulerManagerRestartShardsArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("restartShards_args"); err != nil { +func (p *AuroraSchedulerManagerRestartShardsArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "restartShards_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField3(oprot); err != nil { return err } - if err := p.writeField5(oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField5(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraSchedulerManagerRestartShardsArgs) writeField3(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("shardIds", thrift.SET, 3); err != nil { +func (p *AuroraSchedulerManagerRestartShardsArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "shardIds", thrift.SET, 3); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:shardIds: ", p), err) } - if err := oprot.WriteSetBegin(thrift.I32, len(p.ShardIds)); err != nil { + if err := oprot.WriteSetBegin(ctx, thrift.I32, len(p.ShardIds)); err != nil { return thrift.PrependError("error writing set begin: ", err) } for i := 0; i 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) } - iprot.ReadMessageEnd() result := AuroraAdminSetQuotaResult{} -var retval *Response - var err2 error + var retval *Response if retval, err2 = p.handler.SetQuota(ctx, args.OwnerRole, args.Quota); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing setQuota: " + err2.Error()) - oprot.WriteMessageBegin("setQuota", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + oprot.WriteMessageBegin(ctx, "setQuota", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return true, err2 + return true, thrift.WrapTException(err2) } else { result.Success = retval -} - if err2 = oprot.WriteMessageBegin("setQuota", thrift.REPLY, seqId); err2 != nil { - err = err2 } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "setQuota", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = err2 + err = thrift.WrapTException(err2) } if err != nil { return @@ -25413,41 +27948,72 @@ type auroraAdminProcessorForceTaskState struct { func (p *auroraAdminProcessorForceTaskState) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := AuroraAdminForceTaskStateArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("forceTaskState", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "forceTaskState", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return false, err + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) } - iprot.ReadMessageEnd() result := AuroraAdminForceTaskStateResult{} -var retval *Response - var err2 error + var retval *Response if retval, err2 = p.handler.ForceTaskState(ctx, args.TaskId, args.Status); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing forceTaskState: " + err2.Error()) - oprot.WriteMessageBegin("forceTaskState", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + oprot.WriteMessageBegin(ctx, "forceTaskState", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return true, err2 + return true, thrift.WrapTException(err2) } else { result.Success = retval -} - if err2 = oprot.WriteMessageBegin("forceTaskState", thrift.REPLY, seqId); err2 != nil { - err = err2 } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "forceTaskState", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = err2 + err = thrift.WrapTException(err2) } if err != nil { return @@ -25461,41 +28027,72 @@ type auroraAdminProcessorPerformBackup struct { func (p *auroraAdminProcessorPerformBackup) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := AuroraAdminPerformBackupArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("performBackup", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "performBackup", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return false, err + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) } - iprot.ReadMessageEnd() result := AuroraAdminPerformBackupResult{} -var retval *Response - var err2 error + var retval *Response if retval, err2 = p.handler.PerformBackup(ctx); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing performBackup: " + err2.Error()) - oprot.WriteMessageBegin("performBackup", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + oprot.WriteMessageBegin(ctx, "performBackup", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return true, err2 + return true, thrift.WrapTException(err2) } else { result.Success = retval -} - if err2 = oprot.WriteMessageBegin("performBackup", thrift.REPLY, seqId); err2 != nil { - err = err2 } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "performBackup", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = err2 + err = thrift.WrapTException(err2) } if err != nil { return @@ -25509,41 +28106,72 @@ type auroraAdminProcessorListBackups struct { func (p *auroraAdminProcessorListBackups) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := AuroraAdminListBackupsArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("listBackups", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "listBackups", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return false, err + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) } - iprot.ReadMessageEnd() result := AuroraAdminListBackupsResult{} -var retval *Response - var err2 error + var retval *Response if retval, err2 = p.handler.ListBackups(ctx); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing listBackups: " + err2.Error()) - oprot.WriteMessageBegin("listBackups", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + oprot.WriteMessageBegin(ctx, "listBackups", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return true, err2 + return true, thrift.WrapTException(err2) } else { result.Success = retval -} - if err2 = oprot.WriteMessageBegin("listBackups", thrift.REPLY, seqId); err2 != nil { - err = err2 } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "listBackups", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = err2 + err = thrift.WrapTException(err2) } if err != nil { return @@ -25557,41 +28185,72 @@ type auroraAdminProcessorStageRecovery struct { func (p *auroraAdminProcessorStageRecovery) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := AuroraAdminStageRecoveryArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("stageRecovery", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "stageRecovery", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return false, err + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) } - iprot.ReadMessageEnd() result := AuroraAdminStageRecoveryResult{} -var retval *Response - var err2 error + var retval *Response if retval, err2 = p.handler.StageRecovery(ctx, args.BackupId); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing stageRecovery: " + err2.Error()) - oprot.WriteMessageBegin("stageRecovery", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + oprot.WriteMessageBegin(ctx, "stageRecovery", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return true, err2 + return true, thrift.WrapTException(err2) } else { result.Success = retval -} - if err2 = oprot.WriteMessageBegin("stageRecovery", thrift.REPLY, seqId); err2 != nil { - err = err2 } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "stageRecovery", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = err2 + err = thrift.WrapTException(err2) } if err != nil { return @@ -25605,41 +28264,72 @@ type auroraAdminProcessorQueryRecovery struct { func (p *auroraAdminProcessorQueryRecovery) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := AuroraAdminQueryRecoveryArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("queryRecovery", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "queryRecovery", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return false, err + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) } - iprot.ReadMessageEnd() result := AuroraAdminQueryRecoveryResult{} -var retval *Response - var err2 error + var retval *Response if retval, err2 = p.handler.QueryRecovery(ctx, args.Query); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing queryRecovery: " + err2.Error()) - oprot.WriteMessageBegin("queryRecovery", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + oprot.WriteMessageBegin(ctx, "queryRecovery", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return true, err2 + return true, thrift.WrapTException(err2) } else { result.Success = retval -} - if err2 = oprot.WriteMessageBegin("queryRecovery", thrift.REPLY, seqId); err2 != nil { - err = err2 } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "queryRecovery", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = err2 + err = thrift.WrapTException(err2) } if err != nil { return @@ -25653,41 +28343,72 @@ type auroraAdminProcessorDeleteRecoveryTasks struct { func (p *auroraAdminProcessorDeleteRecoveryTasks) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := AuroraAdminDeleteRecoveryTasksArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("deleteRecoveryTasks", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "deleteRecoveryTasks", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return false, err + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) } - iprot.ReadMessageEnd() result := AuroraAdminDeleteRecoveryTasksResult{} -var retval *Response - var err2 error + var retval *Response if retval, err2 = p.handler.DeleteRecoveryTasks(ctx, args.Query); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing deleteRecoveryTasks: " + err2.Error()) - oprot.WriteMessageBegin("deleteRecoveryTasks", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + oprot.WriteMessageBegin(ctx, "deleteRecoveryTasks", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return true, err2 + return true, thrift.WrapTException(err2) } else { result.Success = retval -} - if err2 = oprot.WriteMessageBegin("deleteRecoveryTasks", thrift.REPLY, seqId); err2 != nil { - err = err2 } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "deleteRecoveryTasks", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = err2 + err = thrift.WrapTException(err2) } if err != nil { return @@ -25701,41 +28422,72 @@ type auroraAdminProcessorCommitRecovery struct { func (p *auroraAdminProcessorCommitRecovery) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := AuroraAdminCommitRecoveryArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("commitRecovery", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "commitRecovery", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return false, err + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) } - iprot.ReadMessageEnd() result := AuroraAdminCommitRecoveryResult{} -var retval *Response - var err2 error + var retval *Response if retval, err2 = p.handler.CommitRecovery(ctx); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing commitRecovery: " + err2.Error()) - oprot.WriteMessageBegin("commitRecovery", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + oprot.WriteMessageBegin(ctx, "commitRecovery", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return true, err2 + return true, thrift.WrapTException(err2) } else { result.Success = retval -} - if err2 = oprot.WriteMessageBegin("commitRecovery", thrift.REPLY, seqId); err2 != nil { - err = err2 } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "commitRecovery", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = err2 + err = thrift.WrapTException(err2) } if err != nil { return @@ -25749,41 +28501,72 @@ type auroraAdminProcessorUnloadRecovery struct { func (p *auroraAdminProcessorUnloadRecovery) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := AuroraAdminUnloadRecoveryArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("unloadRecovery", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "unloadRecovery", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return false, err + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) } - iprot.ReadMessageEnd() result := AuroraAdminUnloadRecoveryResult{} -var retval *Response - var err2 error + var retval *Response if retval, err2 = p.handler.UnloadRecovery(ctx); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing unloadRecovery: " + err2.Error()) - oprot.WriteMessageBegin("unloadRecovery", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + oprot.WriteMessageBegin(ctx, "unloadRecovery", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return true, err2 + return true, thrift.WrapTException(err2) } else { result.Success = retval -} - if err2 = oprot.WriteMessageBegin("unloadRecovery", thrift.REPLY, seqId); err2 != nil { - err = err2 } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "unloadRecovery", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = err2 + err = thrift.WrapTException(err2) } if err != nil { return @@ -25797,41 +28580,72 @@ type auroraAdminProcessorStartMaintenance struct { func (p *auroraAdminProcessorStartMaintenance) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := AuroraAdminStartMaintenanceArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("startMaintenance", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "startMaintenance", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return false, err + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) } - iprot.ReadMessageEnd() result := AuroraAdminStartMaintenanceResult{} -var retval *Response - var err2 error + var retval *Response if retval, err2 = p.handler.StartMaintenance(ctx, args.Hosts); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing startMaintenance: " + err2.Error()) - oprot.WriteMessageBegin("startMaintenance", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + oprot.WriteMessageBegin(ctx, "startMaintenance", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return true, err2 + return true, thrift.WrapTException(err2) } else { result.Success = retval -} - if err2 = oprot.WriteMessageBegin("startMaintenance", thrift.REPLY, seqId); err2 != nil { - err = err2 } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "startMaintenance", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = err2 + err = thrift.WrapTException(err2) } if err != nil { return @@ -25845,41 +28659,72 @@ type auroraAdminProcessorDrainHosts struct { func (p *auroraAdminProcessorDrainHosts) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := AuroraAdminDrainHostsArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("drainHosts", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "drainHosts", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return false, err + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) } - iprot.ReadMessageEnd() result := AuroraAdminDrainHostsResult{} -var retval *Response - var err2 error + var retval *Response if retval, err2 = p.handler.DrainHosts(ctx, args.Hosts); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing drainHosts: " + err2.Error()) - oprot.WriteMessageBegin("drainHosts", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + oprot.WriteMessageBegin(ctx, "drainHosts", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return true, err2 + return true, thrift.WrapTException(err2) } else { result.Success = retval -} - if err2 = oprot.WriteMessageBegin("drainHosts", thrift.REPLY, seqId); err2 != nil { - err = err2 } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "drainHosts", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = err2 + err = thrift.WrapTException(err2) } if err != nil { return @@ -25893,41 +28738,72 @@ type auroraAdminProcessorMaintenanceStatus struct { func (p *auroraAdminProcessorMaintenanceStatus) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := AuroraAdminMaintenanceStatusArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("maintenanceStatus", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "maintenanceStatus", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return false, err + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) } - iprot.ReadMessageEnd() result := AuroraAdminMaintenanceStatusResult{} -var retval *Response - var err2 error + var retval *Response if retval, err2 = p.handler.MaintenanceStatus(ctx, args.Hosts); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing maintenanceStatus: " + err2.Error()) - oprot.WriteMessageBegin("maintenanceStatus", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + oprot.WriteMessageBegin(ctx, "maintenanceStatus", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return true, err2 + return true, thrift.WrapTException(err2) } else { result.Success = retval -} - if err2 = oprot.WriteMessageBegin("maintenanceStatus", thrift.REPLY, seqId); err2 != nil { - err = err2 } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "maintenanceStatus", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = err2 + err = thrift.WrapTException(err2) } if err != nil { return @@ -25941,41 +28817,72 @@ type auroraAdminProcessorEndMaintenance struct { func (p *auroraAdminProcessorEndMaintenance) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := AuroraAdminEndMaintenanceArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("endMaintenance", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "endMaintenance", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return false, err + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) } - iprot.ReadMessageEnd() result := AuroraAdminEndMaintenanceResult{} -var retval *Response - var err2 error + var retval *Response if retval, err2 = p.handler.EndMaintenance(ctx, args.Hosts); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing endMaintenance: " + err2.Error()) - oprot.WriteMessageBegin("endMaintenance", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + oprot.WriteMessageBegin(ctx, "endMaintenance", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return true, err2 + return true, thrift.WrapTException(err2) } else { result.Success = retval -} - if err2 = oprot.WriteMessageBegin("endMaintenance", thrift.REPLY, seqId); err2 != nil { - err = err2 } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "endMaintenance", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = err2 + err = thrift.WrapTException(err2) } if err != nil { return @@ -25989,41 +28896,72 @@ type auroraAdminProcessorSlaDrainHosts struct { func (p *auroraAdminProcessorSlaDrainHosts) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := AuroraAdminSlaDrainHostsArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("slaDrainHosts", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "slaDrainHosts", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return false, err + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) } - iprot.ReadMessageEnd() result := AuroraAdminSlaDrainHostsResult{} -var retval *Response - var err2 error + var retval *Response if retval, err2 = p.handler.SlaDrainHosts(ctx, args.Hosts, args.DefaultSlaPolicy, args.TimeoutSecs); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing slaDrainHosts: " + err2.Error()) - oprot.WriteMessageBegin("slaDrainHosts", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + oprot.WriteMessageBegin(ctx, "slaDrainHosts", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return true, err2 + return true, thrift.WrapTException(err2) } else { result.Success = retval -} - if err2 = oprot.WriteMessageBegin("slaDrainHosts", thrift.REPLY, seqId); err2 != nil { - err = err2 } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "slaDrainHosts", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = err2 + err = thrift.WrapTException(err2) } if err != nil { return @@ -26037,41 +28975,72 @@ type auroraAdminProcessorSnapshot struct { func (p *auroraAdminProcessorSnapshot) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := AuroraAdminSnapshotArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("snapshot", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "snapshot", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return false, err + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) } - iprot.ReadMessageEnd() result := AuroraAdminSnapshotResult{} -var retval *Response - var err2 error + var retval *Response if retval, err2 = p.handler.Snapshot(ctx); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing snapshot: " + err2.Error()) - oprot.WriteMessageBegin("snapshot", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + oprot.WriteMessageBegin(ctx, "snapshot", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return true, err2 + return true, thrift.WrapTException(err2) } else { result.Success = retval -} - if err2 = oprot.WriteMessageBegin("snapshot", thrift.REPLY, seqId); err2 != nil { - err = err2 } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "snapshot", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = err2 + err = thrift.WrapTException(err2) } if err != nil { return @@ -26085,41 +29054,72 @@ type auroraAdminProcessorTriggerExplicitTaskReconciliation struct { func (p *auroraAdminProcessorTriggerExplicitTaskReconciliation) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := AuroraAdminTriggerExplicitTaskReconciliationArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("triggerExplicitTaskReconciliation", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "triggerExplicitTaskReconciliation", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return false, err + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) } - iprot.ReadMessageEnd() result := AuroraAdminTriggerExplicitTaskReconciliationResult{} -var retval *Response - var err2 error + var retval *Response if retval, err2 = p.handler.TriggerExplicitTaskReconciliation(ctx, args.Settings); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing triggerExplicitTaskReconciliation: " + err2.Error()) - oprot.WriteMessageBegin("triggerExplicitTaskReconciliation", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + oprot.WriteMessageBegin(ctx, "triggerExplicitTaskReconciliation", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return true, err2 + return true, thrift.WrapTException(err2) } else { result.Success = retval -} - if err2 = oprot.WriteMessageBegin("triggerExplicitTaskReconciliation", thrift.REPLY, seqId); err2 != nil { - err = err2 } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "triggerExplicitTaskReconciliation", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = err2 + err = thrift.WrapTException(err2) } if err != nil { return @@ -26133,41 +29133,72 @@ type auroraAdminProcessorTriggerImplicitTaskReconciliation struct { func (p *auroraAdminProcessorTriggerImplicitTaskReconciliation) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := AuroraAdminTriggerImplicitTaskReconciliationArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("triggerImplicitTaskReconciliation", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "triggerImplicitTaskReconciliation", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return false, err + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) } - iprot.ReadMessageEnd() result := AuroraAdminTriggerImplicitTaskReconciliationResult{} -var retval *Response - var err2 error + var retval *Response if retval, err2 = p.handler.TriggerImplicitTaskReconciliation(ctx); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing triggerImplicitTaskReconciliation: " + err2.Error()) - oprot.WriteMessageBegin("triggerImplicitTaskReconciliation", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + oprot.WriteMessageBegin(ctx, "triggerImplicitTaskReconciliation", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return true, err2 + return true, thrift.WrapTException(err2) } else { result.Success = retval -} - if err2 = oprot.WriteMessageBegin("triggerImplicitTaskReconciliation", thrift.REPLY, seqId); err2 != nil { - err = err2 } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "triggerImplicitTaskReconciliation", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = err2 + err = thrift.WrapTException(err2) } if err != nil { return @@ -26181,41 +29212,72 @@ type auroraAdminProcessorPruneTasks struct { func (p *auroraAdminProcessorPruneTasks) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := AuroraAdminPruneTasksArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("pruneTasks", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "pruneTasks", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return false, err + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) } - iprot.ReadMessageEnd() result := AuroraAdminPruneTasksResult{} -var retval *Response - var err2 error + var retval *Response if retval, err2 = p.handler.PruneTasks(ctx, args.Query); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing pruneTasks: " + err2.Error()) - oprot.WriteMessageBegin("pruneTasks", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() + oprot.WriteMessageBegin(ctx, "pruneTasks", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return true, err2 + return true, thrift.WrapTException(err2) } else { result.Success = retval -} - if err2 = oprot.WriteMessageBegin("pruneTasks", thrift.REPLY, seqId); err2 != nil { - err = err2 } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "pruneTasks", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = err2 + err = thrift.WrapTException(err2) } if err != nil { return @@ -26253,14 +29315,14 @@ func (p *AuroraAdminSetQuotaArgs) IsSetQuota() bool { return p.Quota != nil } -func (p *AuroraAdminSetQuotaArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *AuroraAdminSetQuotaArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -26268,41 +29330,41 @@ func (p *AuroraAdminSetQuotaArgs) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRING { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField2(iprot); err != nil { + if err := p.ReadField2(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminSetQuotaArgs) ReadField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { +func (p *AuroraAdminSetQuotaArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.OwnerRole = v @@ -26310,45 +29372,45 @@ func (p *AuroraAdminSetQuotaArgs) ReadField1(iprot thrift.TProtocol) error { return nil } -func (p *AuroraAdminSetQuotaArgs) ReadField2(iprot thrift.TProtocol) error { +func (p *AuroraAdminSetQuotaArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { p.Quota = &ResourceAggregate{} - if err := p.Quota.Read(iprot); err != nil { + if err := p.Quota.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Quota), err) } return nil } -func (p *AuroraAdminSetQuotaArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("setQuota_args"); err != nil { +func (p *AuroraAdminSetQuotaArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "setQuota_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } - if err := p.writeField2(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraAdminSetQuotaArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("ownerRole", thrift.STRING, 1); err != nil { +func (p *AuroraAdminSetQuotaArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "ownerRole", thrift.STRING, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:ownerRole: ", p), err) } - if err := oprot.WriteString(string(p.OwnerRole)); err != nil { + if err := oprot.WriteString(ctx, string(p.OwnerRole)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.ownerRole (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:ownerRole: ", p), err) } return err } -func (p *AuroraAdminSetQuotaArgs) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("quota", thrift.STRUCT, 2); err != nil { +func (p *AuroraAdminSetQuotaArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "quota", thrift.STRUCT, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:quota: ", p), err) } - if err := p.Quota.Write(oprot); err != nil { + if err := p.Quota.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Quota), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:quota: ", p), err) } return err } @@ -26381,14 +29443,14 @@ func (p *AuroraAdminSetQuotaResult) IsSetSuccess() bool { return p.Success != nil } -func (p *AuroraAdminSetQuotaResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *AuroraAdminSetQuotaResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -26396,58 +29458,58 @@ func (p *AuroraAdminSetQuotaResult) Read(iprot thrift.TProtocol) error { switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(iprot); err != nil { + if err := p.ReadField0(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminSetQuotaResult) ReadField0(iprot thrift.TProtocol) error { +func (p *AuroraAdminSetQuotaResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(iprot); err != nil { + if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *AuroraAdminSetQuotaResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("setQuota_result"); err != nil { +func (p *AuroraAdminSetQuotaResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "setQuota_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(oprot); err != nil { return err } + if err := p.writeField0(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraAdminSetQuotaResult) writeField0(oprot thrift.TProtocol) (err error) { +func (p *AuroraAdminSetQuotaResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } - if err := p.Success.Write(oprot); err != nil { + if err := p.Success.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err @@ -26480,14 +29542,14 @@ func (p *AuroraAdminForceTaskStateArgs) GetTaskId() string { func (p *AuroraAdminForceTaskStateArgs) GetStatus() ScheduleStatus { return p.Status } -func (p *AuroraAdminForceTaskStateArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *AuroraAdminForceTaskStateArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -26495,41 +29557,41 @@ func (p *AuroraAdminForceTaskStateArgs) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRING { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.I32 { - if err := p.ReadField2(iprot); err != nil { + if err := p.ReadField2(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminForceTaskStateArgs) ReadField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { +func (p *AuroraAdminForceTaskStateArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.TaskId = v @@ -26537,8 +29599,8 @@ func (p *AuroraAdminForceTaskStateArgs) ReadField1(iprot thrift.TProtocol) erro return nil } -func (p *AuroraAdminForceTaskStateArgs) ReadField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { +func (p *AuroraAdminForceTaskStateArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { temp := ScheduleStatus(v) @@ -26547,36 +29609,36 @@ func (p *AuroraAdminForceTaskStateArgs) ReadField2(iprot thrift.TProtocol) erro return nil } -func (p *AuroraAdminForceTaskStateArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("forceTaskState_args"); err != nil { +func (p *AuroraAdminForceTaskStateArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "forceTaskState_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } - if err := p.writeField2(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraAdminForceTaskStateArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("taskId", thrift.STRING, 1); err != nil { +func (p *AuroraAdminForceTaskStateArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "taskId", thrift.STRING, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:taskId: ", p), err) } - if err := oprot.WriteString(string(p.TaskId)); err != nil { + if err := oprot.WriteString(ctx, string(p.TaskId)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.taskId (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:taskId: ", p), err) } return err } -func (p *AuroraAdminForceTaskStateArgs) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("status", thrift.I32, 2); err != nil { +func (p *AuroraAdminForceTaskStateArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "status", thrift.I32, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:status: ", p), err) } - if err := oprot.WriteI32(int32(p.Status)); err != nil { + if err := oprot.WriteI32(ctx, int32(p.Status)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.status (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:status: ", p), err) } return err } @@ -26609,14 +29671,14 @@ func (p *AuroraAdminForceTaskStateResult) IsSetSuccess() bool { return p.Success != nil } -func (p *AuroraAdminForceTaskStateResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *AuroraAdminForceTaskStateResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -26624,58 +29686,58 @@ func (p *AuroraAdminForceTaskStateResult) Read(iprot thrift.TProtocol) error { switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(iprot); err != nil { + if err := p.ReadField0(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminForceTaskStateResult) ReadField0(iprot thrift.TProtocol) error { +func (p *AuroraAdminForceTaskStateResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(iprot); err != nil { + if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *AuroraAdminForceTaskStateResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("forceTaskState_result"); err != nil { +func (p *AuroraAdminForceTaskStateResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "forceTaskState_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(oprot); err != nil { return err } + if err := p.writeField0(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraAdminForceTaskStateResult) writeField0(oprot thrift.TProtocol) (err error) { +func (p *AuroraAdminForceTaskStateResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } - if err := p.Success.Write(oprot); err != nil { + if err := p.Success.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err @@ -26695,39 +29757,39 @@ func NewAuroraAdminPerformBackupArgs() *AuroraAdminPerformBackupArgs { return &AuroraAdminPerformBackupArgs{} } -func (p *AuroraAdminPerformBackupArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *AuroraAdminPerformBackupArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } if fieldTypeId == thrift.STOP { break; } - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminPerformBackupArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("performBackup_args"); err != nil { +func (p *AuroraAdminPerformBackupArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "performBackup_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } @@ -26760,14 +29822,14 @@ func (p *AuroraAdminPerformBackupResult) IsSetSuccess() bool { return p.Success != nil } -func (p *AuroraAdminPerformBackupResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *AuroraAdminPerformBackupResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -26775,58 +29837,58 @@ func (p *AuroraAdminPerformBackupResult) Read(iprot thrift.TProtocol) error { switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(iprot); err != nil { + if err := p.ReadField0(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminPerformBackupResult) ReadField0(iprot thrift.TProtocol) error { +func (p *AuroraAdminPerformBackupResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(iprot); err != nil { + if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *AuroraAdminPerformBackupResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("performBackup_result"); err != nil { +func (p *AuroraAdminPerformBackupResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "performBackup_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(oprot); err != nil { return err } + if err := p.writeField0(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraAdminPerformBackupResult) writeField0(oprot thrift.TProtocol) (err error) { +func (p *AuroraAdminPerformBackupResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } - if err := p.Success.Write(oprot); err != nil { + if err := p.Success.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err @@ -26846,39 +29908,39 @@ func NewAuroraAdminListBackupsArgs() *AuroraAdminListBackupsArgs { return &AuroraAdminListBackupsArgs{} } -func (p *AuroraAdminListBackupsArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *AuroraAdminListBackupsArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } if fieldTypeId == thrift.STOP { break; } - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminListBackupsArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("listBackups_args"); err != nil { +func (p *AuroraAdminListBackupsArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "listBackups_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } @@ -26911,14 +29973,14 @@ func (p *AuroraAdminListBackupsResult) IsSetSuccess() bool { return p.Success != nil } -func (p *AuroraAdminListBackupsResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *AuroraAdminListBackupsResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -26926,58 +29988,58 @@ func (p *AuroraAdminListBackupsResult) Read(iprot thrift.TProtocol) error { switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(iprot); err != nil { + if err := p.ReadField0(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminListBackupsResult) ReadField0(iprot thrift.TProtocol) error { +func (p *AuroraAdminListBackupsResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(iprot); err != nil { + if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *AuroraAdminListBackupsResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("listBackups_result"); err != nil { +func (p *AuroraAdminListBackupsResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "listBackups_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(oprot); err != nil { return err } + if err := p.writeField0(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraAdminListBackupsResult) writeField0(oprot thrift.TProtocol) (err error) { +func (p *AuroraAdminListBackupsResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } - if err := p.Success.Write(oprot); err != nil { + if err := p.Success.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err @@ -27004,14 +30066,14 @@ func NewAuroraAdminStageRecoveryArgs() *AuroraAdminStageRecoveryArgs { func (p *AuroraAdminStageRecoveryArgs) GetBackupId() string { return p.BackupId } -func (p *AuroraAdminStageRecoveryArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *AuroraAdminStageRecoveryArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -27019,31 +30081,31 @@ func (p *AuroraAdminStageRecoveryArgs) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRING { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminStageRecoveryArgs) ReadField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { +func (p *AuroraAdminStageRecoveryArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.BackupId = v @@ -27051,25 +30113,25 @@ func (p *AuroraAdminStageRecoveryArgs) ReadField1(iprot thrift.TProtocol) error return nil } -func (p *AuroraAdminStageRecoveryArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("stageRecovery_args"); err != nil { +func (p *AuroraAdminStageRecoveryArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "stageRecovery_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraAdminStageRecoveryArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("backupId", thrift.STRING, 1); err != nil { +func (p *AuroraAdminStageRecoveryArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "backupId", thrift.STRING, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:backupId: ", p), err) } - if err := oprot.WriteString(string(p.BackupId)); err != nil { + if err := oprot.WriteString(ctx, string(p.BackupId)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.backupId (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:backupId: ", p), err) } return err } @@ -27102,14 +30164,14 @@ func (p *AuroraAdminStageRecoveryResult) IsSetSuccess() bool { return p.Success != nil } -func (p *AuroraAdminStageRecoveryResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *AuroraAdminStageRecoveryResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -27117,58 +30179,58 @@ func (p *AuroraAdminStageRecoveryResult) Read(iprot thrift.TProtocol) error { switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(iprot); err != nil { + if err := p.ReadField0(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminStageRecoveryResult) ReadField0(iprot thrift.TProtocol) error { +func (p *AuroraAdminStageRecoveryResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(iprot); err != nil { + if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *AuroraAdminStageRecoveryResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("stageRecovery_result"); err != nil { +func (p *AuroraAdminStageRecoveryResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "stageRecovery_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(oprot); err != nil { return err } + if err := p.writeField0(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraAdminStageRecoveryResult) writeField0(oprot thrift.TProtocol) (err error) { +func (p *AuroraAdminStageRecoveryResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } - if err := p.Success.Write(oprot); err != nil { + if err := p.Success.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err @@ -27202,14 +30264,14 @@ func (p *AuroraAdminQueryRecoveryArgs) IsSetQuery() bool { return p.Query != nil } -func (p *AuroraAdminQueryRecoveryArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *AuroraAdminQueryRecoveryArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -27217,57 +30279,57 @@ func (p *AuroraAdminQueryRecoveryArgs) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminQueryRecoveryArgs) ReadField1(iprot thrift.TProtocol) error { +func (p *AuroraAdminQueryRecoveryArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { p.Query = &TaskQuery{} - if err := p.Query.Read(iprot); err != nil { + if err := p.Query.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Query), err) } return nil } -func (p *AuroraAdminQueryRecoveryArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("queryRecovery_args"); err != nil { +func (p *AuroraAdminQueryRecoveryArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "queryRecovery_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraAdminQueryRecoveryArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("query", thrift.STRUCT, 1); err != nil { +func (p *AuroraAdminQueryRecoveryArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "query", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:query: ", p), err) } - if err := p.Query.Write(oprot); err != nil { + if err := p.Query.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Query), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:query: ", p), err) } return err } @@ -27300,14 +30362,14 @@ func (p *AuroraAdminQueryRecoveryResult) IsSetSuccess() bool { return p.Success != nil } -func (p *AuroraAdminQueryRecoveryResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *AuroraAdminQueryRecoveryResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -27315,58 +30377,58 @@ func (p *AuroraAdminQueryRecoveryResult) Read(iprot thrift.TProtocol) error { switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(iprot); err != nil { + if err := p.ReadField0(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminQueryRecoveryResult) ReadField0(iprot thrift.TProtocol) error { +func (p *AuroraAdminQueryRecoveryResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(iprot); err != nil { + if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *AuroraAdminQueryRecoveryResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("queryRecovery_result"); err != nil { +func (p *AuroraAdminQueryRecoveryResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "queryRecovery_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(oprot); err != nil { return err } + if err := p.writeField0(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraAdminQueryRecoveryResult) writeField0(oprot thrift.TProtocol) (err error) { +func (p *AuroraAdminQueryRecoveryResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } - if err := p.Success.Write(oprot); err != nil { + if err := p.Success.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err @@ -27400,14 +30462,14 @@ func (p *AuroraAdminDeleteRecoveryTasksArgs) IsSetQuery() bool { return p.Query != nil } -func (p *AuroraAdminDeleteRecoveryTasksArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *AuroraAdminDeleteRecoveryTasksArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -27415,57 +30477,57 @@ func (p *AuroraAdminDeleteRecoveryTasksArgs) Read(iprot thrift.TProtocol) error switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminDeleteRecoveryTasksArgs) ReadField1(iprot thrift.TProtocol) error { +func (p *AuroraAdminDeleteRecoveryTasksArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { p.Query = &TaskQuery{} - if err := p.Query.Read(iprot); err != nil { + if err := p.Query.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Query), err) } return nil } -func (p *AuroraAdminDeleteRecoveryTasksArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("deleteRecoveryTasks_args"); err != nil { +func (p *AuroraAdminDeleteRecoveryTasksArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "deleteRecoveryTasks_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraAdminDeleteRecoveryTasksArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("query", thrift.STRUCT, 1); err != nil { +func (p *AuroraAdminDeleteRecoveryTasksArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "query", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:query: ", p), err) } - if err := p.Query.Write(oprot); err != nil { + if err := p.Query.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Query), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:query: ", p), err) } return err } @@ -27498,14 +30560,14 @@ func (p *AuroraAdminDeleteRecoveryTasksResult) IsSetSuccess() bool { return p.Success != nil } -func (p *AuroraAdminDeleteRecoveryTasksResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *AuroraAdminDeleteRecoveryTasksResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -27513,58 +30575,58 @@ func (p *AuroraAdminDeleteRecoveryTasksResult) Read(iprot thrift.TProtocol) erro switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(iprot); err != nil { + if err := p.ReadField0(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminDeleteRecoveryTasksResult) ReadField0(iprot thrift.TProtocol) error { +func (p *AuroraAdminDeleteRecoveryTasksResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(iprot); err != nil { + if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *AuroraAdminDeleteRecoveryTasksResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("deleteRecoveryTasks_result"); err != nil { +func (p *AuroraAdminDeleteRecoveryTasksResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "deleteRecoveryTasks_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(oprot); err != nil { return err } + if err := p.writeField0(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraAdminDeleteRecoveryTasksResult) writeField0(oprot thrift.TProtocol) (err error) { +func (p *AuroraAdminDeleteRecoveryTasksResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } - if err := p.Success.Write(oprot); err != nil { + if err := p.Success.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err @@ -27584,39 +30646,39 @@ func NewAuroraAdminCommitRecoveryArgs() *AuroraAdminCommitRecoveryArgs { return &AuroraAdminCommitRecoveryArgs{} } -func (p *AuroraAdminCommitRecoveryArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *AuroraAdminCommitRecoveryArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } if fieldTypeId == thrift.STOP { break; } - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminCommitRecoveryArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("commitRecovery_args"); err != nil { +func (p *AuroraAdminCommitRecoveryArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "commitRecovery_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } @@ -27649,14 +30711,14 @@ func (p *AuroraAdminCommitRecoveryResult) IsSetSuccess() bool { return p.Success != nil } -func (p *AuroraAdminCommitRecoveryResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *AuroraAdminCommitRecoveryResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -27664,58 +30726,58 @@ func (p *AuroraAdminCommitRecoveryResult) Read(iprot thrift.TProtocol) error { switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(iprot); err != nil { + if err := p.ReadField0(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminCommitRecoveryResult) ReadField0(iprot thrift.TProtocol) error { +func (p *AuroraAdminCommitRecoveryResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(iprot); err != nil { + if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *AuroraAdminCommitRecoveryResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("commitRecovery_result"); err != nil { +func (p *AuroraAdminCommitRecoveryResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "commitRecovery_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(oprot); err != nil { return err } + if err := p.writeField0(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraAdminCommitRecoveryResult) writeField0(oprot thrift.TProtocol) (err error) { +func (p *AuroraAdminCommitRecoveryResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } - if err := p.Success.Write(oprot); err != nil { + if err := p.Success.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err @@ -27735,39 +30797,39 @@ func NewAuroraAdminUnloadRecoveryArgs() *AuroraAdminUnloadRecoveryArgs { return &AuroraAdminUnloadRecoveryArgs{} } -func (p *AuroraAdminUnloadRecoveryArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *AuroraAdminUnloadRecoveryArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } if fieldTypeId == thrift.STOP { break; } - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminUnloadRecoveryArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("unloadRecovery_args"); err != nil { +func (p *AuroraAdminUnloadRecoveryArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "unloadRecovery_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } @@ -27800,14 +30862,14 @@ func (p *AuroraAdminUnloadRecoveryResult) IsSetSuccess() bool { return p.Success != nil } -func (p *AuroraAdminUnloadRecoveryResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *AuroraAdminUnloadRecoveryResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -27815,58 +30877,58 @@ func (p *AuroraAdminUnloadRecoveryResult) Read(iprot thrift.TProtocol) error { switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(iprot); err != nil { + if err := p.ReadField0(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminUnloadRecoveryResult) ReadField0(iprot thrift.TProtocol) error { +func (p *AuroraAdminUnloadRecoveryResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(iprot); err != nil { + if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *AuroraAdminUnloadRecoveryResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("unloadRecovery_result"); err != nil { +func (p *AuroraAdminUnloadRecoveryResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "unloadRecovery_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(oprot); err != nil { return err } + if err := p.writeField0(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraAdminUnloadRecoveryResult) writeField0(oprot thrift.TProtocol) (err error) { +func (p *AuroraAdminUnloadRecoveryResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } - if err := p.Success.Write(oprot); err != nil { + if err := p.Success.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err @@ -27900,14 +30962,14 @@ func (p *AuroraAdminStartMaintenanceArgs) IsSetHosts() bool { return p.Hosts != nil } -func (p *AuroraAdminStartMaintenanceArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *AuroraAdminStartMaintenanceArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -27915,57 +30977,57 @@ func (p *AuroraAdminStartMaintenanceArgs) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminStartMaintenanceArgs) ReadField1(iprot thrift.TProtocol) error { +func (p *AuroraAdminStartMaintenanceArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { p.Hosts = &Hosts{} - if err := p.Hosts.Read(iprot); err != nil { + if err := p.Hosts.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Hosts), err) } return nil } -func (p *AuroraAdminStartMaintenanceArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("startMaintenance_args"); err != nil { +func (p *AuroraAdminStartMaintenanceArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "startMaintenance_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraAdminStartMaintenanceArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("hosts", thrift.STRUCT, 1); err != nil { +func (p *AuroraAdminStartMaintenanceArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "hosts", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:hosts: ", p), err) } - if err := p.Hosts.Write(oprot); err != nil { + if err := p.Hosts.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Hosts), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:hosts: ", p), err) } return err } @@ -27998,14 +31060,14 @@ func (p *AuroraAdminStartMaintenanceResult) IsSetSuccess() bool { return p.Success != nil } -func (p *AuroraAdminStartMaintenanceResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *AuroraAdminStartMaintenanceResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -28013,58 +31075,58 @@ func (p *AuroraAdminStartMaintenanceResult) Read(iprot thrift.TProtocol) error { switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(iprot); err != nil { + if err := p.ReadField0(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminStartMaintenanceResult) ReadField0(iprot thrift.TProtocol) error { +func (p *AuroraAdminStartMaintenanceResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(iprot); err != nil { + if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *AuroraAdminStartMaintenanceResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("startMaintenance_result"); err != nil { +func (p *AuroraAdminStartMaintenanceResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "startMaintenance_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(oprot); err != nil { return err } + if err := p.writeField0(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraAdminStartMaintenanceResult) writeField0(oprot thrift.TProtocol) (err error) { +func (p *AuroraAdminStartMaintenanceResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } - if err := p.Success.Write(oprot); err != nil { + if err := p.Success.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err @@ -28098,14 +31160,14 @@ func (p *AuroraAdminDrainHostsArgs) IsSetHosts() bool { return p.Hosts != nil } -func (p *AuroraAdminDrainHostsArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *AuroraAdminDrainHostsArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -28113,57 +31175,57 @@ func (p *AuroraAdminDrainHostsArgs) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminDrainHostsArgs) ReadField1(iprot thrift.TProtocol) error { +func (p *AuroraAdminDrainHostsArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { p.Hosts = &Hosts{} - if err := p.Hosts.Read(iprot); err != nil { + if err := p.Hosts.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Hosts), err) } return nil } -func (p *AuroraAdminDrainHostsArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("drainHosts_args"); err != nil { +func (p *AuroraAdminDrainHostsArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "drainHosts_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraAdminDrainHostsArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("hosts", thrift.STRUCT, 1); err != nil { +func (p *AuroraAdminDrainHostsArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "hosts", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:hosts: ", p), err) } - if err := p.Hosts.Write(oprot); err != nil { + if err := p.Hosts.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Hosts), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:hosts: ", p), err) } return err } @@ -28196,14 +31258,14 @@ func (p *AuroraAdminDrainHostsResult) IsSetSuccess() bool { return p.Success != nil } -func (p *AuroraAdminDrainHostsResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *AuroraAdminDrainHostsResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -28211,58 +31273,58 @@ func (p *AuroraAdminDrainHostsResult) Read(iprot thrift.TProtocol) error { switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(iprot); err != nil { + if err := p.ReadField0(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminDrainHostsResult) ReadField0(iprot thrift.TProtocol) error { +func (p *AuroraAdminDrainHostsResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(iprot); err != nil { + if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *AuroraAdminDrainHostsResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("drainHosts_result"); err != nil { +func (p *AuroraAdminDrainHostsResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "drainHosts_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(oprot); err != nil { return err } + if err := p.writeField0(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraAdminDrainHostsResult) writeField0(oprot thrift.TProtocol) (err error) { +func (p *AuroraAdminDrainHostsResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } - if err := p.Success.Write(oprot); err != nil { + if err := p.Success.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err @@ -28296,14 +31358,14 @@ func (p *AuroraAdminMaintenanceStatusArgs) IsSetHosts() bool { return p.Hosts != nil } -func (p *AuroraAdminMaintenanceStatusArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *AuroraAdminMaintenanceStatusArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -28311,57 +31373,57 @@ func (p *AuroraAdminMaintenanceStatusArgs) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminMaintenanceStatusArgs) ReadField1(iprot thrift.TProtocol) error { +func (p *AuroraAdminMaintenanceStatusArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { p.Hosts = &Hosts{} - if err := p.Hosts.Read(iprot); err != nil { + if err := p.Hosts.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Hosts), err) } return nil } -func (p *AuroraAdminMaintenanceStatusArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("maintenanceStatus_args"); err != nil { +func (p *AuroraAdminMaintenanceStatusArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "maintenanceStatus_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraAdminMaintenanceStatusArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("hosts", thrift.STRUCT, 1); err != nil { +func (p *AuroraAdminMaintenanceStatusArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "hosts", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:hosts: ", p), err) } - if err := p.Hosts.Write(oprot); err != nil { + if err := p.Hosts.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Hosts), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:hosts: ", p), err) } return err } @@ -28394,14 +31456,14 @@ func (p *AuroraAdminMaintenanceStatusResult) IsSetSuccess() bool { return p.Success != nil } -func (p *AuroraAdminMaintenanceStatusResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *AuroraAdminMaintenanceStatusResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -28409,58 +31471,58 @@ func (p *AuroraAdminMaintenanceStatusResult) Read(iprot thrift.TProtocol) error switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(iprot); err != nil { + if err := p.ReadField0(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminMaintenanceStatusResult) ReadField0(iprot thrift.TProtocol) error { +func (p *AuroraAdminMaintenanceStatusResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(iprot); err != nil { + if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *AuroraAdminMaintenanceStatusResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("maintenanceStatus_result"); err != nil { +func (p *AuroraAdminMaintenanceStatusResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "maintenanceStatus_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(oprot); err != nil { return err } + if err := p.writeField0(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraAdminMaintenanceStatusResult) writeField0(oprot thrift.TProtocol) (err error) { +func (p *AuroraAdminMaintenanceStatusResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } - if err := p.Success.Write(oprot); err != nil { + if err := p.Success.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err @@ -28494,14 +31556,14 @@ func (p *AuroraAdminEndMaintenanceArgs) IsSetHosts() bool { return p.Hosts != nil } -func (p *AuroraAdminEndMaintenanceArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *AuroraAdminEndMaintenanceArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -28509,57 +31571,57 @@ func (p *AuroraAdminEndMaintenanceArgs) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminEndMaintenanceArgs) ReadField1(iprot thrift.TProtocol) error { +func (p *AuroraAdminEndMaintenanceArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { p.Hosts = &Hosts{} - if err := p.Hosts.Read(iprot); err != nil { + if err := p.Hosts.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Hosts), err) } return nil } -func (p *AuroraAdminEndMaintenanceArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("endMaintenance_args"); err != nil { +func (p *AuroraAdminEndMaintenanceArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "endMaintenance_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraAdminEndMaintenanceArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("hosts", thrift.STRUCT, 1); err != nil { +func (p *AuroraAdminEndMaintenanceArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "hosts", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:hosts: ", p), err) } - if err := p.Hosts.Write(oprot); err != nil { + if err := p.Hosts.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Hosts), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:hosts: ", p), err) } return err } @@ -28592,14 +31654,14 @@ func (p *AuroraAdminEndMaintenanceResult) IsSetSuccess() bool { return p.Success != nil } -func (p *AuroraAdminEndMaintenanceResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *AuroraAdminEndMaintenanceResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -28607,58 +31669,58 @@ func (p *AuroraAdminEndMaintenanceResult) Read(iprot thrift.TProtocol) error { switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(iprot); err != nil { + if err := p.ReadField0(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminEndMaintenanceResult) ReadField0(iprot thrift.TProtocol) error { +func (p *AuroraAdminEndMaintenanceResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(iprot); err != nil { + if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *AuroraAdminEndMaintenanceResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("endMaintenance_result"); err != nil { +func (p *AuroraAdminEndMaintenanceResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "endMaintenance_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(oprot); err != nil { return err } + if err := p.writeField0(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraAdminEndMaintenanceResult) writeField0(oprot thrift.TProtocol) (err error) { +func (p *AuroraAdminEndMaintenanceResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } - if err := p.Success.Write(oprot); err != nil { + if err := p.Success.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err @@ -28711,14 +31773,14 @@ func (p *AuroraAdminSlaDrainHostsArgs) IsSetDefaultSlaPolicy() bool { return p.DefaultSlaPolicy != nil } -func (p *AuroraAdminSlaDrainHostsArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *AuroraAdminSlaDrainHostsArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -28726,67 +31788,67 @@ func (p *AuroraAdminSlaDrainHostsArgs) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField2(iprot); err != nil { + if err := p.ReadField2(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 3: if fieldTypeId == thrift.I64 { - if err := p.ReadField3(iprot); err != nil { + if err := p.ReadField3(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminSlaDrainHostsArgs) ReadField1(iprot thrift.TProtocol) error { +func (p *AuroraAdminSlaDrainHostsArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { p.Hosts = &Hosts{} - if err := p.Hosts.Read(iprot); err != nil { + if err := p.Hosts.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Hosts), err) } return nil } -func (p *AuroraAdminSlaDrainHostsArgs) ReadField2(iprot thrift.TProtocol) error { +func (p *AuroraAdminSlaDrainHostsArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { p.DefaultSlaPolicy = &SlaPolicy{} - if err := p.DefaultSlaPolicy.Read(iprot); err != nil { + if err := p.DefaultSlaPolicy.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.DefaultSlaPolicy), err) } return nil } -func (p *AuroraAdminSlaDrainHostsArgs) ReadField3(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI64(); err != nil { +func (p *AuroraAdminSlaDrainHostsArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { return thrift.PrependError("error reading field 3: ", err) } else { p.TimeoutSecs = v @@ -28794,49 +31856,49 @@ func (p *AuroraAdminSlaDrainHostsArgs) ReadField3(iprot thrift.TProtocol) error return nil } -func (p *AuroraAdminSlaDrainHostsArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("slaDrainHosts_args"); err != nil { +func (p *AuroraAdminSlaDrainHostsArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "slaDrainHosts_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } - if err := p.writeField2(oprot); err != nil { return err } - if err := p.writeField3(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraAdminSlaDrainHostsArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("hosts", thrift.STRUCT, 1); err != nil { +func (p *AuroraAdminSlaDrainHostsArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "hosts", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:hosts: ", p), err) } - if err := p.Hosts.Write(oprot); err != nil { + if err := p.Hosts.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Hosts), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:hosts: ", p), err) } return err } -func (p *AuroraAdminSlaDrainHostsArgs) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("defaultSlaPolicy", thrift.STRUCT, 2); err != nil { +func (p *AuroraAdminSlaDrainHostsArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "defaultSlaPolicy", thrift.STRUCT, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:defaultSlaPolicy: ", p), err) } - if err := p.DefaultSlaPolicy.Write(oprot); err != nil { + if err := p.DefaultSlaPolicy.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.DefaultSlaPolicy), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:defaultSlaPolicy: ", p), err) } return err } -func (p *AuroraAdminSlaDrainHostsArgs) writeField3(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("timeoutSecs", thrift.I64, 3); err != nil { +func (p *AuroraAdminSlaDrainHostsArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "timeoutSecs", thrift.I64, 3); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:timeoutSecs: ", p), err) } - if err := oprot.WriteI64(int64(p.TimeoutSecs)); err != nil { + if err := oprot.WriteI64(ctx, int64(p.TimeoutSecs)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.timeoutSecs (3) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 3:timeoutSecs: ", p), err) } return err } @@ -28869,14 +31931,14 @@ func (p *AuroraAdminSlaDrainHostsResult) IsSetSuccess() bool { return p.Success != nil } -func (p *AuroraAdminSlaDrainHostsResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *AuroraAdminSlaDrainHostsResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -28884,58 +31946,58 @@ func (p *AuroraAdminSlaDrainHostsResult) Read(iprot thrift.TProtocol) error { switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(iprot); err != nil { + if err := p.ReadField0(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminSlaDrainHostsResult) ReadField0(iprot thrift.TProtocol) error { +func (p *AuroraAdminSlaDrainHostsResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(iprot); err != nil { + if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *AuroraAdminSlaDrainHostsResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("slaDrainHosts_result"); err != nil { +func (p *AuroraAdminSlaDrainHostsResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "slaDrainHosts_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(oprot); err != nil { return err } + if err := p.writeField0(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraAdminSlaDrainHostsResult) writeField0(oprot thrift.TProtocol) (err error) { +func (p *AuroraAdminSlaDrainHostsResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } - if err := p.Success.Write(oprot); err != nil { + if err := p.Success.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err @@ -28955,39 +32017,39 @@ func NewAuroraAdminSnapshotArgs() *AuroraAdminSnapshotArgs { return &AuroraAdminSnapshotArgs{} } -func (p *AuroraAdminSnapshotArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *AuroraAdminSnapshotArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } if fieldTypeId == thrift.STOP { break; } - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminSnapshotArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("snapshot_args"); err != nil { +func (p *AuroraAdminSnapshotArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "snapshot_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } @@ -29020,14 +32082,14 @@ func (p *AuroraAdminSnapshotResult) IsSetSuccess() bool { return p.Success != nil } -func (p *AuroraAdminSnapshotResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *AuroraAdminSnapshotResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -29035,58 +32097,58 @@ func (p *AuroraAdminSnapshotResult) Read(iprot thrift.TProtocol) error { switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(iprot); err != nil { + if err := p.ReadField0(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminSnapshotResult) ReadField0(iprot thrift.TProtocol) error { +func (p *AuroraAdminSnapshotResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(iprot); err != nil { + if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *AuroraAdminSnapshotResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("snapshot_result"); err != nil { +func (p *AuroraAdminSnapshotResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "snapshot_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(oprot); err != nil { return err } + if err := p.writeField0(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraAdminSnapshotResult) writeField0(oprot thrift.TProtocol) (err error) { +func (p *AuroraAdminSnapshotResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } - if err := p.Success.Write(oprot); err != nil { + if err := p.Success.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err @@ -29120,14 +32182,14 @@ func (p *AuroraAdminTriggerExplicitTaskReconciliationArgs) IsSetSettings() bool return p.Settings != nil } -func (p *AuroraAdminTriggerExplicitTaskReconciliationArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *AuroraAdminTriggerExplicitTaskReconciliationArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -29135,57 +32197,57 @@ func (p *AuroraAdminTriggerExplicitTaskReconciliationArgs) Read(iprot thrift.TPr switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminTriggerExplicitTaskReconciliationArgs) ReadField1(iprot thrift.TProtocol) error { +func (p *AuroraAdminTriggerExplicitTaskReconciliationArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { p.Settings = &ExplicitReconciliationSettings{} - if err := p.Settings.Read(iprot); err != nil { + if err := p.Settings.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Settings), err) } return nil } -func (p *AuroraAdminTriggerExplicitTaskReconciliationArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("triggerExplicitTaskReconciliation_args"); err != nil { +func (p *AuroraAdminTriggerExplicitTaskReconciliationArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "triggerExplicitTaskReconciliation_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraAdminTriggerExplicitTaskReconciliationArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("settings", thrift.STRUCT, 1); err != nil { +func (p *AuroraAdminTriggerExplicitTaskReconciliationArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "settings", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:settings: ", p), err) } - if err := p.Settings.Write(oprot); err != nil { + if err := p.Settings.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Settings), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:settings: ", p), err) } return err } @@ -29218,14 +32280,14 @@ func (p *AuroraAdminTriggerExplicitTaskReconciliationResult) IsSetSuccess() bool return p.Success != nil } -func (p *AuroraAdminTriggerExplicitTaskReconciliationResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *AuroraAdminTriggerExplicitTaskReconciliationResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -29233,58 +32295,58 @@ func (p *AuroraAdminTriggerExplicitTaskReconciliationResult) Read(iprot thrift.T switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(iprot); err != nil { + if err := p.ReadField0(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminTriggerExplicitTaskReconciliationResult) ReadField0(iprot thrift.TProtocol) error { +func (p *AuroraAdminTriggerExplicitTaskReconciliationResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(iprot); err != nil { + if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *AuroraAdminTriggerExplicitTaskReconciliationResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("triggerExplicitTaskReconciliation_result"); err != nil { +func (p *AuroraAdminTriggerExplicitTaskReconciliationResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "triggerExplicitTaskReconciliation_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(oprot); err != nil { return err } + if err := p.writeField0(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraAdminTriggerExplicitTaskReconciliationResult) writeField0(oprot thrift.TProtocol) (err error) { +func (p *AuroraAdminTriggerExplicitTaskReconciliationResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } - if err := p.Success.Write(oprot); err != nil { + if err := p.Success.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err @@ -29304,39 +32366,39 @@ func NewAuroraAdminTriggerImplicitTaskReconciliationArgs() *AuroraAdminTriggerIm return &AuroraAdminTriggerImplicitTaskReconciliationArgs{} } -func (p *AuroraAdminTriggerImplicitTaskReconciliationArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *AuroraAdminTriggerImplicitTaskReconciliationArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } if fieldTypeId == thrift.STOP { break; } - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminTriggerImplicitTaskReconciliationArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("triggerImplicitTaskReconciliation_args"); err != nil { +func (p *AuroraAdminTriggerImplicitTaskReconciliationArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "triggerImplicitTaskReconciliation_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } @@ -29369,14 +32431,14 @@ func (p *AuroraAdminTriggerImplicitTaskReconciliationResult) IsSetSuccess() bool return p.Success != nil } -func (p *AuroraAdminTriggerImplicitTaskReconciliationResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *AuroraAdminTriggerImplicitTaskReconciliationResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -29384,58 +32446,58 @@ func (p *AuroraAdminTriggerImplicitTaskReconciliationResult) Read(iprot thrift.T switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(iprot); err != nil { + if err := p.ReadField0(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminTriggerImplicitTaskReconciliationResult) ReadField0(iprot thrift.TProtocol) error { +func (p *AuroraAdminTriggerImplicitTaskReconciliationResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(iprot); err != nil { + if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *AuroraAdminTriggerImplicitTaskReconciliationResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("triggerImplicitTaskReconciliation_result"); err != nil { +func (p *AuroraAdminTriggerImplicitTaskReconciliationResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "triggerImplicitTaskReconciliation_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(oprot); err != nil { return err } + if err := p.writeField0(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraAdminTriggerImplicitTaskReconciliationResult) writeField0(oprot thrift.TProtocol) (err error) { +func (p *AuroraAdminTriggerImplicitTaskReconciliationResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } - if err := p.Success.Write(oprot); err != nil { + if err := p.Success.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err @@ -29469,14 +32531,14 @@ func (p *AuroraAdminPruneTasksArgs) IsSetQuery() bool { return p.Query != nil } -func (p *AuroraAdminPruneTasksArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *AuroraAdminPruneTasksArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -29484,57 +32546,57 @@ func (p *AuroraAdminPruneTasksArgs) Read(iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(iprot); err != nil { + if err := p.ReadField1(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminPruneTasksArgs) ReadField1(iprot thrift.TProtocol) error { +func (p *AuroraAdminPruneTasksArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { p.Query = &TaskQuery{} - if err := p.Query.Read(iprot); err != nil { + if err := p.Query.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Query), err) } return nil } -func (p *AuroraAdminPruneTasksArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("pruneTasks_args"); err != nil { +func (p *AuroraAdminPruneTasksArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "pruneTasks_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraAdminPruneTasksArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("query", thrift.STRUCT, 1); err != nil { +func (p *AuroraAdminPruneTasksArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "query", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:query: ", p), err) } - if err := p.Query.Write(oprot); err != nil { + if err := p.Query.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Query), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:query: ", p), err) } return err } @@ -29567,14 +32629,14 @@ func (p *AuroraAdminPruneTasksResult) IsSetSuccess() bool { return p.Success != nil } -func (p *AuroraAdminPruneTasksResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { +func (p *AuroraAdminPruneTasksResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -29582,58 +32644,58 @@ func (p *AuroraAdminPruneTasksResult) Read(iprot thrift.TProtocol) error { switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(iprot); err != nil { + if err := p.ReadField0(ctx, iprot); err != nil { return err } } else { - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(fieldTypeId); err != nil { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(); err != nil { + if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(); err != nil { + if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminPruneTasksResult) ReadField0(iprot thrift.TProtocol) error { +func (p *AuroraAdminPruneTasksResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(iprot); err != nil { + if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *AuroraAdminPruneTasksResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("pruneTasks_result"); err != nil { +func (p *AuroraAdminPruneTasksResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "pruneTasks_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(oprot); err != nil { return err } + if err := p.writeField0(ctx, oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(); err != nil { + if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { + if err := oprot.WriteStructEnd(ctx); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraAdminPruneTasksResult) writeField0(oprot thrift.TProtocol) (err error) { +func (p *AuroraAdminPruneTasksResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } - if err := p.Success.Write(oprot); err != nil { + if err := p.Success.Write(ctx, oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(); err != nil { + if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err diff --git a/gen-go/apache/aurora/aurora_admin-remote/aurora_admin-remote.go b/gen-go/apache/aurora/aurora_admin-remote/aurora_admin-remote.go index 9bd8b7ee..d2d44419 100755 --- a/gen-go/apache/aurora/aurora_admin-remote/aurora_admin-remote.go +++ b/gen-go/apache/aurora/aurora_admin-remote/aurora_admin-remote.go @@ -1,5 +1,4 @@ -// Autogenerated by Thrift Compiler (0.13.0) -// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +// Code generated by Thrift Compiler (0.14.0). DO NOT EDIT. package main @@ -196,19 +195,19 @@ func main() { } argvalue0 := flag.Arg(1) value0 := argvalue0 - arg355 := flag.Arg(2) - mbTrans356 := thrift.NewTMemoryBufferLen(len(arg355)) - defer mbTrans356.Close() - _, err357 := mbTrans356.WriteString(arg355) - if err357 != nil { + arg405 := flag.Arg(2) + mbTrans406 := thrift.NewTMemoryBufferLen(len(arg405)) + defer mbTrans406.Close() + _, err407 := mbTrans406.WriteString(arg405) + if err407 != nil { Usage() return } - factory358 := thrift.NewTJSONProtocolFactory() - jsProt359 := factory358.GetProtocol(mbTrans356) + factory408 := thrift.NewTJSONProtocolFactory() + jsProt409 := factory408.GetProtocol(mbTrans406) argvalue1 := aurora.NewResourceAggregate() - err360 := argvalue1.Read(jsProt359) - if err360 != nil { + err410 := argvalue1.Read(context.Background(), jsProt409) + if err410 != nil { Usage() return } @@ -264,19 +263,19 @@ func main() { fmt.Fprintln(os.Stderr, "QueryRecovery requires 1 args") flag.Usage() } - arg363 := flag.Arg(1) - mbTrans364 := thrift.NewTMemoryBufferLen(len(arg363)) - defer mbTrans364.Close() - _, err365 := mbTrans364.WriteString(arg363) - if err365 != nil { + arg413 := flag.Arg(1) + mbTrans414 := thrift.NewTMemoryBufferLen(len(arg413)) + defer mbTrans414.Close() + _, err415 := mbTrans414.WriteString(arg413) + if err415 != nil { Usage() return } - factory366 := thrift.NewTJSONProtocolFactory() - jsProt367 := factory366.GetProtocol(mbTrans364) + factory416 := thrift.NewTJSONProtocolFactory() + jsProt417 := factory416.GetProtocol(mbTrans414) argvalue0 := aurora.NewTaskQuery() - err368 := argvalue0.Read(jsProt367) - if err368 != nil { + err418 := argvalue0.Read(context.Background(), jsProt417) + if err418 != nil { Usage() return } @@ -289,19 +288,19 @@ func main() { fmt.Fprintln(os.Stderr, "DeleteRecoveryTasks requires 1 args") flag.Usage() } - arg369 := flag.Arg(1) - mbTrans370 := thrift.NewTMemoryBufferLen(len(arg369)) - defer mbTrans370.Close() - _, err371 := mbTrans370.WriteString(arg369) - if err371 != nil { + arg419 := flag.Arg(1) + mbTrans420 := thrift.NewTMemoryBufferLen(len(arg419)) + defer mbTrans420.Close() + _, err421 := mbTrans420.WriteString(arg419) + if err421 != nil { Usage() return } - factory372 := thrift.NewTJSONProtocolFactory() - jsProt373 := factory372.GetProtocol(mbTrans370) + factory422 := thrift.NewTJSONProtocolFactory() + jsProt423 := factory422.GetProtocol(mbTrans420) argvalue0 := aurora.NewTaskQuery() - err374 := argvalue0.Read(jsProt373) - if err374 != nil { + err424 := argvalue0.Read(context.Background(), jsProt423) + if err424 != nil { Usage() return } @@ -330,19 +329,19 @@ func main() { fmt.Fprintln(os.Stderr, "StartMaintenance requires 1 args") flag.Usage() } - arg375 := flag.Arg(1) - mbTrans376 := thrift.NewTMemoryBufferLen(len(arg375)) - defer mbTrans376.Close() - _, err377 := mbTrans376.WriteString(arg375) - if err377 != nil { + arg425 := flag.Arg(1) + mbTrans426 := thrift.NewTMemoryBufferLen(len(arg425)) + defer mbTrans426.Close() + _, err427 := mbTrans426.WriteString(arg425) + if err427 != nil { Usage() return } - factory378 := thrift.NewTJSONProtocolFactory() - jsProt379 := factory378.GetProtocol(mbTrans376) + factory428 := thrift.NewTJSONProtocolFactory() + jsProt429 := factory428.GetProtocol(mbTrans426) argvalue0 := aurora.NewHosts() - err380 := argvalue0.Read(jsProt379) - if err380 != nil { + err430 := argvalue0.Read(context.Background(), jsProt429) + if err430 != nil { Usage() return } @@ -355,19 +354,19 @@ func main() { fmt.Fprintln(os.Stderr, "DrainHosts requires 1 args") flag.Usage() } - arg381 := flag.Arg(1) - mbTrans382 := thrift.NewTMemoryBufferLen(len(arg381)) - defer mbTrans382.Close() - _, err383 := mbTrans382.WriteString(arg381) - if err383 != nil { + arg431 := flag.Arg(1) + mbTrans432 := thrift.NewTMemoryBufferLen(len(arg431)) + defer mbTrans432.Close() + _, err433 := mbTrans432.WriteString(arg431) + if err433 != nil { Usage() return } - factory384 := thrift.NewTJSONProtocolFactory() - jsProt385 := factory384.GetProtocol(mbTrans382) + factory434 := thrift.NewTJSONProtocolFactory() + jsProt435 := factory434.GetProtocol(mbTrans432) argvalue0 := aurora.NewHosts() - err386 := argvalue0.Read(jsProt385) - if err386 != nil { + err436 := argvalue0.Read(context.Background(), jsProt435) + if err436 != nil { Usage() return } @@ -380,19 +379,19 @@ func main() { fmt.Fprintln(os.Stderr, "MaintenanceStatus requires 1 args") flag.Usage() } - arg387 := flag.Arg(1) - mbTrans388 := thrift.NewTMemoryBufferLen(len(arg387)) - defer mbTrans388.Close() - _, err389 := mbTrans388.WriteString(arg387) - if err389 != nil { + arg437 := flag.Arg(1) + mbTrans438 := thrift.NewTMemoryBufferLen(len(arg437)) + defer mbTrans438.Close() + _, err439 := mbTrans438.WriteString(arg437) + if err439 != nil { Usage() return } - factory390 := thrift.NewTJSONProtocolFactory() - jsProt391 := factory390.GetProtocol(mbTrans388) + factory440 := thrift.NewTJSONProtocolFactory() + jsProt441 := factory440.GetProtocol(mbTrans438) argvalue0 := aurora.NewHosts() - err392 := argvalue0.Read(jsProt391) - if err392 != nil { + err442 := argvalue0.Read(context.Background(), jsProt441) + if err442 != nil { Usage() return } @@ -405,19 +404,19 @@ func main() { fmt.Fprintln(os.Stderr, "EndMaintenance requires 1 args") flag.Usage() } - arg393 := flag.Arg(1) - mbTrans394 := thrift.NewTMemoryBufferLen(len(arg393)) - defer mbTrans394.Close() - _, err395 := mbTrans394.WriteString(arg393) - if err395 != nil { + arg443 := flag.Arg(1) + mbTrans444 := thrift.NewTMemoryBufferLen(len(arg443)) + defer mbTrans444.Close() + _, err445 := mbTrans444.WriteString(arg443) + if err445 != nil { Usage() return } - factory396 := thrift.NewTJSONProtocolFactory() - jsProt397 := factory396.GetProtocol(mbTrans394) + factory446 := thrift.NewTJSONProtocolFactory() + jsProt447 := factory446.GetProtocol(mbTrans444) argvalue0 := aurora.NewHosts() - err398 := argvalue0.Read(jsProt397) - if err398 != nil { + err448 := argvalue0.Read(context.Background(), jsProt447) + if err448 != nil { Usage() return } @@ -430,42 +429,42 @@ func main() { fmt.Fprintln(os.Stderr, "SlaDrainHosts requires 3 args") flag.Usage() } - arg399 := flag.Arg(1) - mbTrans400 := thrift.NewTMemoryBufferLen(len(arg399)) - defer mbTrans400.Close() - _, err401 := mbTrans400.WriteString(arg399) - if err401 != nil { + arg449 := flag.Arg(1) + mbTrans450 := thrift.NewTMemoryBufferLen(len(arg449)) + defer mbTrans450.Close() + _, err451 := mbTrans450.WriteString(arg449) + if err451 != nil { Usage() return } - factory402 := thrift.NewTJSONProtocolFactory() - jsProt403 := factory402.GetProtocol(mbTrans400) + factory452 := thrift.NewTJSONProtocolFactory() + jsProt453 := factory452.GetProtocol(mbTrans450) argvalue0 := aurora.NewHosts() - err404 := argvalue0.Read(jsProt403) - if err404 != nil { + err454 := argvalue0.Read(context.Background(), jsProt453) + if err454 != nil { Usage() return } value0 := argvalue0 - arg405 := flag.Arg(2) - mbTrans406 := thrift.NewTMemoryBufferLen(len(arg405)) - defer mbTrans406.Close() - _, err407 := mbTrans406.WriteString(arg405) - if err407 != nil { + arg455 := flag.Arg(2) + mbTrans456 := thrift.NewTMemoryBufferLen(len(arg455)) + defer mbTrans456.Close() + _, err457 := mbTrans456.WriteString(arg455) + if err457 != nil { Usage() return } - factory408 := thrift.NewTJSONProtocolFactory() - jsProt409 := factory408.GetProtocol(mbTrans406) + factory458 := thrift.NewTJSONProtocolFactory() + jsProt459 := factory458.GetProtocol(mbTrans456) argvalue1 := aurora.NewSlaPolicy() - err410 := argvalue1.Read(jsProt409) - if err410 != nil { + err460 := argvalue1.Read(context.Background(), jsProt459) + if err460 != nil { Usage() return } value1 := argvalue1 - argvalue2, err411 := (strconv.ParseInt(flag.Arg(3), 10, 64)) - if err411 != nil { + argvalue2, err461 := (strconv.ParseInt(flag.Arg(3), 10, 64)) + if err461 != nil { Usage() return } @@ -486,19 +485,19 @@ func main() { fmt.Fprintln(os.Stderr, "TriggerExplicitTaskReconciliation requires 1 args") flag.Usage() } - arg412 := flag.Arg(1) - mbTrans413 := thrift.NewTMemoryBufferLen(len(arg412)) - defer mbTrans413.Close() - _, err414 := mbTrans413.WriteString(arg412) - if err414 != nil { + arg462 := flag.Arg(1) + mbTrans463 := thrift.NewTMemoryBufferLen(len(arg462)) + defer mbTrans463.Close() + _, err464 := mbTrans463.WriteString(arg462) + if err464 != nil { Usage() return } - factory415 := thrift.NewTJSONProtocolFactory() - jsProt416 := factory415.GetProtocol(mbTrans413) + factory465 := thrift.NewTJSONProtocolFactory() + jsProt466 := factory465.GetProtocol(mbTrans463) argvalue0 := aurora.NewExplicitReconciliationSettings() - err417 := argvalue0.Read(jsProt416) - if err417 != nil { + err467 := argvalue0.Read(context.Background(), jsProt466) + if err467 != nil { Usage() return } @@ -519,19 +518,19 @@ func main() { fmt.Fprintln(os.Stderr, "PruneTasks requires 1 args") flag.Usage() } - arg418 := flag.Arg(1) - mbTrans419 := thrift.NewTMemoryBufferLen(len(arg418)) - defer mbTrans419.Close() - _, err420 := mbTrans419.WriteString(arg418) - if err420 != nil { + arg468 := flag.Arg(1) + mbTrans469 := thrift.NewTMemoryBufferLen(len(arg468)) + defer mbTrans469.Close() + _, err470 := mbTrans469.WriteString(arg468) + if err470 != nil { Usage() return } - factory421 := thrift.NewTJSONProtocolFactory() - jsProt422 := factory421.GetProtocol(mbTrans419) + factory471 := thrift.NewTJSONProtocolFactory() + jsProt472 := factory471.GetProtocol(mbTrans469) argvalue0 := aurora.NewTaskQuery() - err423 := argvalue0.Read(jsProt422) - if err423 != nil { + err473 := argvalue0.Read(context.Background(), jsProt472) + if err473 != nil { Usage() return } @@ -544,19 +543,19 @@ func main() { fmt.Fprintln(os.Stderr, "CreateJob requires 1 args") flag.Usage() } - arg424 := flag.Arg(1) - mbTrans425 := thrift.NewTMemoryBufferLen(len(arg424)) - defer mbTrans425.Close() - _, err426 := mbTrans425.WriteString(arg424) - if err426 != nil { + arg474 := flag.Arg(1) + mbTrans475 := thrift.NewTMemoryBufferLen(len(arg474)) + defer mbTrans475.Close() + _, err476 := mbTrans475.WriteString(arg474) + if err476 != nil { Usage() return } - factory427 := thrift.NewTJSONProtocolFactory() - jsProt428 := factory427.GetProtocol(mbTrans425) + factory477 := thrift.NewTJSONProtocolFactory() + jsProt478 := factory477.GetProtocol(mbTrans475) argvalue0 := aurora.NewJobConfiguration() - err429 := argvalue0.Read(jsProt428) - if err429 != nil { + err479 := argvalue0.Read(context.Background(), jsProt478) + if err479 != nil { Usage() return } @@ -569,19 +568,19 @@ func main() { fmt.Fprintln(os.Stderr, "ScheduleCronJob requires 1 args") flag.Usage() } - arg430 := flag.Arg(1) - mbTrans431 := thrift.NewTMemoryBufferLen(len(arg430)) - defer mbTrans431.Close() - _, err432 := mbTrans431.WriteString(arg430) - if err432 != nil { + arg480 := flag.Arg(1) + mbTrans481 := thrift.NewTMemoryBufferLen(len(arg480)) + defer mbTrans481.Close() + _, err482 := mbTrans481.WriteString(arg480) + if err482 != nil { Usage() return } - factory433 := thrift.NewTJSONProtocolFactory() - jsProt434 := factory433.GetProtocol(mbTrans431) + factory483 := thrift.NewTJSONProtocolFactory() + jsProt484 := factory483.GetProtocol(mbTrans481) argvalue0 := aurora.NewJobConfiguration() - err435 := argvalue0.Read(jsProt434) - if err435 != nil { + err485 := argvalue0.Read(context.Background(), jsProt484) + if err485 != nil { Usage() return } @@ -594,19 +593,19 @@ func main() { fmt.Fprintln(os.Stderr, "DescheduleCronJob requires 1 args") flag.Usage() } - arg436 := flag.Arg(1) - mbTrans437 := thrift.NewTMemoryBufferLen(len(arg436)) - defer mbTrans437.Close() - _, err438 := mbTrans437.WriteString(arg436) - if err438 != nil { + arg486 := flag.Arg(1) + mbTrans487 := thrift.NewTMemoryBufferLen(len(arg486)) + defer mbTrans487.Close() + _, err488 := mbTrans487.WriteString(arg486) + if err488 != nil { Usage() return } - factory439 := thrift.NewTJSONProtocolFactory() - jsProt440 := factory439.GetProtocol(mbTrans437) + factory489 := thrift.NewTJSONProtocolFactory() + jsProt490 := factory489.GetProtocol(mbTrans487) argvalue0 := aurora.NewJobKey() - err441 := argvalue0.Read(jsProt440) - if err441 != nil { + err491 := argvalue0.Read(context.Background(), jsProt490) + if err491 != nil { Usage() return } @@ -619,19 +618,19 @@ func main() { fmt.Fprintln(os.Stderr, "StartCronJob requires 1 args") flag.Usage() } - arg442 := flag.Arg(1) - mbTrans443 := thrift.NewTMemoryBufferLen(len(arg442)) - defer mbTrans443.Close() - _, err444 := mbTrans443.WriteString(arg442) - if err444 != nil { + arg492 := flag.Arg(1) + mbTrans493 := thrift.NewTMemoryBufferLen(len(arg492)) + defer mbTrans493.Close() + _, err494 := mbTrans493.WriteString(arg492) + if err494 != nil { Usage() return } - factory445 := thrift.NewTJSONProtocolFactory() - jsProt446 := factory445.GetProtocol(mbTrans443) + factory495 := thrift.NewTJSONProtocolFactory() + jsProt496 := factory495.GetProtocol(mbTrans493) argvalue0 := aurora.NewJobKey() - err447 := argvalue0.Read(jsProt446) - if err447 != nil { + err497 := argvalue0.Read(context.Background(), jsProt496) + if err497 != nil { Usage() return } @@ -644,36 +643,36 @@ func main() { fmt.Fprintln(os.Stderr, "RestartShards requires 2 args") flag.Usage() } - arg448 := flag.Arg(1) - mbTrans449 := thrift.NewTMemoryBufferLen(len(arg448)) - defer mbTrans449.Close() - _, err450 := mbTrans449.WriteString(arg448) - if err450 != nil { + arg498 := flag.Arg(1) + mbTrans499 := thrift.NewTMemoryBufferLen(len(arg498)) + defer mbTrans499.Close() + _, err500 := mbTrans499.WriteString(arg498) + if err500 != nil { Usage() return } - factory451 := thrift.NewTJSONProtocolFactory() - jsProt452 := factory451.GetProtocol(mbTrans449) + factory501 := thrift.NewTJSONProtocolFactory() + jsProt502 := factory501.GetProtocol(mbTrans499) argvalue0 := aurora.NewJobKey() - err453 := argvalue0.Read(jsProt452) - if err453 != nil { + err503 := argvalue0.Read(context.Background(), jsProt502) + if err503 != nil { Usage() return } value0 := argvalue0 - arg454 := flag.Arg(2) - mbTrans455 := thrift.NewTMemoryBufferLen(len(arg454)) - defer mbTrans455.Close() - _, err456 := mbTrans455.WriteString(arg454) - if err456 != nil { + arg504 := flag.Arg(2) + mbTrans505 := thrift.NewTMemoryBufferLen(len(arg504)) + defer mbTrans505.Close() + _, err506 := mbTrans505.WriteString(arg504) + if err506 != nil { Usage() return } - factory457 := thrift.NewTJSONProtocolFactory() - jsProt458 := factory457.GetProtocol(mbTrans455) - containerStruct1 := aurora.NewAuroraAdminRestartShardsArgs() - err459 := containerStruct1.ReadField2(jsProt458) - if err459 != nil { + factory507 := thrift.NewTJSONProtocolFactory() + jsProt508 := factory507.GetProtocol(mbTrans505) + containerStruct1 := aurora.NewAuroraSchedulerManagerRestartShardsArgs() + err509 := containerStruct1.ReadField2(context.Background(), jsProt508) + if err509 != nil { Usage() return } @@ -687,36 +686,36 @@ func main() { fmt.Fprintln(os.Stderr, "KillTasks requires 3 args") flag.Usage() } - arg460 := flag.Arg(1) - mbTrans461 := thrift.NewTMemoryBufferLen(len(arg460)) - defer mbTrans461.Close() - _, err462 := mbTrans461.WriteString(arg460) - if err462 != nil { + arg510 := flag.Arg(1) + mbTrans511 := thrift.NewTMemoryBufferLen(len(arg510)) + defer mbTrans511.Close() + _, err512 := mbTrans511.WriteString(arg510) + if err512 != nil { Usage() return } - factory463 := thrift.NewTJSONProtocolFactory() - jsProt464 := factory463.GetProtocol(mbTrans461) + factory513 := thrift.NewTJSONProtocolFactory() + jsProt514 := factory513.GetProtocol(mbTrans511) argvalue0 := aurora.NewJobKey() - err465 := argvalue0.Read(jsProt464) - if err465 != nil { + err515 := argvalue0.Read(context.Background(), jsProt514) + if err515 != nil { Usage() return } value0 := argvalue0 - arg466 := flag.Arg(2) - mbTrans467 := thrift.NewTMemoryBufferLen(len(arg466)) - defer mbTrans467.Close() - _, err468 := mbTrans467.WriteString(arg466) - if err468 != nil { + arg516 := flag.Arg(2) + mbTrans517 := thrift.NewTMemoryBufferLen(len(arg516)) + defer mbTrans517.Close() + _, err518 := mbTrans517.WriteString(arg516) + if err518 != nil { Usage() return } - factory469 := thrift.NewTJSONProtocolFactory() - jsProt470 := factory469.GetProtocol(mbTrans467) - containerStruct1 := aurora.NewAuroraAdminKillTasksArgs() - err471 := containerStruct1.ReadField2(jsProt470) - if err471 != nil { + factory519 := thrift.NewTJSONProtocolFactory() + jsProt520 := factory519.GetProtocol(mbTrans517) + containerStruct1 := aurora.NewAuroraSchedulerManagerKillTasksArgs() + err521 := containerStruct1.ReadField2(context.Background(), jsProt520) + if err521 != nil { Usage() return } @@ -732,25 +731,25 @@ func main() { fmt.Fprintln(os.Stderr, "AddInstances requires 2 args") flag.Usage() } - arg473 := flag.Arg(1) - mbTrans474 := thrift.NewTMemoryBufferLen(len(arg473)) - defer mbTrans474.Close() - _, err475 := mbTrans474.WriteString(arg473) - if err475 != nil { + arg523 := flag.Arg(1) + mbTrans524 := thrift.NewTMemoryBufferLen(len(arg523)) + defer mbTrans524.Close() + _, err525 := mbTrans524.WriteString(arg523) + if err525 != nil { Usage() return } - factory476 := thrift.NewTJSONProtocolFactory() - jsProt477 := factory476.GetProtocol(mbTrans474) + factory526 := thrift.NewTJSONProtocolFactory() + jsProt527 := factory526.GetProtocol(mbTrans524) argvalue0 := aurora.NewInstanceKey() - err478 := argvalue0.Read(jsProt477) - if err478 != nil { + err528 := argvalue0.Read(context.Background(), jsProt527) + if err528 != nil { Usage() return } value0 := argvalue0 - tmp1, err479 := (strconv.Atoi(flag.Arg(2))) - if err479 != nil { + tmp1, err529 := (strconv.Atoi(flag.Arg(2))) + if err529 != nil { Usage() return } @@ -764,19 +763,19 @@ func main() { fmt.Fprintln(os.Stderr, "ReplaceCronTemplate requires 1 args") flag.Usage() } - arg480 := flag.Arg(1) - mbTrans481 := thrift.NewTMemoryBufferLen(len(arg480)) - defer mbTrans481.Close() - _, err482 := mbTrans481.WriteString(arg480) - if err482 != nil { + arg530 := flag.Arg(1) + mbTrans531 := thrift.NewTMemoryBufferLen(len(arg530)) + defer mbTrans531.Close() + _, err532 := mbTrans531.WriteString(arg530) + if err532 != nil { Usage() return } - factory483 := thrift.NewTJSONProtocolFactory() - jsProt484 := factory483.GetProtocol(mbTrans481) + factory533 := thrift.NewTJSONProtocolFactory() + jsProt534 := factory533.GetProtocol(mbTrans531) argvalue0 := aurora.NewJobConfiguration() - err485 := argvalue0.Read(jsProt484) - if err485 != nil { + err535 := argvalue0.Read(context.Background(), jsProt534) + if err535 != nil { Usage() return } @@ -789,19 +788,19 @@ func main() { fmt.Fprintln(os.Stderr, "StartJobUpdate requires 2 args") flag.Usage() } - arg486 := flag.Arg(1) - mbTrans487 := thrift.NewTMemoryBufferLen(len(arg486)) - defer mbTrans487.Close() - _, err488 := mbTrans487.WriteString(arg486) - if err488 != nil { + arg536 := flag.Arg(1) + mbTrans537 := thrift.NewTMemoryBufferLen(len(arg536)) + defer mbTrans537.Close() + _, err538 := mbTrans537.WriteString(arg536) + if err538 != nil { Usage() return } - factory489 := thrift.NewTJSONProtocolFactory() - jsProt490 := factory489.GetProtocol(mbTrans487) + factory539 := thrift.NewTJSONProtocolFactory() + jsProt540 := factory539.GetProtocol(mbTrans537) argvalue0 := aurora.NewJobUpdateRequest() - err491 := argvalue0.Read(jsProt490) - if err491 != nil { + err541 := argvalue0.Read(context.Background(), jsProt540) + if err541 != nil { Usage() return } @@ -816,19 +815,19 @@ func main() { fmt.Fprintln(os.Stderr, "PauseJobUpdate requires 2 args") flag.Usage() } - arg493 := flag.Arg(1) - mbTrans494 := thrift.NewTMemoryBufferLen(len(arg493)) - defer mbTrans494.Close() - _, err495 := mbTrans494.WriteString(arg493) - if err495 != nil { + arg543 := flag.Arg(1) + mbTrans544 := thrift.NewTMemoryBufferLen(len(arg543)) + defer mbTrans544.Close() + _, err545 := mbTrans544.WriteString(arg543) + if err545 != nil { Usage() return } - factory496 := thrift.NewTJSONProtocolFactory() - jsProt497 := factory496.GetProtocol(mbTrans494) + factory546 := thrift.NewTJSONProtocolFactory() + jsProt547 := factory546.GetProtocol(mbTrans544) argvalue0 := aurora.NewJobUpdateKey() - err498 := argvalue0.Read(jsProt497) - if err498 != nil { + err548 := argvalue0.Read(context.Background(), jsProt547) + if err548 != nil { Usage() return } @@ -843,19 +842,19 @@ func main() { fmt.Fprintln(os.Stderr, "ResumeJobUpdate requires 2 args") flag.Usage() } - arg500 := flag.Arg(1) - mbTrans501 := thrift.NewTMemoryBufferLen(len(arg500)) - defer mbTrans501.Close() - _, err502 := mbTrans501.WriteString(arg500) - if err502 != nil { + arg550 := flag.Arg(1) + mbTrans551 := thrift.NewTMemoryBufferLen(len(arg550)) + defer mbTrans551.Close() + _, err552 := mbTrans551.WriteString(arg550) + if err552 != nil { Usage() return } - factory503 := thrift.NewTJSONProtocolFactory() - jsProt504 := factory503.GetProtocol(mbTrans501) + factory553 := thrift.NewTJSONProtocolFactory() + jsProt554 := factory553.GetProtocol(mbTrans551) argvalue0 := aurora.NewJobUpdateKey() - err505 := argvalue0.Read(jsProt504) - if err505 != nil { + err555 := argvalue0.Read(context.Background(), jsProt554) + if err555 != nil { Usage() return } @@ -870,19 +869,19 @@ func main() { fmt.Fprintln(os.Stderr, "AbortJobUpdate requires 2 args") flag.Usage() } - arg507 := flag.Arg(1) - mbTrans508 := thrift.NewTMemoryBufferLen(len(arg507)) - defer mbTrans508.Close() - _, err509 := mbTrans508.WriteString(arg507) - if err509 != nil { + arg557 := flag.Arg(1) + mbTrans558 := thrift.NewTMemoryBufferLen(len(arg557)) + defer mbTrans558.Close() + _, err559 := mbTrans558.WriteString(arg557) + if err559 != nil { Usage() return } - factory510 := thrift.NewTJSONProtocolFactory() - jsProt511 := factory510.GetProtocol(mbTrans508) + factory560 := thrift.NewTJSONProtocolFactory() + jsProt561 := factory560.GetProtocol(mbTrans558) argvalue0 := aurora.NewJobUpdateKey() - err512 := argvalue0.Read(jsProt511) - if err512 != nil { + err562 := argvalue0.Read(context.Background(), jsProt561) + if err562 != nil { Usage() return } @@ -897,19 +896,19 @@ func main() { fmt.Fprintln(os.Stderr, "RollbackJobUpdate requires 2 args") flag.Usage() } - arg514 := flag.Arg(1) - mbTrans515 := thrift.NewTMemoryBufferLen(len(arg514)) - defer mbTrans515.Close() - _, err516 := mbTrans515.WriteString(arg514) - if err516 != nil { + arg564 := flag.Arg(1) + mbTrans565 := thrift.NewTMemoryBufferLen(len(arg564)) + defer mbTrans565.Close() + _, err566 := mbTrans565.WriteString(arg564) + if err566 != nil { Usage() return } - factory517 := thrift.NewTJSONProtocolFactory() - jsProt518 := factory517.GetProtocol(mbTrans515) + factory567 := thrift.NewTJSONProtocolFactory() + jsProt568 := factory567.GetProtocol(mbTrans565) argvalue0 := aurora.NewJobUpdateKey() - err519 := argvalue0.Read(jsProt518) - if err519 != nil { + err569 := argvalue0.Read(context.Background(), jsProt568) + if err569 != nil { Usage() return } @@ -924,19 +923,19 @@ func main() { fmt.Fprintln(os.Stderr, "PulseJobUpdate requires 1 args") flag.Usage() } - arg521 := flag.Arg(1) - mbTrans522 := thrift.NewTMemoryBufferLen(len(arg521)) - defer mbTrans522.Close() - _, err523 := mbTrans522.WriteString(arg521) - if err523 != nil { + arg571 := flag.Arg(1) + mbTrans572 := thrift.NewTMemoryBufferLen(len(arg571)) + defer mbTrans572.Close() + _, err573 := mbTrans572.WriteString(arg571) + if err573 != nil { Usage() return } - factory524 := thrift.NewTJSONProtocolFactory() - jsProt525 := factory524.GetProtocol(mbTrans522) + factory574 := thrift.NewTJSONProtocolFactory() + jsProt575 := factory574.GetProtocol(mbTrans572) argvalue0 := aurora.NewJobUpdateKey() - err526 := argvalue0.Read(jsProt525) - if err526 != nil { + err576 := argvalue0.Read(context.Background(), jsProt575) + if err576 != nil { Usage() return } @@ -967,19 +966,19 @@ func main() { fmt.Fprintln(os.Stderr, "GetTasksStatus requires 1 args") flag.Usage() } - arg528 := flag.Arg(1) - mbTrans529 := thrift.NewTMemoryBufferLen(len(arg528)) - defer mbTrans529.Close() - _, err530 := mbTrans529.WriteString(arg528) - if err530 != nil { + arg578 := flag.Arg(1) + mbTrans579 := thrift.NewTMemoryBufferLen(len(arg578)) + defer mbTrans579.Close() + _, err580 := mbTrans579.WriteString(arg578) + if err580 != nil { Usage() return } - factory531 := thrift.NewTJSONProtocolFactory() - jsProt532 := factory531.GetProtocol(mbTrans529) + factory581 := thrift.NewTJSONProtocolFactory() + jsProt582 := factory581.GetProtocol(mbTrans579) argvalue0 := aurora.NewTaskQuery() - err533 := argvalue0.Read(jsProt532) - if err533 != nil { + err583 := argvalue0.Read(context.Background(), jsProt582) + if err583 != nil { Usage() return } @@ -992,19 +991,19 @@ func main() { fmt.Fprintln(os.Stderr, "GetTasksWithoutConfigs requires 1 args") flag.Usage() } - arg534 := flag.Arg(1) - mbTrans535 := thrift.NewTMemoryBufferLen(len(arg534)) - defer mbTrans535.Close() - _, err536 := mbTrans535.WriteString(arg534) - if err536 != nil { + arg584 := flag.Arg(1) + mbTrans585 := thrift.NewTMemoryBufferLen(len(arg584)) + defer mbTrans585.Close() + _, err586 := mbTrans585.WriteString(arg584) + if err586 != nil { Usage() return } - factory537 := thrift.NewTJSONProtocolFactory() - jsProt538 := factory537.GetProtocol(mbTrans535) + factory587 := thrift.NewTJSONProtocolFactory() + jsProt588 := factory587.GetProtocol(mbTrans585) argvalue0 := aurora.NewTaskQuery() - err539 := argvalue0.Read(jsProt538) - if err539 != nil { + err589 := argvalue0.Read(context.Background(), jsProt588) + if err589 != nil { Usage() return } @@ -1017,19 +1016,19 @@ func main() { fmt.Fprintln(os.Stderr, "GetPendingReason requires 1 args") flag.Usage() } - arg540 := flag.Arg(1) - mbTrans541 := thrift.NewTMemoryBufferLen(len(arg540)) - defer mbTrans541.Close() - _, err542 := mbTrans541.WriteString(arg540) - if err542 != nil { + arg590 := flag.Arg(1) + mbTrans591 := thrift.NewTMemoryBufferLen(len(arg590)) + defer mbTrans591.Close() + _, err592 := mbTrans591.WriteString(arg590) + if err592 != nil { Usage() return } - factory543 := thrift.NewTJSONProtocolFactory() - jsProt544 := factory543.GetProtocol(mbTrans541) + factory593 := thrift.NewTJSONProtocolFactory() + jsProt594 := factory593.GetProtocol(mbTrans591) argvalue0 := aurora.NewTaskQuery() - err545 := argvalue0.Read(jsProt544) - if err545 != nil { + err595 := argvalue0.Read(context.Background(), jsProt594) + if err595 != nil { Usage() return } @@ -1042,19 +1041,19 @@ func main() { fmt.Fprintln(os.Stderr, "GetConfigSummary requires 1 args") flag.Usage() } - arg546 := flag.Arg(1) - mbTrans547 := thrift.NewTMemoryBufferLen(len(arg546)) - defer mbTrans547.Close() - _, err548 := mbTrans547.WriteString(arg546) - if err548 != nil { + arg596 := flag.Arg(1) + mbTrans597 := thrift.NewTMemoryBufferLen(len(arg596)) + defer mbTrans597.Close() + _, err598 := mbTrans597.WriteString(arg596) + if err598 != nil { Usage() return } - factory549 := thrift.NewTJSONProtocolFactory() - jsProt550 := factory549.GetProtocol(mbTrans547) + factory599 := thrift.NewTJSONProtocolFactory() + jsProt600 := factory599.GetProtocol(mbTrans597) argvalue0 := aurora.NewJobKey() - err551 := argvalue0.Read(jsProt550) - if err551 != nil { + err601 := argvalue0.Read(context.Background(), jsProt600) + if err601 != nil { Usage() return } @@ -1087,19 +1086,19 @@ func main() { fmt.Fprintln(os.Stderr, "PopulateJobConfig requires 1 args") flag.Usage() } - arg554 := flag.Arg(1) - mbTrans555 := thrift.NewTMemoryBufferLen(len(arg554)) - defer mbTrans555.Close() - _, err556 := mbTrans555.WriteString(arg554) - if err556 != nil { + arg604 := flag.Arg(1) + mbTrans605 := thrift.NewTMemoryBufferLen(len(arg604)) + defer mbTrans605.Close() + _, err606 := mbTrans605.WriteString(arg604) + if err606 != nil { Usage() return } - factory557 := thrift.NewTJSONProtocolFactory() - jsProt558 := factory557.GetProtocol(mbTrans555) + factory607 := thrift.NewTJSONProtocolFactory() + jsProt608 := factory607.GetProtocol(mbTrans605) argvalue0 := aurora.NewJobConfiguration() - err559 := argvalue0.Read(jsProt558) - if err559 != nil { + err609 := argvalue0.Read(context.Background(), jsProt608) + if err609 != nil { Usage() return } @@ -1112,19 +1111,19 @@ func main() { fmt.Fprintln(os.Stderr, "GetJobUpdateSummaries requires 1 args") flag.Usage() } - arg560 := flag.Arg(1) - mbTrans561 := thrift.NewTMemoryBufferLen(len(arg560)) - defer mbTrans561.Close() - _, err562 := mbTrans561.WriteString(arg560) - if err562 != nil { + arg610 := flag.Arg(1) + mbTrans611 := thrift.NewTMemoryBufferLen(len(arg610)) + defer mbTrans611.Close() + _, err612 := mbTrans611.WriteString(arg610) + if err612 != nil { Usage() return } - factory563 := thrift.NewTJSONProtocolFactory() - jsProt564 := factory563.GetProtocol(mbTrans561) + factory613 := thrift.NewTJSONProtocolFactory() + jsProt614 := factory613.GetProtocol(mbTrans611) argvalue0 := aurora.NewJobUpdateQuery() - err565 := argvalue0.Read(jsProt564) - if err565 != nil { + err615 := argvalue0.Read(context.Background(), jsProt614) + if err615 != nil { Usage() return } @@ -1137,19 +1136,19 @@ func main() { fmt.Fprintln(os.Stderr, "GetJobUpdateDetails requires 1 args") flag.Usage() } - arg566 := flag.Arg(1) - mbTrans567 := thrift.NewTMemoryBufferLen(len(arg566)) - defer mbTrans567.Close() - _, err568 := mbTrans567.WriteString(arg566) - if err568 != nil { + arg616 := flag.Arg(1) + mbTrans617 := thrift.NewTMemoryBufferLen(len(arg616)) + defer mbTrans617.Close() + _, err618 := mbTrans617.WriteString(arg616) + if err618 != nil { Usage() return } - factory569 := thrift.NewTJSONProtocolFactory() - jsProt570 := factory569.GetProtocol(mbTrans567) + factory619 := thrift.NewTJSONProtocolFactory() + jsProt620 := factory619.GetProtocol(mbTrans617) argvalue0 := aurora.NewJobUpdateQuery() - err571 := argvalue0.Read(jsProt570) - if err571 != nil { + err621 := argvalue0.Read(context.Background(), jsProt620) + if err621 != nil { Usage() return } @@ -1162,19 +1161,19 @@ func main() { fmt.Fprintln(os.Stderr, "GetJobUpdateDiff requires 1 args") flag.Usage() } - arg572 := flag.Arg(1) - mbTrans573 := thrift.NewTMemoryBufferLen(len(arg572)) - defer mbTrans573.Close() - _, err574 := mbTrans573.WriteString(arg572) - if err574 != nil { + arg622 := flag.Arg(1) + mbTrans623 := thrift.NewTMemoryBufferLen(len(arg622)) + defer mbTrans623.Close() + _, err624 := mbTrans623.WriteString(arg622) + if err624 != nil { Usage() return } - factory575 := thrift.NewTJSONProtocolFactory() - jsProt576 := factory575.GetProtocol(mbTrans573) + factory625 := thrift.NewTJSONProtocolFactory() + jsProt626 := factory625.GetProtocol(mbTrans623) argvalue0 := aurora.NewJobUpdateRequest() - err577 := argvalue0.Read(jsProt576) - if err577 != nil { + err627 := argvalue0.Read(context.Background(), jsProt626) + if err627 != nil { Usage() return } diff --git a/gen-go/apache/aurora/aurora_scheduler_manager-remote/aurora_scheduler_manager-remote.go b/gen-go/apache/aurora/aurora_scheduler_manager-remote/aurora_scheduler_manager-remote.go index 9bc38482..b4715d53 100755 --- a/gen-go/apache/aurora/aurora_scheduler_manager-remote/aurora_scheduler_manager-remote.go +++ b/gen-go/apache/aurora/aurora_scheduler_manager-remote/aurora_scheduler_manager-remote.go @@ -1,5 +1,4 @@ -// Autogenerated by Thrift Compiler (0.13.0) -// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +// Code generated by Thrift Compiler (0.14.0). DO NOT EDIT. package main @@ -176,19 +175,19 @@ func main() { fmt.Fprintln(os.Stderr, "CreateJob requires 1 args") flag.Usage() } - arg163 := flag.Arg(1) - mbTrans164 := thrift.NewTMemoryBufferLen(len(arg163)) - defer mbTrans164.Close() - _, err165 := mbTrans164.WriteString(arg163) - if err165 != nil { + arg213 := flag.Arg(1) + mbTrans214 := thrift.NewTMemoryBufferLen(len(arg213)) + defer mbTrans214.Close() + _, err215 := mbTrans214.WriteString(arg213) + if err215 != nil { Usage() return } - factory166 := thrift.NewTJSONProtocolFactory() - jsProt167 := factory166.GetProtocol(mbTrans164) + factory216 := thrift.NewTJSONProtocolFactory() + jsProt217 := factory216.GetProtocol(mbTrans214) argvalue0 := aurora.NewJobConfiguration() - err168 := argvalue0.Read(jsProt167) - if err168 != nil { + err218 := argvalue0.Read(context.Background(), jsProt217) + if err218 != nil { Usage() return } @@ -201,19 +200,19 @@ func main() { fmt.Fprintln(os.Stderr, "ScheduleCronJob requires 1 args") flag.Usage() } - arg169 := flag.Arg(1) - mbTrans170 := thrift.NewTMemoryBufferLen(len(arg169)) - defer mbTrans170.Close() - _, err171 := mbTrans170.WriteString(arg169) - if err171 != nil { + arg219 := flag.Arg(1) + mbTrans220 := thrift.NewTMemoryBufferLen(len(arg219)) + defer mbTrans220.Close() + _, err221 := mbTrans220.WriteString(arg219) + if err221 != nil { Usage() return } - factory172 := thrift.NewTJSONProtocolFactory() - jsProt173 := factory172.GetProtocol(mbTrans170) + factory222 := thrift.NewTJSONProtocolFactory() + jsProt223 := factory222.GetProtocol(mbTrans220) argvalue0 := aurora.NewJobConfiguration() - err174 := argvalue0.Read(jsProt173) - if err174 != nil { + err224 := argvalue0.Read(context.Background(), jsProt223) + if err224 != nil { Usage() return } @@ -226,19 +225,19 @@ func main() { fmt.Fprintln(os.Stderr, "DescheduleCronJob requires 1 args") flag.Usage() } - arg175 := flag.Arg(1) - mbTrans176 := thrift.NewTMemoryBufferLen(len(arg175)) - defer mbTrans176.Close() - _, err177 := mbTrans176.WriteString(arg175) - if err177 != nil { + arg225 := flag.Arg(1) + mbTrans226 := thrift.NewTMemoryBufferLen(len(arg225)) + defer mbTrans226.Close() + _, err227 := mbTrans226.WriteString(arg225) + if err227 != nil { Usage() return } - factory178 := thrift.NewTJSONProtocolFactory() - jsProt179 := factory178.GetProtocol(mbTrans176) + factory228 := thrift.NewTJSONProtocolFactory() + jsProt229 := factory228.GetProtocol(mbTrans226) argvalue0 := aurora.NewJobKey() - err180 := argvalue0.Read(jsProt179) - if err180 != nil { + err230 := argvalue0.Read(context.Background(), jsProt229) + if err230 != nil { Usage() return } @@ -251,19 +250,19 @@ func main() { fmt.Fprintln(os.Stderr, "StartCronJob requires 1 args") flag.Usage() } - arg181 := flag.Arg(1) - mbTrans182 := thrift.NewTMemoryBufferLen(len(arg181)) - defer mbTrans182.Close() - _, err183 := mbTrans182.WriteString(arg181) - if err183 != nil { + arg231 := flag.Arg(1) + mbTrans232 := thrift.NewTMemoryBufferLen(len(arg231)) + defer mbTrans232.Close() + _, err233 := mbTrans232.WriteString(arg231) + if err233 != nil { Usage() return } - factory184 := thrift.NewTJSONProtocolFactory() - jsProt185 := factory184.GetProtocol(mbTrans182) + factory234 := thrift.NewTJSONProtocolFactory() + jsProt235 := factory234.GetProtocol(mbTrans232) argvalue0 := aurora.NewJobKey() - err186 := argvalue0.Read(jsProt185) - if err186 != nil { + err236 := argvalue0.Read(context.Background(), jsProt235) + if err236 != nil { Usage() return } @@ -276,36 +275,36 @@ func main() { fmt.Fprintln(os.Stderr, "RestartShards requires 2 args") flag.Usage() } - arg187 := flag.Arg(1) - mbTrans188 := thrift.NewTMemoryBufferLen(len(arg187)) - defer mbTrans188.Close() - _, err189 := mbTrans188.WriteString(arg187) - if err189 != nil { + arg237 := flag.Arg(1) + mbTrans238 := thrift.NewTMemoryBufferLen(len(arg237)) + defer mbTrans238.Close() + _, err239 := mbTrans238.WriteString(arg237) + if err239 != nil { Usage() return } - factory190 := thrift.NewTJSONProtocolFactory() - jsProt191 := factory190.GetProtocol(mbTrans188) + factory240 := thrift.NewTJSONProtocolFactory() + jsProt241 := factory240.GetProtocol(mbTrans238) argvalue0 := aurora.NewJobKey() - err192 := argvalue0.Read(jsProt191) - if err192 != nil { + err242 := argvalue0.Read(context.Background(), jsProt241) + if err242 != nil { Usage() return } value0 := argvalue0 - arg193 := flag.Arg(2) - mbTrans194 := thrift.NewTMemoryBufferLen(len(arg193)) - defer mbTrans194.Close() - _, err195 := mbTrans194.WriteString(arg193) - if err195 != nil { + arg243 := flag.Arg(2) + mbTrans244 := thrift.NewTMemoryBufferLen(len(arg243)) + defer mbTrans244.Close() + _, err245 := mbTrans244.WriteString(arg243) + if err245 != nil { Usage() return } - factory196 := thrift.NewTJSONProtocolFactory() - jsProt197 := factory196.GetProtocol(mbTrans194) + factory246 := thrift.NewTJSONProtocolFactory() + jsProt247 := factory246.GetProtocol(mbTrans244) containerStruct1 := aurora.NewAuroraSchedulerManagerRestartShardsArgs() - err198 := containerStruct1.ReadField2(jsProt197) - if err198 != nil { + err248 := containerStruct1.ReadField2(context.Background(), jsProt247) + if err248 != nil { Usage() return } @@ -319,36 +318,36 @@ func main() { fmt.Fprintln(os.Stderr, "KillTasks requires 3 args") flag.Usage() } - arg199 := flag.Arg(1) - mbTrans200 := thrift.NewTMemoryBufferLen(len(arg199)) - defer mbTrans200.Close() - _, err201 := mbTrans200.WriteString(arg199) - if err201 != nil { + arg249 := flag.Arg(1) + mbTrans250 := thrift.NewTMemoryBufferLen(len(arg249)) + defer mbTrans250.Close() + _, err251 := mbTrans250.WriteString(arg249) + if err251 != nil { Usage() return } - factory202 := thrift.NewTJSONProtocolFactory() - jsProt203 := factory202.GetProtocol(mbTrans200) + factory252 := thrift.NewTJSONProtocolFactory() + jsProt253 := factory252.GetProtocol(mbTrans250) argvalue0 := aurora.NewJobKey() - err204 := argvalue0.Read(jsProt203) - if err204 != nil { + err254 := argvalue0.Read(context.Background(), jsProt253) + if err254 != nil { Usage() return } value0 := argvalue0 - arg205 := flag.Arg(2) - mbTrans206 := thrift.NewTMemoryBufferLen(len(arg205)) - defer mbTrans206.Close() - _, err207 := mbTrans206.WriteString(arg205) - if err207 != nil { + arg255 := flag.Arg(2) + mbTrans256 := thrift.NewTMemoryBufferLen(len(arg255)) + defer mbTrans256.Close() + _, err257 := mbTrans256.WriteString(arg255) + if err257 != nil { Usage() return } - factory208 := thrift.NewTJSONProtocolFactory() - jsProt209 := factory208.GetProtocol(mbTrans206) + factory258 := thrift.NewTJSONProtocolFactory() + jsProt259 := factory258.GetProtocol(mbTrans256) containerStruct1 := aurora.NewAuroraSchedulerManagerKillTasksArgs() - err210 := containerStruct1.ReadField2(jsProt209) - if err210 != nil { + err260 := containerStruct1.ReadField2(context.Background(), jsProt259) + if err260 != nil { Usage() return } @@ -364,25 +363,25 @@ func main() { fmt.Fprintln(os.Stderr, "AddInstances requires 2 args") flag.Usage() } - arg212 := flag.Arg(1) - mbTrans213 := thrift.NewTMemoryBufferLen(len(arg212)) - defer mbTrans213.Close() - _, err214 := mbTrans213.WriteString(arg212) - if err214 != nil { + arg262 := flag.Arg(1) + mbTrans263 := thrift.NewTMemoryBufferLen(len(arg262)) + defer mbTrans263.Close() + _, err264 := mbTrans263.WriteString(arg262) + if err264 != nil { Usage() return } - factory215 := thrift.NewTJSONProtocolFactory() - jsProt216 := factory215.GetProtocol(mbTrans213) + factory265 := thrift.NewTJSONProtocolFactory() + jsProt266 := factory265.GetProtocol(mbTrans263) argvalue0 := aurora.NewInstanceKey() - err217 := argvalue0.Read(jsProt216) - if err217 != nil { + err267 := argvalue0.Read(context.Background(), jsProt266) + if err267 != nil { Usage() return } value0 := argvalue0 - tmp1, err218 := (strconv.Atoi(flag.Arg(2))) - if err218 != nil { + tmp1, err268 := (strconv.Atoi(flag.Arg(2))) + if err268 != nil { Usage() return } @@ -396,19 +395,19 @@ func main() { fmt.Fprintln(os.Stderr, "ReplaceCronTemplate requires 1 args") flag.Usage() } - arg219 := flag.Arg(1) - mbTrans220 := thrift.NewTMemoryBufferLen(len(arg219)) - defer mbTrans220.Close() - _, err221 := mbTrans220.WriteString(arg219) - if err221 != nil { + arg269 := flag.Arg(1) + mbTrans270 := thrift.NewTMemoryBufferLen(len(arg269)) + defer mbTrans270.Close() + _, err271 := mbTrans270.WriteString(arg269) + if err271 != nil { Usage() return } - factory222 := thrift.NewTJSONProtocolFactory() - jsProt223 := factory222.GetProtocol(mbTrans220) + factory272 := thrift.NewTJSONProtocolFactory() + jsProt273 := factory272.GetProtocol(mbTrans270) argvalue0 := aurora.NewJobConfiguration() - err224 := argvalue0.Read(jsProt223) - if err224 != nil { + err274 := argvalue0.Read(context.Background(), jsProt273) + if err274 != nil { Usage() return } @@ -421,19 +420,19 @@ func main() { fmt.Fprintln(os.Stderr, "StartJobUpdate requires 2 args") flag.Usage() } - arg225 := flag.Arg(1) - mbTrans226 := thrift.NewTMemoryBufferLen(len(arg225)) - defer mbTrans226.Close() - _, err227 := mbTrans226.WriteString(arg225) - if err227 != nil { + arg275 := flag.Arg(1) + mbTrans276 := thrift.NewTMemoryBufferLen(len(arg275)) + defer mbTrans276.Close() + _, err277 := mbTrans276.WriteString(arg275) + if err277 != nil { Usage() return } - factory228 := thrift.NewTJSONProtocolFactory() - jsProt229 := factory228.GetProtocol(mbTrans226) + factory278 := thrift.NewTJSONProtocolFactory() + jsProt279 := factory278.GetProtocol(mbTrans276) argvalue0 := aurora.NewJobUpdateRequest() - err230 := argvalue0.Read(jsProt229) - if err230 != nil { + err280 := argvalue0.Read(context.Background(), jsProt279) + if err280 != nil { Usage() return } @@ -448,19 +447,19 @@ func main() { fmt.Fprintln(os.Stderr, "PauseJobUpdate requires 2 args") flag.Usage() } - arg232 := flag.Arg(1) - mbTrans233 := thrift.NewTMemoryBufferLen(len(arg232)) - defer mbTrans233.Close() - _, err234 := mbTrans233.WriteString(arg232) - if err234 != nil { + arg282 := flag.Arg(1) + mbTrans283 := thrift.NewTMemoryBufferLen(len(arg282)) + defer mbTrans283.Close() + _, err284 := mbTrans283.WriteString(arg282) + if err284 != nil { Usage() return } - factory235 := thrift.NewTJSONProtocolFactory() - jsProt236 := factory235.GetProtocol(mbTrans233) + factory285 := thrift.NewTJSONProtocolFactory() + jsProt286 := factory285.GetProtocol(mbTrans283) argvalue0 := aurora.NewJobUpdateKey() - err237 := argvalue0.Read(jsProt236) - if err237 != nil { + err287 := argvalue0.Read(context.Background(), jsProt286) + if err287 != nil { Usage() return } @@ -475,19 +474,19 @@ func main() { fmt.Fprintln(os.Stderr, "ResumeJobUpdate requires 2 args") flag.Usage() } - arg239 := flag.Arg(1) - mbTrans240 := thrift.NewTMemoryBufferLen(len(arg239)) - defer mbTrans240.Close() - _, err241 := mbTrans240.WriteString(arg239) - if err241 != nil { + arg289 := flag.Arg(1) + mbTrans290 := thrift.NewTMemoryBufferLen(len(arg289)) + defer mbTrans290.Close() + _, err291 := mbTrans290.WriteString(arg289) + if err291 != nil { Usage() return } - factory242 := thrift.NewTJSONProtocolFactory() - jsProt243 := factory242.GetProtocol(mbTrans240) + factory292 := thrift.NewTJSONProtocolFactory() + jsProt293 := factory292.GetProtocol(mbTrans290) argvalue0 := aurora.NewJobUpdateKey() - err244 := argvalue0.Read(jsProt243) - if err244 != nil { + err294 := argvalue0.Read(context.Background(), jsProt293) + if err294 != nil { Usage() return } @@ -502,19 +501,19 @@ func main() { fmt.Fprintln(os.Stderr, "AbortJobUpdate requires 2 args") flag.Usage() } - arg246 := flag.Arg(1) - mbTrans247 := thrift.NewTMemoryBufferLen(len(arg246)) - defer mbTrans247.Close() - _, err248 := mbTrans247.WriteString(arg246) - if err248 != nil { + arg296 := flag.Arg(1) + mbTrans297 := thrift.NewTMemoryBufferLen(len(arg296)) + defer mbTrans297.Close() + _, err298 := mbTrans297.WriteString(arg296) + if err298 != nil { Usage() return } - factory249 := thrift.NewTJSONProtocolFactory() - jsProt250 := factory249.GetProtocol(mbTrans247) + factory299 := thrift.NewTJSONProtocolFactory() + jsProt300 := factory299.GetProtocol(mbTrans297) argvalue0 := aurora.NewJobUpdateKey() - err251 := argvalue0.Read(jsProt250) - if err251 != nil { + err301 := argvalue0.Read(context.Background(), jsProt300) + if err301 != nil { Usage() return } @@ -529,19 +528,19 @@ func main() { fmt.Fprintln(os.Stderr, "RollbackJobUpdate requires 2 args") flag.Usage() } - arg253 := flag.Arg(1) - mbTrans254 := thrift.NewTMemoryBufferLen(len(arg253)) - defer mbTrans254.Close() - _, err255 := mbTrans254.WriteString(arg253) - if err255 != nil { + arg303 := flag.Arg(1) + mbTrans304 := thrift.NewTMemoryBufferLen(len(arg303)) + defer mbTrans304.Close() + _, err305 := mbTrans304.WriteString(arg303) + if err305 != nil { Usage() return } - factory256 := thrift.NewTJSONProtocolFactory() - jsProt257 := factory256.GetProtocol(mbTrans254) + factory306 := thrift.NewTJSONProtocolFactory() + jsProt307 := factory306.GetProtocol(mbTrans304) argvalue0 := aurora.NewJobUpdateKey() - err258 := argvalue0.Read(jsProt257) - if err258 != nil { + err308 := argvalue0.Read(context.Background(), jsProt307) + if err308 != nil { Usage() return } @@ -556,19 +555,19 @@ func main() { fmt.Fprintln(os.Stderr, "PulseJobUpdate requires 1 args") flag.Usage() } - arg260 := flag.Arg(1) - mbTrans261 := thrift.NewTMemoryBufferLen(len(arg260)) - defer mbTrans261.Close() - _, err262 := mbTrans261.WriteString(arg260) - if err262 != nil { + arg310 := flag.Arg(1) + mbTrans311 := thrift.NewTMemoryBufferLen(len(arg310)) + defer mbTrans311.Close() + _, err312 := mbTrans311.WriteString(arg310) + if err312 != nil { Usage() return } - factory263 := thrift.NewTJSONProtocolFactory() - jsProt264 := factory263.GetProtocol(mbTrans261) + factory313 := thrift.NewTJSONProtocolFactory() + jsProt314 := factory313.GetProtocol(mbTrans311) argvalue0 := aurora.NewJobUpdateKey() - err265 := argvalue0.Read(jsProt264) - if err265 != nil { + err315 := argvalue0.Read(context.Background(), jsProt314) + if err315 != nil { Usage() return } @@ -599,19 +598,19 @@ func main() { fmt.Fprintln(os.Stderr, "GetTasksStatus requires 1 args") flag.Usage() } - arg267 := flag.Arg(1) - mbTrans268 := thrift.NewTMemoryBufferLen(len(arg267)) - defer mbTrans268.Close() - _, err269 := mbTrans268.WriteString(arg267) - if err269 != nil { + arg317 := flag.Arg(1) + mbTrans318 := thrift.NewTMemoryBufferLen(len(arg317)) + defer mbTrans318.Close() + _, err319 := mbTrans318.WriteString(arg317) + if err319 != nil { Usage() return } - factory270 := thrift.NewTJSONProtocolFactory() - jsProt271 := factory270.GetProtocol(mbTrans268) + factory320 := thrift.NewTJSONProtocolFactory() + jsProt321 := factory320.GetProtocol(mbTrans318) argvalue0 := aurora.NewTaskQuery() - err272 := argvalue0.Read(jsProt271) - if err272 != nil { + err322 := argvalue0.Read(context.Background(), jsProt321) + if err322 != nil { Usage() return } @@ -624,19 +623,19 @@ func main() { fmt.Fprintln(os.Stderr, "GetTasksWithoutConfigs requires 1 args") flag.Usage() } - arg273 := flag.Arg(1) - mbTrans274 := thrift.NewTMemoryBufferLen(len(arg273)) - defer mbTrans274.Close() - _, err275 := mbTrans274.WriteString(arg273) - if err275 != nil { + arg323 := flag.Arg(1) + mbTrans324 := thrift.NewTMemoryBufferLen(len(arg323)) + defer mbTrans324.Close() + _, err325 := mbTrans324.WriteString(arg323) + if err325 != nil { Usage() return } - factory276 := thrift.NewTJSONProtocolFactory() - jsProt277 := factory276.GetProtocol(mbTrans274) + factory326 := thrift.NewTJSONProtocolFactory() + jsProt327 := factory326.GetProtocol(mbTrans324) argvalue0 := aurora.NewTaskQuery() - err278 := argvalue0.Read(jsProt277) - if err278 != nil { + err328 := argvalue0.Read(context.Background(), jsProt327) + if err328 != nil { Usage() return } @@ -649,19 +648,19 @@ func main() { fmt.Fprintln(os.Stderr, "GetPendingReason requires 1 args") flag.Usage() } - arg279 := flag.Arg(1) - mbTrans280 := thrift.NewTMemoryBufferLen(len(arg279)) - defer mbTrans280.Close() - _, err281 := mbTrans280.WriteString(arg279) - if err281 != nil { + arg329 := flag.Arg(1) + mbTrans330 := thrift.NewTMemoryBufferLen(len(arg329)) + defer mbTrans330.Close() + _, err331 := mbTrans330.WriteString(arg329) + if err331 != nil { Usage() return } - factory282 := thrift.NewTJSONProtocolFactory() - jsProt283 := factory282.GetProtocol(mbTrans280) + factory332 := thrift.NewTJSONProtocolFactory() + jsProt333 := factory332.GetProtocol(mbTrans330) argvalue0 := aurora.NewTaskQuery() - err284 := argvalue0.Read(jsProt283) - if err284 != nil { + err334 := argvalue0.Read(context.Background(), jsProt333) + if err334 != nil { Usage() return } @@ -674,19 +673,19 @@ func main() { fmt.Fprintln(os.Stderr, "GetConfigSummary requires 1 args") flag.Usage() } - arg285 := flag.Arg(1) - mbTrans286 := thrift.NewTMemoryBufferLen(len(arg285)) - defer mbTrans286.Close() - _, err287 := mbTrans286.WriteString(arg285) - if err287 != nil { + arg335 := flag.Arg(1) + mbTrans336 := thrift.NewTMemoryBufferLen(len(arg335)) + defer mbTrans336.Close() + _, err337 := mbTrans336.WriteString(arg335) + if err337 != nil { Usage() return } - factory288 := thrift.NewTJSONProtocolFactory() - jsProt289 := factory288.GetProtocol(mbTrans286) + factory338 := thrift.NewTJSONProtocolFactory() + jsProt339 := factory338.GetProtocol(mbTrans336) argvalue0 := aurora.NewJobKey() - err290 := argvalue0.Read(jsProt289) - if err290 != nil { + err340 := argvalue0.Read(context.Background(), jsProt339) + if err340 != nil { Usage() return } @@ -719,19 +718,19 @@ func main() { fmt.Fprintln(os.Stderr, "PopulateJobConfig requires 1 args") flag.Usage() } - arg293 := flag.Arg(1) - mbTrans294 := thrift.NewTMemoryBufferLen(len(arg293)) - defer mbTrans294.Close() - _, err295 := mbTrans294.WriteString(arg293) - if err295 != nil { + arg343 := flag.Arg(1) + mbTrans344 := thrift.NewTMemoryBufferLen(len(arg343)) + defer mbTrans344.Close() + _, err345 := mbTrans344.WriteString(arg343) + if err345 != nil { Usage() return } - factory296 := thrift.NewTJSONProtocolFactory() - jsProt297 := factory296.GetProtocol(mbTrans294) + factory346 := thrift.NewTJSONProtocolFactory() + jsProt347 := factory346.GetProtocol(mbTrans344) argvalue0 := aurora.NewJobConfiguration() - err298 := argvalue0.Read(jsProt297) - if err298 != nil { + err348 := argvalue0.Read(context.Background(), jsProt347) + if err348 != nil { Usage() return } @@ -744,19 +743,19 @@ func main() { fmt.Fprintln(os.Stderr, "GetJobUpdateSummaries requires 1 args") flag.Usage() } - arg299 := flag.Arg(1) - mbTrans300 := thrift.NewTMemoryBufferLen(len(arg299)) - defer mbTrans300.Close() - _, err301 := mbTrans300.WriteString(arg299) - if err301 != nil { + arg349 := flag.Arg(1) + mbTrans350 := thrift.NewTMemoryBufferLen(len(arg349)) + defer mbTrans350.Close() + _, err351 := mbTrans350.WriteString(arg349) + if err351 != nil { Usage() return } - factory302 := thrift.NewTJSONProtocolFactory() - jsProt303 := factory302.GetProtocol(mbTrans300) + factory352 := thrift.NewTJSONProtocolFactory() + jsProt353 := factory352.GetProtocol(mbTrans350) argvalue0 := aurora.NewJobUpdateQuery() - err304 := argvalue0.Read(jsProt303) - if err304 != nil { + err354 := argvalue0.Read(context.Background(), jsProt353) + if err354 != nil { Usage() return } @@ -769,19 +768,19 @@ func main() { fmt.Fprintln(os.Stderr, "GetJobUpdateDetails requires 1 args") flag.Usage() } - arg305 := flag.Arg(1) - mbTrans306 := thrift.NewTMemoryBufferLen(len(arg305)) - defer mbTrans306.Close() - _, err307 := mbTrans306.WriteString(arg305) - if err307 != nil { + arg355 := flag.Arg(1) + mbTrans356 := thrift.NewTMemoryBufferLen(len(arg355)) + defer mbTrans356.Close() + _, err357 := mbTrans356.WriteString(arg355) + if err357 != nil { Usage() return } - factory308 := thrift.NewTJSONProtocolFactory() - jsProt309 := factory308.GetProtocol(mbTrans306) + factory358 := thrift.NewTJSONProtocolFactory() + jsProt359 := factory358.GetProtocol(mbTrans356) argvalue0 := aurora.NewJobUpdateQuery() - err310 := argvalue0.Read(jsProt309) - if err310 != nil { + err360 := argvalue0.Read(context.Background(), jsProt359) + if err360 != nil { Usage() return } @@ -794,19 +793,19 @@ func main() { fmt.Fprintln(os.Stderr, "GetJobUpdateDiff requires 1 args") flag.Usage() } - arg311 := flag.Arg(1) - mbTrans312 := thrift.NewTMemoryBufferLen(len(arg311)) - defer mbTrans312.Close() - _, err313 := mbTrans312.WriteString(arg311) - if err313 != nil { + arg361 := flag.Arg(1) + mbTrans362 := thrift.NewTMemoryBufferLen(len(arg361)) + defer mbTrans362.Close() + _, err363 := mbTrans362.WriteString(arg361) + if err363 != nil { Usage() return } - factory314 := thrift.NewTJSONProtocolFactory() - jsProt315 := factory314.GetProtocol(mbTrans312) + factory364 := thrift.NewTJSONProtocolFactory() + jsProt365 := factory364.GetProtocol(mbTrans362) argvalue0 := aurora.NewJobUpdateRequest() - err316 := argvalue0.Read(jsProt315) - if err316 != nil { + err366 := argvalue0.Read(context.Background(), jsProt365) + if err366 != nil { Usage() return } diff --git a/gen-go/apache/aurora/read_only_scheduler-remote/read_only_scheduler-remote.go b/gen-go/apache/aurora/read_only_scheduler-remote/read_only_scheduler-remote.go index 31aac65a..e802328d 100755 --- a/gen-go/apache/aurora/read_only_scheduler-remote/read_only_scheduler-remote.go +++ b/gen-go/apache/aurora/read_only_scheduler-remote/read_only_scheduler-remote.go @@ -1,5 +1,4 @@ -// Autogenerated by Thrift Compiler (0.13.0) -// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +// Code generated by Thrift Compiler (0.14.0). DO NOT EDIT. package main @@ -180,19 +179,19 @@ func main() { fmt.Fprintln(os.Stderr, "GetTasksStatus requires 1 args") flag.Usage() } - arg82 := flag.Arg(1) - mbTrans83 := thrift.NewTMemoryBufferLen(len(arg82)) - defer mbTrans83.Close() - _, err84 := mbTrans83.WriteString(arg82) - if err84 != nil { + arg132 := flag.Arg(1) + mbTrans133 := thrift.NewTMemoryBufferLen(len(arg132)) + defer mbTrans133.Close() + _, err134 := mbTrans133.WriteString(arg132) + if err134 != nil { Usage() return } - factory85 := thrift.NewTJSONProtocolFactory() - jsProt86 := factory85.GetProtocol(mbTrans83) + factory135 := thrift.NewTJSONProtocolFactory() + jsProt136 := factory135.GetProtocol(mbTrans133) argvalue0 := aurora.NewTaskQuery() - err87 := argvalue0.Read(jsProt86) - if err87 != nil { + err137 := argvalue0.Read(context.Background(), jsProt136) + if err137 != nil { Usage() return } @@ -205,19 +204,19 @@ func main() { fmt.Fprintln(os.Stderr, "GetTasksWithoutConfigs requires 1 args") flag.Usage() } - arg88 := flag.Arg(1) - mbTrans89 := thrift.NewTMemoryBufferLen(len(arg88)) - defer mbTrans89.Close() - _, err90 := mbTrans89.WriteString(arg88) - if err90 != nil { + arg138 := flag.Arg(1) + mbTrans139 := thrift.NewTMemoryBufferLen(len(arg138)) + defer mbTrans139.Close() + _, err140 := mbTrans139.WriteString(arg138) + if err140 != nil { Usage() return } - factory91 := thrift.NewTJSONProtocolFactory() - jsProt92 := factory91.GetProtocol(mbTrans89) + factory141 := thrift.NewTJSONProtocolFactory() + jsProt142 := factory141.GetProtocol(mbTrans139) argvalue0 := aurora.NewTaskQuery() - err93 := argvalue0.Read(jsProt92) - if err93 != nil { + err143 := argvalue0.Read(context.Background(), jsProt142) + if err143 != nil { Usage() return } @@ -230,19 +229,19 @@ func main() { fmt.Fprintln(os.Stderr, "GetPendingReason requires 1 args") flag.Usage() } - arg94 := flag.Arg(1) - mbTrans95 := thrift.NewTMemoryBufferLen(len(arg94)) - defer mbTrans95.Close() - _, err96 := mbTrans95.WriteString(arg94) - if err96 != nil { + arg144 := flag.Arg(1) + mbTrans145 := thrift.NewTMemoryBufferLen(len(arg144)) + defer mbTrans145.Close() + _, err146 := mbTrans145.WriteString(arg144) + if err146 != nil { Usage() return } - factory97 := thrift.NewTJSONProtocolFactory() - jsProt98 := factory97.GetProtocol(mbTrans95) + factory147 := thrift.NewTJSONProtocolFactory() + jsProt148 := factory147.GetProtocol(mbTrans145) argvalue0 := aurora.NewTaskQuery() - err99 := argvalue0.Read(jsProt98) - if err99 != nil { + err149 := argvalue0.Read(context.Background(), jsProt148) + if err149 != nil { Usage() return } @@ -255,19 +254,19 @@ func main() { fmt.Fprintln(os.Stderr, "GetConfigSummary requires 1 args") flag.Usage() } - arg100 := flag.Arg(1) - mbTrans101 := thrift.NewTMemoryBufferLen(len(arg100)) - defer mbTrans101.Close() - _, err102 := mbTrans101.WriteString(arg100) - if err102 != nil { + arg150 := flag.Arg(1) + mbTrans151 := thrift.NewTMemoryBufferLen(len(arg150)) + defer mbTrans151.Close() + _, err152 := mbTrans151.WriteString(arg150) + if err152 != nil { Usage() return } - factory103 := thrift.NewTJSONProtocolFactory() - jsProt104 := factory103.GetProtocol(mbTrans101) + factory153 := thrift.NewTJSONProtocolFactory() + jsProt154 := factory153.GetProtocol(mbTrans151) argvalue0 := aurora.NewJobKey() - err105 := argvalue0.Read(jsProt104) - if err105 != nil { + err155 := argvalue0.Read(context.Background(), jsProt154) + if err155 != nil { Usage() return } @@ -300,19 +299,19 @@ func main() { fmt.Fprintln(os.Stderr, "PopulateJobConfig requires 1 args") flag.Usage() } - arg108 := flag.Arg(1) - mbTrans109 := thrift.NewTMemoryBufferLen(len(arg108)) - defer mbTrans109.Close() - _, err110 := mbTrans109.WriteString(arg108) - if err110 != nil { + arg158 := flag.Arg(1) + mbTrans159 := thrift.NewTMemoryBufferLen(len(arg158)) + defer mbTrans159.Close() + _, err160 := mbTrans159.WriteString(arg158) + if err160 != nil { Usage() return } - factory111 := thrift.NewTJSONProtocolFactory() - jsProt112 := factory111.GetProtocol(mbTrans109) + factory161 := thrift.NewTJSONProtocolFactory() + jsProt162 := factory161.GetProtocol(mbTrans159) argvalue0 := aurora.NewJobConfiguration() - err113 := argvalue0.Read(jsProt112) - if err113 != nil { + err163 := argvalue0.Read(context.Background(), jsProt162) + if err163 != nil { Usage() return } @@ -325,19 +324,19 @@ func main() { fmt.Fprintln(os.Stderr, "GetJobUpdateSummaries requires 1 args") flag.Usage() } - arg114 := flag.Arg(1) - mbTrans115 := thrift.NewTMemoryBufferLen(len(arg114)) - defer mbTrans115.Close() - _, err116 := mbTrans115.WriteString(arg114) - if err116 != nil { + arg164 := flag.Arg(1) + mbTrans165 := thrift.NewTMemoryBufferLen(len(arg164)) + defer mbTrans165.Close() + _, err166 := mbTrans165.WriteString(arg164) + if err166 != nil { Usage() return } - factory117 := thrift.NewTJSONProtocolFactory() - jsProt118 := factory117.GetProtocol(mbTrans115) + factory167 := thrift.NewTJSONProtocolFactory() + jsProt168 := factory167.GetProtocol(mbTrans165) argvalue0 := aurora.NewJobUpdateQuery() - err119 := argvalue0.Read(jsProt118) - if err119 != nil { + err169 := argvalue0.Read(context.Background(), jsProt168) + if err169 != nil { Usage() return } @@ -350,19 +349,19 @@ func main() { fmt.Fprintln(os.Stderr, "GetJobUpdateDetails requires 1 args") flag.Usage() } - arg120 := flag.Arg(1) - mbTrans121 := thrift.NewTMemoryBufferLen(len(arg120)) - defer mbTrans121.Close() - _, err122 := mbTrans121.WriteString(arg120) - if err122 != nil { + arg170 := flag.Arg(1) + mbTrans171 := thrift.NewTMemoryBufferLen(len(arg170)) + defer mbTrans171.Close() + _, err172 := mbTrans171.WriteString(arg170) + if err172 != nil { Usage() return } - factory123 := thrift.NewTJSONProtocolFactory() - jsProt124 := factory123.GetProtocol(mbTrans121) + factory173 := thrift.NewTJSONProtocolFactory() + jsProt174 := factory173.GetProtocol(mbTrans171) argvalue0 := aurora.NewJobUpdateQuery() - err125 := argvalue0.Read(jsProt124) - if err125 != nil { + err175 := argvalue0.Read(context.Background(), jsProt174) + if err175 != nil { Usage() return } @@ -375,19 +374,19 @@ func main() { fmt.Fprintln(os.Stderr, "GetJobUpdateDiff requires 1 args") flag.Usage() } - arg126 := flag.Arg(1) - mbTrans127 := thrift.NewTMemoryBufferLen(len(arg126)) - defer mbTrans127.Close() - _, err128 := mbTrans127.WriteString(arg126) - if err128 != nil { + arg176 := flag.Arg(1) + mbTrans177 := thrift.NewTMemoryBufferLen(len(arg176)) + defer mbTrans177.Close() + _, err178 := mbTrans177.WriteString(arg176) + if err178 != nil { Usage() return } - factory129 := thrift.NewTJSONProtocolFactory() - jsProt130 := factory129.GetProtocol(mbTrans127) + factory179 := thrift.NewTJSONProtocolFactory() + jsProt180 := factory179.GetProtocol(mbTrans177) argvalue0 := aurora.NewJobUpdateRequest() - err131 := argvalue0.Read(jsProt130) - if err131 != nil { + err181 := argvalue0.Read(context.Background(), jsProt180) + if err181 != nil { Usage() return } diff --git a/generateBindings.sh b/generateBindings.sh index 03acd6d0..8cb5b9d8 100755 --- a/generateBindings.sh +++ b/generateBindings.sh @@ -1,6 +1,6 @@ #! /bin/bash -THRIFT_VER=0.13.0 +THRIFT_VER=0.14.0 if [[ $(thrift -version | grep -e $THRIFT_VER -c) -ne 1 ]]; then echo "Warning: This wrapper has only been tested with version" $THRIFT_VER; diff --git a/go.mod b/go.mod index 2e3bd1fb..506556bc 100644 --- a/go.mod +++ b/go.mod @@ -3,12 +3,10 @@ module github.com/paypal/gorealis go 1.13 require ( - github.com/apache/thrift v0.13.0 - github.com/davecgh/go-spew v1.1.0 + github.com/apache/thrift v0.14.0 + github.com/davecgh/go-spew v1.1.0 // indirect github.com/pkg/errors v0.9.1 - github.com/pmezard/go-difflib v1.0.0 + github.com/pmezard/go-difflib v1.0.0 // indirect github.com/samuel/go-zookeeper v0.0.0-20171117190445-471cd4e61d7a github.com/stretchr/testify v1.2.0 ) - -replace github.com/apache/thrift v0.13.0 => github.com/ridv/thrift v0.13.2 diff --git a/runTestsMac.sh b/runTestsMac.sh index d60d85f9..6a099316 100644 --- a/runTestsMac.sh +++ b/runTestsMac.sh @@ -1,4 +1,4 @@ #!/bin/bash # Since we run our docker compose setup in bridge mode to be able to run on MacOS, we have to launch a Docker container within the bridge network in order to avoid any routing issues. -docker run --rm -t -v $(pwd):/go/src/github.com/paypal/gorealis --network gorealis_aurora_cluster golang:1.10-stretch go test -v github.com/paypal/gorealis $@ +docker run --rm -t -w /gorealis -v $GOPATH/pkg:/go/pkg -v $(pwd):/gorealis --network gorealis_aurora_cluster golang:1.16-buster go test -v github.com/paypal/gorealis $@