diff --git a/.auroraversion b/.auroraversion index ca222b7..2157409 100644 --- a/.auroraversion +++ b/.auroraversion @@ -1 +1 @@ -0.23.0 +0.22.0 diff --git a/.github/main.yml b/.github/main.yml deleted file mode 100644 index 0445266..0000000 --- a/.github/main.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: CI - -on: [push] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: Setup Go for use with actions - uses: actions/setup-go@v2 - with: - go-version: 1.16 - - name: Install goimports - run: go get golang.org/x/tools/cmd/goimports - - name: Set env with list of directories in repo containin go code - run: echo GO_USR_DIRS=$(go list -f {{.Dir}} ./... | grep -E -v "/gen-go/|/vendor/") >> $GITHUB_ENV - - name: Run goimports check - run: test -z "`for d in $GO_USR_DIRS; do goimports -d $d/*.go | tee /dev/stderr; done`" - - name: Create aurora/mesos docker cluster - run: docker-compose up -d - - name: Run tests - run: go test -timeout 35m -race -coverprofile=coverage.txt -covermode=atomic -v github.com/paypal/gorealis diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml deleted file mode 100644 index 6c1890f..0000000 --- a/.github/workflows/codeql-analysis.yml +++ /dev/null @@ -1,57 +0,0 @@ -# For most projects, this workflow file will not need changing; you simply need -# to commit it to your repository. -# -# You may wish to alter this file to override the set of languages analyzed, -# or to provide custom queries or build logic. -# -# ******** NOTE ******** -# We have attempted to detect the languages in your repository. Please check -# the `language` matrix defined below to confirm you have the correct set of -# supported CodeQL languages. -# -name: "CodeQL" - -on: - push: - branches: [ main ] - pull_request: - # The branches below must be a subset of the branches above - branches: [ main ] - schedule: - - cron: '34 4 * * 3' - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - permissions: - actions: read - contents: read - security-events: write - - strategy: - fail-fast: false - matrix: - language: [ 'go' ] - # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] - # Learn more: - # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed - - steps: - - name: Checkout repository - uses: actions/checkout@v2 - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v1 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main - - - run: go build examples/client.go - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index 7edfc51..0000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: CI - -on: - push: - branches: - - main - pull_request: - branches: - - main -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: Setup Go for use with actions - uses: actions/setup-go@v2 - with: - go-version: 1.16 - - name: Install goimports - run: go get golang.org/x/tools/cmd/goimports - - name: Set env with list of directories in repo containin go code - run: echo GO_USR_DIRS=$(go list -f {{.Dir}} ./... | grep -E -v "/gen-go/|/vendor/") >> $GITHUB_ENV - - name: Run goimports check - run: test -z "`for d in $GO_USR_DIRS; do goimports -d $d/*.go | tee /dev/stderr; done`" - - name: Create aurora/mesos docker cluster - run: docker-compose up -d - - name: Run tests - run: go test -timeout 35m -race -coverprofile=coverage.txt -covermode=atomic -v github.com/paypal/gorealis diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..4f325ed --- /dev/null +++ b/.travis.yml @@ -0,0 +1,33 @@ +sudo: required + +dist: xenial +language: go + +branches: + only: + - master + - master-v2.0 + - future + +go: + - "1.10.x" + +env: + global: + - GO_USR_DIRS=$(go list -f {{.Dir}} ./... | grep -E -v "/gen-go/|/vendor/") + +services: + - docker + +before_install: + - go get golang.org/x/tools/cmd/goimports + - test -z "`for d in $GO_USR_DIRS; do goimports -d $d/*.go | tee /dev/stderr; done`" + +install: + - docker-compose up -d + +script: + - go test -race -coverprofile=coverage.txt -covermode=atomic -v github.com/paypal/gorealis + +after_success: + - bash <(curl -s https://codecov.io/bash) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9cfbaef..551bae9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,41 +1,4 @@ -1.25.1 (unreleased) - -1.25.0 - -* Add priority api - -1.24.0 - -* enable default sla for slaDrain -* Changes Travis CI badge to Github Actions badge -* Bug fix for auto paused update monitor -* Adds support for running CI on github actions - -1.23.0 - -* First release tested against Aurora Scheduler 0.23.0 - -1.22.5 - -* 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. - -1.22.0 +1.22.0 (unreleased) * CreateService and StartJobUpdate do not continue retrying if a timeout has been encountered by the HTTP client. Instead they now return an error that conforms to the Timedout interface. diff --git a/Gopkg.lock b/Gopkg.lock new file mode 100644 index 0000000..1994a30 --- /dev/null +++ b/Gopkg.lock @@ -0,0 +1,64 @@ +# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. + + +[[projects]] + digest = "1:89696c38cec777120b8b1bb5e2d363d655cf2e1e7d8c851919aaa0fd576d9b86" + name = "github.com/apache/thrift" + packages = ["lib/go/thrift"] + pruneopts = "" + revision = "384647d290e2e4a55a14b1b7ef1b7e66293a2c33" + version = "v0.12.0" + +[[projects]] + digest = "1:56c130d885a4aacae1dd9c7b71cfe39912c7ebc1ff7d2b46083c8812996dc43b" + name = "github.com/davecgh/go-spew" + packages = ["spew"] + pruneopts = "" + revision = "346938d642f2ec3594ed81d874461961cd0faa76" + version = "v1.1.0" + +[[projects]] + digest = "1:df48fb76fb2a40edea0c9b3d960bc95e326660d82ff1114e1f88001f7a236b40" + name = "github.com/pkg/errors" + packages = ["."] + pruneopts = "" + revision = "e881fd58d78e04cf6d0de1217f8707c8cc2249bc" + +[[projects]] + digest = "1:256484dbbcd271f9ecebc6795b2df8cad4c458dd0f5fd82a8c2fa0c29f233411" + name = "github.com/pmezard/go-difflib" + packages = ["difflib"] + pruneopts = "" + revision = "792786c7400a136282c1664665ae0a8db921c6c2" + version = "v1.0.0" + +[[projects]] + digest = "1:78bea5e26e82826dacc5fd64a1013a6711b7075ec8072819b89e6ad76cb8196d" + name = "github.com/samuel/go-zookeeper" + packages = ["zk"] + pruneopts = "" + revision = "471cd4e61d7a78ece1791fa5faa0345dc8c7d5a5" + +[[projects]] + digest = "1:381bcbeb112a51493d9d998bbba207a529c73dbb49b3fd789e48c63fac1f192c" + name = "github.com/stretchr/testify" + packages = [ + "assert", + "require", + ] + pruneopts = "" + revision = "ffdc059bfe9ce6a4e144ba849dbedead332c6053" + version = "v1.3.0" + +[solve-meta] + analyzer-name = "dep" + analyzer-version = 1 + input-imports = [ + "github.com/apache/thrift/lib/go/thrift", + "github.com/pkg/errors", + "github.com/samuel/go-zookeeper/zk", + "github.com/stretchr/testify/assert", + "github.com/stretchr/testify/require", + ] + solver-name = "gps-cdcl" + solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml new file mode 100644 index 0000000..5d6c9f2 --- /dev/null +++ b/Gopkg.toml @@ -0,0 +1,16 @@ +[[constraint]] + name = "github.com/apache/thrift" + version = "0.12.0" + +[[constraint]] + name = "github.com/pkg/errors" + revision = "e881fd58d78e04cf6d0de1217f8707c8cc2249bc" + +[[constraint]] + name = "github.com/samuel/go-zookeeper" + revision = "471cd4e61d7a78ece1791fa5faa0345dc8c7d5a5" + +[[constraint]] + name = "github.com/stretchr/testify" + version = "1.3.0" + diff --git a/README.md b/README.md index 0ce8bc1..7868f2c 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,6 @@ -# gorealis [![GoDoc](https://godoc.org/github.com/paypal/gorealis?status.svg)](https://godoc.org/github.com/paypal/gorealis) ![CI Build Status](https://github.com/paypal/gorealis/actions/workflows/main.yml/badge.svg) [![codecov](https://codecov.io/gh/paypal/gorealis/branch/main/graph/badge.svg)](https://codecov.io/gh/paypal/gorealis) +# gorealis [![GoDoc](https://godoc.org/github.com/paypal/gorealis?status.svg)](https://godoc.org/github.com/paypal/gorealis) [![Build Status](https://travis-ci.org/paypal/gorealis.svg?branch=master)](https://travis-ci.org/paypal/gorealis) [![codecov](https://codecov.io/gh/paypal/gorealis/branch/master/graph/badge.svg)](https://codecov.io/gh/paypal/gorealis) -Version 1 of Go library for interacting with [Aurora Scheduler](https://github.com/aurora-scheduler/aurora). - -Version 2 of this library can be found [here](https://github.com/aurora-scheduler/gorealis). +Go library for interacting with [Apache Aurora](https://github.com/apache/aurora). ### Aurora version compatibility Please see [.auroraversion](./.auroraversion) to see the latest Aurora version against which this @@ -16,7 +14,7 @@ library has been tested. ## Projects using gorealis -* [australis](https://github.com/aurora-scheduler/australis) +* [australis](https://github.com/rdelval/australis) ## Contributions Contributions are always welcome. Please raise an issue to discuss a contribution before it is made. diff --git a/docker-compose.yml b/docker-compose.yml index 9c6169f..4c45490 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -14,7 +14,7 @@ services: ipv4_address: 192.168.33.2 master: - image: aurorascheduler/mesos-master:1.7.2 + image: rdelvalle/mesos-master:1.6.2 restart: on-failure ports: - "5050:5050" @@ -32,13 +32,12 @@ services: - zk agent-one: - image: aurorascheduler/mesos-agent:1.7.2 + image: rdelvalle/mesos-agent:1.6.2 pid: host restart: on-failure ports: - "5051:5051" environment: - MESOS_ATTRIBUTES: 'zone:west' MESOS_MASTER: zk://192.168.33.2:2181/mesos MESOS_CONTAINERIZERS: docker,mesos MESOS_PORT: 5051 @@ -57,13 +56,12 @@ services: - zk agent-two: - image: aurorascheduler/mesos-agent:1.7.2 + image: rdelvalle/mesos-agent:1.6.2 pid: host restart: on-failure ports: - "5061:5061" environment: - MESOS_ATTRIBUTES: 'zone:east' MESOS_MASTER: zk://192.168.33.2:2181/mesos MESOS_CONTAINERIZERS: docker,mesos MESOS_HOSTNAME: localhost @@ -82,7 +80,7 @@ services: - zk aurora-one: - image: aurorascheduler/scheduler:0.23.0 + image: rdelvalle/aurora:0.22.0 pid: host ports: - "8081:8081" diff --git a/examples/client.go b/examples/client.go index 69e3751..4f153e5 100644 --- a/examples/client.go +++ b/examples/client.go @@ -111,7 +111,7 @@ func main() { if err != nil { log.Fatalln(err) } - monitor = &realis.Monitor{Client: r} + monitor = &realis.Monitor{r} defer r.Close() switch executor { @@ -451,6 +451,13 @@ func main() { } fmt.Println(resp.String()) + case "variableBatchStep": + step, err := r.VariableBatchStep(aurora.JobUpdateKey{Job: job.JobKey(), ID: updateId}) + if err != nil { + log.Fatal(err) + } + fmt.Println(step) + case "taskConfig": fmt.Println("Getting job info") live, err := r.GetInstanceIds(job.JobKey(), aurora.ACTIVE_STATES) diff --git a/gen-go/apache/aurora/GoUnusedProtection__.go b/gen-go/apache/aurora/GoUnusedProtection__.go index 462b3b4..6ba25e0 100644 --- a/gen-go/apache/aurora/GoUnusedProtection__.go +++ b/gen-go/apache/aurora/GoUnusedProtection__.go @@ -1,4 +1,5 @@ -// Code generated by Thrift Compiler (0.14.0). DO NOT EDIT. +// Autogenerated by Thrift Compiler (0.12.0) +// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING package aurora diff --git a/gen-go/apache/aurora/auroraAPI-consts.go b/gen-go/apache/aurora/auroraAPI-consts.go index d4a319e..6e79077 100644 --- a/gen-go/apache/aurora/auroraAPI-consts.go +++ b/gen-go/apache/aurora/auroraAPI-consts.go @@ -1,12 +1,13 @@ -// Code generated by Thrift Compiler (0.14.0). DO NOT EDIT. +// Autogenerated by Thrift Compiler (0.12.0) +// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING package aurora -import( +import ( "bytes" "context" + "reflect" "fmt" - "time" "github.com/apache/thrift/lib/go/thrift" ) @@ -14,7 +15,7 @@ import( var _ = thrift.ZERO var _ = fmt.Printf var _ = context.Background -var _ = time.Now +var _ = reflect.DeepEqual 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 914d268..849c381 100644 --- a/gen-go/apache/aurora/auroraAPI.go +++ b/gen-go/apache/aurora/auroraAPI.go @@ -1,14 +1,15 @@ -// Code generated by Thrift Compiler (0.14.0). DO NOT EDIT. +// Autogenerated by Thrift Compiler (0.12.0) +// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING package aurora -import( +import ( "bytes" "context" + "reflect" "database/sql/driver" "errors" "fmt" - "time" "github.com/apache/thrift/lib/go/thrift" ) @@ -16,7 +17,7 @@ import( var _ = thrift.ZERO var _ = fmt.Printf var _ = context.Background -var _ = time.Now +var _ = reflect.DeepEqual var _ = bytes.Equal type ResponseCode int64 @@ -566,14 +567,14 @@ func NewIdentity() *Identity { func (p *Identity) GetUser() string { return p.User } -func (p *Identity) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *Identity) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -581,31 +582,31 @@ func (p *Identity) Read(ctx context.Context, iprot thrift.TProtocol) error { switch fieldId { case 2: if fieldTypeId == thrift.STRING { - if err := p.ReadField2(ctx, iprot); err != nil { + if err := p.ReadField2(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *Identity) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *Identity) ReadField2(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { p.User = v @@ -613,39 +614,29 @@ func (p *Identity) ReadField2(ctx context.Context, iprot thrift.TProtocol) erro return nil } -func (p *Identity) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "Identity"); err != nil { +func (p *Identity) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("Identity"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField2(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *Identity) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "user", thrift.STRING, 2); err != nil { +func (p *Identity) writeField2(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("user", thrift.STRING, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:user: ", p), err) } - if err := oprot.WriteString(ctx, string(p.User)); err != nil { + if err := oprot.WriteString(string(p.User)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.user (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); 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 "" @@ -675,14 +666,14 @@ func (p *Attribute) GetName() string { func (p *Attribute) GetValues() []string { return p.Values } -func (p *Attribute) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *Attribute) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -690,41 +681,41 @@ func (p *Attribute) Read(ctx context.Context, iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRING { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.SET { - if err := p.ReadField2(ctx, iprot); err != nil { + if err := p.ReadField2(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *Attribute) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *Attribute) ReadField1(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.Name = v @@ -732,8 +723,8 @@ func (p *Attribute) ReadField1(ctx context.Context, iprot thrift.TProtocol) err return nil } -func (p *Attribute) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin(ctx) +func (p *Attribute) ReadField2(iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin() if err != nil { return thrift.PrependError("error reading set begin: ", err) } @@ -741,86 +732,68 @@ func (p *Attribute) ReadField2(ctx context.Context, iprot thrift.TProtocol) err p.Values = tSet for i := 0; i < size; i ++ { var _elem0 string - if v, err := iprot.ReadString(ctx); err != nil { + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { _elem0 = v } p.Values = append(p.Values, _elem0) } - if err := iprot.ReadSetEnd(ctx); err != nil { + if err := iprot.ReadSetEnd(); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *Attribute) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "Attribute"); err != nil { +func (p *Attribute) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("Attribute"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } - if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField2(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *Attribute) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "name", thrift.STRING, 1); err != nil { +func (p *Attribute) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("name", thrift.STRING, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:name: ", p), err) } - if err := oprot.WriteString(ctx, string(p.Name)); err != nil { + if err := oprot.WriteString(string(p.Name)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.name (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:name: ", p), err) } return err } -func (p *Attribute) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "values", thrift.SET, 2); err != nil { +func (p *Attribute) writeField2(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("values", thrift.SET, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:values: ", p), err) } - if err := oprot.WriteSetBegin(ctx, thrift.STRING, len(p.Values)); err != nil { + if err := oprot.WriteSetBegin(thrift.STRING, len(p.Values)); err != nil { return thrift.PrependError("error writing set begin: ", err) } for i := 0; i" @@ -876,14 +849,14 @@ func (p *HostAttributes) IsSetSlaveId() bool { return p.SlaveId != nil } -func (p *HostAttributes) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *HostAttributes) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -891,61 +864,61 @@ func (p *HostAttributes) Read(ctx context.Context, iprot thrift.TProtocol) error switch fieldId { case 1: if fieldTypeId == thrift.STRING { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.SET { - if err := p.ReadField2(ctx, iprot); err != nil { + if err := p.ReadField2(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 3: if fieldTypeId == thrift.I32 { - if err := p.ReadField3(ctx, iprot); err != nil { + if err := p.ReadField3(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 4: if fieldTypeId == thrift.STRING { - if err := p.ReadField4(ctx, iprot); err != nil { + if err := p.ReadField4(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *HostAttributes) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *HostAttributes) ReadField1(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.Host = v @@ -953,28 +926,28 @@ func (p *HostAttributes) ReadField1(ctx context.Context, iprot thrift.TProtocol return nil } -func (p *HostAttributes) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin(ctx) +func (p *HostAttributes) ReadField2(iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin() 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 ++ { - _elem2 := &Attribute{} - if err := _elem2.Read(ctx, iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem2), err) + _elem1 := &Attribute{} + if err := _elem1.Read(iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem1), err) } - p.Attributes = append(p.Attributes, _elem2) + p.Attributes = append(p.Attributes, _elem1) } - if err := iprot.ReadSetEnd(ctx); err != nil { + if err := iprot.ReadSetEnd(); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *HostAttributes) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(ctx); err != nil { +func (p *HostAttributes) ReadField3(iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(); err != nil { return thrift.PrependError("error reading field 3: ", err) } else { temp := MaintenanceMode(v) @@ -983,8 +956,8 @@ func (p *HostAttributes) ReadField3(ctx context.Context, iprot thrift.TProtocol return nil } -func (p *HostAttributes) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *HostAttributes) ReadField4(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 4: ", err) } else { p.SlaveId = &v @@ -992,112 +965,82 @@ func (p *HostAttributes) ReadField4(ctx context.Context, iprot thrift.TProtocol return nil } -func (p *HostAttributes) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "HostAttributes"); err != nil { +func (p *HostAttributes) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("HostAttributes"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != 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.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 := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *HostAttributes) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "host", thrift.STRING, 1); err != nil { +func (p *HostAttributes) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("host", thrift.STRING, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:host: ", p), err) } - if err := oprot.WriteString(ctx, string(p.Host)); err != nil { + if err := oprot.WriteString(string(p.Host)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.host (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:host: ", p), err) } return err } -func (p *HostAttributes) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "attributes", thrift.SET, 2); err != nil { +func (p *HostAttributes) writeField2(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("attributes", thrift.SET, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:attributes: ", p), err) } - if err := oprot.WriteSetBegin(ctx, thrift.STRUCT, len(p.Attributes)); err != nil { + if err := oprot.WriteSetBegin(thrift.STRUCT, len(p.Attributes)); err != nil { return thrift.PrependError("error writing set begin: ", err) } for i := 0; i" @@ -1128,14 +1071,14 @@ func (p *ValueConstraint) GetNegated() bool { func (p *ValueConstraint) GetValues() []string { return p.Values } -func (p *ValueConstraint) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *ValueConstraint) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -1143,41 +1086,41 @@ func (p *ValueConstraint) Read(ctx context.Context, iprot thrift.TProtocol) erro switch fieldId { case 1: if fieldTypeId == thrift.BOOL { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.SET { - if err := p.ReadField2(ctx, iprot); err != nil { + if err := p.ReadField2(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ValueConstraint) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadBool(ctx); err != nil { +func (p *ValueConstraint) ReadField1(iprot thrift.TProtocol) error { + if v, err := iprot.ReadBool(); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.Negated = v @@ -1185,95 +1128,77 @@ func (p *ValueConstraint) ReadField1(ctx context.Context, iprot thrift.TProtoco return nil } -func (p *ValueConstraint) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin(ctx) +func (p *ValueConstraint) ReadField2(iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin() 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 _elem4 string - if v, err := iprot.ReadString(ctx); err != nil { +var _elem2 string + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem4 = v + _elem2 = v } - p.Values = append(p.Values, _elem4) + p.Values = append(p.Values, _elem2) } - if err := iprot.ReadSetEnd(ctx); err != nil { + if err := iprot.ReadSetEnd(); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *ValueConstraint) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "ValueConstraint"); err != nil { +func (p *ValueConstraint) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("ValueConstraint"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } - if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField2(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ValueConstraint) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "negated", thrift.BOOL, 1); err != nil { +func (p *ValueConstraint) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("negated", thrift.BOOL, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:negated: ", p), err) } - if err := oprot.WriteBool(ctx, bool(p.Negated)); err != nil { + if err := oprot.WriteBool(bool(p.Negated)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.negated (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:negated: ", p), err) } return err } -func (p *ValueConstraint) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "values", thrift.SET, 2); err != nil { +func (p *ValueConstraint) writeField2(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("values", thrift.SET, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:values: ", p), err) } - if err := oprot.WriteSetBegin(ctx, thrift.STRING, len(p.Values)); err != nil { + if err := oprot.WriteSetBegin(thrift.STRING, len(p.Values)); err != nil { return thrift.PrependError("error writing set begin: ", err) } for i := 0; i" @@ -1298,14 +1223,14 @@ func NewLimitConstraint() *LimitConstraint { func (p *LimitConstraint) GetLimit() int32 { return p.Limit } -func (p *LimitConstraint) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *LimitConstraint) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -1313,31 +1238,31 @@ func (p *LimitConstraint) Read(ctx context.Context, iprot thrift.TProtocol) erro switch fieldId { case 1: if fieldTypeId == thrift.I32 { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *LimitConstraint) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(ctx); err != nil { +func (p *LimitConstraint) ReadField1(iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.Limit = v @@ -1345,39 +1270,29 @@ func (p *LimitConstraint) ReadField1(ctx context.Context, iprot thrift.TProtoco return nil } -func (p *LimitConstraint) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "LimitConstraint"); err != nil { +func (p *LimitConstraint) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("LimitConstraint"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *LimitConstraint) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "limit", thrift.I32, 1); err != nil { +func (p *LimitConstraint) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("limit", thrift.I32, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:limit: ", p), err) } - if err := oprot.WriteI32(ctx, int32(p.Limit)); err != nil { + if err := oprot.WriteI32(int32(p.Limit)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.limit (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); 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 "" @@ -1433,14 +1348,14 @@ func (p *TaskConstraint) IsSetLimit() bool { return p.Limit != nil } -func (p *TaskConstraint) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *TaskConstraint) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -1448,109 +1363,98 @@ func (p *TaskConstraint) Read(ctx context.Context, iprot thrift.TProtocol) error switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField2(ctx, iprot); err != nil { + if err := p.ReadField2(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *TaskConstraint) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TaskConstraint) ReadField1(iprot thrift.TProtocol) error { p.Value = &ValueConstraint{} - if err := p.Value.Read(ctx, iprot); err != nil { + if err := p.Value.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Value), err) } return nil } -func (p *TaskConstraint) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TaskConstraint) ReadField2(iprot thrift.TProtocol) error { p.Limit = &LimitConstraint{} - if err := p.Limit.Read(ctx, iprot); err != nil { + if err := p.Limit.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Limit), err) } return nil } -func (p *TaskConstraint) Write(ctx context.Context, oprot thrift.TProtocol) error { +func (p *TaskConstraint) Write(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(ctx, "TaskConstraint"); err != nil { + if err := oprot.WriteStructBegin("TaskConstraint"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } - if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField2(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *TaskConstraint) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *TaskConstraint) writeField1(oprot thrift.TProtocol) (err error) { if p.IsSetValue() { - if err := oprot.WriteFieldBegin(ctx, "value", thrift.STRUCT, 1); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Value.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Value), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:value: ", p), err) } } return err } -func (p *TaskConstraint) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *TaskConstraint) writeField2(oprot thrift.TProtocol) (err error) { if p.IsSetLimit() { - if err := oprot.WriteFieldBegin(ctx, "limit", thrift.STRUCT, 2); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Limit.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Limit), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); 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 "" @@ -1587,14 +1491,14 @@ func (p *Constraint) IsSetConstraint() bool { return p.Constraint != nil } -func (p *Constraint) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *Constraint) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -1602,41 +1506,41 @@ func (p *Constraint) Read(ctx context.Context, iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRING { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField2(ctx, iprot); err != nil { + if err := p.ReadField2(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *Constraint) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *Constraint) ReadField1(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.Name = v @@ -1644,60 +1548,49 @@ func (p *Constraint) ReadField1(ctx context.Context, iprot thrift.TProtocol) er return nil } -func (p *Constraint) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { +func (p *Constraint) ReadField2(iprot thrift.TProtocol) error { p.Constraint = &TaskConstraint{} - if err := p.Constraint.Read(ctx, iprot); err != nil { + if err := p.Constraint.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Constraint), err) } return nil } -func (p *Constraint) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "Constraint"); err != nil { +func (p *Constraint) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("Constraint"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } - if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField2(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *Constraint) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "name", thrift.STRING, 1); err != nil { +func (p *Constraint) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("name", thrift.STRING, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:name: ", p), err) } - if err := oprot.WriteString(ctx, string(p.Name)); err != nil { + if err := oprot.WriteString(string(p.Name)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.name (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:name: ", p), err) } return err } -func (p *Constraint) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "constraint", thrift.STRUCT, 2); err != nil { +func (p *Constraint) writeField2(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Constraint.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Constraint), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); 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 "" @@ -1731,14 +1624,14 @@ func (p *Package) GetName() string { func (p *Package) GetVersion() int32 { return p.Version } -func (p *Package) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *Package) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -1746,51 +1639,51 @@ func (p *Package) Read(ctx context.Context, iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRING { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.STRING { - if err := p.ReadField2(ctx, iprot); err != nil { + if err := p.ReadField2(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 3: if fieldTypeId == thrift.I32 { - if err := p.ReadField3(ctx, iprot); err != nil { + if err := p.ReadField3(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *Package) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *Package) ReadField1(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.Role = v @@ -1798,8 +1691,8 @@ func (p *Package) ReadField1(ctx context.Context, iprot thrift.TProtocol) error return nil } -func (p *Package) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *Package) ReadField2(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { p.Name = v @@ -1807,8 +1700,8 @@ func (p *Package) ReadField2(ctx context.Context, iprot thrift.TProtocol) error return nil } -func (p *Package) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(ctx); err != nil { +func (p *Package) ReadField3(iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(); err != nil { return thrift.PrependError("error reading field 3: ", err) } else { p.Version = v @@ -1816,63 +1709,51 @@ func (p *Package) ReadField3(ctx context.Context, iprot thrift.TProtocol) error return nil } -func (p *Package) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "Package"); err != nil { +func (p *Package) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("Package"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != 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.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 := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *Package) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "role", thrift.STRING, 1); err != nil { +func (p *Package) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("role", thrift.STRING, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:role: ", p), err) } - if err := oprot.WriteString(ctx, string(p.Role)); err != nil { + if err := oprot.WriteString(string(p.Role)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.role (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:role: ", p), err) } return err } -func (p *Package) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "name", thrift.STRING, 2); err != nil { +func (p *Package) writeField2(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("name", thrift.STRING, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:name: ", p), err) } - if err := oprot.WriteString(ctx, string(p.Name)); err != nil { + if err := oprot.WriteString(string(p.Name)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.name (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:name: ", p), err) } return err } -func (p *Package) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "version", thrift.I32, 3); err != nil { +func (p *Package) writeField3(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("version", thrift.I32, 3); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:version: ", p), err) } - if err := oprot.WriteI32(ctx, int32(p.Version)); err != nil { + if err := oprot.WriteI32(int32(p.Version)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.version (3) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); 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 "" @@ -1902,14 +1783,14 @@ func (p *Metadata) GetKey() string { func (p *Metadata) GetValue() string { return p.Value } -func (p *Metadata) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *Metadata) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -1917,41 +1798,41 @@ func (p *Metadata) Read(ctx context.Context, iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRING { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.STRING { - if err := p.ReadField2(ctx, iprot); err != nil { + if err := p.ReadField2(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *Metadata) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *Metadata) ReadField1(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.Key = v @@ -1959,8 +1840,8 @@ func (p *Metadata) ReadField1(ctx context.Context, iprot thrift.TProtocol) erro return nil } -func (p *Metadata) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *Metadata) ReadField2(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { p.Value = v @@ -1968,51 +1849,40 @@ func (p *Metadata) ReadField2(ctx context.Context, iprot thrift.TProtocol) erro return nil } -func (p *Metadata) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "Metadata"); err != nil { +func (p *Metadata) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("Metadata"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } - if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField2(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *Metadata) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "key", thrift.STRING, 1); err != nil { +func (p *Metadata) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("key", thrift.STRING, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:key: ", p), err) } - if err := oprot.WriteString(ctx, string(p.Key)); err != nil { + if err := oprot.WriteString(string(p.Key)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.key (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:key: ", p), err) } return err } -func (p *Metadata) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "value", thrift.STRING, 2); err != nil { +func (p *Metadata) writeField2(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("value", thrift.STRING, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:value: ", p), err) } - if err := oprot.WriteString(ctx, string(p.Value)); err != nil { + if err := oprot.WriteString(string(p.Value)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.value (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); 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 "" @@ -2048,14 +1918,14 @@ func (p *JobKey) GetEnvironment() string { func (p *JobKey) GetName() string { return p.Name } -func (p *JobKey) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *JobKey) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -2063,51 +1933,51 @@ func (p *JobKey) Read(ctx context.Context, iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRING { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.STRING { - if err := p.ReadField2(ctx, iprot); err != nil { + if err := p.ReadField2(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 3: if fieldTypeId == thrift.STRING { - if err := p.ReadField3(ctx, iprot); err != nil { + if err := p.ReadField3(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *JobKey) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *JobKey) ReadField1(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.Role = v @@ -2115,8 +1985,8 @@ func (p *JobKey) ReadField1(ctx context.Context, iprot thrift.TProtocol) error return nil } -func (p *JobKey) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *JobKey) ReadField2(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { p.Environment = v @@ -2124,8 +1994,8 @@ func (p *JobKey) ReadField2(ctx context.Context, iprot thrift.TProtocol) error return nil } -func (p *JobKey) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *JobKey) ReadField3(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 3: ", err) } else { p.Name = v @@ -2133,63 +2003,51 @@ func (p *JobKey) ReadField3(ctx context.Context, iprot thrift.TProtocol) error return nil } -func (p *JobKey) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "JobKey"); err != nil { +func (p *JobKey) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("JobKey"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != 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.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 := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *JobKey) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "role", thrift.STRING, 1); err != nil { +func (p *JobKey) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("role", thrift.STRING, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:role: ", p), err) } - if err := oprot.WriteString(ctx, string(p.Role)); err != nil { + if err := oprot.WriteString(string(p.Role)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.role (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:role: ", p), err) } return err } -func (p *JobKey) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "environment", thrift.STRING, 2); err != nil { +func (p *JobKey) writeField2(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("environment", thrift.STRING, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:environment: ", p), err) } - if err := oprot.WriteString(ctx, string(p.Environment)); err != nil { + if err := oprot.WriteString(string(p.Environment)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.environment (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:environment: ", p), err) } return err } -func (p *JobKey) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "name", thrift.STRING, 3); err != nil { +func (p *JobKey) writeField3(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("name", thrift.STRING, 3); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:name: ", p), err) } - if err := oprot.WriteString(ctx, string(p.Name)); err != nil { + if err := oprot.WriteString(string(p.Name)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.name (3) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); 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 "" @@ -2229,14 +2087,14 @@ func (p *LockKey) IsSetJob() bool { return p.Job != nil } -func (p *LockKey) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *LockKey) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -2244,76 +2102,66 @@ func (p *LockKey) Read(ctx context.Context, iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *LockKey) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { +func (p *LockKey) ReadField1(iprot thrift.TProtocol) error { p.Job = &JobKey{} - if err := p.Job.Read(ctx, iprot); err != nil { + if err := p.Job.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Job), err) } return nil } -func (p *LockKey) Write(ctx context.Context, oprot thrift.TProtocol) error { +func (p *LockKey) Write(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(ctx, "LockKey"); err != nil { + if err := oprot.WriteStructBegin("LockKey"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *LockKey) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *LockKey) writeField1(oprot thrift.TProtocol) (err error) { if p.IsSetJob() { - if err := oprot.WriteFieldBegin(ctx, "job", thrift.STRUCT, 1); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Job.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Job), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); 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 "" @@ -2375,14 +2223,14 @@ func (p *Lock) IsSetMessage() bool { return p.Message != nil } -func (p *Lock) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *Lock) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -2390,79 +2238,79 @@ func (p *Lock) Read(ctx context.Context, iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.STRING { - if err := p.ReadField2(ctx, iprot); err != nil { + if err := p.ReadField2(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 3: if fieldTypeId == thrift.STRING { - if err := p.ReadField3(ctx, iprot); err != nil { + if err := p.ReadField3(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 4: if fieldTypeId == thrift.I64 { - if err := p.ReadField4(ctx, iprot); err != nil { + if err := p.ReadField4(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 5: if fieldTypeId == thrift.STRING { - if err := p.ReadField5(ctx, iprot); err != nil { + if err := p.ReadField5(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *Lock) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { +func (p *Lock) ReadField1(iprot thrift.TProtocol) error { p.Key = &LockKey{} - if err := p.Key.Read(ctx, iprot); err != nil { + if err := p.Key.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Key), err) } return nil } -func (p *Lock) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *Lock) ReadField2(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { p.Token = v @@ -2470,8 +2318,8 @@ func (p *Lock) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { return nil } -func (p *Lock) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *Lock) ReadField3(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 3: ", err) } else { p.User = v @@ -2479,8 +2327,8 @@ func (p *Lock) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { return nil } -func (p *Lock) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI64(ctx); err != nil { +func (p *Lock) ReadField4(iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(); err != nil { return thrift.PrependError("error reading field 4: ", err) } else { p.TimestampMs = v @@ -2488,8 +2336,8 @@ func (p *Lock) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { return nil } -func (p *Lock) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *Lock) ReadField5(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 5: ", err) } else { p.Message = &v @@ -2497,95 +2345,76 @@ func (p *Lock) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { return nil } -func (p *Lock) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "Lock"); err != nil { +func (p *Lock) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("Lock"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != 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.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 := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *Lock) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "key", thrift.STRUCT, 1); err != nil { +func (p *Lock) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Key.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Key), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:key: ", p), err) } return err } -func (p *Lock) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "token", thrift.STRING, 2); err != nil { +func (p *Lock) writeField2(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("token", thrift.STRING, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:token: ", p), err) } - if err := oprot.WriteString(ctx, string(p.Token)); err != nil { + if err := oprot.WriteString(string(p.Token)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.token (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:token: ", p), err) } return err } -func (p *Lock) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "user", thrift.STRING, 3); err != nil { +func (p *Lock) writeField3(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("user", thrift.STRING, 3); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:user: ", p), err) } - if err := oprot.WriteString(ctx, string(p.User)); err != nil { + if err := oprot.WriteString(string(p.User)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.user (3) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 3:user: ", p), err) } return err } -func (p *Lock) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "timestampMs", thrift.I64, 4); err != nil { +func (p *Lock) writeField4(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("timestampMs", thrift.I64, 4); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:timestampMs: ", p), err) } - if err := oprot.WriteI64(ctx, int64(p.TimestampMs)); err != nil { + if err := oprot.WriteI64(int64(p.TimestampMs)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.timestampMs (4) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 4:timestampMs: ", p), err) } return err } -func (p *Lock) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *Lock) writeField5(oprot thrift.TProtocol) (err error) { if p.IsSetMessage() { - if err := oprot.WriteFieldBegin(ctx, "message", thrift.STRING, 5); err != nil { + if err := oprot.WriteFieldBegin("message", thrift.STRING, 5); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:message: ", p), err) } - if err := oprot.WriteString(ctx, string(*p.Message)); err != nil { + if err := oprot.WriteString(string(*p.Message)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.message (5) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); 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 "" @@ -2622,14 +2451,14 @@ func (p *InstanceKey) IsSetJobKey() bool { return p.JobKey != nil } -func (p *InstanceKey) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *InstanceKey) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -2637,49 +2466,49 @@ func (p *InstanceKey) Read(ctx context.Context, iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.I32 { - if err := p.ReadField2(ctx, iprot); err != nil { + if err := p.ReadField2(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *InstanceKey) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { +func (p *InstanceKey) ReadField1(iprot thrift.TProtocol) error { p.JobKey = &JobKey{} - if err := p.JobKey.Read(ctx, iprot); err != nil { + if err := p.JobKey.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.JobKey), err) } return nil } -func (p *InstanceKey) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(ctx); err != nil { +func (p *InstanceKey) ReadField2(iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { p.InstanceId = v @@ -2687,52 +2516,41 @@ func (p *InstanceKey) ReadField2(ctx context.Context, iprot thrift.TProtocol) e return nil } -func (p *InstanceKey) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "InstanceKey"); err != nil { +func (p *InstanceKey) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("InstanceKey"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } - if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField2(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *InstanceKey) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "jobKey", thrift.STRUCT, 1); err != nil { +func (p *InstanceKey) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.JobKey.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.JobKey), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:jobKey: ", p), err) } return err } -func (p *InstanceKey) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "instanceId", thrift.I32, 2); err != nil { +func (p *InstanceKey) writeField2(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("instanceId", thrift.I32, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:instanceId: ", p), err) } - if err := oprot.WriteI32(ctx, int32(p.InstanceId)); err != nil { + if err := oprot.WriteI32(int32(p.InstanceId)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.instanceId (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); 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 "" @@ -2782,14 +2600,14 @@ func (p *MesosFetcherURI) IsSetCache() bool { return p.Cache != nil } -func (p *MesosFetcherURI) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *MesosFetcherURI) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -2797,51 +2615,51 @@ func (p *MesosFetcherURI) Read(ctx context.Context, iprot thrift.TProtocol) erro switch fieldId { case 1: if fieldTypeId == thrift.STRING { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.BOOL { - if err := p.ReadField2(ctx, iprot); err != nil { + if err := p.ReadField2(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 3: if fieldTypeId == thrift.BOOL { - if err := p.ReadField3(ctx, iprot); err != nil { + if err := p.ReadField3(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *MesosFetcherURI) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *MesosFetcherURI) ReadField1(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.Value = v @@ -2849,8 +2667,8 @@ func (p *MesosFetcherURI) ReadField1(ctx context.Context, iprot thrift.TProtoco return nil } -func (p *MesosFetcherURI) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadBool(ctx); err != nil { +func (p *MesosFetcherURI) ReadField2(iprot thrift.TProtocol) error { + if v, err := iprot.ReadBool(); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { p.Extract = &v @@ -2858,8 +2676,8 @@ func (p *MesosFetcherURI) ReadField2(ctx context.Context, iprot thrift.TProtoco return nil } -func (p *MesosFetcherURI) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadBool(ctx); err != nil { +func (p *MesosFetcherURI) ReadField3(iprot thrift.TProtocol) error { + if v, err := iprot.ReadBool(); err != nil { return thrift.PrependError("error reading field 3: ", err) } else { p.Cache = &v @@ -2867,77 +2685,55 @@ func (p *MesosFetcherURI) ReadField3(ctx context.Context, iprot thrift.TProtoco return nil } -func (p *MesosFetcherURI) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "MesosFetcherURI"); err != nil { +func (p *MesosFetcherURI) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("MesosFetcherURI"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != 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.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 := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *MesosFetcherURI) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "value", thrift.STRING, 1); err != nil { +func (p *MesosFetcherURI) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("value", thrift.STRING, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:value: ", p), err) } - if err := oprot.WriteString(ctx, string(p.Value)); err != nil { + if err := oprot.WriteString(string(p.Value)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.value (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:value: ", p), err) } return err } -func (p *MesosFetcherURI) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *MesosFetcherURI) writeField2(oprot thrift.TProtocol) (err error) { if p.IsSetExtract() { - if err := oprot.WriteFieldBegin(ctx, "extract", thrift.BOOL, 2); err != nil { + if err := oprot.WriteFieldBegin("extract", thrift.BOOL, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:extract: ", p), err) } - if err := oprot.WriteBool(ctx, bool(*p.Extract)); err != nil { + if err := oprot.WriteBool(bool(*p.Extract)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.extract (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:extract: ", p), err) } } return err } -func (p *MesosFetcherURI) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *MesosFetcherURI) writeField3(oprot thrift.TProtocol) (err error) { if p.IsSetCache() { - if err := oprot.WriteFieldBegin(ctx, "cache", thrift.BOOL, 3); err != nil { + if err := oprot.WriteFieldBegin("cache", thrift.BOOL, 3); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:cache: ", p), err) } - if err := oprot.WriteBool(ctx, bool(*p.Cache)); err != nil { + if err := oprot.WriteBool(bool(*p.Cache)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.cache (3) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); 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 "" @@ -2965,14 +2761,14 @@ func (p *ExecutorConfig) GetName() string { func (p *ExecutorConfig) GetData() string { return p.Data } -func (p *ExecutorConfig) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *ExecutorConfig) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -2980,41 +2776,41 @@ func (p *ExecutorConfig) Read(ctx context.Context, iprot thrift.TProtocol) error switch fieldId { case 1: if fieldTypeId == thrift.STRING { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.STRING { - if err := p.ReadField2(ctx, iprot); err != nil { + if err := p.ReadField2(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ExecutorConfig) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *ExecutorConfig) ReadField1(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.Name = v @@ -3022,8 +2818,8 @@ func (p *ExecutorConfig) ReadField1(ctx context.Context, iprot thrift.TProtocol return nil } -func (p *ExecutorConfig) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *ExecutorConfig) ReadField2(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { p.Data = v @@ -3031,51 +2827,40 @@ func (p *ExecutorConfig) ReadField2(ctx context.Context, iprot thrift.TProtocol return nil } -func (p *ExecutorConfig) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "ExecutorConfig"); err != nil { +func (p *ExecutorConfig) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("ExecutorConfig"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } - if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField2(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ExecutorConfig) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "name", thrift.STRING, 1); err != nil { +func (p *ExecutorConfig) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("name", thrift.STRING, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:name: ", p), err) } - if err := oprot.WriteString(ctx, string(p.Name)); err != nil { + if err := oprot.WriteString(string(p.Name)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.name (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:name: ", p), err) } return err } -func (p *ExecutorConfig) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "data", thrift.STRING, 2); err != nil { +func (p *ExecutorConfig) writeField2(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("data", thrift.STRING, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:data: ", p), err) } - if err := oprot.WriteString(ctx, string(p.Data)); err != nil { + if err := oprot.WriteString(string(p.Data)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.data (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); 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 "" @@ -3111,14 +2896,14 @@ func (p *Volume) GetHostPath() string { func (p *Volume) GetMode() Mode { return p.Mode } -func (p *Volume) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *Volume) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -3126,51 +2911,51 @@ func (p *Volume) Read(ctx context.Context, iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRING { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.STRING { - if err := p.ReadField2(ctx, iprot); err != nil { + if err := p.ReadField2(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 3: if fieldTypeId == thrift.I32 { - if err := p.ReadField3(ctx, iprot); err != nil { + if err := p.ReadField3(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *Volume) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *Volume) ReadField1(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.ContainerPath = v @@ -3178,8 +2963,8 @@ func (p *Volume) ReadField1(ctx context.Context, iprot thrift.TProtocol) error return nil } -func (p *Volume) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *Volume) ReadField2(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { p.HostPath = v @@ -3187,8 +2972,8 @@ func (p *Volume) ReadField2(ctx context.Context, iprot thrift.TProtocol) error return nil } -func (p *Volume) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(ctx); err != nil { +func (p *Volume) ReadField3(iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(); err != nil { return thrift.PrependError("error reading field 3: ", err) } else { temp := Mode(v) @@ -3197,63 +2982,51 @@ func (p *Volume) ReadField3(ctx context.Context, iprot thrift.TProtocol) error return nil } -func (p *Volume) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "Volume"); err != nil { +func (p *Volume) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("Volume"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != 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.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 := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *Volume) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "containerPath", thrift.STRING, 1); err != nil { +func (p *Volume) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("containerPath", thrift.STRING, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:containerPath: ", p), err) } - if err := oprot.WriteString(ctx, string(p.ContainerPath)); err != nil { + if err := oprot.WriteString(string(p.ContainerPath)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.containerPath (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:containerPath: ", p), err) } return err } -func (p *Volume) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "hostPath", thrift.STRING, 2); err != nil { +func (p *Volume) writeField2(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("hostPath", thrift.STRING, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:hostPath: ", p), err) } - if err := oprot.WriteString(ctx, string(p.HostPath)); err != nil { + if err := oprot.WriteString(string(p.HostPath)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.hostPath (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:hostPath: ", p), err) } return err } -func (p *Volume) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "mode", thrift.I32, 3); err != nil { +func (p *Volume) writeField3(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("mode", thrift.I32, 3); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:mode: ", p), err) } - if err := oprot.WriteI32(ctx, int32(p.Mode)); err != nil { + if err := oprot.WriteI32(int32(p.Mode)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.mode (3) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); 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 "" @@ -3283,14 +3056,14 @@ func (p *DockerImage) GetName() string { func (p *DockerImage) GetTag() string { return p.Tag } -func (p *DockerImage) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *DockerImage) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -3298,41 +3071,41 @@ func (p *DockerImage) Read(ctx context.Context, iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRING { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.STRING { - if err := p.ReadField2(ctx, iprot); err != nil { + if err := p.ReadField2(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *DockerImage) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *DockerImage) ReadField1(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.Name = v @@ -3340,8 +3113,8 @@ func (p *DockerImage) ReadField1(ctx context.Context, iprot thrift.TProtocol) e return nil } -func (p *DockerImage) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *DockerImage) ReadField2(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { p.Tag = v @@ -3349,51 +3122,40 @@ func (p *DockerImage) ReadField2(ctx context.Context, iprot thrift.TProtocol) e return nil } -func (p *DockerImage) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "DockerImage"); err != nil { +func (p *DockerImage) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("DockerImage"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } - if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField2(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *DockerImage) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "name", thrift.STRING, 1); err != nil { +func (p *DockerImage) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("name", thrift.STRING, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:name: ", p), err) } - if err := oprot.WriteString(ctx, string(p.Name)); err != nil { + if err := oprot.WriteString(string(p.Name)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.name (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:name: ", p), err) } return err } -func (p *DockerImage) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "tag", thrift.STRING, 2); err != nil { +func (p *DockerImage) writeField2(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("tag", thrift.STRING, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:tag: ", p), err) } - if err := oprot.WriteString(ctx, string(p.Tag)); err != nil { + if err := oprot.WriteString(string(p.Tag)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.tag (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); 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 "" @@ -3423,14 +3185,14 @@ func (p *AppcImage) GetName() string { func (p *AppcImage) GetImageId() string { return p.ImageId } -func (p *AppcImage) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *AppcImage) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -3438,41 +3200,41 @@ func (p *AppcImage) Read(ctx context.Context, iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRING { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.STRING { - if err := p.ReadField2(ctx, iprot); err != nil { + if err := p.ReadField2(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AppcImage) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *AppcImage) ReadField1(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.Name = v @@ -3480,8 +3242,8 @@ func (p *AppcImage) ReadField1(ctx context.Context, iprot thrift.TProtocol) err return nil } -func (p *AppcImage) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *AppcImage) ReadField2(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { p.ImageId = v @@ -3489,51 +3251,40 @@ func (p *AppcImage) ReadField2(ctx context.Context, iprot thrift.TProtocol) err return nil } -func (p *AppcImage) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "AppcImage"); err != nil { +func (p *AppcImage) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("AppcImage"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } - if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField2(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AppcImage) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "name", thrift.STRING, 1); err != nil { +func (p *AppcImage) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("name", thrift.STRING, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:name: ", p), err) } - if err := oprot.WriteString(ctx, string(p.Name)); err != nil { + if err := oprot.WriteString(string(p.Name)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.name (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:name: ", p), err) } return err } -func (p *AppcImage) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "imageId", thrift.STRING, 2); err != nil { +func (p *AppcImage) writeField2(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("imageId", thrift.STRING, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:imageId: ", p), err) } - if err := oprot.WriteString(ctx, string(p.ImageId)); err != nil { + if err := oprot.WriteString(string(p.ImageId)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.imageId (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); 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 "" @@ -3589,14 +3340,14 @@ func (p *Image) IsSetAppc() bool { return p.Appc != nil } -func (p *Image) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *Image) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -3604,109 +3355,98 @@ func (p *Image) Read(ctx context.Context, iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField2(ctx, iprot); err != nil { + if err := p.ReadField2(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *Image) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { +func (p *Image) ReadField1(iprot thrift.TProtocol) error { p.Docker = &DockerImage{} - if err := p.Docker.Read(ctx, iprot); err != nil { + if err := p.Docker.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Docker), err) } return nil } -func (p *Image) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { +func (p *Image) ReadField2(iprot thrift.TProtocol) error { p.Appc = &AppcImage{} - if err := p.Appc.Read(ctx, iprot); err != nil { + if err := p.Appc.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Appc), err) } return nil } -func (p *Image) Write(ctx context.Context, oprot thrift.TProtocol) error { +func (p *Image) Write(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(ctx, "Image"); err != nil { + if err := oprot.WriteStructBegin("Image"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } - if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField2(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *Image) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *Image) writeField1(oprot thrift.TProtocol) (err error) { if p.IsSetDocker() { - if err := oprot.WriteFieldBegin(ctx, "docker", thrift.STRUCT, 1); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Docker.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Docker), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:docker: ", p), err) } } return err } -func (p *Image) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *Image) writeField2(oprot thrift.TProtocol) (err error) { if p.IsSetAppc() { - if err := oprot.WriteFieldBegin(ctx, "appc", thrift.STRUCT, 2); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Appc.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Appc), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); 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 "" @@ -3748,14 +3488,14 @@ func (p *MesosContainer) IsSetVolumes() bool { return p.Volumes != nil } -func (p *MesosContainer) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *MesosContainer) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -3763,130 +3503,115 @@ func (p *MesosContainer) Read(ctx context.Context, iprot thrift.TProtocol) error switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.LIST { - if err := p.ReadField2(ctx, iprot); err != nil { + if err := p.ReadField2(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *MesosContainer) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { +func (p *MesosContainer) ReadField1(iprot thrift.TProtocol) error { p.Image = &Image{} - if err := p.Image.Read(ctx, iprot); err != nil { + if err := p.Image.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Image), err) } return nil } -func (p *MesosContainer) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin(ctx) +func (p *MesosContainer) ReadField2(iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin() 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 ++ { - _elem6 := &Volume{} - if err := _elem6.Read(ctx, iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem6), err) + _elem3 := &Volume{} + if err := _elem3.Read(iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem3), err) } - p.Volumes = append(p.Volumes, _elem6) + p.Volumes = append(p.Volumes, _elem3) } - if err := iprot.ReadListEnd(ctx); err != nil { + if err := iprot.ReadListEnd(); err != nil { return thrift.PrependError("error reading list end: ", err) } return nil } -func (p *MesosContainer) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "MesosContainer"); err != nil { +func (p *MesosContainer) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("MesosContainer"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } - if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField2(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *MesosContainer) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *MesosContainer) writeField1(oprot thrift.TProtocol) (err error) { if p.IsSetImage() { - if err := oprot.WriteFieldBegin(ctx, "image", thrift.STRUCT, 1); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Image.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Image), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:image: ", p), err) } } return err } -func (p *MesosContainer) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *MesosContainer) writeField2(oprot thrift.TProtocol) (err error) { if p.IsSetVolumes() { - if err := oprot.WriteFieldBegin(ctx, "volumes", thrift.LIST, 2); err != nil { + if err := oprot.WriteFieldBegin("volumes", thrift.LIST, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:volumes: ", p), err) } - if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.Volumes)); err != nil { + if err := oprot.WriteListBegin(thrift.STRUCT, len(p.Volumes)); err != nil { return thrift.PrependError("error writing list begin: ", err) } for _, v := range p.Volumes { - if err := v.Write(ctx, oprot); err != nil { + if err := v.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) } } - if err := oprot.WriteListEnd(ctx); err != nil { + if err := oprot.WriteListEnd(); err != nil { return thrift.PrependError("error writing list end: ", err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); 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 "" @@ -3916,14 +3641,14 @@ func (p *DockerParameter) GetName() string { func (p *DockerParameter) GetValue() string { return p.Value } -func (p *DockerParameter) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *DockerParameter) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -3931,41 +3656,41 @@ func (p *DockerParameter) Read(ctx context.Context, iprot thrift.TProtocol) erro switch fieldId { case 1: if fieldTypeId == thrift.STRING { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.STRING { - if err := p.ReadField2(ctx, iprot); err != nil { + if err := p.ReadField2(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *DockerParameter) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *DockerParameter) ReadField1(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.Name = v @@ -3973,8 +3698,8 @@ func (p *DockerParameter) ReadField1(ctx context.Context, iprot thrift.TProtoco return nil } -func (p *DockerParameter) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *DockerParameter) ReadField2(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { p.Value = v @@ -3982,51 +3707,40 @@ func (p *DockerParameter) ReadField2(ctx context.Context, iprot thrift.TProtoco return nil } -func (p *DockerParameter) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "DockerParameter"); err != nil { +func (p *DockerParameter) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("DockerParameter"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } - if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField2(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *DockerParameter) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "name", thrift.STRING, 1); err != nil { +func (p *DockerParameter) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("name", thrift.STRING, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:name: ", p), err) } - if err := oprot.WriteString(ctx, string(p.Name)); err != nil { + if err := oprot.WriteString(string(p.Name)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.name (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:name: ", p), err) } return err } -func (p *DockerParameter) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "value", thrift.STRING, 2); err != nil { +func (p *DockerParameter) writeField2(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("value", thrift.STRING, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:value: ", p), err) } - if err := oprot.WriteString(ctx, string(p.Value)); err != nil { + if err := oprot.WriteString(string(p.Value)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.value (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); 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 "" @@ -4061,14 +3775,14 @@ func (p *DockerContainer) IsSetParameters() bool { return p.Parameters != nil } -func (p *DockerContainer) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *DockerContainer) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -4076,41 +3790,41 @@ func (p *DockerContainer) Read(ctx context.Context, iprot thrift.TProtocol) erro switch fieldId { case 1: if fieldTypeId == thrift.STRING { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.LIST { - if err := p.ReadField2(ctx, iprot); err != nil { + if err := p.ReadField2(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *DockerContainer) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *DockerContainer) ReadField1(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.Image = v @@ -4118,86 +3832,71 @@ func (p *DockerContainer) ReadField1(ctx context.Context, iprot thrift.TProtoco return nil } -func (p *DockerContainer) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin(ctx) +func (p *DockerContainer) ReadField2(iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin() 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 ++ { - _elem8 := &DockerParameter{} - if err := _elem8.Read(ctx, iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem8), err) + _elem4 := &DockerParameter{} + if err := _elem4.Read(iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem4), err) } - p.Parameters = append(p.Parameters, _elem8) + p.Parameters = append(p.Parameters, _elem4) } - if err := iprot.ReadListEnd(ctx); err != nil { + if err := iprot.ReadListEnd(); err != nil { return thrift.PrependError("error reading list end: ", err) } return nil } -func (p *DockerContainer) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "DockerContainer"); err != nil { +func (p *DockerContainer) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("DockerContainer"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } - if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField2(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *DockerContainer) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "image", thrift.STRING, 1); err != nil { +func (p *DockerContainer) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("image", thrift.STRING, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:image: ", p), err) } - if err := oprot.WriteString(ctx, string(p.Image)); err != nil { + if err := oprot.WriteString(string(p.Image)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.image (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:image: ", p), err) } return err } -func (p *DockerContainer) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *DockerContainer) writeField2(oprot thrift.TProtocol) (err error) { if p.IsSetParameters() { - if err := oprot.WriteFieldBegin(ctx, "parameters", thrift.LIST, 2); err != nil { + if err := oprot.WriteFieldBegin("parameters", thrift.LIST, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:parameters: ", p), err) } - if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.Parameters)); err != nil { + if err := oprot.WriteListBegin(thrift.STRUCT, len(p.Parameters)); err != nil { return thrift.PrependError("error writing list begin: ", err) } for _, v := range p.Parameters { - if err := v.Write(ctx, oprot); err != nil { + if err := v.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) } } - if err := oprot.WriteListEnd(ctx); err != nil { + if err := oprot.WriteListEnd(); err != nil { return thrift.PrependError("error writing list end: ", err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); 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 "" @@ -4253,14 +3952,14 @@ func (p *Container) IsSetDocker() bool { return p.Docker != nil } -func (p *Container) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *Container) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -4268,109 +3967,98 @@ func (p *Container) Read(ctx context.Context, iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField2(ctx, iprot); err != nil { + if err := p.ReadField2(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *Container) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { +func (p *Container) ReadField1(iprot thrift.TProtocol) error { p.Mesos = &MesosContainer{} - if err := p.Mesos.Read(ctx, iprot); err != nil { + if err := p.Mesos.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Mesos), err) } return nil } -func (p *Container) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { +func (p *Container) ReadField2(iprot thrift.TProtocol) error { p.Docker = &DockerContainer{} - if err := p.Docker.Read(ctx, iprot); err != nil { + if err := p.Docker.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Docker), err) } return nil } -func (p *Container) Write(ctx context.Context, oprot thrift.TProtocol) error { +func (p *Container) Write(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(ctx, "Container"); err != nil { + if err := oprot.WriteStructBegin("Container"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } - if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField2(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *Container) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *Container) writeField1(oprot thrift.TProtocol) (err error) { if p.IsSetMesos() { - if err := oprot.WriteFieldBegin(ctx, "mesos", thrift.STRUCT, 1); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Mesos.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Mesos), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:mesos: ", p), err) } } return err } -func (p *Container) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *Container) writeField2(oprot thrift.TProtocol) (err error) { if p.IsSetDocker() { - if err := oprot.WriteFieldBegin(ctx, "docker", thrift.STRUCT, 2); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Docker.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Docker), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); 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 "" @@ -4474,14 +4162,14 @@ func (p *Resource) IsSetNumGpus() bool { return p.NumGpus != nil } -func (p *Resource) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *Resource) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -4489,71 +4177,71 @@ func (p *Resource) Read(ctx context.Context, iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.DOUBLE { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.I64 { - if err := p.ReadField2(ctx, iprot); err != nil { + if err := p.ReadField2(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 3: if fieldTypeId == thrift.I64 { - if err := p.ReadField3(ctx, iprot); err != nil { + if err := p.ReadField3(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 4: if fieldTypeId == thrift.STRING { - if err := p.ReadField4(ctx, iprot); err != nil { + if err := p.ReadField4(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 5: if fieldTypeId == thrift.I64 { - if err := p.ReadField5(ctx, iprot); err != nil { + if err := p.ReadField5(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *Resource) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadDouble(ctx); err != nil { +func (p *Resource) ReadField1(iprot thrift.TProtocol) error { + if v, err := iprot.ReadDouble(); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.NumCpus = &v @@ -4561,8 +4249,8 @@ func (p *Resource) ReadField1(ctx context.Context, iprot thrift.TProtocol) erro return nil } -func (p *Resource) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI64(ctx); err != nil { +func (p *Resource) ReadField2(iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { p.RamMb = &v @@ -4570,8 +4258,8 @@ func (p *Resource) ReadField2(ctx context.Context, iprot thrift.TProtocol) erro return nil } -func (p *Resource) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI64(ctx); err != nil { +func (p *Resource) ReadField3(iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(); err != nil { return thrift.PrependError("error reading field 3: ", err) } else { p.DiskMb = &v @@ -4579,8 +4267,8 @@ func (p *Resource) ReadField3(ctx context.Context, iprot thrift.TProtocol) erro return nil } -func (p *Resource) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *Resource) ReadField4(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 4: ", err) } else { p.NamedPort = &v @@ -4588,8 +4276,8 @@ func (p *Resource) ReadField4(ctx context.Context, iprot thrift.TProtocol) erro return nil } -func (p *Resource) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI64(ctx); err != nil { +func (p *Resource) ReadField5(iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(); err != nil { return thrift.PrependError("error reading field 5: ", err) } else { p.NumGpus = &v @@ -4597,125 +4285,86 @@ func (p *Resource) ReadField5(ctx context.Context, iprot thrift.TProtocol) erro return nil } -func (p *Resource) Write(ctx context.Context, oprot thrift.TProtocol) error { +func (p *Resource) Write(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(ctx, "Resource"); err != nil { + if err := oprot.WriteStructBegin("Resource"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != 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.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 := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *Resource) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *Resource) writeField1(oprot thrift.TProtocol) (err error) { if p.IsSetNumCpus() { - if err := oprot.WriteFieldBegin(ctx, "numCpus", thrift.DOUBLE, 1); err != nil { + if err := oprot.WriteFieldBegin("numCpus", thrift.DOUBLE, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:numCpus: ", p), err) } - if err := oprot.WriteDouble(ctx, float64(*p.NumCpus)); err != nil { + if err := oprot.WriteDouble(float64(*p.NumCpus)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.numCpus (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:numCpus: ", p), err) } } return err } -func (p *Resource) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *Resource) writeField2(oprot thrift.TProtocol) (err error) { if p.IsSetRamMb() { - if err := oprot.WriteFieldBegin(ctx, "ramMb", thrift.I64, 2); err != nil { + if err := oprot.WriteFieldBegin("ramMb", thrift.I64, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:ramMb: ", p), err) } - if err := oprot.WriteI64(ctx, int64(*p.RamMb)); err != nil { + if err := oprot.WriteI64(int64(*p.RamMb)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.ramMb (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:ramMb: ", p), err) } } return err } -func (p *Resource) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *Resource) writeField3(oprot thrift.TProtocol) (err error) { if p.IsSetDiskMb() { - if err := oprot.WriteFieldBegin(ctx, "diskMb", thrift.I64, 3); err != nil { + if err := oprot.WriteFieldBegin("diskMb", thrift.I64, 3); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:diskMb: ", p), err) } - if err := oprot.WriteI64(ctx, int64(*p.DiskMb)); err != nil { + if err := oprot.WriteI64(int64(*p.DiskMb)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.diskMb (3) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 3:diskMb: ", p), err) } } return err } -func (p *Resource) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *Resource) writeField4(oprot thrift.TProtocol) (err error) { if p.IsSetNamedPort() { - if err := oprot.WriteFieldBegin(ctx, "namedPort", thrift.STRING, 4); err != nil { + if err := oprot.WriteFieldBegin("namedPort", thrift.STRING, 4); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:namedPort: ", p), err) } - if err := oprot.WriteString(ctx, string(*p.NamedPort)); err != nil { + if err := oprot.WriteString(string(*p.NamedPort)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.namedPort (4) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 4:namedPort: ", p), err) } } return err } -func (p *Resource) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *Resource) writeField5(oprot thrift.TProtocol) (err error) { if p.IsSetNumGpus() { - if err := oprot.WriteFieldBegin(ctx, "numGpus", thrift.I64, 5); err != nil { + if err := oprot.WriteFieldBegin("numGpus", thrift.I64, 5); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:numGpus: ", p), err) } - if err := oprot.WriteI64(ctx, int64(*p.NumGpus)); err != nil { + if err := oprot.WriteI64(int64(*p.NumGpus)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.numGpus (5) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); 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 "" @@ -4750,14 +4399,14 @@ func (p *PartitionPolicy) IsSetDelaySecs() bool { return p.DelaySecs != nil } -func (p *PartitionPolicy) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *PartitionPolicy) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -4765,41 +4414,41 @@ func (p *PartitionPolicy) Read(ctx context.Context, iprot thrift.TProtocol) erro switch fieldId { case 1: if fieldTypeId == thrift.BOOL { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.I64 { - if err := p.ReadField2(ctx, iprot); err != nil { + if err := p.ReadField2(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *PartitionPolicy) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadBool(ctx); err != nil { +func (p *PartitionPolicy) ReadField1(iprot thrift.TProtocol) error { + if v, err := iprot.ReadBool(); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.Reschedule = v @@ -4807,8 +4456,8 @@ func (p *PartitionPolicy) ReadField1(ctx context.Context, iprot thrift.TProtoco return nil } -func (p *PartitionPolicy) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI64(ctx); err != nil { +func (p *PartitionPolicy) ReadField2(iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { p.DelaySecs = &v @@ -4816,58 +4465,42 @@ func (p *PartitionPolicy) ReadField2(ctx context.Context, iprot thrift.TProtoco return nil } -func (p *PartitionPolicy) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "PartitionPolicy"); err != nil { +func (p *PartitionPolicy) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("PartitionPolicy"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } - if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField2(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *PartitionPolicy) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "reschedule", thrift.BOOL, 1); err != nil { +func (p *PartitionPolicy) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("reschedule", thrift.BOOL, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:reschedule: ", p), err) } - if err := oprot.WriteBool(ctx, bool(p.Reschedule)); err != nil { + if err := oprot.WriteBool(bool(p.Reschedule)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.reschedule (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:reschedule: ", p), err) } return err } -func (p *PartitionPolicy) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *PartitionPolicy) writeField2(oprot thrift.TProtocol) (err error) { if p.IsSetDelaySecs() { - if err := oprot.WriteFieldBegin(ctx, "delaySecs", thrift.I64, 2); err != nil { + if err := oprot.WriteFieldBegin("delaySecs", thrift.I64, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:delaySecs: ", p), err) } - if err := oprot.WriteI64(ctx, int64(*p.DelaySecs)); err != nil { + if err := oprot.WriteI64(int64(*p.DelaySecs)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.delaySecs (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); 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 "" @@ -4897,14 +4530,14 @@ func (p *PercentageSlaPolicy) GetPercentage() float64 { func (p *PercentageSlaPolicy) GetDurationSecs() int64 { return p.DurationSecs } -func (p *PercentageSlaPolicy) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *PercentageSlaPolicy) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -4912,41 +4545,41 @@ func (p *PercentageSlaPolicy) Read(ctx context.Context, iprot thrift.TProtocol) switch fieldId { case 1: if fieldTypeId == thrift.DOUBLE { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.I64 { - if err := p.ReadField2(ctx, iprot); err != nil { + if err := p.ReadField2(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *PercentageSlaPolicy) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadDouble(ctx); err != nil { +func (p *PercentageSlaPolicy) ReadField1(iprot thrift.TProtocol) error { + if v, err := iprot.ReadDouble(); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.Percentage = v @@ -4954,8 +4587,8 @@ func (p *PercentageSlaPolicy) ReadField1(ctx context.Context, iprot thrift.TPro return nil } -func (p *PercentageSlaPolicy) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI64(ctx); err != nil { +func (p *PercentageSlaPolicy) ReadField2(iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { p.DurationSecs = v @@ -4963,51 +4596,40 @@ func (p *PercentageSlaPolicy) ReadField2(ctx context.Context, iprot thrift.TPro return nil } -func (p *PercentageSlaPolicy) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "PercentageSlaPolicy"); err != nil { +func (p *PercentageSlaPolicy) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("PercentageSlaPolicy"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } - if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField2(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *PercentageSlaPolicy) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "percentage", thrift.DOUBLE, 1); err != nil { +func (p *PercentageSlaPolicy) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("percentage", thrift.DOUBLE, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:percentage: ", p), err) } - if err := oprot.WriteDouble(ctx, float64(p.Percentage)); err != nil { + if err := oprot.WriteDouble(float64(p.Percentage)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.percentage (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:percentage: ", p), err) } return err } -func (p *PercentageSlaPolicy) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "durationSecs", thrift.I64, 2); err != nil { +func (p *PercentageSlaPolicy) writeField2(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("durationSecs", thrift.I64, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:durationSecs: ", p), err) } - if err := oprot.WriteI64(ctx, int64(p.DurationSecs)); err != nil { + if err := oprot.WriteI64(int64(p.DurationSecs)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.durationSecs (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); 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 "" @@ -5037,14 +4659,14 @@ func (p *CountSlaPolicy) GetCount() int64 { func (p *CountSlaPolicy) GetDurationSecs() int64 { return p.DurationSecs } -func (p *CountSlaPolicy) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *CountSlaPolicy) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -5052,41 +4674,41 @@ func (p *CountSlaPolicy) Read(ctx context.Context, iprot thrift.TProtocol) error switch fieldId { case 1: if fieldTypeId == thrift.I64 { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.I64 { - if err := p.ReadField2(ctx, iprot); err != nil { + if err := p.ReadField2(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *CountSlaPolicy) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI64(ctx); err != nil { +func (p *CountSlaPolicy) ReadField1(iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.Count = v @@ -5094,8 +4716,8 @@ func (p *CountSlaPolicy) ReadField1(ctx context.Context, iprot thrift.TProtocol return nil } -func (p *CountSlaPolicy) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI64(ctx); err != nil { +func (p *CountSlaPolicy) ReadField2(iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { p.DurationSecs = v @@ -5103,51 +4725,40 @@ func (p *CountSlaPolicy) ReadField2(ctx context.Context, iprot thrift.TProtocol return nil } -func (p *CountSlaPolicy) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "CountSlaPolicy"); err != nil { +func (p *CountSlaPolicy) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("CountSlaPolicy"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } - if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField2(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *CountSlaPolicy) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "count", thrift.I64, 1); err != nil { +func (p *CountSlaPolicy) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("count", thrift.I64, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:count: ", p), err) } - if err := oprot.WriteI64(ctx, int64(p.Count)); err != nil { + if err := oprot.WriteI64(int64(p.Count)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.count (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:count: ", p), err) } return err } -func (p *CountSlaPolicy) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "durationSecs", thrift.I64, 2); err != nil { +func (p *CountSlaPolicy) writeField2(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("durationSecs", thrift.I64, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:durationSecs: ", p), err) } - if err := oprot.WriteI64(ctx, int64(p.DurationSecs)); err != nil { + if err := oprot.WriteI64(int64(p.DurationSecs)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.durationSecs (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); 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 "" @@ -5177,14 +4788,14 @@ func (p *CoordinatorSlaPolicy) GetCoordinatorUrl() string { func (p *CoordinatorSlaPolicy) GetStatusKey() string { return p.StatusKey } -func (p *CoordinatorSlaPolicy) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *CoordinatorSlaPolicy) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -5192,41 +4803,41 @@ func (p *CoordinatorSlaPolicy) Read(ctx context.Context, iprot thrift.TProtocol) switch fieldId { case 1: if fieldTypeId == thrift.STRING { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.STRING { - if err := p.ReadField2(ctx, iprot); err != nil { + if err := p.ReadField2(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *CoordinatorSlaPolicy) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *CoordinatorSlaPolicy) ReadField1(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.CoordinatorUrl = v @@ -5234,8 +4845,8 @@ func (p *CoordinatorSlaPolicy) ReadField1(ctx context.Context, iprot thrift.TPr return nil } -func (p *CoordinatorSlaPolicy) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *CoordinatorSlaPolicy) ReadField2(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { p.StatusKey = v @@ -5243,51 +4854,40 @@ func (p *CoordinatorSlaPolicy) ReadField2(ctx context.Context, iprot thrift.TPr return nil } -func (p *CoordinatorSlaPolicy) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "CoordinatorSlaPolicy"); err != nil { +func (p *CoordinatorSlaPolicy) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("CoordinatorSlaPolicy"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } - if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField2(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *CoordinatorSlaPolicy) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "coordinatorUrl", thrift.STRING, 1); err != nil { +func (p *CoordinatorSlaPolicy) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("coordinatorUrl", thrift.STRING, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:coordinatorUrl: ", p), err) } - if err := oprot.WriteString(ctx, string(p.CoordinatorUrl)); err != nil { + if err := oprot.WriteString(string(p.CoordinatorUrl)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.coordinatorUrl (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:coordinatorUrl: ", p), err) } return err } -func (p *CoordinatorSlaPolicy) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "statusKey", thrift.STRING, 2); err != nil { +func (p *CoordinatorSlaPolicy) writeField2(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("statusKey", thrift.STRING, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:statusKey: ", p), err) } - if err := oprot.WriteString(ctx, string(p.StatusKey)); err != nil { + if err := oprot.WriteString(string(p.StatusKey)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.statusKey (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); 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 "" @@ -5359,14 +4959,14 @@ func (p *SlaPolicy) IsSetCoordinatorSlaPolicy() bool { return p.CoordinatorSlaPolicy != nil } -func (p *SlaPolicy) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *SlaPolicy) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -5374,142 +4974,130 @@ func (p *SlaPolicy) Read(ctx context.Context, iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField2(ctx, iprot); err != nil { + if err := p.ReadField2(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 3: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField3(ctx, iprot); err != nil { + if err := p.ReadField3(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *SlaPolicy) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { +func (p *SlaPolicy) ReadField1(iprot thrift.TProtocol) error { p.PercentageSlaPolicy = &PercentageSlaPolicy{} - if err := p.PercentageSlaPolicy.Read(ctx, iprot); err != nil { + if err := p.PercentageSlaPolicy.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.PercentageSlaPolicy), err) } return nil } -func (p *SlaPolicy) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { +func (p *SlaPolicy) ReadField2(iprot thrift.TProtocol) error { p.CountSlaPolicy = &CountSlaPolicy{} - if err := p.CountSlaPolicy.Read(ctx, iprot); err != nil { + if err := p.CountSlaPolicy.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.CountSlaPolicy), err) } return nil } -func (p *SlaPolicy) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { +func (p *SlaPolicy) ReadField3(iprot thrift.TProtocol) error { p.CoordinatorSlaPolicy = &CoordinatorSlaPolicy{} - if err := p.CoordinatorSlaPolicy.Read(ctx, iprot); err != nil { + if err := p.CoordinatorSlaPolicy.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.CoordinatorSlaPolicy), err) } return nil } -func (p *SlaPolicy) Write(ctx context.Context, oprot thrift.TProtocol) error { +func (p *SlaPolicy) Write(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(ctx, "SlaPolicy"); err != nil { + if err := oprot.WriteStructBegin("SlaPolicy"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != 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.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 := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *SlaPolicy) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *SlaPolicy) writeField1(oprot thrift.TProtocol) (err error) { if p.IsSetPercentageSlaPolicy() { - if err := oprot.WriteFieldBegin(ctx, "percentageSlaPolicy", thrift.STRUCT, 1); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.PercentageSlaPolicy.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.PercentageSlaPolicy), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:percentageSlaPolicy: ", p), err) } } return err } -func (p *SlaPolicy) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *SlaPolicy) writeField2(oprot thrift.TProtocol) (err error) { if p.IsSetCountSlaPolicy() { - if err := oprot.WriteFieldBegin(ctx, "countSlaPolicy", thrift.STRUCT, 2); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.CountSlaPolicy.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.CountSlaPolicy), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:countSlaPolicy: ", p), err) } } return err } -func (p *SlaPolicy) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *SlaPolicy) writeField3(oprot thrift.TProtocol) (err error) { if p.IsSetCoordinatorSlaPolicy() { - if err := oprot.WriteFieldBegin(ctx, "coordinatorSlaPolicy", thrift.STRUCT, 3); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.CoordinatorSlaPolicy.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.CoordinatorSlaPolicy), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); 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 "" @@ -5720,14 +5308,14 @@ func (p *TaskConfig) IsSetContainer() bool { return p.Container != nil } -func (p *TaskConfig) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *TaskConfig) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -5735,207 +5323,207 @@ func (p *TaskConfig) Read(ctx context.Context, iprot thrift.TProtocol) error { switch fieldId { case 28: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField28(ctx, iprot); err != nil { + if err := p.ReadField28(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 17: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField17(ctx, iprot); err != nil { + if err := p.ReadField17(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 7: if fieldTypeId == thrift.BOOL { - if err := p.ReadField7(ctx, iprot); err != nil { + if err := p.ReadField7(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 11: if fieldTypeId == thrift.I32 { - if err := p.ReadField11(ctx, iprot); err != nil { + if err := p.ReadField11(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 13: if fieldTypeId == thrift.I32 { - if err := p.ReadField13(ctx, iprot); err != nil { + if err := p.ReadField13(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 18: if fieldTypeId == thrift.BOOL { - if err := p.ReadField18(ctx, iprot); err != nil { + if err := p.ReadField18(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 30: if fieldTypeId == thrift.STRING { - if err := p.ReadField30(ctx, iprot); err != nil { + if err := p.ReadField30(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 32: if fieldTypeId == thrift.SET { - if err := p.ReadField32(ctx, iprot); err != nil { + if err := p.ReadField32(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 20: if fieldTypeId == thrift.SET { - if err := p.ReadField20(ctx, iprot); err != nil { + if err := p.ReadField20(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 33: if fieldTypeId == thrift.SET { - if err := p.ReadField33(ctx, iprot); err != nil { + if err := p.ReadField33(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 22: if fieldTypeId == thrift.MAP { - if err := p.ReadField22(ctx, iprot); err != nil { + if err := p.ReadField22(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 23: if fieldTypeId == thrift.STRING { - if err := p.ReadField23(ctx, iprot); err != nil { + if err := p.ReadField23(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 25: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField25(ctx, iprot); err != nil { + if err := p.ReadField25(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 27: if fieldTypeId == thrift.SET { - if err := p.ReadField27(ctx, iprot); err != nil { + if err := p.ReadField27(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 34: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField34(ctx, iprot); err != nil { + if err := p.ReadField34(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 35: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField35(ctx, iprot); err != nil { + if err := p.ReadField35(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 29: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField29(ctx, iprot); err != nil { + if err := p.ReadField29(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *TaskConfig) ReadField28(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TaskConfig) ReadField28(iprot thrift.TProtocol) error { p.Job = &JobKey{} - if err := p.Job.Read(ctx, iprot); err != nil { + if err := p.Job.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Job), err) } return nil } -func (p *TaskConfig) ReadField17(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TaskConfig) ReadField17(iprot thrift.TProtocol) error { p.Owner = &Identity{} - if err := p.Owner.Read(ctx, iprot); err != nil { + if err := p.Owner.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Owner), err) } return nil } -func (p *TaskConfig) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadBool(ctx); err != nil { +func (p *TaskConfig) ReadField7(iprot thrift.TProtocol) error { + if v, err := iprot.ReadBool(); err != nil { return thrift.PrependError("error reading field 7: ", err) } else { p.IsService = v @@ -5943,8 +5531,8 @@ func (p *TaskConfig) ReadField7(ctx context.Context, iprot thrift.TProtocol) er return nil } -func (p *TaskConfig) ReadField11(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(ctx); err != nil { +func (p *TaskConfig) ReadField11(iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(); err != nil { return thrift.PrependError("error reading field 11: ", err) } else { p.Priority = v @@ -5952,8 +5540,8 @@ func (p *TaskConfig) ReadField11(ctx context.Context, iprot thrift.TProtocol) e return nil } -func (p *TaskConfig) ReadField13(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(ctx); err != nil { +func (p *TaskConfig) ReadField13(iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(); err != nil { return thrift.PrependError("error reading field 13: ", err) } else { p.MaxTaskFailures = v @@ -5961,8 +5549,8 @@ func (p *TaskConfig) ReadField13(ctx context.Context, iprot thrift.TProtocol) e return nil } -func (p *TaskConfig) ReadField18(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadBool(ctx); err != nil { +func (p *TaskConfig) ReadField18(iprot thrift.TProtocol) error { + if v, err := iprot.ReadBool(); err != nil { return thrift.PrependError("error reading field 18: ", err) } else { p.Production = &v @@ -5970,8 +5558,8 @@ func (p *TaskConfig) ReadField18(ctx context.Context, iprot thrift.TProtocol) e return nil } -func (p *TaskConfig) ReadField30(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *TaskConfig) ReadField30(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 30: ", err) } else { p.Tier = &v @@ -5979,96 +5567,96 @@ func (p *TaskConfig) ReadField30(ctx context.Context, iprot thrift.TProtocol) e return nil } -func (p *TaskConfig) ReadField32(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin(ctx) +func (p *TaskConfig) ReadField32(iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin() 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 ++ { - _elem10 := &Resource{} - if err := _elem10.Read(ctx, iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem10), err) + _elem5 := &Resource{} + if err := _elem5.Read(iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem5), err) } - p.Resources = append(p.Resources, _elem10) + p.Resources = append(p.Resources, _elem5) } - if err := iprot.ReadSetEnd(ctx); err != nil { + if err := iprot.ReadSetEnd(); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *TaskConfig) ReadField20(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin(ctx) +func (p *TaskConfig) ReadField20(iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin() 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 ++ { - _elem11 := &Constraint{} - if err := _elem11.Read(ctx, iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem11), err) + _elem6 := &Constraint{} + if err := _elem6.Read(iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem6), err) } - p.Constraints = append(p.Constraints, _elem11) + p.Constraints = append(p.Constraints, _elem6) } - if err := iprot.ReadSetEnd(ctx); err != nil { + if err := iprot.ReadSetEnd(); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *TaskConfig) ReadField33(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin(ctx) +func (p *TaskConfig) ReadField33(iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin() 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 ++ { - _elem12 := &MesosFetcherURI{} - if err := _elem12.Read(ctx, iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem12), err) + _elem7 := &MesosFetcherURI{} + if err := _elem7.Read(iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem7), err) } - p.MesosFetcherUris = append(p.MesosFetcherUris, _elem12) + p.MesosFetcherUris = append(p.MesosFetcherUris, _elem7) } - if err := iprot.ReadSetEnd(ctx); err != nil { + if err := iprot.ReadSetEnd(); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *TaskConfig) ReadField22(ctx context.Context, iprot thrift.TProtocol) error { - _, _, size, err := iprot.ReadMapBegin(ctx) +func (p *TaskConfig) ReadField22(iprot thrift.TProtocol) error { + _, _, size, err := iprot.ReadMapBegin() 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 _key13 string - if v, err := iprot.ReadString(ctx); err != nil { +var _key8 string + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _key13 = v + _key8 = v } -var _val14 string - if v, err := iprot.ReadString(ctx); err != nil { +var _val9 string + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _val14 = v + _val9 = v } - p.TaskLinks[_key13] = _val14 + p.TaskLinks[_key8] = _val9 } - if err := iprot.ReadMapEnd(ctx); err != nil { + if err := iprot.ReadMapEnd(); err != nil { return thrift.PrependError("error reading map end: ", err) } return nil } -func (p *TaskConfig) ReadField23(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *TaskConfig) ReadField23(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 23: ", err) } else { p.ContactEmail = &v @@ -6076,428 +5664,355 @@ func (p *TaskConfig) ReadField23(ctx context.Context, iprot thrift.TProtocol) e return nil } -func (p *TaskConfig) ReadField25(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TaskConfig) ReadField25(iprot thrift.TProtocol) error { p.ExecutorConfig = &ExecutorConfig{} - if err := p.ExecutorConfig.Read(ctx, iprot); err != nil { + if err := p.ExecutorConfig.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.ExecutorConfig), err) } return nil } -func (p *TaskConfig) ReadField27(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin(ctx) +func (p *TaskConfig) ReadField27(iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin() 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 ++ { - _elem15 := &Metadata{} - if err := _elem15.Read(ctx, iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem15), err) + _elem10 := &Metadata{} + if err := _elem10.Read(iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem10), err) } - p.Metadata = append(p.Metadata, _elem15) + p.Metadata = append(p.Metadata, _elem10) } - if err := iprot.ReadSetEnd(ctx); err != nil { + if err := iprot.ReadSetEnd(); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *TaskConfig) ReadField34(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TaskConfig) ReadField34(iprot thrift.TProtocol) error { p.PartitionPolicy = &PartitionPolicy{} - if err := p.PartitionPolicy.Read(ctx, iprot); err != nil { + if err := p.PartitionPolicy.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.PartitionPolicy), err) } return nil } -func (p *TaskConfig) ReadField35(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TaskConfig) ReadField35(iprot thrift.TProtocol) error { p.SlaPolicy = &SlaPolicy{} - if err := p.SlaPolicy.Read(ctx, iprot); err != nil { + if err := p.SlaPolicy.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.SlaPolicy), err) } return nil } -func (p *TaskConfig) ReadField29(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TaskConfig) ReadField29(iprot thrift.TProtocol) error { p.Container = &Container{} - if err := p.Container.Read(ctx, iprot); err != nil { + if err := p.Container.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Container), err) } return nil } -func (p *TaskConfig) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "TaskConfig"); err != nil { +func (p *TaskConfig) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("TaskConfig"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != 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 := 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(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *TaskConfig) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "isService", thrift.BOOL, 7); err != nil { +func (p *TaskConfig) writeField7(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("isService", thrift.BOOL, 7); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:isService: ", p), err) } - if err := oprot.WriteBool(ctx, bool(p.IsService)); err != nil { + if err := oprot.WriteBool(bool(p.IsService)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.isService (7) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 7:isService: ", p), err) } return err } -func (p *TaskConfig) writeField11(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "priority", thrift.I32, 11); err != nil { +func (p *TaskConfig) writeField11(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("priority", thrift.I32, 11); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 11:priority: ", p), err) } - if err := oprot.WriteI32(ctx, int32(p.Priority)); err != nil { + if err := oprot.WriteI32(int32(p.Priority)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.priority (11) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 11:priority: ", p), err) } return err } -func (p *TaskConfig) writeField13(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "maxTaskFailures", thrift.I32, 13); err != nil { +func (p *TaskConfig) writeField13(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("maxTaskFailures", thrift.I32, 13); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 13:maxTaskFailures: ", p), err) } - if err := oprot.WriteI32(ctx, int32(p.MaxTaskFailures)); err != nil { + if err := oprot.WriteI32(int32(p.MaxTaskFailures)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.maxTaskFailures (13) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 13:maxTaskFailures: ", p), err) } return err } -func (p *TaskConfig) writeField17(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "owner", thrift.STRUCT, 17); err != nil { +func (p *TaskConfig) writeField17(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Owner.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Owner), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 17:owner: ", p), err) } return err } -func (p *TaskConfig) writeField18(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *TaskConfig) writeField18(oprot thrift.TProtocol) (err error) { if p.IsSetProduction() { - if err := oprot.WriteFieldBegin(ctx, "production", thrift.BOOL, 18); err != nil { + if err := oprot.WriteFieldBegin("production", thrift.BOOL, 18); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 18:production: ", p), err) } - if err := oprot.WriteBool(ctx, bool(*p.Production)); err != nil { + if err := oprot.WriteBool(bool(*p.Production)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.production (18) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 18:production: ", p), err) } } return err } -func (p *TaskConfig) writeField20(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "constraints", thrift.SET, 20); err != nil { +func (p *TaskConfig) writeField20(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("constraints", thrift.SET, 20); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 20:constraints: ", p), err) } - if err := oprot.WriteSetBegin(ctx, thrift.STRUCT, len(p.Constraints)); err != nil { + if err := oprot.WriteSetBegin(thrift.STRUCT, len(p.Constraints)); err != nil { return thrift.PrependError("error writing set begin: ", err) } for i := 0; i" @@ -6520,14 +6035,14 @@ func NewResourceAggregate() *ResourceAggregate { func (p *ResourceAggregate) GetResources() []*Resource { return p.Resources } -func (p *ResourceAggregate) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *ResourceAggregate) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -6535,105 +6050,88 @@ func (p *ResourceAggregate) Read(ctx context.Context, iprot thrift.TProtocol) er switch fieldId { case 4: if fieldTypeId == thrift.SET { - if err := p.ReadField4(ctx, iprot); err != nil { + if err := p.ReadField4(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ResourceAggregate) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin(ctx) +func (p *ResourceAggregate) ReadField4(iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin() 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 ++ { - _elem21 := &Resource{} - if err := _elem21.Read(ctx, iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem21), err) + _elem11 := &Resource{} + if err := _elem11.Read(iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem11), err) } - p.Resources = append(p.Resources, _elem21) + p.Resources = append(p.Resources, _elem11) } - if err := iprot.ReadSetEnd(ctx); err != nil { + if err := iprot.ReadSetEnd(); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *ResourceAggregate) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "ResourceAggregate"); err != nil { +func (p *ResourceAggregate) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("ResourceAggregate"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField4(ctx, oprot); err != nil { return err } + if err := p.writeField4(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ResourceAggregate) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "resources", thrift.SET, 4); err != nil { +func (p *ResourceAggregate) writeField4(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("resources", thrift.SET, 4); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:resources: ", p), err) } - if err := oprot.WriteSetBegin(ctx, thrift.STRUCT, len(p.Resources)); err != nil { + if err := oprot.WriteSetBegin(thrift.STRUCT, len(p.Resources)); err != nil { return thrift.PrependError("error writing set begin: ", err) } for i := 0; i" @@ -6718,14 +6216,14 @@ func (p *JobConfiguration) IsSetTaskConfig() bool { return p.TaskConfig != nil } -func (p *JobConfiguration) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *JobConfiguration) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -6733,97 +6231,97 @@ func (p *JobConfiguration) Read(ctx context.Context, iprot thrift.TProtocol) err switch fieldId { case 9: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField9(ctx, iprot); err != nil { + if err := p.ReadField9(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 7: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField7(ctx, iprot); err != nil { + if err := p.ReadField7(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 4: if fieldTypeId == thrift.STRING { - if err := p.ReadField4(ctx, iprot); err != nil { + if err := p.ReadField4(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 5: if fieldTypeId == thrift.I32 { - if err := p.ReadField5(ctx, iprot); err != nil { + if err := p.ReadField5(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 6: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField6(ctx, iprot); err != nil { + if err := p.ReadField6(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 8: if fieldTypeId == thrift.I32 { - if err := p.ReadField8(ctx, iprot); err != nil { + if err := p.ReadField8(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *JobConfiguration) ReadField9(ctx context.Context, iprot thrift.TProtocol) error { +func (p *JobConfiguration) ReadField9(iprot thrift.TProtocol) error { p.Key = &JobKey{} - if err := p.Key.Read(ctx, iprot); err != nil { + if err := p.Key.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Key), err) } return nil } -func (p *JobConfiguration) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { +func (p *JobConfiguration) ReadField7(iprot thrift.TProtocol) error { p.Owner = &Identity{} - if err := p.Owner.Read(ctx, iprot); err != nil { + if err := p.Owner.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Owner), err) } return nil } -func (p *JobConfiguration) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *JobConfiguration) ReadField4(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 4: ", err) } else { p.CronSchedule = &v @@ -6831,8 +6329,8 @@ func (p *JobConfiguration) ReadField4(ctx context.Context, iprot thrift.TProtoc return nil } -func (p *JobConfiguration) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(ctx); err != nil { +func (p *JobConfiguration) ReadField5(iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(); err != nil { return thrift.PrependError("error reading field 5: ", err) } else { temp := CronCollisionPolicy(v) @@ -6841,16 +6339,16 @@ func (p *JobConfiguration) ReadField5(ctx context.Context, iprot thrift.TProtoc return nil } -func (p *JobConfiguration) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { +func (p *JobConfiguration) ReadField6(iprot thrift.TProtocol) error { p.TaskConfig = &TaskConfig{} - if err := p.TaskConfig.Read(ctx, iprot); err != nil { + if err := p.TaskConfig.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.TaskConfig), err) } return nil } -func (p *JobConfiguration) ReadField8(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(ctx); err != nil { +func (p *JobConfiguration) ReadField8(iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(); err != nil { return thrift.PrependError("error reading field 8: ", err) } else { p.InstanceCount = v @@ -6858,109 +6356,89 @@ func (p *JobConfiguration) ReadField8(ctx context.Context, iprot thrift.TProtoc return nil } -func (p *JobConfiguration) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "JobConfiguration"); err != nil { +func (p *JobConfiguration) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("JobConfiguration"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != 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 := 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(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *JobConfiguration) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *JobConfiguration) writeField4(oprot thrift.TProtocol) (err error) { if p.IsSetCronSchedule() { - if err := oprot.WriteFieldBegin(ctx, "cronSchedule", thrift.STRING, 4); err != nil { + if err := oprot.WriteFieldBegin("cronSchedule", thrift.STRING, 4); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:cronSchedule: ", p), err) } - if err := oprot.WriteString(ctx, string(*p.CronSchedule)); err != nil { + if err := oprot.WriteString(string(*p.CronSchedule)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.cronSchedule (4) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 4:cronSchedule: ", p), err) } } return err } -func (p *JobConfiguration) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "cronCollisionPolicy", thrift.I32, 5); err != nil { +func (p *JobConfiguration) writeField5(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("cronCollisionPolicy", thrift.I32, 5); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:cronCollisionPolicy: ", p), err) } - if err := oprot.WriteI32(ctx, int32(p.CronCollisionPolicy)); err != nil { + if err := oprot.WriteI32(int32(p.CronCollisionPolicy)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.cronCollisionPolicy (5) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 5:cronCollisionPolicy: ", p), err) } return err } -func (p *JobConfiguration) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "taskConfig", thrift.STRUCT, 6); err != nil { +func (p *JobConfiguration) writeField6(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.TaskConfig.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.TaskConfig), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 6:taskConfig: ", p), err) } return err } -func (p *JobConfiguration) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "owner", thrift.STRUCT, 7); err != nil { +func (p *JobConfiguration) writeField7(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Owner.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Owner), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 7:owner: ", p), err) } return err } -func (p *JobConfiguration) writeField8(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "instanceCount", thrift.I32, 8); err != nil { +func (p *JobConfiguration) writeField8(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("instanceCount", thrift.I32, 8); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:instanceCount: ", p), err) } - if err := oprot.WriteI32(ctx, int32(p.InstanceCount)); err != nil { + if err := oprot.WriteI32(int32(p.InstanceCount)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.instanceCount (8) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 8:instanceCount: ", p), err) } return err } -func (p *JobConfiguration) writeField9(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "key", thrift.STRUCT, 9); err != nil { +func (p *JobConfiguration) writeField9(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Key.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Key), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); 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 "" @@ -7000,14 +6478,14 @@ func (p *JobStats) GetFailedTaskCount() int32 { func (p *JobStats) GetPendingTaskCount() int32 { return p.PendingTaskCount } -func (p *JobStats) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *JobStats) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -7015,61 +6493,61 @@ func (p *JobStats) Read(ctx context.Context, iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.I32 { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.I32 { - if err := p.ReadField2(ctx, iprot); err != nil { + if err := p.ReadField2(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 3: if fieldTypeId == thrift.I32 { - if err := p.ReadField3(ctx, iprot); err != nil { + if err := p.ReadField3(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 4: if fieldTypeId == thrift.I32 { - if err := p.ReadField4(ctx, iprot); err != nil { + if err := p.ReadField4(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *JobStats) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(ctx); err != nil { +func (p *JobStats) ReadField1(iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.ActiveTaskCount = v @@ -7077,8 +6555,8 @@ func (p *JobStats) ReadField1(ctx context.Context, iprot thrift.TProtocol) erro return nil } -func (p *JobStats) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(ctx); err != nil { +func (p *JobStats) ReadField2(iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { p.FinishedTaskCount = v @@ -7086,8 +6564,8 @@ func (p *JobStats) ReadField2(ctx context.Context, iprot thrift.TProtocol) erro return nil } -func (p *JobStats) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(ctx); err != nil { +func (p *JobStats) ReadField3(iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(); err != nil { return thrift.PrependError("error reading field 3: ", err) } else { p.FailedTaskCount = v @@ -7095,8 +6573,8 @@ func (p *JobStats) ReadField3(ctx context.Context, iprot thrift.TProtocol) erro return nil } -func (p *JobStats) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(ctx); err != nil { +func (p *JobStats) ReadField4(iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(); err != nil { return thrift.PrependError("error reading field 4: ", err) } else { p.PendingTaskCount = v @@ -7104,75 +6582,62 @@ func (p *JobStats) ReadField4(ctx context.Context, iprot thrift.TProtocol) erro return nil } -func (p *JobStats) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "JobStats"); err != nil { +func (p *JobStats) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("JobStats"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != 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.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 := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *JobStats) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "activeTaskCount", thrift.I32, 1); err != nil { +func (p *JobStats) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("activeTaskCount", thrift.I32, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:activeTaskCount: ", p), err) } - if err := oprot.WriteI32(ctx, int32(p.ActiveTaskCount)); err != nil { + if err := oprot.WriteI32(int32(p.ActiveTaskCount)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.activeTaskCount (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:activeTaskCount: ", p), err) } return err } -func (p *JobStats) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "finishedTaskCount", thrift.I32, 2); err != nil { +func (p *JobStats) writeField2(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("finishedTaskCount", thrift.I32, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:finishedTaskCount: ", p), err) } - if err := oprot.WriteI32(ctx, int32(p.FinishedTaskCount)); err != nil { + if err := oprot.WriteI32(int32(p.FinishedTaskCount)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.finishedTaskCount (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:finishedTaskCount: ", p), err) } return err } -func (p *JobStats) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "failedTaskCount", thrift.I32, 3); err != nil { +func (p *JobStats) writeField3(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("failedTaskCount", thrift.I32, 3); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:failedTaskCount: ", p), err) } - if err := oprot.WriteI32(ctx, int32(p.FailedTaskCount)); err != nil { + if err := oprot.WriteI32(int32(p.FailedTaskCount)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.failedTaskCount (3) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 3:failedTaskCount: ", p), err) } return err } -func (p *JobStats) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "pendingTaskCount", thrift.I32, 4); err != nil { +func (p *JobStats) writeField4(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("pendingTaskCount", thrift.I32, 4); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:pendingTaskCount: ", p), err) } - if err := oprot.WriteI32(ctx, int32(p.PendingTaskCount)); err != nil { + if err := oprot.WriteI32(int32(p.PendingTaskCount)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.pendingTaskCount (4) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); 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 "" @@ -7227,14 +6692,14 @@ func (p *JobSummary) IsSetNextCronRunMs() bool { return p.NextCronRunMs != nil } -func (p *JobSummary) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *JobSummary) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -7242,67 +6707,67 @@ func (p *JobSummary) Read(ctx context.Context, iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField2(ctx, iprot); err != nil { + if err := p.ReadField2(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 3: if fieldTypeId == thrift.I64 { - if err := p.ReadField3(ctx, iprot); err != nil { + if err := p.ReadField3(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *JobSummary) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { +func (p *JobSummary) ReadField1(iprot thrift.TProtocol) error { p.Job = &JobConfiguration{} - if err := p.Job.Read(ctx, iprot); err != nil { + if err := p.Job.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Job), err) } return nil } -func (p *JobSummary) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { +func (p *JobSummary) ReadField2(iprot thrift.TProtocol) error { p.Stats = &JobStats{} - if err := p.Stats.Read(ctx, iprot); err != nil { + if err := p.Stats.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Stats), err) } return nil } -func (p *JobSummary) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI64(ctx); err != nil { +func (p *JobSummary) ReadField3(iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(); err != nil { return thrift.PrependError("error reading field 3: ", err) } else { p.NextCronRunMs = &v @@ -7310,72 +6775,55 @@ func (p *JobSummary) ReadField3(ctx context.Context, iprot thrift.TProtocol) er return nil } -func (p *JobSummary) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "JobSummary"); err != nil { +func (p *JobSummary) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("JobSummary"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != 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.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 := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *JobSummary) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "job", thrift.STRUCT, 1); err != nil { +func (p *JobSummary) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Job.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Job), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:job: ", p), err) } return err } -func (p *JobSummary) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "stats", thrift.STRUCT, 2); err != nil { +func (p *JobSummary) writeField2(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Stats.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Stats), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:stats: ", p), err) } return err } -func (p *JobSummary) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *JobSummary) writeField3(oprot thrift.TProtocol) (err error) { if p.IsSetNextCronRunMs() { - if err := oprot.WriteFieldBegin(ctx, "nextCronRunMs", thrift.I64, 3); err != nil { + if err := oprot.WriteFieldBegin("nextCronRunMs", thrift.I64, 3); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:nextCronRunMs: ", p), err) } - if err := oprot.WriteI64(ctx, int64(*p.NextCronRunMs)); err != nil { + if err := oprot.WriteI64(int64(*p.NextCronRunMs)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.nextCronRunMs (3) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); 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 "" @@ -7405,14 +6853,14 @@ func (p *Range) GetFirst() int32 { func (p *Range) GetLast() int32 { return p.Last } -func (p *Range) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *Range) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -7420,41 +6868,41 @@ func (p *Range) Read(ctx context.Context, iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.I32 { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.I32 { - if err := p.ReadField2(ctx, iprot); err != nil { + if err := p.ReadField2(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *Range) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(ctx); err != nil { +func (p *Range) ReadField1(iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.First = v @@ -7462,8 +6910,8 @@ func (p *Range) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { return nil } -func (p *Range) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(ctx); err != nil { +func (p *Range) ReadField2(iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { p.Last = v @@ -7471,51 +6919,40 @@ func (p *Range) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { return nil } -func (p *Range) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "Range"); err != nil { +func (p *Range) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("Range"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } - if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField2(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *Range) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "first", thrift.I32, 1); err != nil { +func (p *Range) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("first", thrift.I32, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:first: ", p), err) } - if err := oprot.WriteI32(ctx, int32(p.First)); err != nil { + if err := oprot.WriteI32(int32(p.First)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.first (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:first: ", p), err) } return err } -func (p *Range) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "last", thrift.I32, 2); err != nil { +func (p *Range) writeField2(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("last", thrift.I32, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:last: ", p), err) } - if err := oprot.WriteI32(ctx, int32(p.Last)); err != nil { + if err := oprot.WriteI32(int32(p.Last)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.last (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); 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 "" @@ -7551,14 +6988,14 @@ func (p *ConfigGroup) IsSetConfig() bool { return p.Config != nil } -func (p *ConfigGroup) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *ConfigGroup) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -7566,136 +7003,118 @@ func (p *ConfigGroup) Read(ctx context.Context, iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 3: if fieldTypeId == thrift.SET { - if err := p.ReadField3(ctx, iprot); err != nil { + if err := p.ReadField3(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ConfigGroup) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { +func (p *ConfigGroup) ReadField1(iprot thrift.TProtocol) error { p.Config = &TaskConfig{} - if err := p.Config.Read(ctx, iprot); err != nil { + if err := p.Config.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Config), err) } return nil } -func (p *ConfigGroup) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin(ctx) +func (p *ConfigGroup) ReadField3(iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin() 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 ++ { - _elem23 := &Range{} - if err := _elem23.Read(ctx, iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem23), err) + _elem12 := &Range{} + if err := _elem12.Read(iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem12), err) } - p.Instances = append(p.Instances, _elem23) + p.Instances = append(p.Instances, _elem12) } - if err := iprot.ReadSetEnd(ctx); err != nil { + if err := iprot.ReadSetEnd(); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *ConfigGroup) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "ConfigGroup"); err != nil { +func (p *ConfigGroup) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("ConfigGroup"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } - if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField3(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ConfigGroup) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "config", thrift.STRUCT, 1); err != nil { +func (p *ConfigGroup) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Config.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Config), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:config: ", p), err) } return err } -func (p *ConfigGroup) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "instances", thrift.SET, 3); err != nil { +func (p *ConfigGroup) writeField3(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("instances", thrift.SET, 3); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:instances: ", p), err) } - if err := oprot.WriteSetBegin(ctx, thrift.STRUCT, len(p.Instances)); err != nil { + if err := oprot.WriteSetBegin(thrift.STRUCT, len(p.Instances)); err != nil { return thrift.PrependError("error writing set begin: ", err) } for i := 0; i" @@ -7730,14 +7149,14 @@ func (p *ConfigSummary) IsSetKey() bool { return p.Key != nil } -func (p *ConfigSummary) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *ConfigSummary) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -7745,136 +7164,118 @@ func (p *ConfigSummary) Read(ctx context.Context, iprot thrift.TProtocol) error switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.SET { - if err := p.ReadField2(ctx, iprot); err != nil { + if err := p.ReadField2(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ConfigSummary) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { +func (p *ConfigSummary) ReadField1(iprot thrift.TProtocol) error { p.Key = &JobKey{} - if err := p.Key.Read(ctx, iprot); err != nil { + if err := p.Key.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Key), err) } return nil } -func (p *ConfigSummary) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin(ctx) +func (p *ConfigSummary) ReadField2(iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin() 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 ++ { - _elem25 := &ConfigGroup{} - if err := _elem25.Read(ctx, iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem25), err) + _elem13 := &ConfigGroup{} + if err := _elem13.Read(iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem13), err) } - p.Groups = append(p.Groups, _elem25) + p.Groups = append(p.Groups, _elem13) } - if err := iprot.ReadSetEnd(ctx); err != nil { + if err := iprot.ReadSetEnd(); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *ConfigSummary) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "ConfigSummary"); err != nil { +func (p *ConfigSummary) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("ConfigSummary"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } - if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField2(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ConfigSummary) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "key", thrift.STRUCT, 1); err != nil { +func (p *ConfigSummary) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Key.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Key), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:key: ", p), err) } return err } -func (p *ConfigSummary) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "groups", thrift.SET, 2); err != nil { +func (p *ConfigSummary) writeField2(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("groups", thrift.SET, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:groups: ", p), err) } - if err := oprot.WriteSetBegin(ctx, thrift.STRUCT, len(p.Groups)); err != nil { + if err := oprot.WriteSetBegin(thrift.STRUCT, len(p.Groups)); err != nil { return thrift.PrependError("error writing set begin: ", err) } for i := 0; i" @@ -7904,14 +7305,14 @@ func (p *PopulateJobResult_) IsSetTaskConfig() bool { return p.TaskConfig != nil } -func (p *PopulateJobResult_) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *PopulateJobResult_) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -7919,71 +7320,61 @@ func (p *PopulateJobResult_) Read(ctx context.Context, iprot thrift.TProtocol) e switch fieldId { case 2: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField2(ctx, iprot); err != nil { + if err := p.ReadField2(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *PopulateJobResult_) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { +func (p *PopulateJobResult_) ReadField2(iprot thrift.TProtocol) error { p.TaskConfig = &TaskConfig{} - if err := p.TaskConfig.Read(ctx, iprot); err != nil { + if err := p.TaskConfig.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.TaskConfig), err) } return nil } -func (p *PopulateJobResult_) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "PopulateJobResult"); err != nil { +func (p *PopulateJobResult_) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("PopulateJobResult"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField2(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *PopulateJobResult_) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "taskConfig", thrift.STRUCT, 2); err != nil { +func (p *PopulateJobResult_) writeField2(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.TaskConfig.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.TaskConfig), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); 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 "" @@ -8064,14 +7455,14 @@ func (p *GetQuotaResult_) IsSetNonProdDedicatedConsumption() bool { return p.NonProdDedicatedConsumption != nil } -func (p *GetQuotaResult_) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *GetQuotaResult_) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -8079,203 +7470,189 @@ func (p *GetQuotaResult_) Read(ctx context.Context, iprot thrift.TProtocol) erro switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField2(ctx, iprot); err != nil { + if err := p.ReadField2(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 3: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField3(ctx, iprot); err != nil { + if err := p.ReadField3(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 4: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField4(ctx, iprot); err != nil { + if err := p.ReadField4(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 5: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField5(ctx, iprot); err != nil { + if err := p.ReadField5(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *GetQuotaResult_) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { +func (p *GetQuotaResult_) ReadField1(iprot thrift.TProtocol) error { p.Quota = &ResourceAggregate{} - if err := p.Quota.Read(ctx, iprot); err != nil { + if err := p.Quota.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Quota), err) } return nil } -func (p *GetQuotaResult_) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { +func (p *GetQuotaResult_) ReadField2(iprot thrift.TProtocol) error { p.ProdSharedConsumption = &ResourceAggregate{} - if err := p.ProdSharedConsumption.Read(ctx, iprot); err != nil { + if err := p.ProdSharedConsumption.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.ProdSharedConsumption), err) } return nil } -func (p *GetQuotaResult_) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { +func (p *GetQuotaResult_) ReadField3(iprot thrift.TProtocol) error { p.NonProdSharedConsumption = &ResourceAggregate{} - if err := p.NonProdSharedConsumption.Read(ctx, iprot); err != nil { + if err := p.NonProdSharedConsumption.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.NonProdSharedConsumption), err) } return nil } -func (p *GetQuotaResult_) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { +func (p *GetQuotaResult_) ReadField4(iprot thrift.TProtocol) error { p.ProdDedicatedConsumption = &ResourceAggregate{} - if err := p.ProdDedicatedConsumption.Read(ctx, iprot); err != nil { + if err := p.ProdDedicatedConsumption.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.ProdDedicatedConsumption), err) } return nil } -func (p *GetQuotaResult_) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { +func (p *GetQuotaResult_) ReadField5(iprot thrift.TProtocol) error { p.NonProdDedicatedConsumption = &ResourceAggregate{} - if err := p.NonProdDedicatedConsumption.Read(ctx, iprot); err != nil { + if err := p.NonProdDedicatedConsumption.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.NonProdDedicatedConsumption), err) } return nil } -func (p *GetQuotaResult_) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "GetQuotaResult"); err != nil { +func (p *GetQuotaResult_) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("GetQuotaResult"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != 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.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 := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *GetQuotaResult_) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "quota", thrift.STRUCT, 1); err != nil { +func (p *GetQuotaResult_) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Quota.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Quota), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:quota: ", p), err) } return err } -func (p *GetQuotaResult_) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *GetQuotaResult_) writeField2(oprot thrift.TProtocol) (err error) { if p.IsSetProdSharedConsumption() { - if err := oprot.WriteFieldBegin(ctx, "prodSharedConsumption", thrift.STRUCT, 2); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.ProdSharedConsumption.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.ProdSharedConsumption), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:prodSharedConsumption: ", p), err) } } return err } -func (p *GetQuotaResult_) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *GetQuotaResult_) writeField3(oprot thrift.TProtocol) (err error) { if p.IsSetNonProdSharedConsumption() { - if err := oprot.WriteFieldBegin(ctx, "nonProdSharedConsumption", thrift.STRUCT, 3); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.NonProdSharedConsumption.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.NonProdSharedConsumption), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 3:nonProdSharedConsumption: ", p), err) } } return err } -func (p *GetQuotaResult_) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *GetQuotaResult_) writeField4(oprot thrift.TProtocol) (err error) { if p.IsSetProdDedicatedConsumption() { - if err := oprot.WriteFieldBegin(ctx, "prodDedicatedConsumption", thrift.STRUCT, 4); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.ProdDedicatedConsumption.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.ProdDedicatedConsumption), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 4:prodDedicatedConsumption: ", p), err) } } return err } -func (p *GetQuotaResult_) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *GetQuotaResult_) writeField5(oprot thrift.TProtocol) (err error) { if p.IsSetNonProdDedicatedConsumption() { - if err := oprot.WriteFieldBegin(ctx, "nonProdDedicatedConsumption", thrift.STRUCT, 5); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.NonProdDedicatedConsumption.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.NonProdDedicatedConsumption), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); 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 "" @@ -8331,14 +7708,14 @@ func (p *TaskEvent) IsSetScheduler() bool { return p.Scheduler != nil } -func (p *TaskEvent) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *TaskEvent) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -8346,61 +7723,61 @@ func (p *TaskEvent) Read(ctx context.Context, iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.I64 { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.I32 { - if err := p.ReadField2(ctx, iprot); err != nil { + if err := p.ReadField2(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 3: if fieldTypeId == thrift.STRING { - if err := p.ReadField3(ctx, iprot); err != nil { + if err := p.ReadField3(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 4: if fieldTypeId == thrift.STRING { - if err := p.ReadField4(ctx, iprot); err != nil { + if err := p.ReadField4(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *TaskEvent) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI64(ctx); err != nil { +func (p *TaskEvent) ReadField1(iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.Timestamp = v @@ -8408,8 +7785,8 @@ func (p *TaskEvent) ReadField1(ctx context.Context, iprot thrift.TProtocol) err return nil } -func (p *TaskEvent) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(ctx); err != nil { +func (p *TaskEvent) ReadField2(iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { temp := ScheduleStatus(v) @@ -8418,8 +7795,8 @@ func (p *TaskEvent) ReadField2(ctx context.Context, iprot thrift.TProtocol) err return nil } -func (p *TaskEvent) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *TaskEvent) ReadField3(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 3: ", err) } else { p.Message = &v @@ -8427,8 +7804,8 @@ func (p *TaskEvent) ReadField3(ctx context.Context, iprot thrift.TProtocol) err return nil } -func (p *TaskEvent) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *TaskEvent) ReadField4(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 4: ", err) } else { p.Scheduler = &v @@ -8436,89 +7813,66 @@ func (p *TaskEvent) ReadField4(ctx context.Context, iprot thrift.TProtocol) err return nil } -func (p *TaskEvent) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "TaskEvent"); err != nil { +func (p *TaskEvent) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("TaskEvent"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != 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.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 := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *TaskEvent) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "timestamp", thrift.I64, 1); err != nil { +func (p *TaskEvent) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("timestamp", thrift.I64, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:timestamp: ", p), err) } - if err := oprot.WriteI64(ctx, int64(p.Timestamp)); err != nil { + if err := oprot.WriteI64(int64(p.Timestamp)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.timestamp (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:timestamp: ", p), err) } return err } -func (p *TaskEvent) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "status", thrift.I32, 2); err != nil { +func (p *TaskEvent) writeField2(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("status", thrift.I32, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:status: ", p), err) } - if err := oprot.WriteI32(ctx, int32(p.Status)); err != nil { + if err := oprot.WriteI32(int32(p.Status)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.status (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:status: ", p), err) } return err } -func (p *TaskEvent) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *TaskEvent) writeField3(oprot thrift.TProtocol) (err error) { if p.IsSetMessage() { - if err := oprot.WriteFieldBegin(ctx, "message", thrift.STRING, 3); err != nil { + if err := oprot.WriteFieldBegin("message", thrift.STRING, 3); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:message: ", p), err) } - if err := oprot.WriteString(ctx, string(*p.Message)); err != nil { + if err := oprot.WriteString(string(*p.Message)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.message (3) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 3:message: ", p), err) } } return err } -func (p *TaskEvent) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *TaskEvent) writeField4(oprot thrift.TProtocol) (err error) { if p.IsSetScheduler() { - if err := oprot.WriteFieldBegin(ctx, "scheduler", thrift.STRING, 4); err != nil { + if err := oprot.WriteFieldBegin("scheduler", thrift.STRING, 4); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:scheduler: ", p), err) } - if err := oprot.WriteString(ctx, string(*p.Scheduler)); err != nil { + if err := oprot.WriteString(string(*p.Scheduler)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.scheduler (4) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); 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 "" @@ -8582,14 +7936,14 @@ func (p *AssignedTask) IsSetTask() bool { return p.Task != nil } -func (p *AssignedTask) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *AssignedTask) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -8597,81 +7951,81 @@ func (p *AssignedTask) Read(ctx context.Context, iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRING { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.STRING { - if err := p.ReadField2(ctx, iprot); err != nil { + if err := p.ReadField2(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 3: if fieldTypeId == thrift.STRING { - if err := p.ReadField3(ctx, iprot); err != nil { + if err := p.ReadField3(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 4: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField4(ctx, iprot); err != nil { + if err := p.ReadField4(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 5: if fieldTypeId == thrift.MAP { - if err := p.ReadField5(ctx, iprot); err != nil { + if err := p.ReadField5(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 6: if fieldTypeId == thrift.I32 { - if err := p.ReadField6(ctx, iprot); err != nil { + if err := p.ReadField6(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AssignedTask) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *AssignedTask) ReadField1(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.TaskId = v @@ -8679,8 +8033,8 @@ func (p *AssignedTask) ReadField1(ctx context.Context, iprot thrift.TProtocol) return nil } -func (p *AssignedTask) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *AssignedTask) ReadField2(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { p.SlaveId = v @@ -8688,8 +8042,8 @@ func (p *AssignedTask) ReadField2(ctx context.Context, iprot thrift.TProtocol) return nil } -func (p *AssignedTask) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *AssignedTask) ReadField3(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 3: ", err) } else { p.SlaveHost = v @@ -8697,44 +8051,44 @@ func (p *AssignedTask) ReadField3(ctx context.Context, iprot thrift.TProtocol) return nil } -func (p *AssignedTask) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { +func (p *AssignedTask) ReadField4(iprot thrift.TProtocol) error { p.Task = &TaskConfig{} - if err := p.Task.Read(ctx, iprot); err != nil { + if err := p.Task.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Task), err) } return nil } -func (p *AssignedTask) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { - _, _, size, err := iprot.ReadMapBegin(ctx) +func (p *AssignedTask) ReadField5(iprot thrift.TProtocol) error { + _, _, size, err := iprot.ReadMapBegin() 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 _key27 string - if v, err := iprot.ReadString(ctx); err != nil { +var _key14 string + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _key27 = v + _key14 = v } -var _val28 int32 - if v, err := iprot.ReadI32(ctx); err != nil { +var _val15 int32 + if v, err := iprot.ReadI32(); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _val28 = v + _val15 = v } - p.AssignedPorts[_key27] = _val28 + p.AssignedPorts[_key14] = _val15 } - if err := iprot.ReadMapEnd(ctx); err != nil { + if err := iprot.ReadMapEnd(); err != nil { return thrift.PrependError("error reading map end: ", err) } return nil } -func (p *AssignedTask) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(ctx); err != nil { +func (p *AssignedTask) ReadField6(iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(); err != nil { return thrift.PrependError("error reading field 6: ", err) } else { p.InstanceId = v @@ -8742,114 +8096,95 @@ func (p *AssignedTask) ReadField6(ctx context.Context, iprot thrift.TProtocol) return nil } -func (p *AssignedTask) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "AssignedTask"); err != nil { +func (p *AssignedTask) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("AssignedTask"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != 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 := 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(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AssignedTask) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "taskId", thrift.STRING, 1); err != nil { +func (p *AssignedTask) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("taskId", thrift.STRING, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:taskId: ", p), err) } - if err := oprot.WriteString(ctx, string(p.TaskId)); err != nil { + if err := oprot.WriteString(string(p.TaskId)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.taskId (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:taskId: ", p), err) } return err } -func (p *AssignedTask) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "slaveId", thrift.STRING, 2); err != nil { +func (p *AssignedTask) writeField2(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("slaveId", thrift.STRING, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:slaveId: ", p), err) } - if err := oprot.WriteString(ctx, string(p.SlaveId)); err != nil { + if err := oprot.WriteString(string(p.SlaveId)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.slaveId (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:slaveId: ", p), err) } return err } -func (p *AssignedTask) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "slaveHost", thrift.STRING, 3); err != nil { +func (p *AssignedTask) writeField3(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("slaveHost", thrift.STRING, 3); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:slaveHost: ", p), err) } - if err := oprot.WriteString(ctx, string(p.SlaveHost)); err != nil { + if err := oprot.WriteString(string(p.SlaveHost)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.slaveHost (3) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 3:slaveHost: ", p), err) } return err } -func (p *AssignedTask) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "task", thrift.STRUCT, 4); err != nil { +func (p *AssignedTask) writeField4(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Task.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Task), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 4:task: ", p), err) } return err } -func (p *AssignedTask) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "assignedPorts", thrift.MAP, 5); err != nil { +func (p *AssignedTask) writeField5(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("assignedPorts", thrift.MAP, 5); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:assignedPorts: ", p), err) } - if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.I32, len(p.AssignedPorts)); err != nil { + if err := oprot.WriteMapBegin(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(ctx, string(k)); err != nil { + if err := oprot.WriteString(string(k)); err != nil { return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } - if err := oprot.WriteI32(ctx, int32(v)); err != nil { + if err := oprot.WriteI32(int32(v)); err != nil { return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } } - if err := oprot.WriteMapEnd(ctx); err != nil { + if err := oprot.WriteMapEnd(); err != nil { return thrift.PrependError("error writing map end: ", err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 5:assignedPorts: ", p), err) } return err } -func (p *AssignedTask) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "instanceId", thrift.I32, 6); err != nil { +func (p *AssignedTask) writeField6(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("instanceId", thrift.I32, 6); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:instanceId: ", p), err) } - if err := oprot.WriteI32(ctx, int32(p.InstanceId)); err != nil { + if err := oprot.WriteI32(int32(p.InstanceId)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.instanceId (6) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); 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 "" @@ -8912,14 +8247,14 @@ func (p *ScheduledTask) IsSetAssignedTask() bool { return p.AssignedTask != nil } -func (p *ScheduledTask) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *ScheduledTask) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -8927,89 +8262,89 @@ func (p *ScheduledTask) Read(ctx context.Context, iprot thrift.TProtocol) error switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.I32 { - if err := p.ReadField2(ctx, iprot); err != nil { + if err := p.ReadField2(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 3: if fieldTypeId == thrift.I32 { - if err := p.ReadField3(ctx, iprot); err != nil { + if err := p.ReadField3(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 6: if fieldTypeId == thrift.I32 { - if err := p.ReadField6(ctx, iprot); err != nil { + if err := p.ReadField6(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 4: if fieldTypeId == thrift.LIST { - if err := p.ReadField4(ctx, iprot); err != nil { + if err := p.ReadField4(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 5: if fieldTypeId == thrift.STRING { - if err := p.ReadField5(ctx, iprot); err != nil { + if err := p.ReadField5(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ScheduledTask) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { +func (p *ScheduledTask) ReadField1(iprot thrift.TProtocol) error { p.AssignedTask = &AssignedTask{} - if err := p.AssignedTask.Read(ctx, iprot); err != nil { + if err := p.AssignedTask.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.AssignedTask), err) } return nil } -func (p *ScheduledTask) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(ctx); err != nil { +func (p *ScheduledTask) ReadField2(iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { temp := ScheduleStatus(v) @@ -9018,8 +8353,8 @@ func (p *ScheduledTask) ReadField2(ctx context.Context, iprot thrift.TProtocol) return nil } -func (p *ScheduledTask) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(ctx); err != nil { +func (p *ScheduledTask) ReadField3(iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(); err != nil { return thrift.PrependError("error reading field 3: ", err) } else { p.FailureCount = v @@ -9027,8 +8362,8 @@ func (p *ScheduledTask) ReadField3(ctx context.Context, iprot thrift.TProtocol) return nil } -func (p *ScheduledTask) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(ctx); err != nil { +func (p *ScheduledTask) ReadField6(iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(); err != nil { return thrift.PrependError("error reading field 6: ", err) } else { p.TimesPartitioned = v @@ -9036,28 +8371,28 @@ func (p *ScheduledTask) ReadField6(ctx context.Context, iprot thrift.TProtocol) return nil } -func (p *ScheduledTask) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin(ctx) +func (p *ScheduledTask) ReadField4(iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin() 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 ++ { - _elem30 := &TaskEvent{} - if err := _elem30.Read(ctx, iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem30), err) + _elem16 := &TaskEvent{} + if err := _elem16.Read(iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem16), err) } - p.TaskEvents = append(p.TaskEvents, _elem30) + p.TaskEvents = append(p.TaskEvents, _elem16) } - if err := iprot.ReadListEnd(ctx); err != nil { + if err := iprot.ReadListEnd(); err != nil { return thrift.PrependError("error reading list end: ", err) } return nil } -func (p *ScheduledTask) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *ScheduledTask) ReadField5(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 5: ", err) } else { p.AncestorId = v @@ -9065,113 +8400,94 @@ func (p *ScheduledTask) ReadField5(ctx context.Context, iprot thrift.TProtocol) return nil } -func (p *ScheduledTask) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "ScheduledTask"); err != nil { +func (p *ScheduledTask) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("ScheduledTask"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != 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 := 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(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ScheduledTask) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "assignedTask", thrift.STRUCT, 1); err != nil { +func (p *ScheduledTask) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.AssignedTask.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.AssignedTask), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:assignedTask: ", p), err) } return err } -func (p *ScheduledTask) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "status", thrift.I32, 2); err != nil { +func (p *ScheduledTask) writeField2(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("status", thrift.I32, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:status: ", p), err) } - if err := oprot.WriteI32(ctx, int32(p.Status)); err != nil { + if err := oprot.WriteI32(int32(p.Status)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.status (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:status: ", p), err) } return err } -func (p *ScheduledTask) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "failureCount", thrift.I32, 3); err != nil { +func (p *ScheduledTask) writeField3(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("failureCount", thrift.I32, 3); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:failureCount: ", p), err) } - if err := oprot.WriteI32(ctx, int32(p.FailureCount)); err != nil { + if err := oprot.WriteI32(int32(p.FailureCount)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.failureCount (3) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 3:failureCount: ", p), err) } return err } -func (p *ScheduledTask) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "taskEvents", thrift.LIST, 4); err != nil { +func (p *ScheduledTask) writeField4(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("taskEvents", thrift.LIST, 4); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:taskEvents: ", p), err) } - if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.TaskEvents)); err != nil { + if err := oprot.WriteListBegin(thrift.STRUCT, len(p.TaskEvents)); err != nil { return thrift.PrependError("error writing list begin: ", err) } for _, v := range p.TaskEvents { - if err := v.Write(ctx, oprot); err != nil { + if err := v.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) } } - if err := oprot.WriteListEnd(ctx); err != nil { + if err := oprot.WriteListEnd(); err != nil { return thrift.PrependError("error writing list end: ", err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 4:taskEvents: ", p), err) } return err } -func (p *ScheduledTask) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "ancestorId", thrift.STRING, 5); err != nil { +func (p *ScheduledTask) writeField5(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("ancestorId", thrift.STRING, 5); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:ancestorId: ", p), err) } - if err := oprot.WriteString(ctx, string(p.AncestorId)); err != nil { + if err := oprot.WriteString(string(p.AncestorId)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.ancestorId (5) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 5:ancestorId: ", p), err) } return err } -func (p *ScheduledTask) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "timesPartitioned", thrift.I32, 6); err != nil { +func (p *ScheduledTask) writeField6(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("timesPartitioned", thrift.I32, 6); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:timesPartitioned: ", p), err) } - if err := oprot.WriteI32(ctx, int32(p.TimesPartitioned)); err != nil { + if err := oprot.WriteI32(int32(p.TimesPartitioned)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.timesPartitioned (6) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); 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 "" @@ -9193,14 +8509,14 @@ func NewScheduleStatusResult_() *ScheduleStatusResult_ { func (p *ScheduleStatusResult_) GetTasks() []*ScheduledTask { return p.Tasks } -func (p *ScheduleStatusResult_) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *ScheduleStatusResult_) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -9208,95 +8524,81 @@ func (p *ScheduleStatusResult_) Read(ctx context.Context, iprot thrift.TProtocol switch fieldId { case 1: if fieldTypeId == thrift.LIST { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ScheduleStatusResult_) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin(ctx) +func (p *ScheduleStatusResult_) ReadField1(iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin() 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 ++ { - _elem32 := &ScheduledTask{} - if err := _elem32.Read(ctx, iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem32), err) + _elem17 := &ScheduledTask{} + if err := _elem17.Read(iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem17), err) } - p.Tasks = append(p.Tasks, _elem32) + p.Tasks = append(p.Tasks, _elem17) } - if err := iprot.ReadListEnd(ctx); err != nil { + if err := iprot.ReadListEnd(); err != nil { return thrift.PrependError("error reading list end: ", err) } return nil } -func (p *ScheduleStatusResult_) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "ScheduleStatusResult"); err != nil { +func (p *ScheduleStatusResult_) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("ScheduleStatusResult"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ScheduleStatusResult_) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "tasks", thrift.LIST, 1); err != nil { +func (p *ScheduleStatusResult_) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("tasks", thrift.LIST, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:tasks: ", p), err) } - if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.Tasks)); err != nil { + if err := oprot.WriteListBegin(thrift.STRUCT, len(p.Tasks)); err != nil { return thrift.PrependError("error writing list begin: ", err) } for _, v := range p.Tasks { - if err := v.Write(ctx, oprot); err != nil { + if err := v.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) } } - if err := oprot.WriteListEnd(ctx); err != nil { + if err := oprot.WriteListEnd(); err != nil { return thrift.PrependError("error writing list end: ", err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); 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 "" @@ -9318,14 +8620,14 @@ func NewGetJobsResult_() *GetJobsResult_ { func (p *GetJobsResult_) GetConfigs() []*JobConfiguration { return p.Configs } -func (p *GetJobsResult_) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *GetJobsResult_) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -9333,105 +8635,88 @@ func (p *GetJobsResult_) Read(ctx context.Context, iprot thrift.TProtocol) error switch fieldId { case 1: if fieldTypeId == thrift.SET { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *GetJobsResult_) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin(ctx) +func (p *GetJobsResult_) ReadField1(iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin() 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 ++ { - _elem34 := &JobConfiguration{} - if err := _elem34.Read(ctx, iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem34), err) + _elem18 := &JobConfiguration{} + if err := _elem18.Read(iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem18), err) } - p.Configs = append(p.Configs, _elem34) + p.Configs = append(p.Configs, _elem18) } - if err := iprot.ReadSetEnd(ctx); err != nil { + if err := iprot.ReadSetEnd(); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *GetJobsResult_) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "GetJobsResult"); err != nil { +func (p *GetJobsResult_) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("GetJobsResult"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *GetJobsResult_) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "configs", thrift.SET, 1); err != nil { +func (p *GetJobsResult_) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("configs", thrift.SET, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:configs: ", p), err) } - if err := oprot.WriteSetBegin(ctx, thrift.STRUCT, len(p.Configs)); err != nil { + if err := oprot.WriteSetBegin(thrift.STRUCT, len(p.Configs)); err != nil { return thrift.PrependError("error writing set begin: ", err) } for i := 0; i" @@ -9574,14 +8859,14 @@ func (p *TaskQuery) IsSetLimit() bool { return p.Limit != nil } -func (p *TaskQuery) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *TaskQuery) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -9589,121 +8874,121 @@ func (p *TaskQuery) Read(ctx context.Context, iprot thrift.TProtocol) error { switch fieldId { case 14: if fieldTypeId == thrift.STRING { - if err := p.ReadField14(ctx, iprot); err != nil { + if err := p.ReadField14(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 9: if fieldTypeId == thrift.STRING { - if err := p.ReadField9(ctx, iprot); err != nil { + if err := p.ReadField9(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.STRING { - if err := p.ReadField2(ctx, iprot); err != nil { + if err := p.ReadField2(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 4: if fieldTypeId == thrift.SET { - if err := p.ReadField4(ctx, iprot); err != nil { + if err := p.ReadField4(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 5: if fieldTypeId == thrift.SET { - if err := p.ReadField5(ctx, iprot); err != nil { + if err := p.ReadField5(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 7: if fieldTypeId == thrift.SET { - if err := p.ReadField7(ctx, iprot); err != nil { + if err := p.ReadField7(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 10: if fieldTypeId == thrift.SET { - if err := p.ReadField10(ctx, iprot); err != nil { + if err := p.ReadField10(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 11: if fieldTypeId == thrift.SET { - if err := p.ReadField11(ctx, iprot); err != nil { + if err := p.ReadField11(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 12: if fieldTypeId == thrift.I32 { - if err := p.ReadField12(ctx, iprot); err != nil { + if err := p.ReadField12(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 13: if fieldTypeId == thrift.I32 { - if err := p.ReadField13(ctx, iprot); err != nil { + if err := p.ReadField13(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *TaskQuery) ReadField14(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *TaskQuery) ReadField14(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 14: ", err) } else { p.Role = &v @@ -9711,8 +8996,8 @@ func (p *TaskQuery) ReadField14(ctx context.Context, iprot thrift.TProtocol) er return nil } -func (p *TaskQuery) ReadField9(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *TaskQuery) ReadField9(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 9: ", err) } else { p.Environment = &v @@ -9720,8 +9005,8 @@ func (p *TaskQuery) ReadField9(ctx context.Context, iprot thrift.TProtocol) err return nil } -func (p *TaskQuery) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *TaskQuery) ReadField2(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { p.JobName = &v @@ -9729,117 +9014,117 @@ func (p *TaskQuery) ReadField2(ctx context.Context, iprot thrift.TProtocol) err return nil } -func (p *TaskQuery) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin(ctx) +func (p *TaskQuery) ReadField4(iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin() 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 _elem36 string - if v, err := iprot.ReadString(ctx); err != nil { +var _elem19 string + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem36 = v + _elem19 = v } - p.TaskIds = append(p.TaskIds, _elem36) + p.TaskIds = append(p.TaskIds, _elem19) } - if err := iprot.ReadSetEnd(ctx); err != nil { + if err := iprot.ReadSetEnd(); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *TaskQuery) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin(ctx) +func (p *TaskQuery) ReadField5(iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin() 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 _elem37 ScheduleStatus - if v, err := iprot.ReadI32(ctx); err != nil { +var _elem20 ScheduleStatus + if v, err := iprot.ReadI32(); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { temp := ScheduleStatus(v) - _elem37 = temp + _elem20 = temp } - p.Statuses = append(p.Statuses, _elem37) + p.Statuses = append(p.Statuses, _elem20) } - if err := iprot.ReadSetEnd(ctx); err != nil { + if err := iprot.ReadSetEnd(); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *TaskQuery) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin(ctx) +func (p *TaskQuery) ReadField7(iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin() 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 _elem38 int32 - if v, err := iprot.ReadI32(ctx); err != nil { +var _elem21 int32 + if v, err := iprot.ReadI32(); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem38 = v + _elem21 = v } - p.InstanceIds = append(p.InstanceIds, _elem38) + p.InstanceIds = append(p.InstanceIds, _elem21) } - if err := iprot.ReadSetEnd(ctx); err != nil { + if err := iprot.ReadSetEnd(); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *TaskQuery) ReadField10(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin(ctx) +func (p *TaskQuery) ReadField10(iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin() 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 _elem39 string - if v, err := iprot.ReadString(ctx); err != nil { +var _elem22 string + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem39 = v + _elem22 = v } - p.SlaveHosts = append(p.SlaveHosts, _elem39) + p.SlaveHosts = append(p.SlaveHosts, _elem22) } - if err := iprot.ReadSetEnd(ctx); err != nil { + if err := iprot.ReadSetEnd(); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *TaskQuery) ReadField11(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin(ctx) +func (p *TaskQuery) ReadField11(iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin() 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 ++ { - _elem40 := &JobKey{} - if err := _elem40.Read(ctx, iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem40), err) + _elem23 := &JobKey{} + if err := _elem23.Read(iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem23), err) } - p.JobKeys = append(p.JobKeys, _elem40) + p.JobKeys = append(p.JobKeys, _elem23) } - if err := iprot.ReadSetEnd(ctx); err != nil { + if err := iprot.ReadSetEnd(); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *TaskQuery) ReadField12(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(ctx); err != nil { +func (p *TaskQuery) ReadField12(iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(); err != nil { return thrift.PrependError("error reading field 12: ", err) } else { p.Offset = &v @@ -9847,8 +9132,8 @@ func (p *TaskQuery) ReadField12(ctx context.Context, iprot thrift.TProtocol) er return nil } -func (p *TaskQuery) ReadField13(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(ctx); err != nil { +func (p *TaskQuery) ReadField13(iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(); err != nil { return thrift.PrependError("error reading field 13: ", err) } else { p.Limit = &v @@ -9856,303 +9141,224 @@ func (p *TaskQuery) ReadField13(ctx context.Context, iprot thrift.TProtocol) er return nil } -func (p *TaskQuery) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "TaskQuery"); err != nil { +func (p *TaskQuery) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("TaskQuery"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != 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 := 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(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *TaskQuery) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *TaskQuery) writeField2(oprot thrift.TProtocol) (err error) { if p.IsSetJobName() { - if err := oprot.WriteFieldBegin(ctx, "jobName", thrift.STRING, 2); err != nil { + if err := oprot.WriteFieldBegin("jobName", thrift.STRING, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:jobName: ", p), err) } - if err := oprot.WriteString(ctx, string(*p.JobName)); err != nil { + if err := oprot.WriteString(string(*p.JobName)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.jobName (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:jobName: ", p), err) } } return err } -func (p *TaskQuery) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *TaskQuery) writeField4(oprot thrift.TProtocol) (err error) { if p.IsSetTaskIds() { - if err := oprot.WriteFieldBegin(ctx, "taskIds", thrift.SET, 4); err != nil { + if err := oprot.WriteFieldBegin("taskIds", thrift.SET, 4); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:taskIds: ", p), err) } - if err := oprot.WriteSetBegin(ctx, thrift.STRING, len(p.TaskIds)); err != nil { + if err := oprot.WriteSetBegin(thrift.STRING, len(p.TaskIds)); err != nil { return thrift.PrependError("error writing set begin: ", err) } for i := 0; i" @@ -10180,14 +9386,14 @@ func (p *HostStatus) GetHost() string { func (p *HostStatus) GetMode() MaintenanceMode { return p.Mode } -func (p *HostStatus) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *HostStatus) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -10195,41 +9401,41 @@ func (p *HostStatus) Read(ctx context.Context, iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRING { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.I32 { - if err := p.ReadField2(ctx, iprot); err != nil { + if err := p.ReadField2(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *HostStatus) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *HostStatus) ReadField1(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.Host = v @@ -10237,8 +9443,8 @@ func (p *HostStatus) ReadField1(ctx context.Context, iprot thrift.TProtocol) er return nil } -func (p *HostStatus) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(ctx); err != nil { +func (p *HostStatus) ReadField2(iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { temp := MaintenanceMode(v) @@ -10247,51 +9453,40 @@ func (p *HostStatus) ReadField2(ctx context.Context, iprot thrift.TProtocol) er return nil } -func (p *HostStatus) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "HostStatus"); err != nil { +func (p *HostStatus) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("HostStatus"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } - if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField2(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *HostStatus) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "host", thrift.STRING, 1); err != nil { +func (p *HostStatus) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("host", thrift.STRING, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:host: ", p), err) } - if err := oprot.WriteString(ctx, string(p.Host)); err != nil { + if err := oprot.WriteString(string(p.Host)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.host (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:host: ", p), err) } return err } -func (p *HostStatus) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "mode", thrift.I32, 2); err != nil { +func (p *HostStatus) writeField2(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("mode", thrift.I32, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:mode: ", p), err) } - if err := oprot.WriteI32(ctx, int32(p.Mode)); err != nil { + if err := oprot.WriteI32(int32(p.Mode)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.mode (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); 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 "" @@ -10325,14 +9520,14 @@ func (p *RoleSummary) GetJobCount() int32 { func (p *RoleSummary) GetCronJobCount() int32 { return p.CronJobCount } -func (p *RoleSummary) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *RoleSummary) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -10340,51 +9535,51 @@ func (p *RoleSummary) Read(ctx context.Context, iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRING { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.I32 { - if err := p.ReadField2(ctx, iprot); err != nil { + if err := p.ReadField2(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 3: if fieldTypeId == thrift.I32 { - if err := p.ReadField3(ctx, iprot); err != nil { + if err := p.ReadField3(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *RoleSummary) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *RoleSummary) ReadField1(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.Role = v @@ -10392,8 +9587,8 @@ func (p *RoleSummary) ReadField1(ctx context.Context, iprot thrift.TProtocol) e return nil } -func (p *RoleSummary) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(ctx); err != nil { +func (p *RoleSummary) ReadField2(iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { p.JobCount = v @@ -10401,8 +9596,8 @@ func (p *RoleSummary) ReadField2(ctx context.Context, iprot thrift.TProtocol) e return nil } -func (p *RoleSummary) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(ctx); err != nil { +func (p *RoleSummary) ReadField3(iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(); err != nil { return thrift.PrependError("error reading field 3: ", err) } else { p.CronJobCount = v @@ -10410,63 +9605,51 @@ func (p *RoleSummary) ReadField3(ctx context.Context, iprot thrift.TProtocol) e return nil } -func (p *RoleSummary) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "RoleSummary"); err != nil { +func (p *RoleSummary) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("RoleSummary"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != 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.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 := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *RoleSummary) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "role", thrift.STRING, 1); err != nil { +func (p *RoleSummary) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("role", thrift.STRING, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:role: ", p), err) } - if err := oprot.WriteString(ctx, string(p.Role)); err != nil { + if err := oprot.WriteString(string(p.Role)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.role (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:role: ", p), err) } return err } -func (p *RoleSummary) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "jobCount", thrift.I32, 2); err != nil { +func (p *RoleSummary) writeField2(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("jobCount", thrift.I32, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:jobCount: ", p), err) } - if err := oprot.WriteI32(ctx, int32(p.JobCount)); err != nil { + if err := oprot.WriteI32(int32(p.JobCount)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.jobCount (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:jobCount: ", p), err) } return err } -func (p *RoleSummary) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "cronJobCount", thrift.I32, 3); err != nil { +func (p *RoleSummary) writeField3(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("cronJobCount", thrift.I32, 3); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:cronJobCount: ", p), err) } - if err := oprot.WriteI32(ctx, int32(p.CronJobCount)); err != nil { + if err := oprot.WriteI32(int32(p.CronJobCount)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.cronJobCount (3) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); 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 "" @@ -10488,14 +9671,14 @@ func NewHosts() *Hosts { func (p *Hosts) GetHostNames() []string { return p.HostNames } -func (p *Hosts) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *Hosts) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -10503,106 +9686,89 @@ func (p *Hosts) Read(ctx context.Context, iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.SET { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *Hosts) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin(ctx) +func (p *Hosts) ReadField1(iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin() 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 _elem46 string - if v, err := iprot.ReadString(ctx); err != nil { +var _elem24 string + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem46 = v + _elem24 = v } - p.HostNames = append(p.HostNames, _elem46) + p.HostNames = append(p.HostNames, _elem24) } - if err := iprot.ReadSetEnd(ctx); err != nil { + if err := iprot.ReadSetEnd(); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *Hosts) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "Hosts"); err != nil { +func (p *Hosts) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("Hosts"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *Hosts) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "hostNames", thrift.SET, 1); err != nil { +func (p *Hosts) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("hostNames", thrift.SET, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:hostNames: ", p), err) } - if err := oprot.WriteSetBegin(ctx, thrift.STRING, len(p.HostNames)); err != nil { + if err := oprot.WriteSetBegin(thrift.STRING, len(p.HostNames)); err != nil { return thrift.PrependError("error writing set begin: ", err) } for i := 0; i" @@ -10630,14 +9796,14 @@ func (p *PendingReason) GetTaskId() string { func (p *PendingReason) GetReason() string { return p.Reason } -func (p *PendingReason) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *PendingReason) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -10645,41 +9811,41 @@ func (p *PendingReason) Read(ctx context.Context, iprot thrift.TProtocol) error switch fieldId { case 1: if fieldTypeId == thrift.STRING { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.STRING { - if err := p.ReadField2(ctx, iprot); err != nil { + if err := p.ReadField2(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *PendingReason) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *PendingReason) ReadField1(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.TaskId = v @@ -10687,8 +9853,8 @@ func (p *PendingReason) ReadField1(ctx context.Context, iprot thrift.TProtocol) return nil } -func (p *PendingReason) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *PendingReason) ReadField2(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { p.Reason = v @@ -10696,51 +9862,40 @@ func (p *PendingReason) ReadField2(ctx context.Context, iprot thrift.TProtocol) return nil } -func (p *PendingReason) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "PendingReason"); err != nil { +func (p *PendingReason) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("PendingReason"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } - if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField2(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *PendingReason) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "taskId", thrift.STRING, 1); err != nil { +func (p *PendingReason) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("taskId", thrift.STRING, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:taskId: ", p), err) } - if err := oprot.WriteString(ctx, string(p.TaskId)); err != nil { + if err := oprot.WriteString(string(p.TaskId)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.taskId (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:taskId: ", p), err) } return err } -func (p *PendingReason) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "reason", thrift.STRING, 2); err != nil { +func (p *PendingReason) writeField2(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("reason", thrift.STRING, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:reason: ", p), err) } - if err := oprot.WriteString(ctx, string(p.Reason)); err != nil { + if err := oprot.WriteString(string(p.Reason)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.reason (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); 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 "" @@ -10777,14 +9932,14 @@ func (p *JobUpdateKey) IsSetJob() bool { return p.Job != nil } -func (p *JobUpdateKey) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *JobUpdateKey) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -10792,49 +9947,49 @@ func (p *JobUpdateKey) Read(ctx context.Context, iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.STRING { - if err := p.ReadField2(ctx, iprot); err != nil { + if err := p.ReadField2(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *JobUpdateKey) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { +func (p *JobUpdateKey) ReadField1(iprot thrift.TProtocol) error { p.Job = &JobKey{} - if err := p.Job.Read(ctx, iprot); err != nil { + if err := p.Job.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Job), err) } return nil } -func (p *JobUpdateKey) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *JobUpdateKey) ReadField2(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { p.ID = v @@ -10842,52 +9997,41 @@ func (p *JobUpdateKey) ReadField2(ctx context.Context, iprot thrift.TProtocol) return nil } -func (p *JobUpdateKey) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "JobUpdateKey"); err != nil { +func (p *JobUpdateKey) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("JobUpdateKey"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } - if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField2(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *JobUpdateKey) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "job", thrift.STRUCT, 1); err != nil { +func (p *JobUpdateKey) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Job.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Job), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:job: ", p), err) } return err } -func (p *JobUpdateKey) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "id", thrift.STRING, 2); err != nil { +func (p *JobUpdateKey) writeField2(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("id", thrift.STRING, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:id: ", p), err) } - if err := oprot.WriteString(ctx, string(p.ID)); err != nil { + if err := oprot.WriteString(string(p.ID)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.id (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); 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 "" @@ -10911,14 +10055,14 @@ func NewQueueJobUpdateStrategy() *QueueJobUpdateStrategy { func (p *QueueJobUpdateStrategy) GetGroupSize() int32 { return p.GroupSize } -func (p *QueueJobUpdateStrategy) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *QueueJobUpdateStrategy) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -10926,31 +10070,31 @@ func (p *QueueJobUpdateStrategy) Read(ctx context.Context, iprot thrift.TProtoco switch fieldId { case 1: if fieldTypeId == thrift.I32 { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *QueueJobUpdateStrategy) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(ctx); err != nil { +func (p *QueueJobUpdateStrategy) ReadField1(iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.GroupSize = v @@ -10958,39 +10102,29 @@ func (p *QueueJobUpdateStrategy) ReadField1(ctx context.Context, iprot thrift.T return nil } -func (p *QueueJobUpdateStrategy) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "QueueJobUpdateStrategy"); err != nil { +func (p *QueueJobUpdateStrategy) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("QueueJobUpdateStrategy"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *QueueJobUpdateStrategy) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "groupSize", thrift.I32, 1); err != nil { +func (p *QueueJobUpdateStrategy) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("groupSize", thrift.I32, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:groupSize: ", p), err) } - if err := oprot.WriteI32(ctx, int32(p.GroupSize)); err != nil { + if err := oprot.WriteI32(int32(p.GroupSize)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.groupSize (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); 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 "" @@ -11021,14 +10155,14 @@ func (p *BatchJobUpdateStrategy) GetGroupSize() int32 { func (p *BatchJobUpdateStrategy) GetAutopauseAfterBatch() bool { return p.AutopauseAfterBatch } -func (p *BatchJobUpdateStrategy) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *BatchJobUpdateStrategy) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -11036,41 +10170,41 @@ func (p *BatchJobUpdateStrategy) Read(ctx context.Context, iprot thrift.TProtoco switch fieldId { case 1: if fieldTypeId == thrift.I32 { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.BOOL { - if err := p.ReadField2(ctx, iprot); err != nil { + if err := p.ReadField2(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *BatchJobUpdateStrategy) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(ctx); err != nil { +func (p *BatchJobUpdateStrategy) ReadField1(iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.GroupSize = v @@ -11078,8 +10212,8 @@ func (p *BatchJobUpdateStrategy) ReadField1(ctx context.Context, iprot thrift.T return nil } -func (p *BatchJobUpdateStrategy) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadBool(ctx); err != nil { +func (p *BatchJobUpdateStrategy) ReadField2(iprot thrift.TProtocol) error { + if v, err := iprot.ReadBool(); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { p.AutopauseAfterBatch = v @@ -11087,51 +10221,40 @@ func (p *BatchJobUpdateStrategy) ReadField2(ctx context.Context, iprot thrift.T return nil } -func (p *BatchJobUpdateStrategy) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "BatchJobUpdateStrategy"); err != nil { +func (p *BatchJobUpdateStrategy) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("BatchJobUpdateStrategy"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } - if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField2(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *BatchJobUpdateStrategy) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "groupSize", thrift.I32, 1); err != nil { +func (p *BatchJobUpdateStrategy) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("groupSize", thrift.I32, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:groupSize: ", p), err) } - if err := oprot.WriteI32(ctx, int32(p.GroupSize)); err != nil { + if err := oprot.WriteI32(int32(p.GroupSize)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.groupSize (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:groupSize: ", p), err) } return err } -func (p *BatchJobUpdateStrategy) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "autopauseAfterBatch", thrift.BOOL, 2); err != nil { +func (p *BatchJobUpdateStrategy) writeField2(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("autopauseAfterBatch", thrift.BOOL, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:autopauseAfterBatch: ", p), err) } - if err := oprot.WriteBool(ctx, bool(p.AutopauseAfterBatch)); err != nil { + if err := oprot.WriteBool(bool(p.AutopauseAfterBatch)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.autopauseAfterBatch (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); 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 "" @@ -11162,14 +10285,14 @@ func (p *VariableBatchJobUpdateStrategy) GetGroupSizes() []int32 { func (p *VariableBatchJobUpdateStrategy) GetAutopauseAfterBatch() bool { return p.AutopauseAfterBatch } -func (p *VariableBatchJobUpdateStrategy) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *VariableBatchJobUpdateStrategy) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -11177,63 +10300,63 @@ func (p *VariableBatchJobUpdateStrategy) Read(ctx context.Context, iprot thrift. switch fieldId { case 1: if fieldTypeId == thrift.LIST { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.BOOL { - if err := p.ReadField2(ctx, iprot); err != nil { + if err := p.ReadField2(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *VariableBatchJobUpdateStrategy) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin(ctx) +func (p *VariableBatchJobUpdateStrategy) ReadField1(iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin() 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 _elem48 int32 - if v, err := iprot.ReadI32(ctx); err != nil { +var _elem25 int32 + if v, err := iprot.ReadI32(); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem48 = v + _elem25 = v } - p.GroupSizes = append(p.GroupSizes, _elem48) + p.GroupSizes = append(p.GroupSizes, _elem25) } - if err := iprot.ReadListEnd(ctx); err != nil { + if err := iprot.ReadListEnd(); err != nil { return thrift.PrependError("error reading list end: ", err) } return nil } -func (p *VariableBatchJobUpdateStrategy) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadBool(ctx); err != nil { +func (p *VariableBatchJobUpdateStrategy) ReadField2(iprot thrift.TProtocol) error { + if v, err := iprot.ReadBool(); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { p.AutopauseAfterBatch = v @@ -11241,63 +10364,48 @@ func (p *VariableBatchJobUpdateStrategy) ReadField2(ctx context.Context, iprot return nil } -func (p *VariableBatchJobUpdateStrategy) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "VariableBatchJobUpdateStrategy"); err != nil { +func (p *VariableBatchJobUpdateStrategy) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("VariableBatchJobUpdateStrategy"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } - if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField2(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *VariableBatchJobUpdateStrategy) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "groupSizes", thrift.LIST, 1); err != nil { +func (p *VariableBatchJobUpdateStrategy) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("groupSizes", thrift.LIST, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:groupSizes: ", p), err) } - if err := oprot.WriteListBegin(ctx, thrift.I32, len(p.GroupSizes)); err != nil { + if err := oprot.WriteListBegin(thrift.I32, len(p.GroupSizes)); err != nil { return thrift.PrependError("error writing list begin: ", err) } for _, v := range p.GroupSizes { - if err := oprot.WriteI32(ctx, int32(v)); err != nil { + if err := oprot.WriteI32(int32(v)); err != nil { return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } } - if err := oprot.WriteListEnd(ctx); err != nil { + if err := oprot.WriteListEnd(); err != nil { return thrift.PrependError("error writing list end: ", err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:groupSizes: ", p), err) } return err } -func (p *VariableBatchJobUpdateStrategy) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "autopauseAfterBatch", thrift.BOOL, 2); err != nil { +func (p *VariableBatchJobUpdateStrategy) writeField2(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("autopauseAfterBatch", thrift.BOOL, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:autopauseAfterBatch: ", p), err) } - if err := oprot.WriteBool(ctx, bool(p.AutopauseAfterBatch)); err != nil { + if err := oprot.WriteBool(bool(p.AutopauseAfterBatch)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.autopauseAfterBatch (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); 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 "" @@ -11367,14 +10475,14 @@ func (p *JobUpdateStrategy) IsSetVarBatchStrategy() bool { return p.VarBatchStrategy != nil } -func (p *JobUpdateStrategy) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *JobUpdateStrategy) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -11382,142 +10490,130 @@ func (p *JobUpdateStrategy) Read(ctx context.Context, iprot thrift.TProtocol) er switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField2(ctx, iprot); err != nil { + if err := p.ReadField2(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 3: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField3(ctx, iprot); err != nil { + if err := p.ReadField3(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *JobUpdateStrategy) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { +func (p *JobUpdateStrategy) ReadField1(iprot thrift.TProtocol) error { p.QueueStrategy = &QueueJobUpdateStrategy{} - if err := p.QueueStrategy.Read(ctx, iprot); err != nil { + if err := p.QueueStrategy.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.QueueStrategy), err) } return nil } -func (p *JobUpdateStrategy) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { +func (p *JobUpdateStrategy) ReadField2(iprot thrift.TProtocol) error { p.BatchStrategy = &BatchJobUpdateStrategy{} - if err := p.BatchStrategy.Read(ctx, iprot); err != nil { + if err := p.BatchStrategy.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.BatchStrategy), err) } return nil } -func (p *JobUpdateStrategy) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { +func (p *JobUpdateStrategy) ReadField3(iprot thrift.TProtocol) error { p.VarBatchStrategy = &VariableBatchJobUpdateStrategy{} - if err := p.VarBatchStrategy.Read(ctx, iprot); err != nil { + if err := p.VarBatchStrategy.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.VarBatchStrategy), err) } return nil } -func (p *JobUpdateStrategy) Write(ctx context.Context, oprot thrift.TProtocol) error { +func (p *JobUpdateStrategy) Write(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(ctx, "JobUpdateStrategy"); err != nil { + if err := oprot.WriteStructBegin("JobUpdateStrategy"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != 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.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 := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *JobUpdateStrategy) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *JobUpdateStrategy) writeField1(oprot thrift.TProtocol) (err error) { if p.IsSetQueueStrategy() { - if err := oprot.WriteFieldBegin(ctx, "queueStrategy", thrift.STRUCT, 1); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.QueueStrategy.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.QueueStrategy), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:queueStrategy: ", p), err) } } return err } -func (p *JobUpdateStrategy) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *JobUpdateStrategy) writeField2(oprot thrift.TProtocol) (err error) { if p.IsSetBatchStrategy() { - if err := oprot.WriteFieldBegin(ctx, "batchStrategy", thrift.STRUCT, 2); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.BatchStrategy.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.BatchStrategy), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:batchStrategy: ", p), err) } } return err } -func (p *JobUpdateStrategy) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *JobUpdateStrategy) writeField3(oprot thrift.TProtocol) (err error) { if p.IsSetVarBatchStrategy() { - if err := oprot.WriteFieldBegin(ctx, "varBatchStrategy", thrift.STRUCT, 3); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.VarBatchStrategy.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.VarBatchStrategy), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); 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 "" @@ -11624,14 +10720,14 @@ func (p *JobUpdateSettings) IsSetUpdateStrategy() bool { return p.UpdateStrategy != nil } -func (p *JobUpdateSettings) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *JobUpdateSettings) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -11639,121 +10735,121 @@ func (p *JobUpdateSettings) Read(ctx context.Context, iprot thrift.TProtocol) er switch fieldId { case 1: if fieldTypeId == thrift.I32 { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.I32 { - if err := p.ReadField2(ctx, iprot); err != nil { + if err := p.ReadField2(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 3: if fieldTypeId == thrift.I32 { - if err := p.ReadField3(ctx, iprot); err != nil { + if err := p.ReadField3(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 5: if fieldTypeId == thrift.I32 { - if err := p.ReadField5(ctx, iprot); err != nil { + if err := p.ReadField5(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 6: if fieldTypeId == thrift.BOOL { - if err := p.ReadField6(ctx, iprot); err != nil { + if err := p.ReadField6(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 7: if fieldTypeId == thrift.SET { - if err := p.ReadField7(ctx, iprot); err != nil { + if err := p.ReadField7(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 8: if fieldTypeId == thrift.BOOL { - if err := p.ReadField8(ctx, iprot); err != nil { + if err := p.ReadField8(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 9: if fieldTypeId == thrift.I32 { - if err := p.ReadField9(ctx, iprot); err != nil { + if err := p.ReadField9(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 10: if fieldTypeId == thrift.BOOL { - if err := p.ReadField10(ctx, iprot); err != nil { + if err := p.ReadField10(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 11: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField11(ctx, iprot); err != nil { + if err := p.ReadField11(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *JobUpdateSettings) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(ctx); err != nil { +func (p *JobUpdateSettings) ReadField1(iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.UpdateGroupSize = v @@ -11761,8 +10857,8 @@ func (p *JobUpdateSettings) ReadField1(ctx context.Context, iprot thrift.TProto return nil } -func (p *JobUpdateSettings) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(ctx); err != nil { +func (p *JobUpdateSettings) ReadField2(iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { p.MaxPerInstanceFailures = v @@ -11770,8 +10866,8 @@ func (p *JobUpdateSettings) ReadField2(ctx context.Context, iprot thrift.TProto return nil } -func (p *JobUpdateSettings) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(ctx); err != nil { +func (p *JobUpdateSettings) ReadField3(iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(); err != nil { return thrift.PrependError("error reading field 3: ", err) } else { p.MaxFailedInstances = v @@ -11779,8 +10875,8 @@ func (p *JobUpdateSettings) ReadField3(ctx context.Context, iprot thrift.TProto return nil } -func (p *JobUpdateSettings) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(ctx); err != nil { +func (p *JobUpdateSettings) ReadField5(iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(); err != nil { return thrift.PrependError("error reading field 5: ", err) } else { p.MinWaitInInstanceRunningMs = v @@ -11788,8 +10884,8 @@ func (p *JobUpdateSettings) ReadField5(ctx context.Context, iprot thrift.TProto return nil } -func (p *JobUpdateSettings) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadBool(ctx); err != nil { +func (p *JobUpdateSettings) ReadField6(iprot thrift.TProtocol) error { + if v, err := iprot.ReadBool(); err != nil { return thrift.PrependError("error reading field 6: ", err) } else { p.RollbackOnFailure = v @@ -11797,28 +10893,28 @@ func (p *JobUpdateSettings) ReadField6(ctx context.Context, iprot thrift.TProto return nil } -func (p *JobUpdateSettings) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin(ctx) +func (p *JobUpdateSettings) ReadField7(iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin() 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 ++ { - _elem50 := &Range{} - if err := _elem50.Read(ctx, iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem50), err) + _elem26 := &Range{} + if err := _elem26.Read(iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem26), err) } - p.UpdateOnlyTheseInstances = append(p.UpdateOnlyTheseInstances, _elem50) + p.UpdateOnlyTheseInstances = append(p.UpdateOnlyTheseInstances, _elem26) } - if err := iprot.ReadSetEnd(ctx); err != nil { + if err := iprot.ReadSetEnd(); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *JobUpdateSettings) ReadField8(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadBool(ctx); err != nil { +func (p *JobUpdateSettings) ReadField8(iprot thrift.TProtocol) error { + if v, err := iprot.ReadBool(); err != nil { return thrift.PrependError("error reading field 8: ", err) } else { p.WaitForBatchCompletion = v @@ -11826,8 +10922,8 @@ func (p *JobUpdateSettings) ReadField8(ctx context.Context, iprot thrift.TProto return nil } -func (p *JobUpdateSettings) ReadField9(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(ctx); err != nil { +func (p *JobUpdateSettings) ReadField9(iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(); err != nil { return thrift.PrependError("error reading field 9: ", err) } else { p.BlockIfNoPulsesAfterMs = &v @@ -11835,8 +10931,8 @@ func (p *JobUpdateSettings) ReadField9(ctx context.Context, iprot thrift.TProto return nil } -func (p *JobUpdateSettings) ReadField10(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadBool(ctx); err != nil { +func (p *JobUpdateSettings) ReadField10(iprot thrift.TProtocol) error { + if v, err := iprot.ReadBool(); err != nil { return thrift.PrependError("error reading field 10: ", err) } else { p.SlaAware = &v @@ -11844,195 +10940,159 @@ func (p *JobUpdateSettings) ReadField10(ctx context.Context, iprot thrift.TProt return nil } -func (p *JobUpdateSettings) ReadField11(ctx context.Context, iprot thrift.TProtocol) error { +func (p *JobUpdateSettings) ReadField11(iprot thrift.TProtocol) error { p.UpdateStrategy = &JobUpdateStrategy{} - if err := p.UpdateStrategy.Read(ctx, iprot); err != nil { + if err := p.UpdateStrategy.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.UpdateStrategy), err) } return nil } -func (p *JobUpdateSettings) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "JobUpdateSettings"); err != nil { +func (p *JobUpdateSettings) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("JobUpdateSettings"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != 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 := 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(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *JobUpdateSettings) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "updateGroupSize", thrift.I32, 1); err != nil { +func (p *JobUpdateSettings) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("updateGroupSize", thrift.I32, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:updateGroupSize: ", p), err) } - if err := oprot.WriteI32(ctx, int32(p.UpdateGroupSize)); err != nil { + if err := oprot.WriteI32(int32(p.UpdateGroupSize)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.updateGroupSize (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:updateGroupSize: ", p), err) } return err } -func (p *JobUpdateSettings) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "maxPerInstanceFailures", thrift.I32, 2); err != nil { +func (p *JobUpdateSettings) writeField2(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("maxPerInstanceFailures", thrift.I32, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:maxPerInstanceFailures: ", p), err) } - if err := oprot.WriteI32(ctx, int32(p.MaxPerInstanceFailures)); err != nil { + if err := oprot.WriteI32(int32(p.MaxPerInstanceFailures)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.maxPerInstanceFailures (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:maxPerInstanceFailures: ", p), err) } return err } -func (p *JobUpdateSettings) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "maxFailedInstances", thrift.I32, 3); err != nil { +func (p *JobUpdateSettings) writeField3(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("maxFailedInstances", thrift.I32, 3); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:maxFailedInstances: ", p), err) } - if err := oprot.WriteI32(ctx, int32(p.MaxFailedInstances)); err != nil { + if err := oprot.WriteI32(int32(p.MaxFailedInstances)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.maxFailedInstances (3) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 3:maxFailedInstances: ", p), err) } return err } -func (p *JobUpdateSettings) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "minWaitInInstanceRunningMs", thrift.I32, 5); err != nil { +func (p *JobUpdateSettings) writeField5(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("minWaitInInstanceRunningMs", thrift.I32, 5); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:minWaitInInstanceRunningMs: ", p), err) } - if err := oprot.WriteI32(ctx, int32(p.MinWaitInInstanceRunningMs)); err != nil { + if err := oprot.WriteI32(int32(p.MinWaitInInstanceRunningMs)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.minWaitInInstanceRunningMs (5) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 5:minWaitInInstanceRunningMs: ", p), err) } return err } -func (p *JobUpdateSettings) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "rollbackOnFailure", thrift.BOOL, 6); err != nil { +func (p *JobUpdateSettings) writeField6(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("rollbackOnFailure", thrift.BOOL, 6); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:rollbackOnFailure: ", p), err) } - if err := oprot.WriteBool(ctx, bool(p.RollbackOnFailure)); err != nil { + if err := oprot.WriteBool(bool(p.RollbackOnFailure)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.rollbackOnFailure (6) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 6:rollbackOnFailure: ", p), err) } return err } -func (p *JobUpdateSettings) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "updateOnlyTheseInstances", thrift.SET, 7); err != nil { +func (p *JobUpdateSettings) writeField7(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("updateOnlyTheseInstances", thrift.SET, 7); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:updateOnlyTheseInstances: ", p), err) } - if err := oprot.WriteSetBegin(ctx, thrift.STRUCT, len(p.UpdateOnlyTheseInstances)); err != nil { + if err := oprot.WriteSetBegin(thrift.STRUCT, len(p.UpdateOnlyTheseInstances)); err != nil { return thrift.PrependError("error writing set begin: ", err) } for i := 0; i" @@ -12089,14 +11149,14 @@ func (p *JobUpdateEvent) IsSetMessage() bool { return p.Message != nil } -func (p *JobUpdateEvent) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *JobUpdateEvent) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -12104,61 +11164,61 @@ func (p *JobUpdateEvent) Read(ctx context.Context, iprot thrift.TProtocol) error switch fieldId { case 1: if fieldTypeId == thrift.I32 { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.I64 { - if err := p.ReadField2(ctx, iprot); err != nil { + if err := p.ReadField2(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 3: if fieldTypeId == thrift.STRING { - if err := p.ReadField3(ctx, iprot); err != nil { + if err := p.ReadField3(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 4: if fieldTypeId == thrift.STRING { - if err := p.ReadField4(ctx, iprot); err != nil { + if err := p.ReadField4(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *JobUpdateEvent) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(ctx); err != nil { +func (p *JobUpdateEvent) ReadField1(iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { temp := JobUpdateStatus(v) @@ -12167,8 +11227,8 @@ func (p *JobUpdateEvent) ReadField1(ctx context.Context, iprot thrift.TProtocol return nil } -func (p *JobUpdateEvent) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI64(ctx); err != nil { +func (p *JobUpdateEvent) ReadField2(iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { p.TimestampMs = v @@ -12176,8 +11236,8 @@ func (p *JobUpdateEvent) ReadField2(ctx context.Context, iprot thrift.TProtocol return nil } -func (p *JobUpdateEvent) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *JobUpdateEvent) ReadField3(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 3: ", err) } else { p.User = &v @@ -12185,8 +11245,8 @@ func (p *JobUpdateEvent) ReadField3(ctx context.Context, iprot thrift.TProtocol return nil } -func (p *JobUpdateEvent) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *JobUpdateEvent) ReadField4(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 4: ", err) } else { p.Message = &v @@ -12194,89 +11254,66 @@ func (p *JobUpdateEvent) ReadField4(ctx context.Context, iprot thrift.TProtocol return nil } -func (p *JobUpdateEvent) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "JobUpdateEvent"); err != nil { +func (p *JobUpdateEvent) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("JobUpdateEvent"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != 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.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 := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *JobUpdateEvent) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "status", thrift.I32, 1); err != nil { +func (p *JobUpdateEvent) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("status", thrift.I32, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:status: ", p), err) } - if err := oprot.WriteI32(ctx, int32(p.Status)); err != nil { + if err := oprot.WriteI32(int32(p.Status)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.status (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:status: ", p), err) } return err } -func (p *JobUpdateEvent) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "timestampMs", thrift.I64, 2); err != nil { +func (p *JobUpdateEvent) writeField2(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("timestampMs", thrift.I64, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:timestampMs: ", p), err) } - if err := oprot.WriteI64(ctx, int64(p.TimestampMs)); err != nil { + if err := oprot.WriteI64(int64(p.TimestampMs)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.timestampMs (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:timestampMs: ", p), err) } return err } -func (p *JobUpdateEvent) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *JobUpdateEvent) writeField3(oprot thrift.TProtocol) (err error) { if p.IsSetUser() { - if err := oprot.WriteFieldBegin(ctx, "user", thrift.STRING, 3); err != nil { + if err := oprot.WriteFieldBegin("user", thrift.STRING, 3); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:user: ", p), err) } - if err := oprot.WriteString(ctx, string(*p.User)); err != nil { + if err := oprot.WriteString(string(*p.User)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.user (3) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 3:user: ", p), err) } } return err } -func (p *JobUpdateEvent) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *JobUpdateEvent) writeField4(oprot thrift.TProtocol) (err error) { if p.IsSetMessage() { - if err := oprot.WriteFieldBegin(ctx, "message", thrift.STRING, 4); err != nil { + if err := oprot.WriteFieldBegin("message", thrift.STRING, 4); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:message: ", p), err) } - if err := oprot.WriteString(ctx, string(*p.Message)); err != nil { + if err := oprot.WriteString(string(*p.Message)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.message (4) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 4:message: ", p), err) } } return err } -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 "" @@ -12325,14 +11362,14 @@ func (p *JobInstanceUpdateEvent) IsSetMessage() bool { return p.Message != nil } -func (p *JobInstanceUpdateEvent) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *JobInstanceUpdateEvent) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -12340,61 +11377,61 @@ func (p *JobInstanceUpdateEvent) Read(ctx context.Context, iprot thrift.TProtoco switch fieldId { case 1: if fieldTypeId == thrift.I32 { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.I64 { - if err := p.ReadField2(ctx, iprot); err != nil { + if err := p.ReadField2(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 3: if fieldTypeId == thrift.I32 { - if err := p.ReadField3(ctx, iprot); err != nil { + if err := p.ReadField3(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 4: if fieldTypeId == thrift.STRING { - if err := p.ReadField4(ctx, iprot); err != nil { + if err := p.ReadField4(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *JobInstanceUpdateEvent) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(ctx); err != nil { +func (p *JobInstanceUpdateEvent) ReadField1(iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.InstanceId = v @@ -12402,8 +11439,8 @@ func (p *JobInstanceUpdateEvent) ReadField1(ctx context.Context, iprot thrift.T return nil } -func (p *JobInstanceUpdateEvent) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI64(ctx); err != nil { +func (p *JobInstanceUpdateEvent) ReadField2(iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { p.TimestampMs = v @@ -12411,8 +11448,8 @@ func (p *JobInstanceUpdateEvent) ReadField2(ctx context.Context, iprot thrift.T return nil } -func (p *JobInstanceUpdateEvent) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(ctx); err != nil { +func (p *JobInstanceUpdateEvent) ReadField3(iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(); err != nil { return thrift.PrependError("error reading field 3: ", err) } else { temp := JobUpdateAction(v) @@ -12421,8 +11458,8 @@ func (p *JobInstanceUpdateEvent) ReadField3(ctx context.Context, iprot thrift.T return nil } -func (p *JobInstanceUpdateEvent) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *JobInstanceUpdateEvent) ReadField4(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 4: ", err) } else { p.Message = &v @@ -12430,82 +11467,64 @@ func (p *JobInstanceUpdateEvent) ReadField4(ctx context.Context, iprot thrift.T return nil } -func (p *JobInstanceUpdateEvent) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "JobInstanceUpdateEvent"); err != nil { +func (p *JobInstanceUpdateEvent) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("JobInstanceUpdateEvent"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != 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.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 := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *JobInstanceUpdateEvent) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "instanceId", thrift.I32, 1); err != nil { +func (p *JobInstanceUpdateEvent) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("instanceId", thrift.I32, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:instanceId: ", p), err) } - if err := oprot.WriteI32(ctx, int32(p.InstanceId)); err != nil { + if err := oprot.WriteI32(int32(p.InstanceId)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.instanceId (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:instanceId: ", p), err) } return err } -func (p *JobInstanceUpdateEvent) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "timestampMs", thrift.I64, 2); err != nil { +func (p *JobInstanceUpdateEvent) writeField2(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("timestampMs", thrift.I64, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:timestampMs: ", p), err) } - if err := oprot.WriteI64(ctx, int64(p.TimestampMs)); err != nil { + if err := oprot.WriteI64(int64(p.TimestampMs)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.timestampMs (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:timestampMs: ", p), err) } return err } -func (p *JobInstanceUpdateEvent) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "action", thrift.I32, 3); err != nil { +func (p *JobInstanceUpdateEvent) writeField3(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("action", thrift.I32, 3); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:action: ", p), err) } - if err := oprot.WriteI32(ctx, int32(p.Action)); err != nil { + if err := oprot.WriteI32(int32(p.Action)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.action (3) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 3:action: ", p), err) } return err } -func (p *JobInstanceUpdateEvent) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *JobInstanceUpdateEvent) writeField4(oprot thrift.TProtocol) (err error) { if p.IsSetMessage() { - if err := oprot.WriteFieldBegin(ctx, "message", thrift.STRING, 4); err != nil { + if err := oprot.WriteFieldBegin("message", thrift.STRING, 4); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:message: ", p), err) } - if err := oprot.WriteString(ctx, string(*p.Message)); err != nil { + if err := oprot.WriteString(string(*p.Message)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.message (4) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); 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 "" @@ -12542,14 +11561,14 @@ func (p *InstanceTaskConfig) IsSetTask() bool { return p.Task != nil } -func (p *InstanceTaskConfig) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *InstanceTaskConfig) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -12557,136 +11576,118 @@ func (p *InstanceTaskConfig) Read(ctx context.Context, iprot thrift.TProtocol) e switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.SET { - if err := p.ReadField2(ctx, iprot); err != nil { + if err := p.ReadField2(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *InstanceTaskConfig) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { +func (p *InstanceTaskConfig) ReadField1(iprot thrift.TProtocol) error { p.Task = &TaskConfig{} - if err := p.Task.Read(ctx, iprot); err != nil { + if err := p.Task.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Task), err) } return nil } -func (p *InstanceTaskConfig) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin(ctx) +func (p *InstanceTaskConfig) ReadField2(iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin() 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 ++ { - _elem52 := &Range{} - if err := _elem52.Read(ctx, iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem52), err) + _elem27 := &Range{} + if err := _elem27.Read(iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem27), err) } - p.Instances = append(p.Instances, _elem52) + p.Instances = append(p.Instances, _elem27) } - if err := iprot.ReadSetEnd(ctx); err != nil { + if err := iprot.ReadSetEnd(); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *InstanceTaskConfig) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "InstanceTaskConfig"); err != nil { +func (p *InstanceTaskConfig) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("InstanceTaskConfig"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } - if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField2(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *InstanceTaskConfig) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "task", thrift.STRUCT, 1); err != nil { +func (p *InstanceTaskConfig) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Task.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Task), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:task: ", p), err) } return err } -func (p *InstanceTaskConfig) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "instances", thrift.SET, 2); err != nil { +func (p *InstanceTaskConfig) writeField2(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("instances", thrift.SET, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:instances: ", p), err) } - if err := oprot.WriteSetBegin(ctx, thrift.STRUCT, len(p.Instances)); err != nil { + if err := oprot.WriteSetBegin(thrift.STRUCT, len(p.Instances)); err != nil { return thrift.PrependError("error writing set begin: ", err) } for i := 0; i" @@ -12722,14 +11723,14 @@ func (p *JobUpdateState) GetCreatedTimestampMs() int64 { func (p *JobUpdateState) GetLastModifiedTimestampMs() int64 { return p.LastModifiedTimestampMs } -func (p *JobUpdateState) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *JobUpdateState) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -12737,51 +11738,51 @@ func (p *JobUpdateState) Read(ctx context.Context, iprot thrift.TProtocol) error switch fieldId { case 1: if fieldTypeId == thrift.I32 { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.I64 { - if err := p.ReadField2(ctx, iprot); err != nil { + if err := p.ReadField2(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 3: if fieldTypeId == thrift.I64 { - if err := p.ReadField3(ctx, iprot); err != nil { + if err := p.ReadField3(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *JobUpdateState) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(ctx); err != nil { +func (p *JobUpdateState) ReadField1(iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { temp := JobUpdateStatus(v) @@ -12790,8 +11791,8 @@ func (p *JobUpdateState) ReadField1(ctx context.Context, iprot thrift.TProtocol return nil } -func (p *JobUpdateState) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI64(ctx); err != nil { +func (p *JobUpdateState) ReadField2(iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { p.CreatedTimestampMs = v @@ -12799,8 +11800,8 @@ func (p *JobUpdateState) ReadField2(ctx context.Context, iprot thrift.TProtocol return nil } -func (p *JobUpdateState) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI64(ctx); err != nil { +func (p *JobUpdateState) ReadField3(iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(); err != nil { return thrift.PrependError("error reading field 3: ", err) } else { p.LastModifiedTimestampMs = v @@ -12808,63 +11809,51 @@ func (p *JobUpdateState) ReadField3(ctx context.Context, iprot thrift.TProtocol return nil } -func (p *JobUpdateState) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "JobUpdateState"); err != nil { +func (p *JobUpdateState) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("JobUpdateState"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != 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.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 := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *JobUpdateState) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "status", thrift.I32, 1); err != nil { +func (p *JobUpdateState) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("status", thrift.I32, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:status: ", p), err) } - if err := oprot.WriteI32(ctx, int32(p.Status)); err != nil { + if err := oprot.WriteI32(int32(p.Status)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.status (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:status: ", p), err) } return err } -func (p *JobUpdateState) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "createdTimestampMs", thrift.I64, 2); err != nil { +func (p *JobUpdateState) writeField2(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("createdTimestampMs", thrift.I64, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:createdTimestampMs: ", p), err) } - if err := oprot.WriteI64(ctx, int64(p.CreatedTimestampMs)); err != nil { + if err := oprot.WriteI64(int64(p.CreatedTimestampMs)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.createdTimestampMs (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:createdTimestampMs: ", p), err) } return err } -func (p *JobUpdateState) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "lastModifiedTimestampMs", thrift.I64, 3); err != nil { +func (p *JobUpdateState) writeField3(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("lastModifiedTimestampMs", thrift.I64, 3); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:lastModifiedTimestampMs: ", p), err) } - if err := oprot.WriteI64(ctx, int64(p.LastModifiedTimestampMs)); err != nil { + if err := oprot.WriteI64(int64(p.LastModifiedTimestampMs)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.lastModifiedTimestampMs (3) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); 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 "" @@ -12926,14 +11915,14 @@ func (p *JobUpdateSummary) IsSetMetadata() bool { return p.Metadata != nil } -func (p *JobUpdateSummary) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *JobUpdateSummary) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -12941,69 +11930,69 @@ func (p *JobUpdateSummary) Read(ctx context.Context, iprot thrift.TProtocol) err switch fieldId { case 5: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField5(ctx, iprot); err != nil { + if err := p.ReadField5(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 3: if fieldTypeId == thrift.STRING { - if err := p.ReadField3(ctx, iprot); err != nil { + if err := p.ReadField3(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 4: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField4(ctx, iprot); err != nil { + if err := p.ReadField4(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 6: if fieldTypeId == thrift.SET { - if err := p.ReadField6(ctx, iprot); err != nil { + if err := p.ReadField6(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *JobUpdateSummary) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { +func (p *JobUpdateSummary) ReadField5(iprot thrift.TProtocol) error { p.Key = &JobUpdateKey{} - if err := p.Key.Read(ctx, iprot); err != nil { + if err := p.Key.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Key), err) } return nil } -func (p *JobUpdateSummary) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *JobUpdateSummary) ReadField3(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 3: ", err) } else { p.User = v @@ -13011,130 +12000,110 @@ func (p *JobUpdateSummary) ReadField3(ctx context.Context, iprot thrift.TProtoc return nil } -func (p *JobUpdateSummary) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { +func (p *JobUpdateSummary) ReadField4(iprot thrift.TProtocol) error { p.State = &JobUpdateState{} - if err := p.State.Read(ctx, iprot); err != nil { + if err := p.State.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.State), err) } return nil } -func (p *JobUpdateSummary) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin(ctx) +func (p *JobUpdateSummary) ReadField6(iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin() 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 ++ { - _elem54 := &Metadata{} - if err := _elem54.Read(ctx, iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem54), err) + _elem28 := &Metadata{} + if err := _elem28.Read(iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem28), err) } - p.Metadata = append(p.Metadata, _elem54) + p.Metadata = append(p.Metadata, _elem28) } - if err := iprot.ReadSetEnd(ctx); err != nil { + if err := iprot.ReadSetEnd(); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *JobUpdateSummary) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "JobUpdateSummary"); err != nil { +func (p *JobUpdateSummary) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("JobUpdateSummary"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - 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.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(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *JobUpdateSummary) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "user", thrift.STRING, 3); err != nil { +func (p *JobUpdateSummary) writeField3(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("user", thrift.STRING, 3); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:user: ", p), err) } - if err := oprot.WriteString(ctx, string(p.User)); err != nil { + if err := oprot.WriteString(string(p.User)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.user (3) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 3:user: ", p), err) } return err } -func (p *JobUpdateSummary) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "state", thrift.STRUCT, 4); err != nil { +func (p *JobUpdateSummary) writeField4(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.State.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.State), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 4:state: ", p), err) } return err } -func (p *JobUpdateSummary) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "key", thrift.STRUCT, 5); err != nil { +func (p *JobUpdateSummary) writeField5(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Key.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Key), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 5:key: ", p), err) } return err } -func (p *JobUpdateSummary) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *JobUpdateSummary) writeField6(oprot thrift.TProtocol) (err error) { if p.IsSetMetadata() { - if err := oprot.WriteFieldBegin(ctx, "metadata", thrift.SET, 6); err != nil { + if err := oprot.WriteFieldBegin("metadata", thrift.SET, 6); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:metadata: ", p), err) } - if err := oprot.WriteSetBegin(ctx, thrift.STRUCT, len(p.Metadata)); err != nil { + if err := oprot.WriteSetBegin(thrift.STRUCT, len(p.Metadata)); err != nil { return thrift.PrependError("error writing set begin: ", err) } for i := 0; i" @@ -13184,14 +12153,14 @@ func (p *JobUpdateInstructions) IsSetSettings() bool { return p.Settings != nil } -func (p *JobUpdateInstructions) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *JobUpdateInstructions) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -13199,167 +12168,148 @@ func (p *JobUpdateInstructions) Read(ctx context.Context, iprot thrift.TProtocol switch fieldId { case 1: if fieldTypeId == thrift.SET { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField2(ctx, iprot); err != nil { + if err := p.ReadField2(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 3: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField3(ctx, iprot); err != nil { + if err := p.ReadField3(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *JobUpdateInstructions) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin(ctx) +func (p *JobUpdateInstructions) ReadField1(iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin() 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 ++ { - _elem56 := &InstanceTaskConfig{} - if err := _elem56.Read(ctx, iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem56), err) + _elem29 := &InstanceTaskConfig{} + if err := _elem29.Read(iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem29), err) } - p.InitialState = append(p.InitialState, _elem56) + p.InitialState = append(p.InitialState, _elem29) } - if err := iprot.ReadSetEnd(ctx); err != nil { + if err := iprot.ReadSetEnd(); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *JobUpdateInstructions) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { +func (p *JobUpdateInstructions) ReadField2(iprot thrift.TProtocol) error { p.DesiredState = &InstanceTaskConfig{} - if err := p.DesiredState.Read(ctx, iprot); err != nil { + if err := p.DesiredState.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.DesiredState), err) } return nil } -func (p *JobUpdateInstructions) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { +func (p *JobUpdateInstructions) ReadField3(iprot thrift.TProtocol) error { p.Settings = &JobUpdateSettings{} - if err := p.Settings.Read(ctx, iprot); err != nil { + if err := p.Settings.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Settings), err) } return nil } -func (p *JobUpdateInstructions) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "JobUpdateInstructions"); err != nil { +func (p *JobUpdateInstructions) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("JobUpdateInstructions"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != 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.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 := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *JobUpdateInstructions) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "initialState", thrift.SET, 1); err != nil { +func (p *JobUpdateInstructions) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("initialState", thrift.SET, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:initialState: ", p), err) } - if err := oprot.WriteSetBegin(ctx, thrift.STRUCT, len(p.InitialState)); err != nil { + if err := oprot.WriteSetBegin(thrift.STRUCT, len(p.InitialState)); err != nil { return thrift.PrependError("error writing set begin: ", err) } for i := 0; i" @@ -13403,14 +12353,14 @@ func (p *JobUpdate) IsSetInstructions() bool { return p.Instructions != nil } -func (p *JobUpdate) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *JobUpdate) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -13418,102 +12368,91 @@ func (p *JobUpdate) Read(ctx context.Context, iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField2(ctx, iprot); err != nil { + if err := p.ReadField2(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *JobUpdate) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { +func (p *JobUpdate) ReadField1(iprot thrift.TProtocol) error { p.Summary = &JobUpdateSummary{} - if err := p.Summary.Read(ctx, iprot); err != nil { + if err := p.Summary.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Summary), err) } return nil } -func (p *JobUpdate) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { +func (p *JobUpdate) ReadField2(iprot thrift.TProtocol) error { p.Instructions = &JobUpdateInstructions{} - if err := p.Instructions.Read(ctx, iprot); err != nil { + if err := p.Instructions.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Instructions), err) } return nil } -func (p *JobUpdate) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "JobUpdate"); err != nil { +func (p *JobUpdate) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("JobUpdate"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } - if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField2(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *JobUpdate) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "summary", thrift.STRUCT, 1); err != nil { +func (p *JobUpdate) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Summary.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Summary), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:summary: ", p), err) } return err } -func (p *JobUpdate) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "instructions", thrift.STRUCT, 2); err != nil { +func (p *JobUpdate) writeField2(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Instructions.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Instructions), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); 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 "" @@ -13554,14 +12493,14 @@ func (p *JobUpdateDetails) IsSetUpdate() bool { return p.Update != nil } -func (p *JobUpdateDetails) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *JobUpdateDetails) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -13569,181 +12508,161 @@ func (p *JobUpdateDetails) Read(ctx context.Context, iprot thrift.TProtocol) err switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.LIST { - if err := p.ReadField2(ctx, iprot); err != nil { + if err := p.ReadField2(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 3: if fieldTypeId == thrift.LIST { - if err := p.ReadField3(ctx, iprot); err != nil { + if err := p.ReadField3(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *JobUpdateDetails) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { +func (p *JobUpdateDetails) ReadField1(iprot thrift.TProtocol) error { p.Update = &JobUpdate{} - if err := p.Update.Read(ctx, iprot); err != nil { + if err := p.Update.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Update), err) } return nil } -func (p *JobUpdateDetails) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin(ctx) +func (p *JobUpdateDetails) ReadField2(iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin() 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 ++ { - _elem58 := &JobUpdateEvent{} - if err := _elem58.Read(ctx, iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem58), err) + _elem30 := &JobUpdateEvent{} + if err := _elem30.Read(iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem30), err) } - p.UpdateEvents = append(p.UpdateEvents, _elem58) + p.UpdateEvents = append(p.UpdateEvents, _elem30) } - if err := iprot.ReadListEnd(ctx); err != nil { + if err := iprot.ReadListEnd(); err != nil { return thrift.PrependError("error reading list end: ", err) } return nil } -func (p *JobUpdateDetails) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin(ctx) +func (p *JobUpdateDetails) ReadField3(iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin() 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 ++ { - _elem59 := &JobInstanceUpdateEvent{} - if err := _elem59.Read(ctx, iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem59), err) + _elem31 := &JobInstanceUpdateEvent{} + if err := _elem31.Read(iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem31), err) } - p.InstanceEvents = append(p.InstanceEvents, _elem59) + p.InstanceEvents = append(p.InstanceEvents, _elem31) } - if err := iprot.ReadListEnd(ctx); err != nil { + if err := iprot.ReadListEnd(); err != nil { return thrift.PrependError("error reading list end: ", err) } return nil } -func (p *JobUpdateDetails) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "JobUpdateDetails"); err != nil { +func (p *JobUpdateDetails) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("JobUpdateDetails"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != 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.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 := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *JobUpdateDetails) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "update", thrift.STRUCT, 1); err != nil { +func (p *JobUpdateDetails) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Update.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Update), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:update: ", p), err) } return err } -func (p *JobUpdateDetails) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "updateEvents", thrift.LIST, 2); err != nil { +func (p *JobUpdateDetails) writeField2(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("updateEvents", thrift.LIST, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:updateEvents: ", p), err) } - if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.UpdateEvents)); err != nil { + if err := oprot.WriteListBegin(thrift.STRUCT, len(p.UpdateEvents)); err != nil { return thrift.PrependError("error writing list begin: ", err) } for _, v := range p.UpdateEvents { - if err := v.Write(ctx, oprot); err != nil { + if err := v.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) } } - if err := oprot.WriteListEnd(ctx); err != nil { + if err := oprot.WriteListEnd(); err != nil { return thrift.PrependError("error writing list end: ", err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:updateEvents: ", p), err) } return err } -func (p *JobUpdateDetails) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "instanceEvents", thrift.LIST, 3); err != nil { +func (p *JobUpdateDetails) writeField3(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("instanceEvents", thrift.LIST, 3); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:instanceEvents: ", p), err) } - if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.InstanceEvents)); err != nil { + if err := oprot.WriteListBegin(thrift.STRUCT, len(p.InstanceEvents)); err != nil { return thrift.PrependError("error writing list begin: ", err) } for _, v := range p.InstanceEvents { - if err := v.Write(ctx, oprot); err != nil { + if err := v.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) } } - if err := oprot.WriteListEnd(ctx); err != nil { + if err := oprot.WriteListEnd(); err != nil { return thrift.PrependError("error writing list end: ", err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); 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 "" @@ -13804,14 +12723,14 @@ func (p *JobUpdateRequest) IsSetMetadata() bool { return p.Metadata != nil } -func (p *JobUpdateRequest) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *JobUpdateRequest) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -13819,69 +12738,69 @@ func (p *JobUpdateRequest) Read(ctx context.Context, iprot thrift.TProtocol) err switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.I32 { - if err := p.ReadField2(ctx, iprot); err != nil { + if err := p.ReadField2(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 3: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField3(ctx, iprot); err != nil { + if err := p.ReadField3(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 4: if fieldTypeId == thrift.SET { - if err := p.ReadField4(ctx, iprot); err != nil { + if err := p.ReadField4(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *JobUpdateRequest) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { +func (p *JobUpdateRequest) ReadField1(iprot thrift.TProtocol) error { p.TaskConfig = &TaskConfig{} - if err := p.TaskConfig.Read(ctx, iprot); err != nil { + if err := p.TaskConfig.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.TaskConfig), err) } return nil } -func (p *JobUpdateRequest) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(ctx); err != nil { +func (p *JobUpdateRequest) ReadField2(iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { p.InstanceCount = v @@ -13889,130 +12808,110 @@ func (p *JobUpdateRequest) ReadField2(ctx context.Context, iprot thrift.TProtoc return nil } -func (p *JobUpdateRequest) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { +func (p *JobUpdateRequest) ReadField3(iprot thrift.TProtocol) error { p.Settings = &JobUpdateSettings{} - if err := p.Settings.Read(ctx, iprot); err != nil { + if err := p.Settings.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Settings), err) } return nil } -func (p *JobUpdateRequest) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin(ctx) +func (p *JobUpdateRequest) ReadField4(iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin() 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 ++ { - _elem62 := &Metadata{} - if err := _elem62.Read(ctx, iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem62), err) + _elem32 := &Metadata{} + if err := _elem32.Read(iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem32), err) } - p.Metadata = append(p.Metadata, _elem62) + p.Metadata = append(p.Metadata, _elem32) } - if err := iprot.ReadSetEnd(ctx); err != nil { + if err := iprot.ReadSetEnd(); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *JobUpdateRequest) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "JobUpdateRequest"); err != nil { +func (p *JobUpdateRequest) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("JobUpdateRequest"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != 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.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 := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *JobUpdateRequest) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "taskConfig", thrift.STRUCT, 1); err != nil { +func (p *JobUpdateRequest) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.TaskConfig.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.TaskConfig), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:taskConfig: ", p), err) } return err } -func (p *JobUpdateRequest) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "instanceCount", thrift.I32, 2); err != nil { +func (p *JobUpdateRequest) writeField2(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("instanceCount", thrift.I32, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:instanceCount: ", p), err) } - if err := oprot.WriteI32(ctx, int32(p.InstanceCount)); err != nil { + if err := oprot.WriteI32(int32(p.InstanceCount)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.instanceCount (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:instanceCount: ", p), err) } return err } -func (p *JobUpdateRequest) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "settings", thrift.STRUCT, 3); err != nil { +func (p *JobUpdateRequest) writeField3(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Settings.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Settings), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 3:settings: ", p), err) } return err } -func (p *JobUpdateRequest) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *JobUpdateRequest) writeField4(oprot thrift.TProtocol) (err error) { if p.IsSetMetadata() { - if err := oprot.WriteFieldBegin(ctx, "metadata", thrift.SET, 4); err != nil { + if err := oprot.WriteFieldBegin("metadata", thrift.SET, 4); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:metadata: ", p), err) } - if err := oprot.WriteSetBegin(ctx, thrift.STRUCT, len(p.Metadata)); err != nil { + if err := oprot.WriteSetBegin(thrift.STRUCT, len(p.Metadata)); err != nil { return thrift.PrependError("error writing set begin: ", err) } for i := 0; i" @@ -14107,14 +13006,14 @@ func (p *JobUpdateQuery) IsSetUpdateStatuses() bool { return p.UpdateStatuses != nil } -func (p *JobUpdateQuery) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *JobUpdateQuery) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -14122,91 +13021,91 @@ func (p *JobUpdateQuery) Read(ctx context.Context, iprot thrift.TProtocol) error switch fieldId { case 2: if fieldTypeId == thrift.STRING { - if err := p.ReadField2(ctx, iprot); err != nil { + if err := p.ReadField2(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 8: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField8(ctx, iprot); err != nil { + if err := p.ReadField8(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 3: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField3(ctx, iprot); err != nil { + if err := p.ReadField3(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 4: if fieldTypeId == thrift.STRING { - if err := p.ReadField4(ctx, iprot); err != nil { + if err := p.ReadField4(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 5: if fieldTypeId == thrift.SET { - if err := p.ReadField5(ctx, iprot); err != nil { + if err := p.ReadField5(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 6: if fieldTypeId == thrift.I32 { - if err := p.ReadField6(ctx, iprot); err != nil { + if err := p.ReadField6(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 7: if fieldTypeId == thrift.I32 { - if err := p.ReadField7(ctx, iprot); err != nil { + if err := p.ReadField7(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *JobUpdateQuery) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *JobUpdateQuery) ReadField2(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { p.Role = &v @@ -14214,24 +13113,24 @@ func (p *JobUpdateQuery) ReadField2(ctx context.Context, iprot thrift.TProtocol return nil } -func (p *JobUpdateQuery) ReadField8(ctx context.Context, iprot thrift.TProtocol) error { +func (p *JobUpdateQuery) ReadField8(iprot thrift.TProtocol) error { p.Key = &JobUpdateKey{} - if err := p.Key.Read(ctx, iprot); err != nil { + if err := p.Key.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Key), err) } return nil } -func (p *JobUpdateQuery) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { +func (p *JobUpdateQuery) ReadField3(iprot thrift.TProtocol) error { p.JobKey = &JobKey{} - if err := p.JobKey.Read(ctx, iprot); err != nil { + if err := p.JobKey.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.JobKey), err) } return nil } -func (p *JobUpdateQuery) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *JobUpdateQuery) ReadField4(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 4: ", err) } else { p.User = &v @@ -14239,31 +13138,31 @@ func (p *JobUpdateQuery) ReadField4(ctx context.Context, iprot thrift.TProtocol return nil } -func (p *JobUpdateQuery) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin(ctx) +func (p *JobUpdateQuery) ReadField5(iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin() 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 _elem64 JobUpdateStatus - if v, err := iprot.ReadI32(ctx); err != nil { +var _elem33 JobUpdateStatus + if v, err := iprot.ReadI32(); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { temp := JobUpdateStatus(v) - _elem64 = temp + _elem33 = temp } - p.UpdateStatuses = append(p.UpdateStatuses, _elem64) + p.UpdateStatuses = append(p.UpdateStatuses, _elem33) } - if err := iprot.ReadSetEnd(ctx); err != nil { + if err := iprot.ReadSetEnd(); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *JobUpdateQuery) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(ctx); err != nil { +func (p *JobUpdateQuery) ReadField6(iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(); err != nil { return thrift.PrependError("error reading field 6: ", err) } else { p.Offset = v @@ -14271,8 +13170,8 @@ func (p *JobUpdateQuery) ReadField6(ctx context.Context, iprot thrift.TProtocol return nil } -func (p *JobUpdateQuery) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(ctx); err != nil { +func (p *JobUpdateQuery) ReadField7(iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(); err != nil { return thrift.PrependError("error reading field 7: ", err) } else { p.Limit = v @@ -14280,155 +13179,122 @@ func (p *JobUpdateQuery) ReadField7(ctx context.Context, iprot thrift.TProtocol return nil } -func (p *JobUpdateQuery) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "JobUpdateQuery"); err != nil { +func (p *JobUpdateQuery) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("JobUpdateQuery"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != 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 := 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(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *JobUpdateQuery) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *JobUpdateQuery) writeField2(oprot thrift.TProtocol) (err error) { if p.IsSetRole() { - if err := oprot.WriteFieldBegin(ctx, "role", thrift.STRING, 2); err != nil { + if err := oprot.WriteFieldBegin("role", thrift.STRING, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:role: ", p), err) } - if err := oprot.WriteString(ctx, string(*p.Role)); err != nil { + if err := oprot.WriteString(string(*p.Role)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.role (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:role: ", p), err) } } return err } -func (p *JobUpdateQuery) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *JobUpdateQuery) writeField3(oprot thrift.TProtocol) (err error) { if p.IsSetJobKey() { - if err := oprot.WriteFieldBegin(ctx, "jobKey", thrift.STRUCT, 3); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.JobKey.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.JobKey), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 3:jobKey: ", p), err) } } return err } -func (p *JobUpdateQuery) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *JobUpdateQuery) writeField4(oprot thrift.TProtocol) (err error) { if p.IsSetUser() { - if err := oprot.WriteFieldBegin(ctx, "user", thrift.STRING, 4); err != nil { + if err := oprot.WriteFieldBegin("user", thrift.STRING, 4); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:user: ", p), err) } - if err := oprot.WriteString(ctx, string(*p.User)); err != nil { + if err := oprot.WriteString(string(*p.User)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.user (4) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 4:user: ", p), err) } } return err } -func (p *JobUpdateQuery) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *JobUpdateQuery) writeField5(oprot thrift.TProtocol) (err error) { if p.IsSetUpdateStatuses() { - if err := oprot.WriteFieldBegin(ctx, "updateStatuses", thrift.SET, 5); err != nil { + if err := oprot.WriteFieldBegin("updateStatuses", thrift.SET, 5); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:updateStatuses: ", p), err) } - if err := oprot.WriteSetBegin(ctx, thrift.I32, len(p.UpdateStatuses)); err != nil { + if err := oprot.WriteSetBegin(thrift.I32, len(p.UpdateStatuses)); err != nil { return thrift.PrependError("error writing set begin: ", err) } for i := 0; i" @@ -14475,14 +13341,14 @@ func (p *HostMaintenanceRequest) IsSetDefaultSlaPolicy() bool { return p.DefaultSlaPolicy != nil } -func (p *HostMaintenanceRequest) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *HostMaintenanceRequest) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -14490,61 +13356,61 @@ func (p *HostMaintenanceRequest) Read(ctx context.Context, iprot thrift.TProtoco switch fieldId { case 1: if fieldTypeId == thrift.STRING { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField2(ctx, iprot); err != nil { + if err := p.ReadField2(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 3: if fieldTypeId == thrift.I64 { - if err := p.ReadField3(ctx, iprot); err != nil { + if err := p.ReadField3(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 4: if fieldTypeId == thrift.I64 { - if err := p.ReadField4(ctx, iprot); err != nil { + if err := p.ReadField4(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *HostMaintenanceRequest) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *HostMaintenanceRequest) ReadField1(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.Host = v @@ -14552,16 +13418,16 @@ func (p *HostMaintenanceRequest) ReadField1(ctx context.Context, iprot thrift.T return nil } -func (p *HostMaintenanceRequest) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { +func (p *HostMaintenanceRequest) ReadField2(iprot thrift.TProtocol) error { p.DefaultSlaPolicy = &SlaPolicy{} - if err := p.DefaultSlaPolicy.Read(ctx, iprot); err != nil { + if err := p.DefaultSlaPolicy.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.DefaultSlaPolicy), err) } return nil } -func (p *HostMaintenanceRequest) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI64(ctx); err != nil { +func (p *HostMaintenanceRequest) ReadField3(iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(); err != nil { return thrift.PrependError("error reading field 3: ", err) } else { p.TimeoutSecs = v @@ -14569,8 +13435,8 @@ func (p *HostMaintenanceRequest) ReadField3(ctx context.Context, iprot thrift.T return nil } -func (p *HostMaintenanceRequest) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI64(ctx); err != nil { +func (p *HostMaintenanceRequest) ReadField4(iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(); err != nil { return thrift.PrependError("error reading field 4: ", err) } else { p.CreatedTimestampMs = v @@ -14578,76 +13444,63 @@ func (p *HostMaintenanceRequest) ReadField4(ctx context.Context, iprot thrift.T return nil } -func (p *HostMaintenanceRequest) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "HostMaintenanceRequest"); err != nil { +func (p *HostMaintenanceRequest) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("HostMaintenanceRequest"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != 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.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 := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *HostMaintenanceRequest) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "host", thrift.STRING, 1); err != nil { +func (p *HostMaintenanceRequest) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("host", thrift.STRING, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:host: ", p), err) } - if err := oprot.WriteString(ctx, string(p.Host)); err != nil { + if err := oprot.WriteString(string(p.Host)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.host (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:host: ", p), err) } return err } -func (p *HostMaintenanceRequest) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "defaultSlaPolicy", thrift.STRUCT, 2); err != nil { +func (p *HostMaintenanceRequest) writeField2(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.DefaultSlaPolicy.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.DefaultSlaPolicy), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:defaultSlaPolicy: ", p), err) } return err } -func (p *HostMaintenanceRequest) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "timeoutSecs", thrift.I64, 3); err != nil { +func (p *HostMaintenanceRequest) writeField3(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("timeoutSecs", thrift.I64, 3); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:timeoutSecs: ", p), err) } - if err := oprot.WriteI64(ctx, int64(p.TimeoutSecs)); err != nil { + if err := oprot.WriteI64(int64(p.TimeoutSecs)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.timeoutSecs (3) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 3:timeoutSecs: ", p), err) } return err } -func (p *HostMaintenanceRequest) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "createdTimestampMs", thrift.I64, 4); err != nil { +func (p *HostMaintenanceRequest) writeField4(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("createdTimestampMs", thrift.I64, 4); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:createdTimestampMs: ", p), err) } - if err := oprot.WriteI64(ctx, int64(p.CreatedTimestampMs)); err != nil { + if err := oprot.WriteI64(int64(p.CreatedTimestampMs)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.createdTimestampMs (4) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); 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 "" @@ -14669,14 +13522,14 @@ func NewListBackupsResult_() *ListBackupsResult_ { func (p *ListBackupsResult_) GetBackups() []string { return p.Backups } -func (p *ListBackupsResult_) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *ListBackupsResult_) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -14684,106 +13537,89 @@ func (p *ListBackupsResult_) Read(ctx context.Context, iprot thrift.TProtocol) e switch fieldId { case 1: if fieldTypeId == thrift.SET { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ListBackupsResult_) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin(ctx) +func (p *ListBackupsResult_) ReadField1(iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin() 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 _elem66 string - if v, err := iprot.ReadString(ctx); err != nil { +var _elem34 string + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem66 = v + _elem34 = v } - p.Backups = append(p.Backups, _elem66) + p.Backups = append(p.Backups, _elem34) } - if err := iprot.ReadSetEnd(ctx); err != nil { + if err := iprot.ReadSetEnd(); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *ListBackupsResult_) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "ListBackupsResult"); err != nil { +func (p *ListBackupsResult_) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("ListBackupsResult"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ListBackupsResult_) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "backups", thrift.SET, 1); err != nil { +func (p *ListBackupsResult_) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("backups", thrift.SET, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:backups: ", p), err) } - if err := oprot.WriteSetBegin(ctx, thrift.STRING, len(p.Backups)); err != nil { + if err := oprot.WriteSetBegin(thrift.STRING, len(p.Backups)); err != nil { return thrift.PrependError("error writing set begin: ", err) } for i := 0; i" @@ -14805,14 +13641,14 @@ func NewStartMaintenanceResult_() *StartMaintenanceResult_ { func (p *StartMaintenanceResult_) GetStatuses() []*HostStatus { return p.Statuses } -func (p *StartMaintenanceResult_) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *StartMaintenanceResult_) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -14820,105 +13656,88 @@ func (p *StartMaintenanceResult_) Read(ctx context.Context, iprot thrift.TProtoc switch fieldId { case 1: if fieldTypeId == thrift.SET { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *StartMaintenanceResult_) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin(ctx) +func (p *StartMaintenanceResult_) ReadField1(iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin() 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 ++ { - _elem68 := &HostStatus{} - if err := _elem68.Read(ctx, iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem68), err) + _elem35 := &HostStatus{} + if err := _elem35.Read(iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem35), err) } - p.Statuses = append(p.Statuses, _elem68) + p.Statuses = append(p.Statuses, _elem35) } - if err := iprot.ReadSetEnd(ctx); err != nil { + if err := iprot.ReadSetEnd(); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *StartMaintenanceResult_) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "StartMaintenanceResult"); err != nil { +func (p *StartMaintenanceResult_) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("StartMaintenanceResult"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *StartMaintenanceResult_) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "statuses", thrift.SET, 1); err != nil { +func (p *StartMaintenanceResult_) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("statuses", thrift.SET, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:statuses: ", p), err) } - if err := oprot.WriteSetBegin(ctx, thrift.STRUCT, len(p.Statuses)); err != nil { + if err := oprot.WriteSetBegin(thrift.STRUCT, len(p.Statuses)); err != nil { return thrift.PrependError("error writing set begin: ", err) } for i := 0; i" @@ -14940,14 +13759,14 @@ func NewDrainHostsResult_() *DrainHostsResult_ { func (p *DrainHostsResult_) GetStatuses() []*HostStatus { return p.Statuses } -func (p *DrainHostsResult_) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *DrainHostsResult_) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -14955,105 +13774,88 @@ func (p *DrainHostsResult_) Read(ctx context.Context, iprot thrift.TProtocol) er switch fieldId { case 1: if fieldTypeId == thrift.SET { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *DrainHostsResult_) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin(ctx) +func (p *DrainHostsResult_) ReadField1(iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin() 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 ++ { - _elem70 := &HostStatus{} - if err := _elem70.Read(ctx, iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem70), err) + _elem36 := &HostStatus{} + if err := _elem36.Read(iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem36), err) } - p.Statuses = append(p.Statuses, _elem70) + p.Statuses = append(p.Statuses, _elem36) } - if err := iprot.ReadSetEnd(ctx); err != nil { + if err := iprot.ReadSetEnd(); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *DrainHostsResult_) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "DrainHostsResult"); err != nil { +func (p *DrainHostsResult_) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("DrainHostsResult"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *DrainHostsResult_) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "statuses", thrift.SET, 1); err != nil { +func (p *DrainHostsResult_) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("statuses", thrift.SET, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:statuses: ", p), err) } - if err := oprot.WriteSetBegin(ctx, thrift.STRUCT, len(p.Statuses)); err != nil { + if err := oprot.WriteSetBegin(thrift.STRUCT, len(p.Statuses)); err != nil { return thrift.PrependError("error writing set begin: ", err) } for i := 0; i" @@ -15075,14 +13877,14 @@ func NewQueryRecoveryResult_() *QueryRecoveryResult_ { func (p *QueryRecoveryResult_) GetTasks() []*ScheduledTask { return p.Tasks } -func (p *QueryRecoveryResult_) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *QueryRecoveryResult_) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -15090,105 +13892,88 @@ func (p *QueryRecoveryResult_) Read(ctx context.Context, iprot thrift.TProtocol) switch fieldId { case 1: if fieldTypeId == thrift.SET { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *QueryRecoveryResult_) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin(ctx) +func (p *QueryRecoveryResult_) ReadField1(iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin() 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 ++ { - _elem72 := &ScheduledTask{} - if err := _elem72.Read(ctx, iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem72), err) + _elem37 := &ScheduledTask{} + if err := _elem37.Read(iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem37), err) } - p.Tasks = append(p.Tasks, _elem72) + p.Tasks = append(p.Tasks, _elem37) } - if err := iprot.ReadSetEnd(ctx); err != nil { + if err := iprot.ReadSetEnd(); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *QueryRecoveryResult_) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "QueryRecoveryResult"); err != nil { +func (p *QueryRecoveryResult_) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("QueryRecoveryResult"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *QueryRecoveryResult_) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "tasks", thrift.SET, 1); err != nil { +func (p *QueryRecoveryResult_) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("tasks", thrift.SET, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:tasks: ", p), err) } - if err := oprot.WriteSetBegin(ctx, thrift.STRUCT, len(p.Tasks)); err != nil { + if err := oprot.WriteSetBegin(thrift.STRUCT, len(p.Tasks)); err != nil { return thrift.PrependError("error writing set begin: ", err) } for i := 0; i" @@ -15210,14 +13995,14 @@ func NewMaintenanceStatusResult_() *MaintenanceStatusResult_ { func (p *MaintenanceStatusResult_) GetStatuses() []*HostStatus { return p.Statuses } -func (p *MaintenanceStatusResult_) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *MaintenanceStatusResult_) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -15225,105 +14010,88 @@ func (p *MaintenanceStatusResult_) Read(ctx context.Context, iprot thrift.TProto switch fieldId { case 1: if fieldTypeId == thrift.SET { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *MaintenanceStatusResult_) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin(ctx) +func (p *MaintenanceStatusResult_) ReadField1(iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin() 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 ++ { - _elem74 := &HostStatus{} - if err := _elem74.Read(ctx, iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem74), err) + _elem38 := &HostStatus{} + if err := _elem38.Read(iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem38), err) } - p.Statuses = append(p.Statuses, _elem74) + p.Statuses = append(p.Statuses, _elem38) } - if err := iprot.ReadSetEnd(ctx); err != nil { + if err := iprot.ReadSetEnd(); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *MaintenanceStatusResult_) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "MaintenanceStatusResult"); err != nil { +func (p *MaintenanceStatusResult_) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("MaintenanceStatusResult"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *MaintenanceStatusResult_) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "statuses", thrift.SET, 1); err != nil { +func (p *MaintenanceStatusResult_) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("statuses", thrift.SET, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:statuses: ", p), err) } - if err := oprot.WriteSetBegin(ctx, thrift.STRUCT, len(p.Statuses)); err != nil { + if err := oprot.WriteSetBegin(thrift.STRUCT, len(p.Statuses)); err != nil { return thrift.PrependError("error writing set begin: ", err) } for i := 0; i" @@ -15345,14 +14113,14 @@ func NewEndMaintenanceResult_() *EndMaintenanceResult_ { func (p *EndMaintenanceResult_) GetStatuses() []*HostStatus { return p.Statuses } -func (p *EndMaintenanceResult_) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *EndMaintenanceResult_) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -15360,105 +14128,88 @@ func (p *EndMaintenanceResult_) Read(ctx context.Context, iprot thrift.TProtocol switch fieldId { case 1: if fieldTypeId == thrift.SET { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *EndMaintenanceResult_) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin(ctx) +func (p *EndMaintenanceResult_) ReadField1(iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin() 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 ++ { - _elem76 := &HostStatus{} - if err := _elem76.Read(ctx, iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem76), err) + _elem39 := &HostStatus{} + if err := _elem39.Read(iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem39), err) } - p.Statuses = append(p.Statuses, _elem76) + p.Statuses = append(p.Statuses, _elem39) } - if err := iprot.ReadSetEnd(ctx); err != nil { + if err := iprot.ReadSetEnd(); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *EndMaintenanceResult_) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "EndMaintenanceResult"); err != nil { +func (p *EndMaintenanceResult_) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("EndMaintenanceResult"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *EndMaintenanceResult_) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "statuses", thrift.SET, 1); err != nil { +func (p *EndMaintenanceResult_) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("statuses", thrift.SET, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:statuses: ", p), err) } - if err := oprot.WriteSetBegin(ctx, thrift.STRUCT, len(p.Statuses)); err != nil { + if err := oprot.WriteSetBegin(thrift.STRUCT, len(p.Statuses)); err != nil { return thrift.PrependError("error writing set begin: ", err) } for i := 0; i" @@ -15480,14 +14231,14 @@ func NewRoleSummaryResult_() *RoleSummaryResult_ { func (p *RoleSummaryResult_) GetSummaries() []*RoleSummary { return p.Summaries } -func (p *RoleSummaryResult_) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *RoleSummaryResult_) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -15495,105 +14246,88 @@ func (p *RoleSummaryResult_) Read(ctx context.Context, iprot thrift.TProtocol) e switch fieldId { case 1: if fieldTypeId == thrift.SET { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *RoleSummaryResult_) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin(ctx) +func (p *RoleSummaryResult_) ReadField1(iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin() 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 ++ { - _elem78 := &RoleSummary{} - if err := _elem78.Read(ctx, iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem78), err) + _elem40 := &RoleSummary{} + if err := _elem40.Read(iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem40), err) } - p.Summaries = append(p.Summaries, _elem78) + p.Summaries = append(p.Summaries, _elem40) } - if err := iprot.ReadSetEnd(ctx); err != nil { + if err := iprot.ReadSetEnd(); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *RoleSummaryResult_) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "RoleSummaryResult"); err != nil { +func (p *RoleSummaryResult_) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("RoleSummaryResult"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *RoleSummaryResult_) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "summaries", thrift.SET, 1); err != nil { +func (p *RoleSummaryResult_) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("summaries", thrift.SET, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:summaries: ", p), err) } - if err := oprot.WriteSetBegin(ctx, thrift.STRUCT, len(p.Summaries)); err != nil { + if err := oprot.WriteSetBegin(thrift.STRUCT, len(p.Summaries)); err != nil { return thrift.PrependError("error writing set begin: ", err) } for i := 0; i" @@ -15615,14 +14349,14 @@ func NewJobSummaryResult_() *JobSummaryResult_ { func (p *JobSummaryResult_) GetSummaries() []*JobSummary { return p.Summaries } -func (p *JobSummaryResult_) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *JobSummaryResult_) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -15630,105 +14364,88 @@ func (p *JobSummaryResult_) Read(ctx context.Context, iprot thrift.TProtocol) er switch fieldId { case 1: if fieldTypeId == thrift.SET { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *JobSummaryResult_) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin(ctx) +func (p *JobSummaryResult_) ReadField1(iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin() 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 ++ { - _elem80 := &JobSummary{} - if err := _elem80.Read(ctx, iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem80), err) + _elem41 := &JobSummary{} + if err := _elem41.Read(iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem41), err) } - p.Summaries = append(p.Summaries, _elem80) + p.Summaries = append(p.Summaries, _elem41) } - if err := iprot.ReadSetEnd(ctx); err != nil { + if err := iprot.ReadSetEnd(); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *JobSummaryResult_) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "JobSummaryResult"); err != nil { +func (p *JobSummaryResult_) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("JobSummaryResult"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *JobSummaryResult_) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "summaries", thrift.SET, 1); err != nil { +func (p *JobSummaryResult_) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("summaries", thrift.SET, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:summaries: ", p), err) } - if err := oprot.WriteSetBegin(ctx, thrift.STRUCT, len(p.Summaries)); err != nil { + if err := oprot.WriteSetBegin(thrift.STRUCT, len(p.Summaries)); err != nil { return thrift.PrependError("error writing set begin: ", err) } for i := 0; i" @@ -15757,14 +14474,14 @@ func (p *ConfigSummaryResult_) IsSetSummary() bool { return p.Summary != nil } -func (p *ConfigSummaryResult_) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *ConfigSummaryResult_) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -15772,71 +14489,61 @@ func (p *ConfigSummaryResult_) Read(ctx context.Context, iprot thrift.TProtocol) switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ConfigSummaryResult_) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { +func (p *ConfigSummaryResult_) ReadField1(iprot thrift.TProtocol) error { p.Summary = &ConfigSummary{} - if err := p.Summary.Read(ctx, iprot); err != nil { + if err := p.Summary.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Summary), err) } return nil } -func (p *ConfigSummaryResult_) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "ConfigSummaryResult"); err != nil { +func (p *ConfigSummaryResult_) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("ConfigSummaryResult"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ConfigSummaryResult_) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "summary", thrift.STRUCT, 1); err != nil { +func (p *ConfigSummaryResult_) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Summary.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Summary), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); 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 "" @@ -15858,14 +14565,14 @@ func NewGetPendingReasonResult_() *GetPendingReasonResult_ { func (p *GetPendingReasonResult_) GetReasons() []*PendingReason { return p.Reasons } -func (p *GetPendingReasonResult_) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *GetPendingReasonResult_) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -15873,105 +14580,88 @@ func (p *GetPendingReasonResult_) Read(ctx context.Context, iprot thrift.TProtoc switch fieldId { case 1: if fieldTypeId == thrift.SET { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *GetPendingReasonResult_) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin(ctx) +func (p *GetPendingReasonResult_) ReadField1(iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin() 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 ++ { - _elem82 := &PendingReason{} - if err := _elem82.Read(ctx, iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem82), err) + _elem42 := &PendingReason{} + if err := _elem42.Read(iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem42), err) } - p.Reasons = append(p.Reasons, _elem82) + p.Reasons = append(p.Reasons, _elem42) } - if err := iprot.ReadSetEnd(ctx); err != nil { + if err := iprot.ReadSetEnd(); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *GetPendingReasonResult_) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "GetPendingReasonResult"); err != nil { +func (p *GetPendingReasonResult_) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("GetPendingReasonResult"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *GetPendingReasonResult_) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "reasons", thrift.SET, 1); err != nil { +func (p *GetPendingReasonResult_) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("reasons", thrift.SET, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:reasons: ", p), err) } - if err := oprot.WriteSetBegin(ctx, thrift.STRUCT, len(p.Reasons)); err != nil { + if err := oprot.WriteSetBegin(thrift.STRUCT, len(p.Reasons)); err != nil { return thrift.PrependError("error writing set begin: ", err) } for i := 0; i" @@ -16015,14 +14705,14 @@ func (p *StartJobUpdateResult_) IsSetUpdateSummary() bool { return p.UpdateSummary != nil } -func (p *StartJobUpdateResult_) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *StartJobUpdateResult_) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -16030,104 +14720,93 @@ func (p *StartJobUpdateResult_) Read(ctx context.Context, iprot thrift.TProtocol switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField2(ctx, iprot); err != nil { + if err := p.ReadField2(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *StartJobUpdateResult_) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { +func (p *StartJobUpdateResult_) ReadField1(iprot thrift.TProtocol) error { p.Key = &JobUpdateKey{} - if err := p.Key.Read(ctx, iprot); err != nil { + if err := p.Key.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Key), err) } return nil } -func (p *StartJobUpdateResult_) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { +func (p *StartJobUpdateResult_) ReadField2(iprot thrift.TProtocol) error { p.UpdateSummary = &JobUpdateSummary{} - if err := p.UpdateSummary.Read(ctx, iprot); err != nil { + if err := p.UpdateSummary.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.UpdateSummary), err) } return nil } -func (p *StartJobUpdateResult_) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "StartJobUpdateResult"); err != nil { +func (p *StartJobUpdateResult_) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("StartJobUpdateResult"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } - if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField2(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *StartJobUpdateResult_) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "key", thrift.STRUCT, 1); err != nil { +func (p *StartJobUpdateResult_) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Key.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Key), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:key: ", p), err) } return err } -func (p *StartJobUpdateResult_) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *StartJobUpdateResult_) writeField2(oprot thrift.TProtocol) (err error) { if p.IsSetUpdateSummary() { - if err := oprot.WriteFieldBegin(ctx, "updateSummary", thrift.STRUCT, 2); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.UpdateSummary.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.UpdateSummary), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); 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 "" @@ -16151,14 +14830,14 @@ func NewGetJobUpdateSummariesResult_() *GetJobUpdateSummariesResult_ { func (p *GetJobUpdateSummariesResult_) GetUpdateSummaries() []*JobUpdateSummary { return p.UpdateSummaries } -func (p *GetJobUpdateSummariesResult_) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *GetJobUpdateSummariesResult_) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -16166,95 +14845,81 @@ func (p *GetJobUpdateSummariesResult_) Read(ctx context.Context, iprot thrift.TP switch fieldId { case 1: if fieldTypeId == thrift.LIST { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *GetJobUpdateSummariesResult_) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin(ctx) +func (p *GetJobUpdateSummariesResult_) ReadField1(iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin() 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 ++ { - _elem84 := &JobUpdateSummary{} - if err := _elem84.Read(ctx, iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem84), err) + _elem43 := &JobUpdateSummary{} + if err := _elem43.Read(iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem43), err) } - p.UpdateSummaries = append(p.UpdateSummaries, _elem84) + p.UpdateSummaries = append(p.UpdateSummaries, _elem43) } - if err := iprot.ReadListEnd(ctx); err != nil { + if err := iprot.ReadListEnd(); err != nil { return thrift.PrependError("error reading list end: ", err) } return nil } -func (p *GetJobUpdateSummariesResult_) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "GetJobUpdateSummariesResult"); err != nil { +func (p *GetJobUpdateSummariesResult_) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("GetJobUpdateSummariesResult"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *GetJobUpdateSummariesResult_) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "updateSummaries", thrift.LIST, 1); err != nil { +func (p *GetJobUpdateSummariesResult_) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("updateSummaries", thrift.LIST, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:updateSummaries: ", p), err) } - if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.UpdateSummaries)); err != nil { + if err := oprot.WriteListBegin(thrift.STRUCT, len(p.UpdateSummaries)); err != nil { return thrift.PrependError("error writing list begin: ", err) } for _, v := range p.UpdateSummaries { - if err := v.Write(ctx, oprot); err != nil { + if err := v.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) } } - if err := oprot.WriteListEnd(ctx); err != nil { + if err := oprot.WriteListEnd(); err != nil { return thrift.PrependError("error writing list end: ", err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); 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 "" @@ -16291,14 +14956,14 @@ func (p *GetJobUpdateDetailsResult_) IsSetDetails() bool { return p.Details != nil } -func (p *GetJobUpdateDetailsResult_) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *GetJobUpdateDetailsResult_) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -16306,126 +14971,111 @@ func (p *GetJobUpdateDetailsResult_) Read(ctx context.Context, iprot thrift.TPro switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.LIST { - if err := p.ReadField2(ctx, iprot); err != nil { + if err := p.ReadField2(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *GetJobUpdateDetailsResult_) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { +func (p *GetJobUpdateDetailsResult_) ReadField1(iprot thrift.TProtocol) error { p.Details = &JobUpdateDetails{} - if err := p.Details.Read(ctx, iprot); err != nil { + if err := p.Details.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Details), err) } return nil } -func (p *GetJobUpdateDetailsResult_) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin(ctx) +func (p *GetJobUpdateDetailsResult_) ReadField2(iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin() 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 ++ { - _elem86 := &JobUpdateDetails{} - if err := _elem86.Read(ctx, iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem86), err) + _elem44 := &JobUpdateDetails{} + if err := _elem44.Read(iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem44), err) } - p.DetailsList = append(p.DetailsList, _elem86) + p.DetailsList = append(p.DetailsList, _elem44) } - if err := iprot.ReadListEnd(ctx); err != nil { + if err := iprot.ReadListEnd(); err != nil { return thrift.PrependError("error reading list end: ", err) } return nil } -func (p *GetJobUpdateDetailsResult_) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "GetJobUpdateDetailsResult"); err != nil { +func (p *GetJobUpdateDetailsResult_) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("GetJobUpdateDetailsResult"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } - if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField2(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *GetJobUpdateDetailsResult_) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "details", thrift.STRUCT, 1); err != nil { +func (p *GetJobUpdateDetailsResult_) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Details.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Details), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:details: ", p), err) } return err } -func (p *GetJobUpdateDetailsResult_) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "detailsList", thrift.LIST, 2); err != nil { +func (p *GetJobUpdateDetailsResult_) writeField2(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("detailsList", thrift.LIST, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:detailsList: ", p), err) } - if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.DetailsList)); err != nil { + if err := oprot.WriteListBegin(thrift.STRUCT, len(p.DetailsList)); err != nil { return thrift.PrependError("error writing list begin: ", err) } for _, v := range p.DetailsList { - if err := v.Write(ctx, oprot); err != nil { + if err := v.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) } } - if err := oprot.WriteListEnd(ctx); err != nil { + if err := oprot.WriteListEnd(); err != nil { return thrift.PrependError("error writing list end: ", err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); 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 "" @@ -16449,14 +15099,14 @@ func NewPulseJobUpdateResult_() *PulseJobUpdateResult_ { func (p *PulseJobUpdateResult_) GetStatus() JobUpdatePulseStatus { return p.Status } -func (p *PulseJobUpdateResult_) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *PulseJobUpdateResult_) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -16464,31 +15114,31 @@ func (p *PulseJobUpdateResult_) Read(ctx context.Context, iprot thrift.TProtocol switch fieldId { case 1: if fieldTypeId == thrift.I32 { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *PulseJobUpdateResult_) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(ctx); err != nil { +func (p *PulseJobUpdateResult_) ReadField1(iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { temp := JobUpdatePulseStatus(v) @@ -16497,39 +15147,29 @@ func (p *PulseJobUpdateResult_) ReadField1(ctx context.Context, iprot thrift.TP return nil } -func (p *PulseJobUpdateResult_) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "PulseJobUpdateResult"); err != nil { +func (p *PulseJobUpdateResult_) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("PulseJobUpdateResult"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *PulseJobUpdateResult_) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "status", thrift.I32, 1); err != nil { +func (p *PulseJobUpdateResult_) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("status", thrift.I32, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:status: ", p), err) } - if err := oprot.WriteI32(ctx, int32(p.Status)); err != nil { + if err := oprot.WriteI32(int32(p.Status)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.status (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); 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 "" @@ -16569,14 +15209,14 @@ func (p *GetJobUpdateDiffResult_) GetUpdate() []*ConfigGroup { func (p *GetJobUpdateDiffResult_) GetUnchanged() []*ConfigGroup { return p.Unchanged } -func (p *GetJobUpdateDiffResult_) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *GetJobUpdateDiffResult_) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -16584,300 +15224,259 @@ func (p *GetJobUpdateDiffResult_) Read(ctx context.Context, iprot thrift.TProtoc switch fieldId { case 1: if fieldTypeId == thrift.SET { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.SET { - if err := p.ReadField2(ctx, iprot); err != nil { + if err := p.ReadField2(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 3: if fieldTypeId == thrift.SET { - if err := p.ReadField3(ctx, iprot); err != nil { + if err := p.ReadField3(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 4: if fieldTypeId == thrift.SET { - if err := p.ReadField4(ctx, iprot); err != nil { + if err := p.ReadField4(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *GetJobUpdateDiffResult_) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin(ctx) +func (p *GetJobUpdateDiffResult_) ReadField1(iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin() 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 ++ { - _elem88 := &ConfigGroup{} - if err := _elem88.Read(ctx, iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem88), err) + _elem45 := &ConfigGroup{} + if err := _elem45.Read(iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem45), err) } - p.Add = append(p.Add, _elem88) + p.Add = append(p.Add, _elem45) } - if err := iprot.ReadSetEnd(ctx); err != nil { + if err := iprot.ReadSetEnd(); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *GetJobUpdateDiffResult_) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin(ctx) +func (p *GetJobUpdateDiffResult_) ReadField2(iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin() 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 ++ { - _elem89 := &ConfigGroup{} - if err := _elem89.Read(ctx, iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem89), err) + _elem46 := &ConfigGroup{} + if err := _elem46.Read(iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem46), err) } - p.Remove = append(p.Remove, _elem89) + p.Remove = append(p.Remove, _elem46) } - if err := iprot.ReadSetEnd(ctx); err != nil { + if err := iprot.ReadSetEnd(); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *GetJobUpdateDiffResult_) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin(ctx) +func (p *GetJobUpdateDiffResult_) ReadField3(iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin() 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 ++ { - _elem90 := &ConfigGroup{} - if err := _elem90.Read(ctx, iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem90), err) + _elem47 := &ConfigGroup{} + if err := _elem47.Read(iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem47), err) } - p.Update = append(p.Update, _elem90) + p.Update = append(p.Update, _elem47) } - if err := iprot.ReadSetEnd(ctx); err != nil { + if err := iprot.ReadSetEnd(); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *GetJobUpdateDiffResult_) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin(ctx) +func (p *GetJobUpdateDiffResult_) ReadField4(iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin() 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 ++ { - _elem91 := &ConfigGroup{} - if err := _elem91.Read(ctx, iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem91), err) + _elem48 := &ConfigGroup{} + if err := _elem48.Read(iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem48), err) } - p.Unchanged = append(p.Unchanged, _elem91) + p.Unchanged = append(p.Unchanged, _elem48) } - if err := iprot.ReadSetEnd(ctx); err != nil { + if err := iprot.ReadSetEnd(); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *GetJobUpdateDiffResult_) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "GetJobUpdateDiffResult"); err != nil { +func (p *GetJobUpdateDiffResult_) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("GetJobUpdateDiffResult"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != 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.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 := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *GetJobUpdateDiffResult_) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "add", thrift.SET, 1); err != nil { +func (p *GetJobUpdateDiffResult_) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("add", thrift.SET, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:add: ", p), err) } - if err := oprot.WriteSetBegin(ctx, thrift.STRUCT, len(p.Add)); err != nil { + if err := oprot.WriteSetBegin(thrift.STRUCT, len(p.Add)); err != nil { return thrift.PrependError("error writing set begin: ", err) } for i := 0; i" @@ -16907,14 +15506,14 @@ func (p *TierConfig) GetName() string { func (p *TierConfig) GetSettings() map[string]string { return p.Settings } -func (p *TierConfig) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *TierConfig) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -16922,41 +15521,41 @@ func (p *TierConfig) Read(ctx context.Context, iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRING { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.MAP { - if err := p.ReadField2(ctx, iprot); err != nil { + if err := p.ReadField2(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *TierConfig) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *TierConfig) ReadField1(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.Name = v @@ -16964,93 +15563,78 @@ func (p *TierConfig) ReadField1(ctx context.Context, iprot thrift.TProtocol) er return nil } -func (p *TierConfig) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { - _, _, size, err := iprot.ReadMapBegin(ctx) +func (p *TierConfig) ReadField2(iprot thrift.TProtocol) error { + _, _, size, err := iprot.ReadMapBegin() 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 _key96 string - if v, err := iprot.ReadString(ctx); err != nil { +var _key49 string + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _key96 = v + _key49 = v } -var _val97 string - if v, err := iprot.ReadString(ctx); err != nil { +var _val50 string + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _val97 = v + _val50 = v } - p.Settings[_key96] = _val97 + p.Settings[_key49] = _val50 } - if err := iprot.ReadMapEnd(ctx); err != nil { + if err := iprot.ReadMapEnd(); err != nil { return thrift.PrependError("error reading map end: ", err) } return nil } -func (p *TierConfig) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "TierConfig"); err != nil { +func (p *TierConfig) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("TierConfig"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } - if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField2(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *TierConfig) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "name", thrift.STRING, 1); err != nil { +func (p *TierConfig) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("name", thrift.STRING, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:name: ", p), err) } - if err := oprot.WriteString(ctx, string(p.Name)); err != nil { + if err := oprot.WriteString(string(p.Name)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.name (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:name: ", p), err) } return err } -func (p *TierConfig) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "settings", thrift.MAP, 2); err != nil { +func (p *TierConfig) writeField2(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("settings", thrift.MAP, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:settings: ", p), err) } - if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.Settings)); err != nil { + if err := oprot.WriteMapBegin(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(ctx, string(k)); err != nil { + if err := oprot.WriteString(string(k)); err != nil { return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } - if err := oprot.WriteString(ctx, string(v)); err != nil { + if err := oprot.WriteString(string(v)); err != nil { return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } } - if err := oprot.WriteMapEnd(ctx); err != nil { + if err := oprot.WriteMapEnd(); err != nil { return thrift.PrependError("error writing map end: ", err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); 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 "" @@ -17080,14 +15664,14 @@ func (p *GetTierConfigResult_) GetDefaultTierName() string { func (p *GetTierConfigResult_) GetTiers() []*TierConfig { return p.Tiers } -func (p *GetTierConfigResult_) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *GetTierConfigResult_) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -17095,41 +15679,41 @@ func (p *GetTierConfigResult_) Read(ctx context.Context, iprot thrift.TProtocol) switch fieldId { case 1: if fieldTypeId == thrift.STRING { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.SET { - if err := p.ReadField2(ctx, iprot); err != nil { + if err := p.ReadField2(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *GetTierConfigResult_) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *GetTierConfigResult_) ReadField1(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.DefaultTierName = v @@ -17137,94 +15721,76 @@ func (p *GetTierConfigResult_) ReadField1(ctx context.Context, iprot thrift.TPr return nil } -func (p *GetTierConfigResult_) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin(ctx) +func (p *GetTierConfigResult_) ReadField2(iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin() 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 ++ { - _elem99 := &TierConfig{} - if err := _elem99.Read(ctx, iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem99), err) + _elem51 := &TierConfig{} + if err := _elem51.Read(iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem51), err) } - p.Tiers = append(p.Tiers, _elem99) + p.Tiers = append(p.Tiers, _elem51) } - if err := iprot.ReadSetEnd(ctx); err != nil { + if err := iprot.ReadSetEnd(); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *GetTierConfigResult_) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "GetTierConfigResult"); err != nil { +func (p *GetTierConfigResult_) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("GetTierConfigResult"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } - if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField2(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *GetTierConfigResult_) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "defaultTierName", thrift.STRING, 1); err != nil { +func (p *GetTierConfigResult_) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("defaultTierName", thrift.STRING, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:defaultTierName: ", p), err) } - if err := oprot.WriteString(ctx, string(p.DefaultTierName)); err != nil { + if err := oprot.WriteString(string(p.DefaultTierName)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.defaultTierName (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:defaultTierName: ", p), err) } return err } -func (p *GetTierConfigResult_) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "tiers", thrift.SET, 2); err != nil { +func (p *GetTierConfigResult_) writeField2(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("tiers", thrift.SET, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:tiers: ", p), err) } - if err := oprot.WriteSetBegin(ctx, thrift.STRUCT, len(p.Tiers)); err != nil { + if err := oprot.WriteSetBegin(thrift.STRUCT, len(p.Tiers)); err != nil { return thrift.PrependError("error writing set begin: ", err) } for i := 0; i" @@ -17255,14 +15821,14 @@ func (p *ServerInfo) GetClusterName() string { func (p *ServerInfo) GetStatsUrlPrefix() string { return p.StatsUrlPrefix } -func (p *ServerInfo) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *ServerInfo) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -17270,41 +15836,41 @@ func (p *ServerInfo) Read(ctx context.Context, iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRING { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 3: if fieldTypeId == thrift.STRING { - if err := p.ReadField3(ctx, iprot); err != nil { + if err := p.ReadField3(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ServerInfo) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *ServerInfo) ReadField1(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.ClusterName = v @@ -17312,8 +15878,8 @@ func (p *ServerInfo) ReadField1(ctx context.Context, iprot thrift.TProtocol) er return nil } -func (p *ServerInfo) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *ServerInfo) ReadField3(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 3: ", err) } else { p.StatsUrlPrefix = v @@ -17321,51 +15887,40 @@ func (p *ServerInfo) ReadField3(ctx context.Context, iprot thrift.TProtocol) er return nil } -func (p *ServerInfo) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "ServerInfo"); err != nil { +func (p *ServerInfo) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("ServerInfo"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } - if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField3(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ServerInfo) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "clusterName", thrift.STRING, 1); err != nil { +func (p *ServerInfo) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("clusterName", thrift.STRING, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:clusterName: ", p), err) } - if err := oprot.WriteString(ctx, string(p.ClusterName)); err != nil { + if err := oprot.WriteString(string(p.ClusterName)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.clusterName (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:clusterName: ", p), err) } return err } -func (p *ServerInfo) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "statsUrlPrefix", thrift.STRING, 3); err != nil { +func (p *ServerInfo) writeField3(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("statsUrlPrefix", thrift.STRING, 3); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:statsUrlPrefix: ", p), err) } - if err := oprot.WriteString(ctx, string(p.StatsUrlPrefix)); err != nil { + if err := oprot.WriteString(string(p.StatsUrlPrefix)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.statsUrlPrefix (3) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); 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 "" @@ -17710,14 +16265,14 @@ func (p *Result_) IsSetGetTierConfigResult_() bool { return p.GetTierConfigResult_ != nil } -func (p *Result_) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *Result_) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -17725,703 +16280,674 @@ func (p *Result_) Read(ctx context.Context, iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 3: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField3(ctx, iprot); err != nil { + if err := p.ReadField3(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 4: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField4(ctx, iprot); err != nil { + if err := p.ReadField4(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 5: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField5(ctx, iprot); err != nil { + if err := p.ReadField5(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 6: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField6(ctx, iprot); err != nil { + if err := p.ReadField6(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 7: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField7(ctx, iprot); err != nil { + if err := p.ReadField7(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 8: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField8(ctx, iprot); err != nil { + if err := p.ReadField8(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 9: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField9(ctx, iprot); err != nil { + if err := p.ReadField9(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 10: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField10(ctx, iprot); err != nil { + if err := p.ReadField10(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 11: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField11(ctx, iprot); err != nil { + if err := p.ReadField11(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 17: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField17(ctx, iprot); err != nil { + if err := p.ReadField17(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 18: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField18(ctx, iprot); err != nil { + if err := p.ReadField18(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 20: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField20(ctx, iprot); err != nil { + if err := p.ReadField20(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 21: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField21(ctx, iprot); err != nil { + if err := p.ReadField21(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 22: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField22(ctx, iprot); err != nil { + if err := p.ReadField22(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 23: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField23(ctx, iprot); err != nil { + if err := p.ReadField23(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 24: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField24(ctx, iprot); err != nil { + if err := p.ReadField24(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 25: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField25(ctx, iprot); err != nil { + if err := p.ReadField25(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 26: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField26(ctx, iprot); err != nil { + if err := p.ReadField26(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 27: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField27(ctx, iprot); err != nil { + if err := p.ReadField27(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *Result_) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { +func (p *Result_) ReadField1(iprot thrift.TProtocol) error { p.PopulateJobResult_ = &PopulateJobResult_{} - if err := p.PopulateJobResult_.Read(ctx, iprot); err != nil { + if err := p.PopulateJobResult_.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.PopulateJobResult_), err) } return nil } -func (p *Result_) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { +func (p *Result_) ReadField3(iprot thrift.TProtocol) error { p.ScheduleStatusResult_ = &ScheduleStatusResult_{} - if err := p.ScheduleStatusResult_.Read(ctx, iprot); err != nil { + if err := p.ScheduleStatusResult_.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.ScheduleStatusResult_), err) } return nil } -func (p *Result_) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { +func (p *Result_) ReadField4(iprot thrift.TProtocol) error { p.GetJobsResult_ = &GetJobsResult_{} - if err := p.GetJobsResult_.Read(ctx, iprot); err != nil { + if err := p.GetJobsResult_.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.GetJobsResult_), err) } return nil } -func (p *Result_) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { +func (p *Result_) ReadField5(iprot thrift.TProtocol) error { p.GetQuotaResult_ = &GetQuotaResult_{} - if err := p.GetQuotaResult_.Read(ctx, iprot); err != nil { + if err := p.GetQuotaResult_.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.GetQuotaResult_), err) } return nil } -func (p *Result_) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { +func (p *Result_) ReadField6(iprot thrift.TProtocol) error { p.ListBackupsResult_ = &ListBackupsResult_{} - if err := p.ListBackupsResult_.Read(ctx, iprot); err != nil { + if err := p.ListBackupsResult_.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.ListBackupsResult_), err) } return nil } -func (p *Result_) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { +func (p *Result_) ReadField7(iprot thrift.TProtocol) error { p.StartMaintenanceResult_ = &StartMaintenanceResult_{} - if err := p.StartMaintenanceResult_.Read(ctx, iprot); err != nil { + if err := p.StartMaintenanceResult_.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.StartMaintenanceResult_), err) } return nil } -func (p *Result_) ReadField8(ctx context.Context, iprot thrift.TProtocol) error { +func (p *Result_) ReadField8(iprot thrift.TProtocol) error { p.DrainHostsResult_ = &DrainHostsResult_{} - if err := p.DrainHostsResult_.Read(ctx, iprot); err != nil { + if err := p.DrainHostsResult_.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.DrainHostsResult_), err) } return nil } -func (p *Result_) ReadField9(ctx context.Context, iprot thrift.TProtocol) error { +func (p *Result_) ReadField9(iprot thrift.TProtocol) error { p.QueryRecoveryResult_ = &QueryRecoveryResult_{} - if err := p.QueryRecoveryResult_.Read(ctx, iprot); err != nil { + if err := p.QueryRecoveryResult_.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.QueryRecoveryResult_), err) } return nil } -func (p *Result_) ReadField10(ctx context.Context, iprot thrift.TProtocol) error { +func (p *Result_) ReadField10(iprot thrift.TProtocol) error { p.MaintenanceStatusResult_ = &MaintenanceStatusResult_{} - if err := p.MaintenanceStatusResult_.Read(ctx, iprot); err != nil { + if err := p.MaintenanceStatusResult_.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.MaintenanceStatusResult_), err) } return nil } -func (p *Result_) ReadField11(ctx context.Context, iprot thrift.TProtocol) error { +func (p *Result_) ReadField11(iprot thrift.TProtocol) error { p.EndMaintenanceResult_ = &EndMaintenanceResult_{} - if err := p.EndMaintenanceResult_.Read(ctx, iprot); err != nil { + if err := p.EndMaintenanceResult_.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.EndMaintenanceResult_), err) } return nil } -func (p *Result_) ReadField17(ctx context.Context, iprot thrift.TProtocol) error { +func (p *Result_) ReadField17(iprot thrift.TProtocol) error { p.RoleSummaryResult_ = &RoleSummaryResult_{} - if err := p.RoleSummaryResult_.Read(ctx, iprot); err != nil { + if err := p.RoleSummaryResult_.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.RoleSummaryResult_), err) } return nil } -func (p *Result_) ReadField18(ctx context.Context, iprot thrift.TProtocol) error { +func (p *Result_) ReadField18(iprot thrift.TProtocol) error { p.JobSummaryResult_ = &JobSummaryResult_{} - if err := p.JobSummaryResult_.Read(ctx, iprot); err != nil { + if err := p.JobSummaryResult_.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.JobSummaryResult_), err) } return nil } -func (p *Result_) ReadField20(ctx context.Context, iprot thrift.TProtocol) error { +func (p *Result_) ReadField20(iprot thrift.TProtocol) error { p.ConfigSummaryResult_ = &ConfigSummaryResult_{} - if err := p.ConfigSummaryResult_.Read(ctx, iprot); err != nil { + if err := p.ConfigSummaryResult_.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.ConfigSummaryResult_), err) } return nil } -func (p *Result_) ReadField21(ctx context.Context, iprot thrift.TProtocol) error { +func (p *Result_) ReadField21(iprot thrift.TProtocol) error { p.GetPendingReasonResult_ = &GetPendingReasonResult_{} - if err := p.GetPendingReasonResult_.Read(ctx, iprot); err != nil { + if err := p.GetPendingReasonResult_.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.GetPendingReasonResult_), err) } return nil } -func (p *Result_) ReadField22(ctx context.Context, iprot thrift.TProtocol) error { +func (p *Result_) ReadField22(iprot thrift.TProtocol) error { p.StartJobUpdateResult_ = &StartJobUpdateResult_{} - if err := p.StartJobUpdateResult_.Read(ctx, iprot); err != nil { + if err := p.StartJobUpdateResult_.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.StartJobUpdateResult_), err) } return nil } -func (p *Result_) ReadField23(ctx context.Context, iprot thrift.TProtocol) error { +func (p *Result_) ReadField23(iprot thrift.TProtocol) error { p.GetJobUpdateSummariesResult_ = &GetJobUpdateSummariesResult_{} - if err := p.GetJobUpdateSummariesResult_.Read(ctx, iprot); err != nil { + if err := p.GetJobUpdateSummariesResult_.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.GetJobUpdateSummariesResult_), err) } return nil } -func (p *Result_) ReadField24(ctx context.Context, iprot thrift.TProtocol) error { +func (p *Result_) ReadField24(iprot thrift.TProtocol) error { p.GetJobUpdateDetailsResult_ = &GetJobUpdateDetailsResult_{} - if err := p.GetJobUpdateDetailsResult_.Read(ctx, iprot); err != nil { + if err := p.GetJobUpdateDetailsResult_.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.GetJobUpdateDetailsResult_), err) } return nil } -func (p *Result_) ReadField25(ctx context.Context, iprot thrift.TProtocol) error { +func (p *Result_) ReadField25(iprot thrift.TProtocol) error { p.PulseJobUpdateResult_ = &PulseJobUpdateResult_{} - if err := p.PulseJobUpdateResult_.Read(ctx, iprot); err != nil { + if err := p.PulseJobUpdateResult_.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.PulseJobUpdateResult_), err) } return nil } -func (p *Result_) ReadField26(ctx context.Context, iprot thrift.TProtocol) error { +func (p *Result_) ReadField26(iprot thrift.TProtocol) error { p.GetJobUpdateDiffResult_ = &GetJobUpdateDiffResult_{} - if err := p.GetJobUpdateDiffResult_.Read(ctx, iprot); err != nil { + if err := p.GetJobUpdateDiffResult_.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.GetJobUpdateDiffResult_), err) } return nil } -func (p *Result_) ReadField27(ctx context.Context, iprot thrift.TProtocol) error { +func (p *Result_) ReadField27(iprot thrift.TProtocol) error { p.GetTierConfigResult_ = &GetTierConfigResult_{} - if err := p.GetTierConfigResult_.Read(ctx, iprot); err != nil { + if err := p.GetTierConfigResult_.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.GetTierConfigResult_), err) } return nil } -func (p *Result_) Write(ctx context.Context, oprot thrift.TProtocol) error { +func (p *Result_) Write(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(ctx, "Result"); err != nil { + if err := oprot.WriteStructBegin("Result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != 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 := 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(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *Result_) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *Result_) writeField1(oprot thrift.TProtocol) (err error) { if p.IsSetPopulateJobResult_() { - if err := oprot.WriteFieldBegin(ctx, "populateJobResult", thrift.STRUCT, 1); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.PopulateJobResult_.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.PopulateJobResult_), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:populateJobResult: ", p), err) } } return err } -func (p *Result_) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *Result_) writeField3(oprot thrift.TProtocol) (err error) { if p.IsSetScheduleStatusResult_() { - if err := oprot.WriteFieldBegin(ctx, "scheduleStatusResult", thrift.STRUCT, 3); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.ScheduleStatusResult_.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.ScheduleStatusResult_), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 3:scheduleStatusResult: ", p), err) } } return err } -func (p *Result_) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *Result_) writeField4(oprot thrift.TProtocol) (err error) { if p.IsSetGetJobsResult_() { - if err := oprot.WriteFieldBegin(ctx, "getJobsResult", thrift.STRUCT, 4); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.GetJobsResult_.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.GetJobsResult_), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 4:getJobsResult: ", p), err) } } return err } -func (p *Result_) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *Result_) writeField5(oprot thrift.TProtocol) (err error) { if p.IsSetGetQuotaResult_() { - if err := oprot.WriteFieldBegin(ctx, "getQuotaResult", thrift.STRUCT, 5); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.GetQuotaResult_.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.GetQuotaResult_), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 5:getQuotaResult: ", p), err) } } return err } -func (p *Result_) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *Result_) writeField6(oprot thrift.TProtocol) (err error) { if p.IsSetListBackupsResult_() { - if err := oprot.WriteFieldBegin(ctx, "listBackupsResult", thrift.STRUCT, 6); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.ListBackupsResult_.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.ListBackupsResult_), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 6:listBackupsResult: ", p), err) } } return err } -func (p *Result_) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *Result_) writeField7(oprot thrift.TProtocol) (err error) { if p.IsSetStartMaintenanceResult_() { - if err := oprot.WriteFieldBegin(ctx, "startMaintenanceResult", thrift.STRUCT, 7); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.StartMaintenanceResult_.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.StartMaintenanceResult_), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 7:startMaintenanceResult: ", p), err) } } return err } -func (p *Result_) writeField8(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *Result_) writeField8(oprot thrift.TProtocol) (err error) { if p.IsSetDrainHostsResult_() { - if err := oprot.WriteFieldBegin(ctx, "drainHostsResult", thrift.STRUCT, 8); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.DrainHostsResult_.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.DrainHostsResult_), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 8:drainHostsResult: ", p), err) } } return err } -func (p *Result_) writeField9(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *Result_) writeField9(oprot thrift.TProtocol) (err error) { if p.IsSetQueryRecoveryResult_() { - if err := oprot.WriteFieldBegin(ctx, "queryRecoveryResult", thrift.STRUCT, 9); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.QueryRecoveryResult_.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.QueryRecoveryResult_), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 9:queryRecoveryResult: ", p), err) } } return err } -func (p *Result_) writeField10(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *Result_) writeField10(oprot thrift.TProtocol) (err error) { if p.IsSetMaintenanceStatusResult_() { - if err := oprot.WriteFieldBegin(ctx, "maintenanceStatusResult", thrift.STRUCT, 10); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.MaintenanceStatusResult_.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.MaintenanceStatusResult_), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 10:maintenanceStatusResult: ", p), err) } } return err } -func (p *Result_) writeField11(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *Result_) writeField11(oprot thrift.TProtocol) (err error) { if p.IsSetEndMaintenanceResult_() { - if err := oprot.WriteFieldBegin(ctx, "endMaintenanceResult", thrift.STRUCT, 11); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.EndMaintenanceResult_.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.EndMaintenanceResult_), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 11:endMaintenanceResult: ", p), err) } } return err } -func (p *Result_) writeField17(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *Result_) writeField17(oprot thrift.TProtocol) (err error) { if p.IsSetRoleSummaryResult_() { - if err := oprot.WriteFieldBegin(ctx, "roleSummaryResult", thrift.STRUCT, 17); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.RoleSummaryResult_.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.RoleSummaryResult_), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 17:roleSummaryResult: ", p), err) } } return err } -func (p *Result_) writeField18(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *Result_) writeField18(oprot thrift.TProtocol) (err error) { if p.IsSetJobSummaryResult_() { - if err := oprot.WriteFieldBegin(ctx, "jobSummaryResult", thrift.STRUCT, 18); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.JobSummaryResult_.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.JobSummaryResult_), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 18:jobSummaryResult: ", p), err) } } return err } -func (p *Result_) writeField20(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *Result_) writeField20(oprot thrift.TProtocol) (err error) { if p.IsSetConfigSummaryResult_() { - if err := oprot.WriteFieldBegin(ctx, "configSummaryResult", thrift.STRUCT, 20); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.ConfigSummaryResult_.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.ConfigSummaryResult_), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 20:configSummaryResult: ", p), err) } } return err } -func (p *Result_) writeField21(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *Result_) writeField21(oprot thrift.TProtocol) (err error) { if p.IsSetGetPendingReasonResult_() { - if err := oprot.WriteFieldBegin(ctx, "getPendingReasonResult", thrift.STRUCT, 21); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.GetPendingReasonResult_.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.GetPendingReasonResult_), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 21:getPendingReasonResult: ", p), err) } } return err } -func (p *Result_) writeField22(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *Result_) writeField22(oprot thrift.TProtocol) (err error) { if p.IsSetStartJobUpdateResult_() { - if err := oprot.WriteFieldBegin(ctx, "startJobUpdateResult", thrift.STRUCT, 22); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.StartJobUpdateResult_.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.StartJobUpdateResult_), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 22:startJobUpdateResult: ", p), err) } } return err } -func (p *Result_) writeField23(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *Result_) writeField23(oprot thrift.TProtocol) (err error) { if p.IsSetGetJobUpdateSummariesResult_() { - if err := oprot.WriteFieldBegin(ctx, "getJobUpdateSummariesResult", thrift.STRUCT, 23); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.GetJobUpdateSummariesResult_.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.GetJobUpdateSummariesResult_), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 23:getJobUpdateSummariesResult: ", p), err) } } return err } -func (p *Result_) writeField24(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *Result_) writeField24(oprot thrift.TProtocol) (err error) { if p.IsSetGetJobUpdateDetailsResult_() { - if err := oprot.WriteFieldBegin(ctx, "getJobUpdateDetailsResult", thrift.STRUCT, 24); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.GetJobUpdateDetailsResult_.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.GetJobUpdateDetailsResult_), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 24:getJobUpdateDetailsResult: ", p), err) } } return err } -func (p *Result_) writeField25(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *Result_) writeField25(oprot thrift.TProtocol) (err error) { if p.IsSetPulseJobUpdateResult_() { - if err := oprot.WriteFieldBegin(ctx, "pulseJobUpdateResult", thrift.STRUCT, 25); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.PulseJobUpdateResult_.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.PulseJobUpdateResult_), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 25:pulseJobUpdateResult: ", p), err) } } return err } -func (p *Result_) writeField26(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *Result_) writeField26(oprot thrift.TProtocol) (err error) { if p.IsSetGetJobUpdateDiffResult_() { - if err := oprot.WriteFieldBegin(ctx, "getJobUpdateDiffResult", thrift.STRUCT, 26); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.GetJobUpdateDiffResult_.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.GetJobUpdateDiffResult_), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 26:getJobUpdateDiffResult: ", p), err) } } return err } -func (p *Result_) writeField27(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *Result_) writeField27(oprot thrift.TProtocol) (err error) { if p.IsSetGetTierConfigResult_() { - if err := oprot.WriteFieldBegin(ctx, "getTierConfigResult", thrift.STRUCT, 27); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.GetTierConfigResult_.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.GetTierConfigResult_), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); 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 "" @@ -18443,14 +16969,14 @@ func NewResponseDetail() *ResponseDetail { func (p *ResponseDetail) GetMessage() string { return p.Message } -func (p *ResponseDetail) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *ResponseDetail) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -18458,31 +16984,31 @@ func (p *ResponseDetail) Read(ctx context.Context, iprot thrift.TProtocol) error switch fieldId { case 1: if fieldTypeId == thrift.STRING { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ResponseDetail) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *ResponseDetail) ReadField1(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.Message = v @@ -18490,39 +17016,29 @@ func (p *ResponseDetail) ReadField1(ctx context.Context, iprot thrift.TProtocol return nil } -func (p *ResponseDetail) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "ResponseDetail"); err != nil { +func (p *ResponseDetail) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("ResponseDetail"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ResponseDetail) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "message", thrift.STRING, 1); err != nil { +func (p *ResponseDetail) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("message", thrift.STRING, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:message: ", p), err) } - if err := oprot.WriteString(ctx, string(p.Message)); err != nil { + if err := oprot.WriteString(string(p.Message)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.message (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); 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 "" @@ -18579,14 +17095,14 @@ func (p *Response) IsSetResult_() bool { return p.Result_ != nil } -func (p *Response) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *Response) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -18594,61 +17110,61 @@ func (p *Response) Read(ctx context.Context, iprot thrift.TProtocol) error { switch fieldId { case 1: if fieldTypeId == thrift.I32 { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 5: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField5(ctx, iprot); err != nil { + if err := p.ReadField5(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 3: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField3(ctx, iprot); err != nil { + if err := p.ReadField3(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 6: if fieldTypeId == thrift.LIST { - if err := p.ReadField6(ctx, iprot); err != nil { + if err := p.ReadField6(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *Response) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(ctx); err != nil { +func (p *Response) ReadField1(iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { temp := ResponseCode(v) @@ -18657,128 +17173,111 @@ func (p *Response) ReadField1(ctx context.Context, iprot thrift.TProtocol) erro return nil } -func (p *Response) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { +func (p *Response) ReadField5(iprot thrift.TProtocol) error { p.ServerInfo = &ServerInfo{} - if err := p.ServerInfo.Read(ctx, iprot); err != nil { + if err := p.ServerInfo.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.ServerInfo), err) } return nil } -func (p *Response) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { +func (p *Response) ReadField3(iprot thrift.TProtocol) error { p.Result_ = &Result_{} - if err := p.Result_.Read(ctx, iprot); err != nil { + if err := p.Result_.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Result_), err) } return nil } -func (p *Response) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin(ctx) +func (p *Response) ReadField6(iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin() 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 ++ { - _elem101 := &ResponseDetail{} - if err := _elem101.Read(ctx, iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem101), err) + _elem52 := &ResponseDetail{} + if err := _elem52.Read(iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem52), err) } - p.Details = append(p.Details, _elem101) + p.Details = append(p.Details, _elem52) } - if err := iprot.ReadListEnd(ctx); err != nil { + if err := iprot.ReadListEnd(); err != nil { return thrift.PrependError("error reading list end: ", err) } return nil } -func (p *Response) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "Response"); err != nil { +func (p *Response) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("Response"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - 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 := 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 := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *Response) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "responseCode", thrift.I32, 1); err != nil { +func (p *Response) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("responseCode", thrift.I32, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:responseCode: ", p), err) } - if err := oprot.WriteI32(ctx, int32(p.ResponseCode)); err != nil { + if err := oprot.WriteI32(int32(p.ResponseCode)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.responseCode (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:responseCode: ", p), err) } return err } -func (p *Response) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *Response) writeField3(oprot thrift.TProtocol) (err error) { if p.IsSetResult_() { - if err := oprot.WriteFieldBegin(ctx, "result", thrift.STRUCT, 3); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Result_.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Result_), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 3:result: ", p), err) } } return err } -func (p *Response) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "serverInfo", thrift.STRUCT, 5); err != nil { +func (p *Response) writeField5(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.ServerInfo.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.ServerInfo), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 5:serverInfo: ", p), err) } return err } -func (p *Response) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "details", thrift.LIST, 6); err != nil { +func (p *Response) writeField6(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("details", thrift.LIST, 6); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:details: ", p), err) } - if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.Details)); err != nil { + if err := oprot.WriteListBegin(thrift.STRUCT, len(p.Details)); err != nil { return thrift.PrependError("error writing list begin: ", err) } for _, v := range p.Details { - if err := v.Write(ctx, oprot); err != nil { + if err := v.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) } } - if err := oprot.WriteListEnd(ctx); err != nil { + if err := oprot.WriteListEnd(); err != nil { return thrift.PrependError("error writing list end: ", err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); 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 "" @@ -18807,14 +17306,14 @@ func (p *ExplicitReconciliationSettings) IsSetBatchSize() bool { return p.BatchSize != nil } -func (p *ExplicitReconciliationSettings) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *ExplicitReconciliationSettings) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -18822,31 +17321,31 @@ func (p *ExplicitReconciliationSettings) Read(ctx context.Context, iprot thrift. switch fieldId { case 1: if fieldTypeId == thrift.I32 { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ExplicitReconciliationSettings) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(ctx); err != nil { +func (p *ExplicitReconciliationSettings) ReadField1(iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.BatchSize = &v @@ -18854,46 +17353,31 @@ func (p *ExplicitReconciliationSettings) ReadField1(ctx context.Context, iprot return nil } -func (p *ExplicitReconciliationSettings) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "ExplicitReconciliationSettings"); err != nil { +func (p *ExplicitReconciliationSettings) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("ExplicitReconciliationSettings"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ExplicitReconciliationSettings) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *ExplicitReconciliationSettings) writeField1(oprot thrift.TProtocol) (err error) { if p.IsSetBatchSize() { - if err := oprot.WriteFieldBegin(ctx, "batchSize", thrift.I32, 1); err != nil { + if err := oprot.WriteFieldBegin("batchSize", thrift.I32, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:batchSize: ", p), err) } - if err := oprot.WriteI32(ctx, int32(*p.BatchSize)); err != nil { + if err := oprot.WriteI32(int32(*p.BatchSize)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.batchSize (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); 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 "" @@ -18968,7 +17452,6 @@ type ReadOnlyScheduler interface { type ReadOnlySchedulerClient struct { c thrift.TClient - meta thrift.ResponseMeta } func NewReadOnlySchedulerClientFactory(t thrift.TTransport, f thrift.TProtocolFactory) *ReadOnlySchedulerClient { @@ -18992,26 +17475,14 @@ 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 _args103 ReadOnlySchedulerGetRoleSummaryArgs - var _result104 ReadOnlySchedulerGetRoleSummaryResult - var meta thrift.ResponseMeta - meta, err = p.Client_().Call(ctx, "getRoleSummary", &_args103, &_result104) - p.SetLastResponseMeta_(meta) - if err != nil { + var _args53 ReadOnlySchedulerGetRoleSummaryArgs + var _result54 ReadOnlySchedulerGetRoleSummaryResult + if err = p.Client_().Call(ctx, "getRoleSummary", &_args53, &_result54); err != nil { return } - return _result104.GetSuccess(), nil + return _result54.GetSuccess(), nil } // Returns a summary of jobs, optionally only those owned by a specific role. @@ -19019,16 +17490,13 @@ 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 _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 { + var _args55 ReadOnlySchedulerGetJobSummaryArgs + _args55.Role = role + var _result56 ReadOnlySchedulerGetJobSummaryResult + if err = p.Client_().Call(ctx, "getJobSummary", &_args55, &_result56); err != nil { return } - return _result106.GetSuccess(), nil + return _result56.GetSuccess(), nil } // Fetches the status of tasks. @@ -19036,16 +17504,13 @@ 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 _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 { + var _args57 ReadOnlySchedulerGetTasksStatusArgs + _args57.Query = query + var _result58 ReadOnlySchedulerGetTasksStatusResult + if err = p.Client_().Call(ctx, "getTasksStatus", &_args57, &_result58); err != nil { return } - return _result108.GetSuccess(), nil + return _result58.GetSuccess(), nil } // Same as getTaskStatus but without the TaskConfig.ExecutorConfig data set. @@ -19054,16 +17519,13 @@ 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 _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 { + var _args59 ReadOnlySchedulerGetTasksWithoutConfigsArgs + _args59.Query = query + var _result60 ReadOnlySchedulerGetTasksWithoutConfigsResult + if err = p.Client_().Call(ctx, "getTasksWithoutConfigs", &_args59, &_result60); err != nil { return } - return _result110.GetSuccess(), nil + return _result60.GetSuccess(), nil } // Returns user-friendly reasons (if available) for tasks retained in PENDING state. @@ -19071,16 +17533,13 @@ func (p *ReadOnlySchedulerClient) GetTasksWithoutConfigs(ctx context.Context, qu // Parameters: // - Query func (p *ReadOnlySchedulerClient) GetPendingReason(ctx context.Context, query *TaskQuery) (r *Response, err error) { - 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 { + var _args61 ReadOnlySchedulerGetPendingReasonArgs + _args61.Query = query + var _result62 ReadOnlySchedulerGetPendingReasonResult + if err = p.Client_().Call(ctx, "getPendingReason", &_args61, &_result62); err != nil { return } - return _result112.GetSuccess(), nil + return _result62.GetSuccess(), nil } // Fetches the configuration summary of active tasks for the specified job. @@ -19088,16 +17547,13 @@ 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 _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 { + var _args63 ReadOnlySchedulerGetConfigSummaryArgs + _args63.Job = job + var _result64 ReadOnlySchedulerGetConfigSummaryResult + if err = p.Client_().Call(ctx, "getConfigSummary", &_args63, &_result64); err != nil { return } - return _result114.GetSuccess(), nil + return _result64.GetSuccess(), nil } // Fetches the status of jobs. @@ -19106,16 +17562,13 @@ 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 _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 { + var _args65 ReadOnlySchedulerGetJobsArgs + _args65.OwnerRole = ownerRole + var _result66 ReadOnlySchedulerGetJobsResult + if err = p.Client_().Call(ctx, "getJobs", &_args65, &_result66); err != nil { return } - return _result116.GetSuccess(), nil + return _result66.GetSuccess(), nil } // Fetches the quota allocated for a user. @@ -19123,16 +17576,13 @@ 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 _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 { + var _args67 ReadOnlySchedulerGetQuotaArgs + _args67.OwnerRole = ownerRole + var _result68 ReadOnlySchedulerGetQuotaResult + if err = p.Client_().Call(ctx, "getQuota", &_args67, &_result68); err != nil { return } - return _result118.GetSuccess(), nil + return _result68.GetSuccess(), nil } // Populates fields in a job configuration as though it were about to be run. @@ -19141,16 +17591,13 @@ 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 _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 { + var _args69 ReadOnlySchedulerPopulateJobConfigArgs + _args69.Description = description + var _result70 ReadOnlySchedulerPopulateJobConfigResult + if err = p.Client_().Call(ctx, "populateJobConfig", &_args69, &_result70); err != nil { return } - return _result120.GetSuccess(), nil + return _result70.GetSuccess(), nil } // Gets job update summaries. @@ -19158,16 +17605,13 @@ func (p *ReadOnlySchedulerClient) PopulateJobConfig(ctx context.Context, descrip // Parameters: // - JobUpdateQuery func (p *ReadOnlySchedulerClient) GetJobUpdateSummaries(ctx context.Context, jobUpdateQuery *JobUpdateQuery) (r *Response, err error) { - 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 { + var _args71 ReadOnlySchedulerGetJobUpdateSummariesArgs + _args71.JobUpdateQuery = jobUpdateQuery + var _result72 ReadOnlySchedulerGetJobUpdateSummariesResult + if err = p.Client_().Call(ctx, "getJobUpdateSummaries", &_args71, &_result72); err != nil { return } - return _result122.GetSuccess(), nil + return _result72.GetSuccess(), nil } // Gets job update details. @@ -19175,16 +17619,13 @@ func (p *ReadOnlySchedulerClient) GetJobUpdateSummaries(ctx context.Context, job // Parameters: // - Query func (p *ReadOnlySchedulerClient) GetJobUpdateDetails(ctx context.Context, query *JobUpdateQuery) (r *Response, err error) { - 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 { + var _args73 ReadOnlySchedulerGetJobUpdateDetailsArgs + _args73.Query = query + var _result74 ReadOnlySchedulerGetJobUpdateDetailsResult + if err = p.Client_().Call(ctx, "getJobUpdateDetails", &_args73, &_result74); err != nil { return } - return _result124.GetSuccess(), nil + return _result74.GetSuccess(), nil } // Gets the diff between client (desired) and server (current) job states. @@ -19192,29 +17633,23 @@ func (p *ReadOnlySchedulerClient) GetJobUpdateDetails(ctx context.Context, query // Parameters: // - Request func (p *ReadOnlySchedulerClient) GetJobUpdateDiff(ctx context.Context, request *JobUpdateRequest) (r *Response, err error) { - 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 { + var _args75 ReadOnlySchedulerGetJobUpdateDiffArgs + _args75.Request = request + var _result76 ReadOnlySchedulerGetJobUpdateDiffResult + if err = p.Client_().Call(ctx, "getJobUpdateDiff", &_args75, &_result76); err != nil { return } - return _result126.GetSuccess(), nil + return _result76.GetSuccess(), nil } // Gets tier configurations. func (p *ReadOnlySchedulerClient) GetTierConfigs(ctx context.Context) (r *Response, err error) { - 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 { + var _args77 ReadOnlySchedulerGetTierConfigsArgs + var _result78 ReadOnlySchedulerGetTierConfigsResult + if err = p.Client_().Call(ctx, "getTierConfigs", &_args77, &_result78); err != nil { return } - return _result128.GetSuccess(), nil + return _result78.GetSuccess(), nil } type ReadOnlySchedulerProcessor struct { @@ -19237,37 +17672,37 @@ func (p *ReadOnlySchedulerProcessor) ProcessorMap() map[string]thrift.TProcessor func NewReadOnlySchedulerProcessor(handler ReadOnlyScheduler) *ReadOnlySchedulerProcessor { - 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 + 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 } func (p *ReadOnlySchedulerProcessor) Process(ctx context.Context, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - name, _, seqId, err2 := iprot.ReadMessageBegin(ctx) - if err2 != nil { return false, thrift.WrapTException(err2) } + name, _, seqId, err := iprot.ReadMessageBegin() + if err != nil { return false, err } if processor, ok := p.GetProcessorFunction(name); ok { return processor.Process(ctx, seqId, iprot, oprot) } - 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) + 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() oprot.Flush(ctx) - return false, x130 + return false, x80 } @@ -19277,72 +17712,41 @@ type readOnlySchedulerProcessorGetRoleSummary struct { func (p *readOnlySchedulerProcessorGetRoleSummary) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := ReadOnlySchedulerGetRoleSummaryArgs{} - 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) + 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() oprot.Flush(ctx) - 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) + return false, err } + iprot.ReadMessageEnd() result := ReadOnlySchedulerGetRoleSummaryResult{} - var retval *Response +var retval *Response + var err2 error 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(ctx, "getRoleSummary", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) + oprot.WriteMessageBegin("getRoleSummary", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() oprot.Flush(ctx) - return true, thrift.WrapTException(err2) + return true, err2 } else { result.Success = retval +} + if err2 = oprot.WriteMessageBegin("getRoleSummary", thrift.REPLY, seqId); err2 != nil { + err = err2 } - tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "getRoleSummary", thrift.REPLY, seqId); err2 != nil { - err = thrift.WrapTException(err2) + if err2 = result.Write(oprot); 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.WriteMessageEnd(); err == nil && err2 != nil { + err = err2 } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + err = err2 } if err != nil { return @@ -19356,72 +17760,41 @@ type readOnlySchedulerProcessorGetJobSummary struct { func (p *readOnlySchedulerProcessorGetJobSummary) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := ReadOnlySchedulerGetJobSummaryArgs{} - 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) + 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() oprot.Flush(ctx) - 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) + return false, err } + iprot.ReadMessageEnd() result := ReadOnlySchedulerGetJobSummaryResult{} - var retval *Response +var retval *Response + var err2 error 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(ctx, "getJobSummary", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) + oprot.WriteMessageBegin("getJobSummary", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() oprot.Flush(ctx) - return true, thrift.WrapTException(err2) + return true, err2 } else { result.Success = retval +} + if err2 = oprot.WriteMessageBegin("getJobSummary", thrift.REPLY, seqId); err2 != nil { + err = err2 } - tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "getJobSummary", thrift.REPLY, seqId); err2 != nil { - err = thrift.WrapTException(err2) + if err2 = result.Write(oprot); 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.WriteMessageEnd(); err == nil && err2 != nil { + err = err2 } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + err = err2 } if err != nil { return @@ -19435,72 +17808,41 @@ type readOnlySchedulerProcessorGetTasksStatus struct { func (p *readOnlySchedulerProcessorGetTasksStatus) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := ReadOnlySchedulerGetTasksStatusArgs{} - 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) + 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() oprot.Flush(ctx) - 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) + return false, err } + iprot.ReadMessageEnd() result := ReadOnlySchedulerGetTasksStatusResult{} - var retval *Response +var retval *Response + var err2 error 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(ctx, "getTasksStatus", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) + oprot.WriteMessageBegin("getTasksStatus", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() oprot.Flush(ctx) - return true, thrift.WrapTException(err2) + return true, err2 } else { result.Success = retval +} + if err2 = oprot.WriteMessageBegin("getTasksStatus", thrift.REPLY, seqId); err2 != nil { + err = err2 } - tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "getTasksStatus", thrift.REPLY, seqId); err2 != nil { - err = thrift.WrapTException(err2) + if err2 = result.Write(oprot); 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.WriteMessageEnd(); err == nil && err2 != nil { + err = err2 } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + err = err2 } if err != nil { return @@ -19514,72 +17856,41 @@ type readOnlySchedulerProcessorGetTasksWithoutConfigs struct { func (p *readOnlySchedulerProcessorGetTasksWithoutConfigs) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := ReadOnlySchedulerGetTasksWithoutConfigsArgs{} - 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) + 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() oprot.Flush(ctx) - 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) + return false, err } + iprot.ReadMessageEnd() result := ReadOnlySchedulerGetTasksWithoutConfigsResult{} - var retval *Response +var retval *Response + var err2 error 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(ctx, "getTasksWithoutConfigs", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) + oprot.WriteMessageBegin("getTasksWithoutConfigs", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() oprot.Flush(ctx) - return true, thrift.WrapTException(err2) + return true, err2 } else { result.Success = retval +} + if err2 = oprot.WriteMessageBegin("getTasksWithoutConfigs", thrift.REPLY, seqId); err2 != nil { + err = err2 } - tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "getTasksWithoutConfigs", thrift.REPLY, seqId); err2 != nil { - err = thrift.WrapTException(err2) + if err2 = result.Write(oprot); 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.WriteMessageEnd(); err == nil && err2 != nil { + err = err2 } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + err = err2 } if err != nil { return @@ -19593,72 +17904,41 @@ type readOnlySchedulerProcessorGetPendingReason struct { func (p *readOnlySchedulerProcessorGetPendingReason) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := ReadOnlySchedulerGetPendingReasonArgs{} - 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) + 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() oprot.Flush(ctx) - 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) + return false, err } + iprot.ReadMessageEnd() result := ReadOnlySchedulerGetPendingReasonResult{} - var retval *Response +var retval *Response + var err2 error 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(ctx, "getPendingReason", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) + oprot.WriteMessageBegin("getPendingReason", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() oprot.Flush(ctx) - return true, thrift.WrapTException(err2) + return true, err2 } else { result.Success = retval +} + if err2 = oprot.WriteMessageBegin("getPendingReason", thrift.REPLY, seqId); err2 != nil { + err = err2 } - tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "getPendingReason", thrift.REPLY, seqId); err2 != nil { - err = thrift.WrapTException(err2) + if err2 = result.Write(oprot); 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.WriteMessageEnd(); err == nil && err2 != nil { + err = err2 } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + err = err2 } if err != nil { return @@ -19672,72 +17952,41 @@ type readOnlySchedulerProcessorGetConfigSummary struct { func (p *readOnlySchedulerProcessorGetConfigSummary) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := ReadOnlySchedulerGetConfigSummaryArgs{} - 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) + 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() oprot.Flush(ctx) - 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) + return false, err } + iprot.ReadMessageEnd() result := ReadOnlySchedulerGetConfigSummaryResult{} - var retval *Response +var retval *Response + var err2 error 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(ctx, "getConfigSummary", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) + oprot.WriteMessageBegin("getConfigSummary", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() oprot.Flush(ctx) - return true, thrift.WrapTException(err2) + return true, err2 } else { result.Success = retval +} + if err2 = oprot.WriteMessageBegin("getConfigSummary", thrift.REPLY, seqId); err2 != nil { + err = err2 } - tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "getConfigSummary", thrift.REPLY, seqId); err2 != nil { - err = thrift.WrapTException(err2) + if err2 = result.Write(oprot); 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.WriteMessageEnd(); err == nil && err2 != nil { + err = err2 } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + err = err2 } if err != nil { return @@ -19751,72 +18000,41 @@ type readOnlySchedulerProcessorGetJobs struct { func (p *readOnlySchedulerProcessorGetJobs) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := ReadOnlySchedulerGetJobsArgs{} - 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) + 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() oprot.Flush(ctx) - 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) + return false, err } + iprot.ReadMessageEnd() result := ReadOnlySchedulerGetJobsResult{} - var retval *Response +var retval *Response + var err2 error 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(ctx, "getJobs", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) + oprot.WriteMessageBegin("getJobs", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() oprot.Flush(ctx) - return true, thrift.WrapTException(err2) + return true, err2 } else { result.Success = retval +} + if err2 = oprot.WriteMessageBegin("getJobs", thrift.REPLY, seqId); err2 != nil { + err = err2 } - tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "getJobs", thrift.REPLY, seqId); err2 != nil { - err = thrift.WrapTException(err2) + if err2 = result.Write(oprot); 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.WriteMessageEnd(); err == nil && err2 != nil { + err = err2 } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + err = err2 } if err != nil { return @@ -19830,72 +18048,41 @@ type readOnlySchedulerProcessorGetQuota struct { func (p *readOnlySchedulerProcessorGetQuota) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := ReadOnlySchedulerGetQuotaArgs{} - 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) + 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() oprot.Flush(ctx) - 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) + return false, err } + iprot.ReadMessageEnd() result := ReadOnlySchedulerGetQuotaResult{} - var retval *Response +var retval *Response + var err2 error 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(ctx, "getQuota", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) + oprot.WriteMessageBegin("getQuota", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() oprot.Flush(ctx) - return true, thrift.WrapTException(err2) + return true, err2 } else { result.Success = retval +} + if err2 = oprot.WriteMessageBegin("getQuota", thrift.REPLY, seqId); err2 != nil { + err = err2 } - tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "getQuota", thrift.REPLY, seqId); err2 != nil { - err = thrift.WrapTException(err2) + if err2 = result.Write(oprot); 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.WriteMessageEnd(); err == nil && err2 != nil { + err = err2 } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + err = err2 } if err != nil { return @@ -19909,72 +18096,41 @@ type readOnlySchedulerProcessorPopulateJobConfig struct { func (p *readOnlySchedulerProcessorPopulateJobConfig) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := ReadOnlySchedulerPopulateJobConfigArgs{} - 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) + 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() oprot.Flush(ctx) - 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) + return false, err } + iprot.ReadMessageEnd() result := ReadOnlySchedulerPopulateJobConfigResult{} - var retval *Response +var retval *Response + var err2 error 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(ctx, "populateJobConfig", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) + oprot.WriteMessageBegin("populateJobConfig", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() oprot.Flush(ctx) - return true, thrift.WrapTException(err2) + return true, err2 } else { result.Success = retval +} + if err2 = oprot.WriteMessageBegin("populateJobConfig", thrift.REPLY, seqId); err2 != nil { + err = err2 } - tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "populateJobConfig", thrift.REPLY, seqId); err2 != nil { - err = thrift.WrapTException(err2) + if err2 = result.Write(oprot); 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.WriteMessageEnd(); err == nil && err2 != nil { + err = err2 } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + err = err2 } if err != nil { return @@ -19988,72 +18144,41 @@ type readOnlySchedulerProcessorGetJobUpdateSummaries struct { func (p *readOnlySchedulerProcessorGetJobUpdateSummaries) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := ReadOnlySchedulerGetJobUpdateSummariesArgs{} - 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) + 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() oprot.Flush(ctx) - 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) + return false, err } + iprot.ReadMessageEnd() result := ReadOnlySchedulerGetJobUpdateSummariesResult{} - var retval *Response +var retval *Response + var err2 error 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(ctx, "getJobUpdateSummaries", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) + oprot.WriteMessageBegin("getJobUpdateSummaries", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() oprot.Flush(ctx) - return true, thrift.WrapTException(err2) + return true, err2 } else { result.Success = retval +} + if err2 = oprot.WriteMessageBegin("getJobUpdateSummaries", thrift.REPLY, seqId); err2 != nil { + err = err2 } - tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "getJobUpdateSummaries", thrift.REPLY, seqId); err2 != nil { - err = thrift.WrapTException(err2) + if err2 = result.Write(oprot); 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.WriteMessageEnd(); err == nil && err2 != nil { + err = err2 } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + err = err2 } if err != nil { return @@ -20067,72 +18192,41 @@ type readOnlySchedulerProcessorGetJobUpdateDetails struct { func (p *readOnlySchedulerProcessorGetJobUpdateDetails) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := ReadOnlySchedulerGetJobUpdateDetailsArgs{} - 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) + 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() oprot.Flush(ctx) - 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) + return false, err } + iprot.ReadMessageEnd() result := ReadOnlySchedulerGetJobUpdateDetailsResult{} - var retval *Response +var retval *Response + var err2 error 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(ctx, "getJobUpdateDetails", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) + oprot.WriteMessageBegin("getJobUpdateDetails", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() oprot.Flush(ctx) - return true, thrift.WrapTException(err2) + return true, err2 } else { result.Success = retval +} + if err2 = oprot.WriteMessageBegin("getJobUpdateDetails", thrift.REPLY, seqId); err2 != nil { + err = err2 } - tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "getJobUpdateDetails", thrift.REPLY, seqId); err2 != nil { - err = thrift.WrapTException(err2) + if err2 = result.Write(oprot); 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.WriteMessageEnd(); err == nil && err2 != nil { + err = err2 } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + err = err2 } if err != nil { return @@ -20146,72 +18240,41 @@ type readOnlySchedulerProcessorGetJobUpdateDiff struct { func (p *readOnlySchedulerProcessorGetJobUpdateDiff) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := ReadOnlySchedulerGetJobUpdateDiffArgs{} - 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) + 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() oprot.Flush(ctx) - 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) + return false, err } + iprot.ReadMessageEnd() result := ReadOnlySchedulerGetJobUpdateDiffResult{} - var retval *Response +var retval *Response + var err2 error 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(ctx, "getJobUpdateDiff", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) + oprot.WriteMessageBegin("getJobUpdateDiff", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() oprot.Flush(ctx) - return true, thrift.WrapTException(err2) + return true, err2 } else { result.Success = retval +} + if err2 = oprot.WriteMessageBegin("getJobUpdateDiff", thrift.REPLY, seqId); err2 != nil { + err = err2 } - tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "getJobUpdateDiff", thrift.REPLY, seqId); err2 != nil { - err = thrift.WrapTException(err2) + if err2 = result.Write(oprot); 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.WriteMessageEnd(); err == nil && err2 != nil { + err = err2 } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + err = err2 } if err != nil { return @@ -20225,72 +18288,41 @@ type readOnlySchedulerProcessorGetTierConfigs struct { func (p *readOnlySchedulerProcessorGetTierConfigs) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := ReadOnlySchedulerGetTierConfigsArgs{} - 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) + 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() oprot.Flush(ctx) - 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) + return false, err } + iprot.ReadMessageEnd() result := ReadOnlySchedulerGetTierConfigsResult{} - var retval *Response +var retval *Response + var err2 error 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(ctx, "getTierConfigs", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) + oprot.WriteMessageBegin("getTierConfigs", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() oprot.Flush(ctx) - return true, thrift.WrapTException(err2) + return true, err2 } else { result.Success = retval +} + if err2 = oprot.WriteMessageBegin("getTierConfigs", thrift.REPLY, seqId); err2 != nil { + err = err2 } - tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "getTierConfigs", thrift.REPLY, seqId); err2 != nil { - err = thrift.WrapTException(err2) + if err2 = result.Write(oprot); 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.WriteMessageEnd(); err == nil && err2 != nil { + err = err2 } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + err = err2 } if err != nil { return @@ -20308,39 +18340,39 @@ func NewReadOnlySchedulerGetRoleSummaryArgs() *ReadOnlySchedulerGetRoleSummaryAr return &ReadOnlySchedulerGetRoleSummaryArgs{} } -func (p *ReadOnlySchedulerGetRoleSummaryArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *ReadOnlySchedulerGetRoleSummaryArgs) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() 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(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ReadOnlySchedulerGetRoleSummaryArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "getRoleSummary_args"); err != nil { +func (p *ReadOnlySchedulerGetRoleSummaryArgs) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("getRoleSummary_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } @@ -20373,14 +18405,14 @@ func (p *ReadOnlySchedulerGetRoleSummaryResult) IsSetSuccess() bool { return p.Success != nil } -func (p *ReadOnlySchedulerGetRoleSummaryResult) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *ReadOnlySchedulerGetRoleSummaryResult) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -20388,58 +18420,58 @@ func (p *ReadOnlySchedulerGetRoleSummaryResult) Read(ctx context.Context, iprot switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(ctx, iprot); err != nil { + if err := p.ReadField0(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ReadOnlySchedulerGetRoleSummaryResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { +func (p *ReadOnlySchedulerGetRoleSummaryResult) ReadField0(iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(ctx, iprot); err != nil { + if err := p.Success.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *ReadOnlySchedulerGetRoleSummaryResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "getRoleSummary_result"); err != nil { +func (p *ReadOnlySchedulerGetRoleSummaryResult) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("getRoleSummary_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(ctx, oprot); err != nil { return err } + if err := p.writeField0(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ReadOnlySchedulerGetRoleSummaryResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *ReadOnlySchedulerGetRoleSummaryResult) writeField0(oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Success.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err @@ -20466,14 +18498,14 @@ func NewReadOnlySchedulerGetJobSummaryArgs() *ReadOnlySchedulerGetJobSummaryArgs func (p *ReadOnlySchedulerGetJobSummaryArgs) GetRole() string { return p.Role } -func (p *ReadOnlySchedulerGetJobSummaryArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *ReadOnlySchedulerGetJobSummaryArgs) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -20481,31 +18513,31 @@ func (p *ReadOnlySchedulerGetJobSummaryArgs) Read(ctx context.Context, iprot thr switch fieldId { case 1: if fieldTypeId == thrift.STRING { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ReadOnlySchedulerGetJobSummaryArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *ReadOnlySchedulerGetJobSummaryArgs) ReadField1(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.Role = v @@ -20513,25 +18545,25 @@ func (p *ReadOnlySchedulerGetJobSummaryArgs) ReadField1(ctx context.Context, ip return nil } -func (p *ReadOnlySchedulerGetJobSummaryArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "getJobSummary_args"); err != nil { +func (p *ReadOnlySchedulerGetJobSummaryArgs) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("getJobSummary_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ReadOnlySchedulerGetJobSummaryArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "role", thrift.STRING, 1); err != nil { +func (p *ReadOnlySchedulerGetJobSummaryArgs) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("role", thrift.STRING, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:role: ", p), err) } - if err := oprot.WriteString(ctx, string(p.Role)); err != nil { + if err := oprot.WriteString(string(p.Role)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.role (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:role: ", p), err) } return err } @@ -20564,14 +18596,14 @@ func (p *ReadOnlySchedulerGetJobSummaryResult) IsSetSuccess() bool { return p.Success != nil } -func (p *ReadOnlySchedulerGetJobSummaryResult) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *ReadOnlySchedulerGetJobSummaryResult) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -20579,58 +18611,58 @@ func (p *ReadOnlySchedulerGetJobSummaryResult) Read(ctx context.Context, iprot t switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(ctx, iprot); err != nil { + if err := p.ReadField0(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ReadOnlySchedulerGetJobSummaryResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { +func (p *ReadOnlySchedulerGetJobSummaryResult) ReadField0(iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(ctx, iprot); err != nil { + if err := p.Success.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *ReadOnlySchedulerGetJobSummaryResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "getJobSummary_result"); err != nil { +func (p *ReadOnlySchedulerGetJobSummaryResult) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("getJobSummary_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(ctx, oprot); err != nil { return err } + if err := p.writeField0(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ReadOnlySchedulerGetJobSummaryResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *ReadOnlySchedulerGetJobSummaryResult) writeField0(oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Success.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err @@ -20664,14 +18696,14 @@ func (p *ReadOnlySchedulerGetTasksStatusArgs) IsSetQuery() bool { return p.Query != nil } -func (p *ReadOnlySchedulerGetTasksStatusArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *ReadOnlySchedulerGetTasksStatusArgs) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -20679,57 +18711,57 @@ func (p *ReadOnlySchedulerGetTasksStatusArgs) Read(ctx context.Context, iprot th switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ReadOnlySchedulerGetTasksStatusArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { +func (p *ReadOnlySchedulerGetTasksStatusArgs) ReadField1(iprot thrift.TProtocol) error { p.Query = &TaskQuery{} - if err := p.Query.Read(ctx, iprot); err != nil { + if err := p.Query.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Query), err) } return nil } -func (p *ReadOnlySchedulerGetTasksStatusArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "getTasksStatus_args"); err != nil { +func (p *ReadOnlySchedulerGetTasksStatusArgs) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("getTasksStatus_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ReadOnlySchedulerGetTasksStatusArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "query", thrift.STRUCT, 1); err != nil { +func (p *ReadOnlySchedulerGetTasksStatusArgs) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Query.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Query), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:query: ", p), err) } return err } @@ -20762,14 +18794,14 @@ func (p *ReadOnlySchedulerGetTasksStatusResult) IsSetSuccess() bool { return p.Success != nil } -func (p *ReadOnlySchedulerGetTasksStatusResult) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *ReadOnlySchedulerGetTasksStatusResult) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -20777,58 +18809,58 @@ func (p *ReadOnlySchedulerGetTasksStatusResult) Read(ctx context.Context, iprot switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(ctx, iprot); err != nil { + if err := p.ReadField0(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ReadOnlySchedulerGetTasksStatusResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { +func (p *ReadOnlySchedulerGetTasksStatusResult) ReadField0(iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(ctx, iprot); err != nil { + if err := p.Success.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *ReadOnlySchedulerGetTasksStatusResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "getTasksStatus_result"); err != nil { +func (p *ReadOnlySchedulerGetTasksStatusResult) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("getTasksStatus_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(ctx, oprot); err != nil { return err } + if err := p.writeField0(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ReadOnlySchedulerGetTasksStatusResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *ReadOnlySchedulerGetTasksStatusResult) writeField0(oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Success.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err @@ -20862,14 +18894,14 @@ func (p *ReadOnlySchedulerGetTasksWithoutConfigsArgs) IsSetQuery() bool { return p.Query != nil } -func (p *ReadOnlySchedulerGetTasksWithoutConfigsArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *ReadOnlySchedulerGetTasksWithoutConfigsArgs) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -20877,57 +18909,57 @@ func (p *ReadOnlySchedulerGetTasksWithoutConfigsArgs) Read(ctx context.Context, switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ReadOnlySchedulerGetTasksWithoutConfigsArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { +func (p *ReadOnlySchedulerGetTasksWithoutConfigsArgs) ReadField1(iprot thrift.TProtocol) error { p.Query = &TaskQuery{} - if err := p.Query.Read(ctx, iprot); err != nil { + if err := p.Query.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Query), err) } return nil } -func (p *ReadOnlySchedulerGetTasksWithoutConfigsArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "getTasksWithoutConfigs_args"); err != nil { +func (p *ReadOnlySchedulerGetTasksWithoutConfigsArgs) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("getTasksWithoutConfigs_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ReadOnlySchedulerGetTasksWithoutConfigsArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "query", thrift.STRUCT, 1); err != nil { +func (p *ReadOnlySchedulerGetTasksWithoutConfigsArgs) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Query.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Query), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:query: ", p), err) } return err } @@ -20960,14 +18992,14 @@ func (p *ReadOnlySchedulerGetTasksWithoutConfigsResult) IsSetSuccess() bool { return p.Success != nil } -func (p *ReadOnlySchedulerGetTasksWithoutConfigsResult) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *ReadOnlySchedulerGetTasksWithoutConfigsResult) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -20975,58 +19007,58 @@ func (p *ReadOnlySchedulerGetTasksWithoutConfigsResult) Read(ctx context.Context switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(ctx, iprot); err != nil { + if err := p.ReadField0(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ReadOnlySchedulerGetTasksWithoutConfigsResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { +func (p *ReadOnlySchedulerGetTasksWithoutConfigsResult) ReadField0(iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(ctx, iprot); err != nil { + if err := p.Success.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *ReadOnlySchedulerGetTasksWithoutConfigsResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "getTasksWithoutConfigs_result"); err != nil { +func (p *ReadOnlySchedulerGetTasksWithoutConfigsResult) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("getTasksWithoutConfigs_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(ctx, oprot); err != nil { return err } + if err := p.writeField0(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ReadOnlySchedulerGetTasksWithoutConfigsResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *ReadOnlySchedulerGetTasksWithoutConfigsResult) writeField0(oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Success.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err @@ -21060,14 +19092,14 @@ func (p *ReadOnlySchedulerGetPendingReasonArgs) IsSetQuery() bool { return p.Query != nil } -func (p *ReadOnlySchedulerGetPendingReasonArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *ReadOnlySchedulerGetPendingReasonArgs) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -21075,57 +19107,57 @@ func (p *ReadOnlySchedulerGetPendingReasonArgs) Read(ctx context.Context, iprot switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ReadOnlySchedulerGetPendingReasonArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { +func (p *ReadOnlySchedulerGetPendingReasonArgs) ReadField1(iprot thrift.TProtocol) error { p.Query = &TaskQuery{} - if err := p.Query.Read(ctx, iprot); err != nil { + if err := p.Query.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Query), err) } return nil } -func (p *ReadOnlySchedulerGetPendingReasonArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "getPendingReason_args"); err != nil { +func (p *ReadOnlySchedulerGetPendingReasonArgs) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("getPendingReason_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ReadOnlySchedulerGetPendingReasonArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "query", thrift.STRUCT, 1); err != nil { +func (p *ReadOnlySchedulerGetPendingReasonArgs) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Query.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Query), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:query: ", p), err) } return err } @@ -21158,14 +19190,14 @@ func (p *ReadOnlySchedulerGetPendingReasonResult) IsSetSuccess() bool { return p.Success != nil } -func (p *ReadOnlySchedulerGetPendingReasonResult) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *ReadOnlySchedulerGetPendingReasonResult) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -21173,58 +19205,58 @@ func (p *ReadOnlySchedulerGetPendingReasonResult) Read(ctx context.Context, ipro switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(ctx, iprot); err != nil { + if err := p.ReadField0(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ReadOnlySchedulerGetPendingReasonResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { +func (p *ReadOnlySchedulerGetPendingReasonResult) ReadField0(iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(ctx, iprot); err != nil { + if err := p.Success.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *ReadOnlySchedulerGetPendingReasonResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "getPendingReason_result"); err != nil { +func (p *ReadOnlySchedulerGetPendingReasonResult) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("getPendingReason_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(ctx, oprot); err != nil { return err } + if err := p.writeField0(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ReadOnlySchedulerGetPendingReasonResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *ReadOnlySchedulerGetPendingReasonResult) writeField0(oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Success.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err @@ -21258,14 +19290,14 @@ func (p *ReadOnlySchedulerGetConfigSummaryArgs) IsSetJob() bool { return p.Job != nil } -func (p *ReadOnlySchedulerGetConfigSummaryArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *ReadOnlySchedulerGetConfigSummaryArgs) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -21273,57 +19305,57 @@ func (p *ReadOnlySchedulerGetConfigSummaryArgs) Read(ctx context.Context, iprot switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ReadOnlySchedulerGetConfigSummaryArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { +func (p *ReadOnlySchedulerGetConfigSummaryArgs) ReadField1(iprot thrift.TProtocol) error { p.Job = &JobKey{} - if err := p.Job.Read(ctx, iprot); err != nil { + if err := p.Job.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Job), err) } return nil } -func (p *ReadOnlySchedulerGetConfigSummaryArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "getConfigSummary_args"); err != nil { +func (p *ReadOnlySchedulerGetConfigSummaryArgs) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("getConfigSummary_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ReadOnlySchedulerGetConfigSummaryArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "job", thrift.STRUCT, 1); err != nil { +func (p *ReadOnlySchedulerGetConfigSummaryArgs) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Job.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Job), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:job: ", p), err) } return err } @@ -21356,14 +19388,14 @@ func (p *ReadOnlySchedulerGetConfigSummaryResult) IsSetSuccess() bool { return p.Success != nil } -func (p *ReadOnlySchedulerGetConfigSummaryResult) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *ReadOnlySchedulerGetConfigSummaryResult) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -21371,58 +19403,58 @@ func (p *ReadOnlySchedulerGetConfigSummaryResult) Read(ctx context.Context, ipro switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(ctx, iprot); err != nil { + if err := p.ReadField0(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ReadOnlySchedulerGetConfigSummaryResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { +func (p *ReadOnlySchedulerGetConfigSummaryResult) ReadField0(iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(ctx, iprot); err != nil { + if err := p.Success.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *ReadOnlySchedulerGetConfigSummaryResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "getConfigSummary_result"); err != nil { +func (p *ReadOnlySchedulerGetConfigSummaryResult) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("getConfigSummary_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(ctx, oprot); err != nil { return err } + if err := p.writeField0(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ReadOnlySchedulerGetConfigSummaryResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *ReadOnlySchedulerGetConfigSummaryResult) writeField0(oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Success.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err @@ -21449,14 +19481,14 @@ func NewReadOnlySchedulerGetJobsArgs() *ReadOnlySchedulerGetJobsArgs { func (p *ReadOnlySchedulerGetJobsArgs) GetOwnerRole() string { return p.OwnerRole } -func (p *ReadOnlySchedulerGetJobsArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *ReadOnlySchedulerGetJobsArgs) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -21464,31 +19496,31 @@ func (p *ReadOnlySchedulerGetJobsArgs) Read(ctx context.Context, iprot thrift.TP switch fieldId { case 1: if fieldTypeId == thrift.STRING { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ReadOnlySchedulerGetJobsArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *ReadOnlySchedulerGetJobsArgs) ReadField1(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.OwnerRole = v @@ -21496,25 +19528,25 @@ func (p *ReadOnlySchedulerGetJobsArgs) ReadField1(ctx context.Context, iprot th return nil } -func (p *ReadOnlySchedulerGetJobsArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "getJobs_args"); err != nil { +func (p *ReadOnlySchedulerGetJobsArgs) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("getJobs_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ReadOnlySchedulerGetJobsArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "ownerRole", thrift.STRING, 1); err != nil { +func (p *ReadOnlySchedulerGetJobsArgs) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("ownerRole", thrift.STRING, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:ownerRole: ", p), err) } - if err := oprot.WriteString(ctx, string(p.OwnerRole)); err != nil { + if err := oprot.WriteString(string(p.OwnerRole)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.ownerRole (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:ownerRole: ", p), err) } return err } @@ -21547,14 +19579,14 @@ func (p *ReadOnlySchedulerGetJobsResult) IsSetSuccess() bool { return p.Success != nil } -func (p *ReadOnlySchedulerGetJobsResult) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *ReadOnlySchedulerGetJobsResult) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -21562,58 +19594,58 @@ func (p *ReadOnlySchedulerGetJobsResult) Read(ctx context.Context, iprot thrift. switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(ctx, iprot); err != nil { + if err := p.ReadField0(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ReadOnlySchedulerGetJobsResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { +func (p *ReadOnlySchedulerGetJobsResult) ReadField0(iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(ctx, iprot); err != nil { + if err := p.Success.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *ReadOnlySchedulerGetJobsResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "getJobs_result"); err != nil { +func (p *ReadOnlySchedulerGetJobsResult) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("getJobs_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(ctx, oprot); err != nil { return err } + if err := p.writeField0(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ReadOnlySchedulerGetJobsResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *ReadOnlySchedulerGetJobsResult) writeField0(oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Success.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err @@ -21640,14 +19672,14 @@ func NewReadOnlySchedulerGetQuotaArgs() *ReadOnlySchedulerGetQuotaArgs { func (p *ReadOnlySchedulerGetQuotaArgs) GetOwnerRole() string { return p.OwnerRole } -func (p *ReadOnlySchedulerGetQuotaArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *ReadOnlySchedulerGetQuotaArgs) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -21655,31 +19687,31 @@ func (p *ReadOnlySchedulerGetQuotaArgs) Read(ctx context.Context, iprot thrift.T switch fieldId { case 1: if fieldTypeId == thrift.STRING { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ReadOnlySchedulerGetQuotaArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *ReadOnlySchedulerGetQuotaArgs) ReadField1(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.OwnerRole = v @@ -21687,25 +19719,25 @@ func (p *ReadOnlySchedulerGetQuotaArgs) ReadField1(ctx context.Context, iprot t return nil } -func (p *ReadOnlySchedulerGetQuotaArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "getQuota_args"); err != nil { +func (p *ReadOnlySchedulerGetQuotaArgs) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("getQuota_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ReadOnlySchedulerGetQuotaArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "ownerRole", thrift.STRING, 1); err != nil { +func (p *ReadOnlySchedulerGetQuotaArgs) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("ownerRole", thrift.STRING, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:ownerRole: ", p), err) } - if err := oprot.WriteString(ctx, string(p.OwnerRole)); err != nil { + if err := oprot.WriteString(string(p.OwnerRole)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.ownerRole (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:ownerRole: ", p), err) } return err } @@ -21738,14 +19770,14 @@ func (p *ReadOnlySchedulerGetQuotaResult) IsSetSuccess() bool { return p.Success != nil } -func (p *ReadOnlySchedulerGetQuotaResult) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *ReadOnlySchedulerGetQuotaResult) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -21753,58 +19785,58 @@ func (p *ReadOnlySchedulerGetQuotaResult) Read(ctx context.Context, iprot thrift switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(ctx, iprot); err != nil { + if err := p.ReadField0(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ReadOnlySchedulerGetQuotaResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { +func (p *ReadOnlySchedulerGetQuotaResult) ReadField0(iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(ctx, iprot); err != nil { + if err := p.Success.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *ReadOnlySchedulerGetQuotaResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "getQuota_result"); err != nil { +func (p *ReadOnlySchedulerGetQuotaResult) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("getQuota_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(ctx, oprot); err != nil { return err } + if err := p.writeField0(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ReadOnlySchedulerGetQuotaResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *ReadOnlySchedulerGetQuotaResult) writeField0(oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Success.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err @@ -21838,14 +19870,14 @@ func (p *ReadOnlySchedulerPopulateJobConfigArgs) IsSetDescription() bool { return p.Description != nil } -func (p *ReadOnlySchedulerPopulateJobConfigArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *ReadOnlySchedulerPopulateJobConfigArgs) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -21853,57 +19885,57 @@ func (p *ReadOnlySchedulerPopulateJobConfigArgs) Read(ctx context.Context, iprot switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ReadOnlySchedulerPopulateJobConfigArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { +func (p *ReadOnlySchedulerPopulateJobConfigArgs) ReadField1(iprot thrift.TProtocol) error { p.Description = &JobConfiguration{} - if err := p.Description.Read(ctx, iprot); err != nil { + if err := p.Description.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Description), err) } return nil } -func (p *ReadOnlySchedulerPopulateJobConfigArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "populateJobConfig_args"); err != nil { +func (p *ReadOnlySchedulerPopulateJobConfigArgs) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("populateJobConfig_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ReadOnlySchedulerPopulateJobConfigArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "description", thrift.STRUCT, 1); err != nil { +func (p *ReadOnlySchedulerPopulateJobConfigArgs) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Description.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Description), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:description: ", p), err) } return err } @@ -21936,14 +19968,14 @@ func (p *ReadOnlySchedulerPopulateJobConfigResult) IsSetSuccess() bool { return p.Success != nil } -func (p *ReadOnlySchedulerPopulateJobConfigResult) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *ReadOnlySchedulerPopulateJobConfigResult) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -21951,58 +19983,58 @@ func (p *ReadOnlySchedulerPopulateJobConfigResult) Read(ctx context.Context, ipr switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(ctx, iprot); err != nil { + if err := p.ReadField0(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ReadOnlySchedulerPopulateJobConfigResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { +func (p *ReadOnlySchedulerPopulateJobConfigResult) ReadField0(iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(ctx, iprot); err != nil { + if err := p.Success.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *ReadOnlySchedulerPopulateJobConfigResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "populateJobConfig_result"); err != nil { +func (p *ReadOnlySchedulerPopulateJobConfigResult) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("populateJobConfig_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(ctx, oprot); err != nil { return err } + if err := p.writeField0(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ReadOnlySchedulerPopulateJobConfigResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *ReadOnlySchedulerPopulateJobConfigResult) writeField0(oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Success.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err @@ -22036,14 +20068,14 @@ func (p *ReadOnlySchedulerGetJobUpdateSummariesArgs) IsSetJobUpdateQuery() bool return p.JobUpdateQuery != nil } -func (p *ReadOnlySchedulerGetJobUpdateSummariesArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *ReadOnlySchedulerGetJobUpdateSummariesArgs) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -22051,57 +20083,57 @@ func (p *ReadOnlySchedulerGetJobUpdateSummariesArgs) Read(ctx context.Context, i switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ReadOnlySchedulerGetJobUpdateSummariesArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { +func (p *ReadOnlySchedulerGetJobUpdateSummariesArgs) ReadField1(iprot thrift.TProtocol) error { p.JobUpdateQuery = &JobUpdateQuery{} - if err := p.JobUpdateQuery.Read(ctx, iprot); err != nil { + if err := p.JobUpdateQuery.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.JobUpdateQuery), err) } return nil } -func (p *ReadOnlySchedulerGetJobUpdateSummariesArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "getJobUpdateSummaries_args"); err != nil { +func (p *ReadOnlySchedulerGetJobUpdateSummariesArgs) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("getJobUpdateSummaries_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ReadOnlySchedulerGetJobUpdateSummariesArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "jobUpdateQuery", thrift.STRUCT, 1); err != nil { +func (p *ReadOnlySchedulerGetJobUpdateSummariesArgs) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.JobUpdateQuery.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.JobUpdateQuery), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:jobUpdateQuery: ", p), err) } return err } @@ -22134,14 +20166,14 @@ func (p *ReadOnlySchedulerGetJobUpdateSummariesResult) IsSetSuccess() bool { return p.Success != nil } -func (p *ReadOnlySchedulerGetJobUpdateSummariesResult) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *ReadOnlySchedulerGetJobUpdateSummariesResult) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -22149,58 +20181,58 @@ func (p *ReadOnlySchedulerGetJobUpdateSummariesResult) Read(ctx context.Context, switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(ctx, iprot); err != nil { + if err := p.ReadField0(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ReadOnlySchedulerGetJobUpdateSummariesResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { +func (p *ReadOnlySchedulerGetJobUpdateSummariesResult) ReadField0(iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(ctx, iprot); err != nil { + if err := p.Success.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *ReadOnlySchedulerGetJobUpdateSummariesResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "getJobUpdateSummaries_result"); err != nil { +func (p *ReadOnlySchedulerGetJobUpdateSummariesResult) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("getJobUpdateSummaries_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(ctx, oprot); err != nil { return err } + if err := p.writeField0(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ReadOnlySchedulerGetJobUpdateSummariesResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *ReadOnlySchedulerGetJobUpdateSummariesResult) writeField0(oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Success.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err @@ -22235,14 +20267,14 @@ func (p *ReadOnlySchedulerGetJobUpdateDetailsArgs) IsSetQuery() bool { return p.Query != nil } -func (p *ReadOnlySchedulerGetJobUpdateDetailsArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *ReadOnlySchedulerGetJobUpdateDetailsArgs) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -22250,57 +20282,57 @@ func (p *ReadOnlySchedulerGetJobUpdateDetailsArgs) Read(ctx context.Context, ipr switch fieldId { case 2: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField2(ctx, iprot); err != nil { + if err := p.ReadField2(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ReadOnlySchedulerGetJobUpdateDetailsArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { +func (p *ReadOnlySchedulerGetJobUpdateDetailsArgs) ReadField2(iprot thrift.TProtocol) error { p.Query = &JobUpdateQuery{} - if err := p.Query.Read(ctx, iprot); err != nil { + if err := p.Query.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Query), err) } return nil } -func (p *ReadOnlySchedulerGetJobUpdateDetailsArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "getJobUpdateDetails_args"); err != nil { +func (p *ReadOnlySchedulerGetJobUpdateDetailsArgs) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("getJobUpdateDetails_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField2(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ReadOnlySchedulerGetJobUpdateDetailsArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "query", thrift.STRUCT, 2); err != nil { +func (p *ReadOnlySchedulerGetJobUpdateDetailsArgs) writeField2(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Query.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Query), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:query: ", p), err) } return err } @@ -22333,14 +20365,14 @@ func (p *ReadOnlySchedulerGetJobUpdateDetailsResult) IsSetSuccess() bool { return p.Success != nil } -func (p *ReadOnlySchedulerGetJobUpdateDetailsResult) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *ReadOnlySchedulerGetJobUpdateDetailsResult) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -22348,58 +20380,58 @@ func (p *ReadOnlySchedulerGetJobUpdateDetailsResult) Read(ctx context.Context, i switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(ctx, iprot); err != nil { + if err := p.ReadField0(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ReadOnlySchedulerGetJobUpdateDetailsResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { +func (p *ReadOnlySchedulerGetJobUpdateDetailsResult) ReadField0(iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(ctx, iprot); err != nil { + if err := p.Success.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *ReadOnlySchedulerGetJobUpdateDetailsResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "getJobUpdateDetails_result"); err != nil { +func (p *ReadOnlySchedulerGetJobUpdateDetailsResult) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("getJobUpdateDetails_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(ctx, oprot); err != nil { return err } + if err := p.writeField0(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ReadOnlySchedulerGetJobUpdateDetailsResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *ReadOnlySchedulerGetJobUpdateDetailsResult) writeField0(oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Success.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err @@ -22433,14 +20465,14 @@ func (p *ReadOnlySchedulerGetJobUpdateDiffArgs) IsSetRequest() bool { return p.Request != nil } -func (p *ReadOnlySchedulerGetJobUpdateDiffArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *ReadOnlySchedulerGetJobUpdateDiffArgs) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -22448,57 +20480,57 @@ func (p *ReadOnlySchedulerGetJobUpdateDiffArgs) Read(ctx context.Context, iprot switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ReadOnlySchedulerGetJobUpdateDiffArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { +func (p *ReadOnlySchedulerGetJobUpdateDiffArgs) ReadField1(iprot thrift.TProtocol) error { p.Request = &JobUpdateRequest{} - if err := p.Request.Read(ctx, iprot); err != nil { + if err := p.Request.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Request), err) } return nil } -func (p *ReadOnlySchedulerGetJobUpdateDiffArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "getJobUpdateDiff_args"); err != nil { +func (p *ReadOnlySchedulerGetJobUpdateDiffArgs) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("getJobUpdateDiff_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ReadOnlySchedulerGetJobUpdateDiffArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "request", thrift.STRUCT, 1); err != nil { +func (p *ReadOnlySchedulerGetJobUpdateDiffArgs) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Request.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Request), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:request: ", p), err) } return err } @@ -22531,14 +20563,14 @@ func (p *ReadOnlySchedulerGetJobUpdateDiffResult) IsSetSuccess() bool { return p.Success != nil } -func (p *ReadOnlySchedulerGetJobUpdateDiffResult) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *ReadOnlySchedulerGetJobUpdateDiffResult) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -22546,58 +20578,58 @@ func (p *ReadOnlySchedulerGetJobUpdateDiffResult) Read(ctx context.Context, ipro switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(ctx, iprot); err != nil { + if err := p.ReadField0(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ReadOnlySchedulerGetJobUpdateDiffResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { +func (p *ReadOnlySchedulerGetJobUpdateDiffResult) ReadField0(iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(ctx, iprot); err != nil { + if err := p.Success.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *ReadOnlySchedulerGetJobUpdateDiffResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "getJobUpdateDiff_result"); err != nil { +func (p *ReadOnlySchedulerGetJobUpdateDiffResult) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("getJobUpdateDiff_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(ctx, oprot); err != nil { return err } + if err := p.writeField0(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ReadOnlySchedulerGetJobUpdateDiffResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *ReadOnlySchedulerGetJobUpdateDiffResult) writeField0(oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Success.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err @@ -22617,39 +20649,39 @@ func NewReadOnlySchedulerGetTierConfigsArgs() *ReadOnlySchedulerGetTierConfigsAr return &ReadOnlySchedulerGetTierConfigsArgs{} } -func (p *ReadOnlySchedulerGetTierConfigsArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *ReadOnlySchedulerGetTierConfigsArgs) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() 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(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ReadOnlySchedulerGetTierConfigsArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "getTierConfigs_args"); err != nil { +func (p *ReadOnlySchedulerGetTierConfigsArgs) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("getTierConfigs_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } @@ -22682,14 +20714,14 @@ func (p *ReadOnlySchedulerGetTierConfigsResult) IsSetSuccess() bool { return p.Success != nil } -func (p *ReadOnlySchedulerGetTierConfigsResult) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *ReadOnlySchedulerGetTierConfigsResult) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -22697,58 +20729,58 @@ func (p *ReadOnlySchedulerGetTierConfigsResult) Read(ctx context.Context, iprot switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(ctx, iprot); err != nil { + if err := p.ReadField0(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *ReadOnlySchedulerGetTierConfigsResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { +func (p *ReadOnlySchedulerGetTierConfigsResult) ReadField0(iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(ctx, iprot); err != nil { + if err := p.Success.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *ReadOnlySchedulerGetTierConfigsResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "getTierConfigs_result"); err != nil { +func (p *ReadOnlySchedulerGetTierConfigsResult) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("getTierConfigs_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(ctx, oprot); err != nil { return err } + if err := p.writeField0(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *ReadOnlySchedulerGetTierConfigsResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *ReadOnlySchedulerGetTierConfigsResult) writeField0(oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Success.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err @@ -22877,16 +20909,13 @@ func NewAuroraSchedulerManagerClient(c thrift.TClient) *AuroraSchedulerManagerCl // Parameters: // - Description func (p *AuroraSchedulerManagerClient) CreateJob(ctx context.Context, description *JobConfiguration) (r *Response, err error) { - 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 { + var _args132 AuroraSchedulerManagerCreateJobArgs + _args132.Description = description + var _result133 AuroraSchedulerManagerCreateJobResult + if err = p.Client_().Call(ctx, "createJob", &_args132, &_result133); err != nil { return } - return _result183.GetSuccess(), nil + return _result133.GetSuccess(), nil } // Enters a job into the cron schedule, without actually starting the job. @@ -22896,16 +20925,13 @@ func (p *AuroraSchedulerManagerClient) CreateJob(ctx context.Context, descriptio // Parameters: // - Description func (p *AuroraSchedulerManagerClient) ScheduleCronJob(ctx context.Context, description *JobConfiguration) (r *Response, err error) { - 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 { + var _args134 AuroraSchedulerManagerScheduleCronJobArgs + _args134.Description = description + var _result135 AuroraSchedulerManagerScheduleCronJobResult + if err = p.Client_().Call(ctx, "scheduleCronJob", &_args134, &_result135); err != nil { return } - return _result185.GetSuccess(), nil + return _result135.GetSuccess(), nil } // Removes a job from the cron schedule. The request will be denied if the job was not previously @@ -22914,16 +20940,13 @@ func (p *AuroraSchedulerManagerClient) ScheduleCronJob(ctx context.Context, desc // Parameters: // - Job func (p *AuroraSchedulerManagerClient) DescheduleCronJob(ctx context.Context, job *JobKey) (r *Response, err error) { - 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 { + var _args136 AuroraSchedulerManagerDescheduleCronJobArgs + _args136.Job = job + var _result137 AuroraSchedulerManagerDescheduleCronJobResult + if err = p.Client_().Call(ctx, "descheduleCronJob", &_args136, &_result137); err != nil { return } - return _result187.GetSuccess(), nil + return _result137.GetSuccess(), nil } // Starts a cron job immediately. The request will be denied if the specified job does not @@ -22932,16 +20955,13 @@ func (p *AuroraSchedulerManagerClient) DescheduleCronJob(ctx context.Context, jo // Parameters: // - Job func (p *AuroraSchedulerManagerClient) StartCronJob(ctx context.Context, job *JobKey) (r *Response, err error) { - 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 { + var _args138 AuroraSchedulerManagerStartCronJobArgs + _args138.Job = job + var _result139 AuroraSchedulerManagerStartCronJobResult + if err = p.Client_().Call(ctx, "startCronJob", &_args138, &_result139); err != nil { return } - return _result189.GetSuccess(), nil + return _result139.GetSuccess(), nil } // Restarts a batch of shards. @@ -22950,17 +20970,14 @@ 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 _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 { + var _args140 AuroraSchedulerManagerRestartShardsArgs + _args140.Job = job + _args140.ShardIds = shardIds + var _result141 AuroraSchedulerManagerRestartShardsResult + if err = p.Client_().Call(ctx, "restartShards", &_args140, &_result141); err != nil { return } - return _result191.GetSuccess(), nil + return _result141.GetSuccess(), nil } // Initiates a kill on tasks. @@ -22970,18 +20987,15 @@ 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 _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 { + 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 { return } - return _result193.GetSuccess(), nil + return _result143.GetSuccess(), nil } // Adds new instances with the TaskConfig of the existing instance pointed by the key. @@ -22990,17 +21004,14 @@ 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 _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 { + var _args144 AuroraSchedulerManagerAddInstancesArgs + _args144.Key = key + _args144.Count = count + var _result145 AuroraSchedulerManagerAddInstancesResult + if err = p.Client_().Call(ctx, "addInstances", &_args144, &_result145); err != nil { return } - return _result195.GetSuccess(), nil + return _result145.GetSuccess(), nil } // Replaces the template (configuration) for the existing cron job. @@ -23009,16 +21020,13 @@ 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 _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 { + var _args146 AuroraSchedulerManagerReplaceCronTemplateArgs + _args146.Config = config + var _result147 AuroraSchedulerManagerReplaceCronTemplateResult + if err = p.Client_().Call(ctx, "replaceCronTemplate", &_args146, &_result147); err != nil { return } - return _result197.GetSuccess(), nil + return _result147.GetSuccess(), nil } // Starts update of the existing service job. @@ -23027,17 +21035,14 @@ 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 _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 { + var _args148 AuroraSchedulerManagerStartJobUpdateArgs + _args148.Request = request + _args148.Message = message + var _result149 AuroraSchedulerManagerStartJobUpdateResult + if err = p.Client_().Call(ctx, "startJobUpdate", &_args148, &_result149); err != nil { return } - return _result199.GetSuccess(), nil + return _result149.GetSuccess(), nil } // Pauses the specified job update. Can be resumed by resumeUpdate call. @@ -23046,17 +21051,14 @@ 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 _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 { + var _args150 AuroraSchedulerManagerPauseJobUpdateArgs + _args150.Key = key + _args150.Message = message + var _result151 AuroraSchedulerManagerPauseJobUpdateResult + if err = p.Client_().Call(ctx, "pauseJobUpdate", &_args150, &_result151); err != nil { return } - return _result201.GetSuccess(), nil + return _result151.GetSuccess(), nil } // Resumes progress of a previously paused job update. @@ -23065,17 +21067,14 @@ 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 _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 { + var _args152 AuroraSchedulerManagerResumeJobUpdateArgs + _args152.Key = key + _args152.Message = message + var _result153 AuroraSchedulerManagerResumeJobUpdateResult + if err = p.Client_().Call(ctx, "resumeJobUpdate", &_args152, &_result153); err != nil { return } - return _result203.GetSuccess(), nil + return _result153.GetSuccess(), nil } // Permanently aborts the job update. Does not remove the update history. @@ -23084,17 +21083,14 @@ 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 _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 { + var _args154 AuroraSchedulerManagerAbortJobUpdateArgs + _args154.Key = key + _args154.Message = message + var _result155 AuroraSchedulerManagerAbortJobUpdateResult + if err = p.Client_().Call(ctx, "abortJobUpdate", &_args154, &_result155); err != nil { return } - return _result205.GetSuccess(), nil + return _result155.GetSuccess(), nil } // Rollbacks the specified active job update to the initial state. @@ -23103,17 +21099,14 @@ 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 _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 { + var _args156 AuroraSchedulerManagerRollbackJobUpdateArgs + _args156.Key = key + _args156.Message = message + var _result157 AuroraSchedulerManagerRollbackJobUpdateResult + if err = p.Client_().Call(ctx, "rollbackJobUpdate", &_args156, &_result157); err != nil { return } - return _result207.GetSuccess(), nil + return _result157.GetSuccess(), nil } // Allows progress of the job update in case blockIfNoPulsesAfterMs is specified in @@ -23123,16 +21116,13 @@ func (p *AuroraSchedulerManagerClient) RollbackJobUpdate(ctx context.Context, ke // Parameters: // - Key func (p *AuroraSchedulerManagerClient) PulseJobUpdate(ctx context.Context, key *JobUpdateKey) (r *Response, err error) { - 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 { + var _args158 AuroraSchedulerManagerPulseJobUpdateArgs + _args158.Key = key + var _result159 AuroraSchedulerManagerPulseJobUpdateResult + if err = p.Client_().Call(ctx, "pulseJobUpdate", &_args158, &_result159); err != nil { return } - return _result209.GetSuccess(), nil + return _result159.GetSuccess(), nil } type AuroraSchedulerManagerProcessor struct { @@ -23140,22 +21130,22 @@ type AuroraSchedulerManagerProcessor struct { } func NewAuroraSchedulerManagerProcessor(handler AuroraSchedulerManager) *AuroraSchedulerManagerProcessor { - 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 + 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 } type auroraSchedulerManagerProcessorCreateJob struct { @@ -23164,72 +21154,41 @@ type auroraSchedulerManagerProcessorCreateJob struct { func (p *auroraSchedulerManagerProcessorCreateJob) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := AuroraSchedulerManagerCreateJobArgs{} - 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) + 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() oprot.Flush(ctx) - 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) + return false, err } + iprot.ReadMessageEnd() result := AuroraSchedulerManagerCreateJobResult{} - var retval *Response +var retval *Response + var err2 error 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(ctx, "createJob", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) + oprot.WriteMessageBegin("createJob", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() oprot.Flush(ctx) - return true, thrift.WrapTException(err2) + return true, err2 } else { result.Success = retval +} + if err2 = oprot.WriteMessageBegin("createJob", thrift.REPLY, seqId); err2 != nil { + err = err2 } - tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "createJob", thrift.REPLY, seqId); err2 != nil { - err = thrift.WrapTException(err2) + if err2 = result.Write(oprot); 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.WriteMessageEnd(); err == nil && err2 != nil { + err = err2 } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + err = err2 } if err != nil { return @@ -23243,72 +21202,41 @@ type auroraSchedulerManagerProcessorScheduleCronJob struct { func (p *auroraSchedulerManagerProcessorScheduleCronJob) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := AuroraSchedulerManagerScheduleCronJobArgs{} - 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) + 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() oprot.Flush(ctx) - 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) + return false, err } + iprot.ReadMessageEnd() result := AuroraSchedulerManagerScheduleCronJobResult{} - var retval *Response +var retval *Response + var err2 error 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(ctx, "scheduleCronJob", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) + oprot.WriteMessageBegin("scheduleCronJob", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() oprot.Flush(ctx) - return true, thrift.WrapTException(err2) + return true, err2 } else { result.Success = retval +} + if err2 = oprot.WriteMessageBegin("scheduleCronJob", thrift.REPLY, seqId); err2 != nil { + err = err2 } - tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "scheduleCronJob", thrift.REPLY, seqId); err2 != nil { - err = thrift.WrapTException(err2) + if err2 = result.Write(oprot); 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.WriteMessageEnd(); err == nil && err2 != nil { + err = err2 } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + err = err2 } if err != nil { return @@ -23322,72 +21250,41 @@ type auroraSchedulerManagerProcessorDescheduleCronJob struct { func (p *auroraSchedulerManagerProcessorDescheduleCronJob) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := AuroraSchedulerManagerDescheduleCronJobArgs{} - 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) + 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() oprot.Flush(ctx) - 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) + return false, err } + iprot.ReadMessageEnd() result := AuroraSchedulerManagerDescheduleCronJobResult{} - var retval *Response +var retval *Response + var err2 error 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(ctx, "descheduleCronJob", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) + oprot.WriteMessageBegin("descheduleCronJob", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() oprot.Flush(ctx) - return true, thrift.WrapTException(err2) + return true, err2 } else { result.Success = retval +} + if err2 = oprot.WriteMessageBegin("descheduleCronJob", thrift.REPLY, seqId); err2 != nil { + err = err2 } - tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "descheduleCronJob", thrift.REPLY, seqId); err2 != nil { - err = thrift.WrapTException(err2) + if err2 = result.Write(oprot); 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.WriteMessageEnd(); err == nil && err2 != nil { + err = err2 } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + err = err2 } if err != nil { return @@ -23401,72 +21298,41 @@ type auroraSchedulerManagerProcessorStartCronJob struct { func (p *auroraSchedulerManagerProcessorStartCronJob) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := AuroraSchedulerManagerStartCronJobArgs{} - 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) + 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() oprot.Flush(ctx) - 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) + return false, err } + iprot.ReadMessageEnd() result := AuroraSchedulerManagerStartCronJobResult{} - var retval *Response +var retval *Response + var err2 error 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(ctx, "startCronJob", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) + oprot.WriteMessageBegin("startCronJob", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() oprot.Flush(ctx) - return true, thrift.WrapTException(err2) + return true, err2 } else { result.Success = retval +} + if err2 = oprot.WriteMessageBegin("startCronJob", thrift.REPLY, seqId); err2 != nil { + err = err2 } - tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "startCronJob", thrift.REPLY, seqId); err2 != nil { - err = thrift.WrapTException(err2) + if err2 = result.Write(oprot); 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.WriteMessageEnd(); err == nil && err2 != nil { + err = err2 } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + err = err2 } if err != nil { return @@ -23480,72 +21346,41 @@ type auroraSchedulerManagerProcessorRestartShards struct { func (p *auroraSchedulerManagerProcessorRestartShards) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := AuroraSchedulerManagerRestartShardsArgs{} - 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) + 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() oprot.Flush(ctx) - 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) + return false, err } + iprot.ReadMessageEnd() result := AuroraSchedulerManagerRestartShardsResult{} - var retval *Response +var retval *Response + var err2 error 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(ctx, "restartShards", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) + oprot.WriteMessageBegin("restartShards", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() oprot.Flush(ctx) - return true, thrift.WrapTException(err2) + return true, err2 } else { result.Success = retval +} + if err2 = oprot.WriteMessageBegin("restartShards", thrift.REPLY, seqId); err2 != nil { + err = err2 } - tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "restartShards", thrift.REPLY, seqId); err2 != nil { - err = thrift.WrapTException(err2) + if err2 = result.Write(oprot); 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.WriteMessageEnd(); err == nil && err2 != nil { + err = err2 } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + err = err2 } if err != nil { return @@ -23559,72 +21394,41 @@ type auroraSchedulerManagerProcessorKillTasks struct { func (p *auroraSchedulerManagerProcessorKillTasks) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := AuroraSchedulerManagerKillTasksArgs{} - 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) + 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() oprot.Flush(ctx) - 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) + return false, err } + iprot.ReadMessageEnd() result := AuroraSchedulerManagerKillTasksResult{} - var retval *Response +var retval *Response + var err2 error 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(ctx, "killTasks", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) + oprot.WriteMessageBegin("killTasks", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() oprot.Flush(ctx) - return true, thrift.WrapTException(err2) + return true, err2 } else { result.Success = retval +} + if err2 = oprot.WriteMessageBegin("killTasks", thrift.REPLY, seqId); err2 != nil { + err = err2 } - tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "killTasks", thrift.REPLY, seqId); err2 != nil { - err = thrift.WrapTException(err2) + if err2 = result.Write(oprot); 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.WriteMessageEnd(); err == nil && err2 != nil { + err = err2 } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + err = err2 } if err != nil { return @@ -23638,72 +21442,41 @@ type auroraSchedulerManagerProcessorAddInstances struct { func (p *auroraSchedulerManagerProcessorAddInstances) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := AuroraSchedulerManagerAddInstancesArgs{} - 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) + 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() oprot.Flush(ctx) - 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) + return false, err } + iprot.ReadMessageEnd() result := AuroraSchedulerManagerAddInstancesResult{} - var retval *Response +var retval *Response + var err2 error 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(ctx, "addInstances", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) + oprot.WriteMessageBegin("addInstances", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() oprot.Flush(ctx) - return true, thrift.WrapTException(err2) + return true, err2 } else { result.Success = retval +} + if err2 = oprot.WriteMessageBegin("addInstances", thrift.REPLY, seqId); err2 != nil { + err = err2 } - tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "addInstances", thrift.REPLY, seqId); err2 != nil { - err = thrift.WrapTException(err2) + if err2 = result.Write(oprot); 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.WriteMessageEnd(); err == nil && err2 != nil { + err = err2 } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + err = err2 } if err != nil { return @@ -23717,72 +21490,41 @@ type auroraSchedulerManagerProcessorReplaceCronTemplate struct { func (p *auroraSchedulerManagerProcessorReplaceCronTemplate) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := AuroraSchedulerManagerReplaceCronTemplateArgs{} - 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) + 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() oprot.Flush(ctx) - 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) + return false, err } + iprot.ReadMessageEnd() result := AuroraSchedulerManagerReplaceCronTemplateResult{} - var retval *Response +var retval *Response + var err2 error 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(ctx, "replaceCronTemplate", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) + oprot.WriteMessageBegin("replaceCronTemplate", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() oprot.Flush(ctx) - return true, thrift.WrapTException(err2) + return true, err2 } else { result.Success = retval +} + if err2 = oprot.WriteMessageBegin("replaceCronTemplate", thrift.REPLY, seqId); err2 != nil { + err = err2 } - tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "replaceCronTemplate", thrift.REPLY, seqId); err2 != nil { - err = thrift.WrapTException(err2) + if err2 = result.Write(oprot); 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.WriteMessageEnd(); err == nil && err2 != nil { + err = err2 } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + err = err2 } if err != nil { return @@ -23796,72 +21538,41 @@ type auroraSchedulerManagerProcessorStartJobUpdate struct { func (p *auroraSchedulerManagerProcessorStartJobUpdate) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := AuroraSchedulerManagerStartJobUpdateArgs{} - 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) + 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() oprot.Flush(ctx) - 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) + return false, err } + iprot.ReadMessageEnd() result := AuroraSchedulerManagerStartJobUpdateResult{} - var retval *Response +var retval *Response + var err2 error 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(ctx, "startJobUpdate", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) + oprot.WriteMessageBegin("startJobUpdate", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() oprot.Flush(ctx) - return true, thrift.WrapTException(err2) + return true, err2 } else { result.Success = retval +} + if err2 = oprot.WriteMessageBegin("startJobUpdate", thrift.REPLY, seqId); err2 != nil { + err = err2 } - tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "startJobUpdate", thrift.REPLY, seqId); err2 != nil { - err = thrift.WrapTException(err2) + if err2 = result.Write(oprot); 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.WriteMessageEnd(); err == nil && err2 != nil { + err = err2 } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + err = err2 } if err != nil { return @@ -23875,72 +21586,41 @@ type auroraSchedulerManagerProcessorPauseJobUpdate struct { func (p *auroraSchedulerManagerProcessorPauseJobUpdate) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := AuroraSchedulerManagerPauseJobUpdateArgs{} - 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) + 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() oprot.Flush(ctx) - 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) + return false, err } + iprot.ReadMessageEnd() result := AuroraSchedulerManagerPauseJobUpdateResult{} - var retval *Response +var retval *Response + var err2 error 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(ctx, "pauseJobUpdate", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) + oprot.WriteMessageBegin("pauseJobUpdate", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() oprot.Flush(ctx) - return true, thrift.WrapTException(err2) + return true, err2 } else { result.Success = retval +} + if err2 = oprot.WriteMessageBegin("pauseJobUpdate", thrift.REPLY, seqId); err2 != nil { + err = err2 } - tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "pauseJobUpdate", thrift.REPLY, seqId); err2 != nil { - err = thrift.WrapTException(err2) + if err2 = result.Write(oprot); 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.WriteMessageEnd(); err == nil && err2 != nil { + err = err2 } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + err = err2 } if err != nil { return @@ -23954,72 +21634,41 @@ type auroraSchedulerManagerProcessorResumeJobUpdate struct { func (p *auroraSchedulerManagerProcessorResumeJobUpdate) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := AuroraSchedulerManagerResumeJobUpdateArgs{} - 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) + 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() oprot.Flush(ctx) - 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) + return false, err } + iprot.ReadMessageEnd() result := AuroraSchedulerManagerResumeJobUpdateResult{} - var retval *Response +var retval *Response + var err2 error 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(ctx, "resumeJobUpdate", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) + oprot.WriteMessageBegin("resumeJobUpdate", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() oprot.Flush(ctx) - return true, thrift.WrapTException(err2) + return true, err2 } else { result.Success = retval +} + if err2 = oprot.WriteMessageBegin("resumeJobUpdate", thrift.REPLY, seqId); err2 != nil { + err = err2 } - tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "resumeJobUpdate", thrift.REPLY, seqId); err2 != nil { - err = thrift.WrapTException(err2) + if err2 = result.Write(oprot); 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.WriteMessageEnd(); err == nil && err2 != nil { + err = err2 } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + err = err2 } if err != nil { return @@ -24033,72 +21682,41 @@ type auroraSchedulerManagerProcessorAbortJobUpdate struct { func (p *auroraSchedulerManagerProcessorAbortJobUpdate) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := AuroraSchedulerManagerAbortJobUpdateArgs{} - 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) + 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() oprot.Flush(ctx) - 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) + return false, err } + iprot.ReadMessageEnd() result := AuroraSchedulerManagerAbortJobUpdateResult{} - var retval *Response +var retval *Response + var err2 error 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(ctx, "abortJobUpdate", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) + oprot.WriteMessageBegin("abortJobUpdate", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() oprot.Flush(ctx) - return true, thrift.WrapTException(err2) + return true, err2 } else { result.Success = retval +} + if err2 = oprot.WriteMessageBegin("abortJobUpdate", thrift.REPLY, seqId); err2 != nil { + err = err2 } - tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "abortJobUpdate", thrift.REPLY, seqId); err2 != nil { - err = thrift.WrapTException(err2) + if err2 = result.Write(oprot); 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.WriteMessageEnd(); err == nil && err2 != nil { + err = err2 } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + err = err2 } if err != nil { return @@ -24112,72 +21730,41 @@ type auroraSchedulerManagerProcessorRollbackJobUpdate struct { func (p *auroraSchedulerManagerProcessorRollbackJobUpdate) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := AuroraSchedulerManagerRollbackJobUpdateArgs{} - 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) + 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() oprot.Flush(ctx) - 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) + return false, err } + iprot.ReadMessageEnd() result := AuroraSchedulerManagerRollbackJobUpdateResult{} - var retval *Response +var retval *Response + var err2 error 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(ctx, "rollbackJobUpdate", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) + oprot.WriteMessageBegin("rollbackJobUpdate", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() oprot.Flush(ctx) - return true, thrift.WrapTException(err2) + return true, err2 } else { result.Success = retval +} + if err2 = oprot.WriteMessageBegin("rollbackJobUpdate", thrift.REPLY, seqId); err2 != nil { + err = err2 } - tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "rollbackJobUpdate", thrift.REPLY, seqId); err2 != nil { - err = thrift.WrapTException(err2) + if err2 = result.Write(oprot); 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.WriteMessageEnd(); err == nil && err2 != nil { + err = err2 } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + err = err2 } if err != nil { return @@ -24191,72 +21778,41 @@ type auroraSchedulerManagerProcessorPulseJobUpdate struct { func (p *auroraSchedulerManagerProcessorPulseJobUpdate) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := AuroraSchedulerManagerPulseJobUpdateArgs{} - 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) + 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() oprot.Flush(ctx) - 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) + return false, err } + iprot.ReadMessageEnd() result := AuroraSchedulerManagerPulseJobUpdateResult{} - var retval *Response +var retval *Response + var err2 error 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(ctx, "pulseJobUpdate", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) + oprot.WriteMessageBegin("pulseJobUpdate", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() oprot.Flush(ctx) - return true, thrift.WrapTException(err2) + return true, err2 } else { result.Success = retval +} + if err2 = oprot.WriteMessageBegin("pulseJobUpdate", thrift.REPLY, seqId); err2 != nil { + err = err2 } - tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "pulseJobUpdate", thrift.REPLY, seqId); err2 != nil { - err = thrift.WrapTException(err2) + if err2 = result.Write(oprot); 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.WriteMessageEnd(); err == nil && err2 != nil { + err = err2 } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + err = err2 } if err != nil { return @@ -24288,14 +21844,14 @@ func (p *AuroraSchedulerManagerCreateJobArgs) IsSetDescription() bool { return p.Description != nil } -func (p *AuroraSchedulerManagerCreateJobArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *AuroraSchedulerManagerCreateJobArgs) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -24303,57 +21859,57 @@ func (p *AuroraSchedulerManagerCreateJobArgs) Read(ctx context.Context, iprot th switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraSchedulerManagerCreateJobArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { +func (p *AuroraSchedulerManagerCreateJobArgs) ReadField1(iprot thrift.TProtocol) error { p.Description = &JobConfiguration{} - if err := p.Description.Read(ctx, iprot); err != nil { + if err := p.Description.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Description), err) } return nil } -func (p *AuroraSchedulerManagerCreateJobArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "createJob_args"); err != nil { +func (p *AuroraSchedulerManagerCreateJobArgs) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("createJob_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraSchedulerManagerCreateJobArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "description", thrift.STRUCT, 1); err != nil { +func (p *AuroraSchedulerManagerCreateJobArgs) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Description.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Description), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:description: ", p), err) } return err } @@ -24386,14 +21942,14 @@ func (p *AuroraSchedulerManagerCreateJobResult) IsSetSuccess() bool { return p.Success != nil } -func (p *AuroraSchedulerManagerCreateJobResult) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *AuroraSchedulerManagerCreateJobResult) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -24401,58 +21957,58 @@ func (p *AuroraSchedulerManagerCreateJobResult) Read(ctx context.Context, iprot switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(ctx, iprot); err != nil { + if err := p.ReadField0(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraSchedulerManagerCreateJobResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { +func (p *AuroraSchedulerManagerCreateJobResult) ReadField0(iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(ctx, iprot); err != nil { + if err := p.Success.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *AuroraSchedulerManagerCreateJobResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "createJob_result"); err != nil { +func (p *AuroraSchedulerManagerCreateJobResult) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("createJob_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(ctx, oprot); err != nil { return err } + if err := p.writeField0(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraSchedulerManagerCreateJobResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *AuroraSchedulerManagerCreateJobResult) writeField0(oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Success.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err @@ -24486,14 +22042,14 @@ func (p *AuroraSchedulerManagerScheduleCronJobArgs) IsSetDescription() bool { return p.Description != nil } -func (p *AuroraSchedulerManagerScheduleCronJobArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *AuroraSchedulerManagerScheduleCronJobArgs) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -24501,57 +22057,57 @@ func (p *AuroraSchedulerManagerScheduleCronJobArgs) Read(ctx context.Context, ip switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraSchedulerManagerScheduleCronJobArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { +func (p *AuroraSchedulerManagerScheduleCronJobArgs) ReadField1(iprot thrift.TProtocol) error { p.Description = &JobConfiguration{} - if err := p.Description.Read(ctx, iprot); err != nil { + if err := p.Description.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Description), err) } return nil } -func (p *AuroraSchedulerManagerScheduleCronJobArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "scheduleCronJob_args"); err != nil { +func (p *AuroraSchedulerManagerScheduleCronJobArgs) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("scheduleCronJob_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraSchedulerManagerScheduleCronJobArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "description", thrift.STRUCT, 1); err != nil { +func (p *AuroraSchedulerManagerScheduleCronJobArgs) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Description.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Description), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:description: ", p), err) } return err } @@ -24584,14 +22140,14 @@ func (p *AuroraSchedulerManagerScheduleCronJobResult) IsSetSuccess() bool { return p.Success != nil } -func (p *AuroraSchedulerManagerScheduleCronJobResult) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *AuroraSchedulerManagerScheduleCronJobResult) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -24599,58 +22155,58 @@ func (p *AuroraSchedulerManagerScheduleCronJobResult) Read(ctx context.Context, switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(ctx, iprot); err != nil { + if err := p.ReadField0(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraSchedulerManagerScheduleCronJobResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { +func (p *AuroraSchedulerManagerScheduleCronJobResult) ReadField0(iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(ctx, iprot); err != nil { + if err := p.Success.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *AuroraSchedulerManagerScheduleCronJobResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "scheduleCronJob_result"); err != nil { +func (p *AuroraSchedulerManagerScheduleCronJobResult) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("scheduleCronJob_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(ctx, oprot); err != nil { return err } + if err := p.writeField0(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraSchedulerManagerScheduleCronJobResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *AuroraSchedulerManagerScheduleCronJobResult) writeField0(oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Success.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err @@ -24685,14 +22241,14 @@ func (p *AuroraSchedulerManagerDescheduleCronJobArgs) IsSetJob() bool { return p.Job != nil } -func (p *AuroraSchedulerManagerDescheduleCronJobArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *AuroraSchedulerManagerDescheduleCronJobArgs) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -24700,57 +22256,57 @@ func (p *AuroraSchedulerManagerDescheduleCronJobArgs) Read(ctx context.Context, switch fieldId { case 4: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField4(ctx, iprot); err != nil { + if err := p.ReadField4(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraSchedulerManagerDescheduleCronJobArgs) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { +func (p *AuroraSchedulerManagerDescheduleCronJobArgs) ReadField4(iprot thrift.TProtocol) error { p.Job = &JobKey{} - if err := p.Job.Read(ctx, iprot); err != nil { + if err := p.Job.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Job), err) } return nil } -func (p *AuroraSchedulerManagerDescheduleCronJobArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "descheduleCronJob_args"); err != nil { +func (p *AuroraSchedulerManagerDescheduleCronJobArgs) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("descheduleCronJob_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField4(ctx, oprot); err != nil { return err } + if err := p.writeField4(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraSchedulerManagerDescheduleCronJobArgs) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "job", thrift.STRUCT, 4); err != nil { +func (p *AuroraSchedulerManagerDescheduleCronJobArgs) writeField4(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Job.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Job), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 4:job: ", p), err) } return err } @@ -24783,14 +22339,14 @@ func (p *AuroraSchedulerManagerDescheduleCronJobResult) IsSetSuccess() bool { return p.Success != nil } -func (p *AuroraSchedulerManagerDescheduleCronJobResult) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *AuroraSchedulerManagerDescheduleCronJobResult) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -24798,58 +22354,58 @@ func (p *AuroraSchedulerManagerDescheduleCronJobResult) Read(ctx context.Context switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(ctx, iprot); err != nil { + if err := p.ReadField0(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraSchedulerManagerDescheduleCronJobResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { +func (p *AuroraSchedulerManagerDescheduleCronJobResult) ReadField0(iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(ctx, iprot); err != nil { + if err := p.Success.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *AuroraSchedulerManagerDescheduleCronJobResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "descheduleCronJob_result"); err != nil { +func (p *AuroraSchedulerManagerDescheduleCronJobResult) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("descheduleCronJob_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(ctx, oprot); err != nil { return err } + if err := p.writeField0(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraSchedulerManagerDescheduleCronJobResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *AuroraSchedulerManagerDescheduleCronJobResult) writeField0(oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Success.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err @@ -24884,14 +22440,14 @@ func (p *AuroraSchedulerManagerStartCronJobArgs) IsSetJob() bool { return p.Job != nil } -func (p *AuroraSchedulerManagerStartCronJobArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *AuroraSchedulerManagerStartCronJobArgs) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -24899,57 +22455,57 @@ func (p *AuroraSchedulerManagerStartCronJobArgs) Read(ctx context.Context, iprot switch fieldId { case 4: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField4(ctx, iprot); err != nil { + if err := p.ReadField4(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraSchedulerManagerStartCronJobArgs) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { +func (p *AuroraSchedulerManagerStartCronJobArgs) ReadField4(iprot thrift.TProtocol) error { p.Job = &JobKey{} - if err := p.Job.Read(ctx, iprot); err != nil { + if err := p.Job.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Job), err) } return nil } -func (p *AuroraSchedulerManagerStartCronJobArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "startCronJob_args"); err != nil { +func (p *AuroraSchedulerManagerStartCronJobArgs) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("startCronJob_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField4(ctx, oprot); err != nil { return err } + if err := p.writeField4(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraSchedulerManagerStartCronJobArgs) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "job", thrift.STRUCT, 4); err != nil { +func (p *AuroraSchedulerManagerStartCronJobArgs) writeField4(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Job.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Job), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 4:job: ", p), err) } return err } @@ -24982,14 +22538,14 @@ func (p *AuroraSchedulerManagerStartCronJobResult) IsSetSuccess() bool { return p.Success != nil } -func (p *AuroraSchedulerManagerStartCronJobResult) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *AuroraSchedulerManagerStartCronJobResult) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -24997,58 +22553,58 @@ func (p *AuroraSchedulerManagerStartCronJobResult) Read(ctx context.Context, ipr switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(ctx, iprot); err != nil { + if err := p.ReadField0(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraSchedulerManagerStartCronJobResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { +func (p *AuroraSchedulerManagerStartCronJobResult) ReadField0(iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(ctx, iprot); err != nil { + if err := p.Success.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *AuroraSchedulerManagerStartCronJobResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "startCronJob_result"); err != nil { +func (p *AuroraSchedulerManagerStartCronJobResult) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("startCronJob_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(ctx, oprot); err != nil { return err } + if err := p.writeField0(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraSchedulerManagerStartCronJobResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *AuroraSchedulerManagerStartCronJobResult) writeField0(oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Success.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err @@ -25090,14 +22646,14 @@ func (p *AuroraSchedulerManagerRestartShardsArgs) IsSetJob() bool { return p.Job != nil } -func (p *AuroraSchedulerManagerRestartShardsArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *AuroraSchedulerManagerRestartShardsArgs) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -25105,118 +22661,115 @@ func (p *AuroraSchedulerManagerRestartShardsArgs) Read(ctx context.Context, ipro switch fieldId { case 5: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField5(ctx, iprot); err != nil { + if err := p.ReadField5(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 3: if fieldTypeId == thrift.SET { - if err := p.ReadField3(ctx, iprot); err != nil { + if err := p.ReadField3(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraSchedulerManagerRestartShardsArgs) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { +func (p *AuroraSchedulerManagerRestartShardsArgs) ReadField5(iprot thrift.TProtocol) error { p.Job = &JobKey{} - if err := p.Job.Read(ctx, iprot); err != nil { + if err := p.Job.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Job), err) } return nil } -func (p *AuroraSchedulerManagerRestartShardsArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadSetBegin(ctx) +func (p *AuroraSchedulerManagerRestartShardsArgs) ReadField3(iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin() 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 _elem211 int32 - if v, err := iprot.ReadI32(ctx); err != nil { +var _elem161 int32 + if v, err := iprot.ReadI32(); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem211 = v + _elem161 = v } - p.ShardIds = append(p.ShardIds, _elem211) + p.ShardIds = append(p.ShardIds, _elem161) } - if err := iprot.ReadSetEnd(ctx); err != nil { + if err := iprot.ReadSetEnd(); err != nil { return thrift.PrependError("error reading set end: ", err) } return nil } -func (p *AuroraSchedulerManagerRestartShardsArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "restartShards_args"); err != nil { +func (p *AuroraSchedulerManagerRestartShardsArgs) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("restartShards_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField3(ctx, oprot); err != nil { return err } - if err := p.writeField5(ctx, 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 := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraSchedulerManagerRestartShardsArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "shardIds", thrift.SET, 3); err != nil { +func (p *AuroraSchedulerManagerRestartShardsArgs) writeField3(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("shardIds", thrift.SET, 3); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:shardIds: ", p), err) } - if err := oprot.WriteSetBegin(ctx, thrift.I32, len(p.ShardIds)); err != nil { + if err := oprot.WriteSetBegin(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) + return false, err } + iprot.ReadMessageEnd() result := AuroraAdminSetQuotaResult{} - var retval *Response +var retval *Response + var err2 error 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(ctx, "setQuota", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) + oprot.WriteMessageBegin("setQuota", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() oprot.Flush(ctx) - return true, thrift.WrapTException(err2) + return true, err2 } else { result.Success = retval +} + if err2 = oprot.WriteMessageBegin("setQuota", thrift.REPLY, seqId); err2 != nil { + err = err2 } - tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "setQuota", thrift.REPLY, seqId); err2 != nil { - err = thrift.WrapTException(err2) + if err2 = result.Write(oprot); 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.WriteMessageEnd(); err == nil && err2 != nil { + err = err2 } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + err = err2 } if err != nil { return @@ -27948,72 +25413,41 @@ type auroraAdminProcessorForceTaskState struct { func (p *auroraAdminProcessorForceTaskState) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := AuroraAdminForceTaskStateArgs{} - 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) + 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() oprot.Flush(ctx) - 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) + return false, err } + iprot.ReadMessageEnd() result := AuroraAdminForceTaskStateResult{} - var retval *Response +var retval *Response + var err2 error 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(ctx, "forceTaskState", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) + oprot.WriteMessageBegin("forceTaskState", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() oprot.Flush(ctx) - return true, thrift.WrapTException(err2) + return true, err2 } else { result.Success = retval +} + if err2 = oprot.WriteMessageBegin("forceTaskState", thrift.REPLY, seqId); err2 != nil { + err = err2 } - tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "forceTaskState", thrift.REPLY, seqId); err2 != nil { - err = thrift.WrapTException(err2) + if err2 = result.Write(oprot); 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.WriteMessageEnd(); err == nil && err2 != nil { + err = err2 } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + err = err2 } if err != nil { return @@ -28027,72 +25461,41 @@ type auroraAdminProcessorPerformBackup struct { func (p *auroraAdminProcessorPerformBackup) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := AuroraAdminPerformBackupArgs{} - 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) + 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() oprot.Flush(ctx) - 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) + return false, err } + iprot.ReadMessageEnd() result := AuroraAdminPerformBackupResult{} - var retval *Response +var retval *Response + var err2 error 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(ctx, "performBackup", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) + oprot.WriteMessageBegin("performBackup", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() oprot.Flush(ctx) - return true, thrift.WrapTException(err2) + return true, err2 } else { result.Success = retval +} + if err2 = oprot.WriteMessageBegin("performBackup", thrift.REPLY, seqId); err2 != nil { + err = err2 } - tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "performBackup", thrift.REPLY, seqId); err2 != nil { - err = thrift.WrapTException(err2) + if err2 = result.Write(oprot); 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.WriteMessageEnd(); err == nil && err2 != nil { + err = err2 } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + err = err2 } if err != nil { return @@ -28106,72 +25509,41 @@ type auroraAdminProcessorListBackups struct { func (p *auroraAdminProcessorListBackups) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := AuroraAdminListBackupsArgs{} - 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) + 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() oprot.Flush(ctx) - 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) + return false, err } + iprot.ReadMessageEnd() result := AuroraAdminListBackupsResult{} - var retval *Response +var retval *Response + var err2 error 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(ctx, "listBackups", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) + oprot.WriteMessageBegin("listBackups", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() oprot.Flush(ctx) - return true, thrift.WrapTException(err2) + return true, err2 } else { result.Success = retval +} + if err2 = oprot.WriteMessageBegin("listBackups", thrift.REPLY, seqId); err2 != nil { + err = err2 } - tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "listBackups", thrift.REPLY, seqId); err2 != nil { - err = thrift.WrapTException(err2) + if err2 = result.Write(oprot); 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.WriteMessageEnd(); err == nil && err2 != nil { + err = err2 } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + err = err2 } if err != nil { return @@ -28185,72 +25557,41 @@ type auroraAdminProcessorStageRecovery struct { func (p *auroraAdminProcessorStageRecovery) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := AuroraAdminStageRecoveryArgs{} - 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) + 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() oprot.Flush(ctx) - 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) + return false, err } + iprot.ReadMessageEnd() result := AuroraAdminStageRecoveryResult{} - var retval *Response +var retval *Response + var err2 error 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(ctx, "stageRecovery", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) + oprot.WriteMessageBegin("stageRecovery", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() oprot.Flush(ctx) - return true, thrift.WrapTException(err2) + return true, err2 } else { result.Success = retval +} + if err2 = oprot.WriteMessageBegin("stageRecovery", thrift.REPLY, seqId); err2 != nil { + err = err2 } - tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "stageRecovery", thrift.REPLY, seqId); err2 != nil { - err = thrift.WrapTException(err2) + if err2 = result.Write(oprot); 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.WriteMessageEnd(); err == nil && err2 != nil { + err = err2 } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + err = err2 } if err != nil { return @@ -28264,72 +25605,41 @@ type auroraAdminProcessorQueryRecovery struct { func (p *auroraAdminProcessorQueryRecovery) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := AuroraAdminQueryRecoveryArgs{} - 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) + 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() oprot.Flush(ctx) - 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) + return false, err } + iprot.ReadMessageEnd() result := AuroraAdminQueryRecoveryResult{} - var retval *Response +var retval *Response + var err2 error 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(ctx, "queryRecovery", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) + oprot.WriteMessageBegin("queryRecovery", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() oprot.Flush(ctx) - return true, thrift.WrapTException(err2) + return true, err2 } else { result.Success = retval +} + if err2 = oprot.WriteMessageBegin("queryRecovery", thrift.REPLY, seqId); err2 != nil { + err = err2 } - tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "queryRecovery", thrift.REPLY, seqId); err2 != nil { - err = thrift.WrapTException(err2) + if err2 = result.Write(oprot); 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.WriteMessageEnd(); err == nil && err2 != nil { + err = err2 } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + err = err2 } if err != nil { return @@ -28343,72 +25653,41 @@ type auroraAdminProcessorDeleteRecoveryTasks struct { func (p *auroraAdminProcessorDeleteRecoveryTasks) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := AuroraAdminDeleteRecoveryTasksArgs{} - 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) + 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() oprot.Flush(ctx) - 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) + return false, err } + iprot.ReadMessageEnd() result := AuroraAdminDeleteRecoveryTasksResult{} - var retval *Response +var retval *Response + var err2 error 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(ctx, "deleteRecoveryTasks", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) + oprot.WriteMessageBegin("deleteRecoveryTasks", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() oprot.Flush(ctx) - return true, thrift.WrapTException(err2) + return true, err2 } else { result.Success = retval +} + if err2 = oprot.WriteMessageBegin("deleteRecoveryTasks", thrift.REPLY, seqId); err2 != nil { + err = err2 } - tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "deleteRecoveryTasks", thrift.REPLY, seqId); err2 != nil { - err = thrift.WrapTException(err2) + if err2 = result.Write(oprot); 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.WriteMessageEnd(); err == nil && err2 != nil { + err = err2 } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + err = err2 } if err != nil { return @@ -28422,72 +25701,41 @@ type auroraAdminProcessorCommitRecovery struct { func (p *auroraAdminProcessorCommitRecovery) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := AuroraAdminCommitRecoveryArgs{} - 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) + 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() oprot.Flush(ctx) - 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) + return false, err } + iprot.ReadMessageEnd() result := AuroraAdminCommitRecoveryResult{} - var retval *Response +var retval *Response + var err2 error 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(ctx, "commitRecovery", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) + oprot.WriteMessageBegin("commitRecovery", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() oprot.Flush(ctx) - return true, thrift.WrapTException(err2) + return true, err2 } else { result.Success = retval +} + if err2 = oprot.WriteMessageBegin("commitRecovery", thrift.REPLY, seqId); err2 != nil { + err = err2 } - tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "commitRecovery", thrift.REPLY, seqId); err2 != nil { - err = thrift.WrapTException(err2) + if err2 = result.Write(oprot); 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.WriteMessageEnd(); err == nil && err2 != nil { + err = err2 } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + err = err2 } if err != nil { return @@ -28501,72 +25749,41 @@ type auroraAdminProcessorUnloadRecovery struct { func (p *auroraAdminProcessorUnloadRecovery) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := AuroraAdminUnloadRecoveryArgs{} - 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) + 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() oprot.Flush(ctx) - 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) + return false, err } + iprot.ReadMessageEnd() result := AuroraAdminUnloadRecoveryResult{} - var retval *Response +var retval *Response + var err2 error 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(ctx, "unloadRecovery", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) + oprot.WriteMessageBegin("unloadRecovery", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() oprot.Flush(ctx) - return true, thrift.WrapTException(err2) + return true, err2 } else { result.Success = retval +} + if err2 = oprot.WriteMessageBegin("unloadRecovery", thrift.REPLY, seqId); err2 != nil { + err = err2 } - tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "unloadRecovery", thrift.REPLY, seqId); err2 != nil { - err = thrift.WrapTException(err2) + if err2 = result.Write(oprot); 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.WriteMessageEnd(); err == nil && err2 != nil { + err = err2 } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + err = err2 } if err != nil { return @@ -28580,72 +25797,41 @@ type auroraAdminProcessorStartMaintenance struct { func (p *auroraAdminProcessorStartMaintenance) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := AuroraAdminStartMaintenanceArgs{} - 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) + 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() oprot.Flush(ctx) - 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) + return false, err } + iprot.ReadMessageEnd() result := AuroraAdminStartMaintenanceResult{} - var retval *Response +var retval *Response + var err2 error 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(ctx, "startMaintenance", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) + oprot.WriteMessageBegin("startMaintenance", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() oprot.Flush(ctx) - return true, thrift.WrapTException(err2) + return true, err2 } else { result.Success = retval +} + if err2 = oprot.WriteMessageBegin("startMaintenance", thrift.REPLY, seqId); err2 != nil { + err = err2 } - tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "startMaintenance", thrift.REPLY, seqId); err2 != nil { - err = thrift.WrapTException(err2) + if err2 = result.Write(oprot); 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.WriteMessageEnd(); err == nil && err2 != nil { + err = err2 } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + err = err2 } if err != nil { return @@ -28659,72 +25845,41 @@ type auroraAdminProcessorDrainHosts struct { func (p *auroraAdminProcessorDrainHosts) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := AuroraAdminDrainHostsArgs{} - 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) + 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() oprot.Flush(ctx) - 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) + return false, err } + iprot.ReadMessageEnd() result := AuroraAdminDrainHostsResult{} - var retval *Response +var retval *Response + var err2 error 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(ctx, "drainHosts", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) + oprot.WriteMessageBegin("drainHosts", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() oprot.Flush(ctx) - return true, thrift.WrapTException(err2) + return true, err2 } else { result.Success = retval +} + if err2 = oprot.WriteMessageBegin("drainHosts", thrift.REPLY, seqId); err2 != nil { + err = err2 } - tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "drainHosts", thrift.REPLY, seqId); err2 != nil { - err = thrift.WrapTException(err2) + if err2 = result.Write(oprot); 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.WriteMessageEnd(); err == nil && err2 != nil { + err = err2 } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + err = err2 } if err != nil { return @@ -28738,72 +25893,41 @@ type auroraAdminProcessorMaintenanceStatus struct { func (p *auroraAdminProcessorMaintenanceStatus) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := AuroraAdminMaintenanceStatusArgs{} - 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) + 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() oprot.Flush(ctx) - 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) + return false, err } + iprot.ReadMessageEnd() result := AuroraAdminMaintenanceStatusResult{} - var retval *Response +var retval *Response + var err2 error 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(ctx, "maintenanceStatus", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) + oprot.WriteMessageBegin("maintenanceStatus", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() oprot.Flush(ctx) - return true, thrift.WrapTException(err2) + return true, err2 } else { result.Success = retval +} + if err2 = oprot.WriteMessageBegin("maintenanceStatus", thrift.REPLY, seqId); err2 != nil { + err = err2 } - tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "maintenanceStatus", thrift.REPLY, seqId); err2 != nil { - err = thrift.WrapTException(err2) + if err2 = result.Write(oprot); 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.WriteMessageEnd(); err == nil && err2 != nil { + err = err2 } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + err = err2 } if err != nil { return @@ -28817,72 +25941,41 @@ type auroraAdminProcessorEndMaintenance struct { func (p *auroraAdminProcessorEndMaintenance) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := AuroraAdminEndMaintenanceArgs{} - 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) + 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() oprot.Flush(ctx) - 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) + return false, err } + iprot.ReadMessageEnd() result := AuroraAdminEndMaintenanceResult{} - var retval *Response +var retval *Response + var err2 error 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(ctx, "endMaintenance", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) + oprot.WriteMessageBegin("endMaintenance", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() oprot.Flush(ctx) - return true, thrift.WrapTException(err2) + return true, err2 } else { result.Success = retval +} + if err2 = oprot.WriteMessageBegin("endMaintenance", thrift.REPLY, seqId); err2 != nil { + err = err2 } - tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "endMaintenance", thrift.REPLY, seqId); err2 != nil { - err = thrift.WrapTException(err2) + if err2 = result.Write(oprot); 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.WriteMessageEnd(); err == nil && err2 != nil { + err = err2 } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + err = err2 } if err != nil { return @@ -28896,72 +25989,41 @@ type auroraAdminProcessorSlaDrainHosts struct { func (p *auroraAdminProcessorSlaDrainHosts) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := AuroraAdminSlaDrainHostsArgs{} - 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) + 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() oprot.Flush(ctx) - 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) + return false, err } + iprot.ReadMessageEnd() result := AuroraAdminSlaDrainHostsResult{} - var retval *Response +var retval *Response + var err2 error 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(ctx, "slaDrainHosts", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) + oprot.WriteMessageBegin("slaDrainHosts", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() oprot.Flush(ctx) - return true, thrift.WrapTException(err2) + return true, err2 } else { result.Success = retval +} + if err2 = oprot.WriteMessageBegin("slaDrainHosts", thrift.REPLY, seqId); err2 != nil { + err = err2 } - tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "slaDrainHosts", thrift.REPLY, seqId); err2 != nil { - err = thrift.WrapTException(err2) + if err2 = result.Write(oprot); 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.WriteMessageEnd(); err == nil && err2 != nil { + err = err2 } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + err = err2 } if err != nil { return @@ -28975,72 +26037,41 @@ type auroraAdminProcessorSnapshot struct { func (p *auroraAdminProcessorSnapshot) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := AuroraAdminSnapshotArgs{} - 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) + 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() oprot.Flush(ctx) - 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) + return false, err } + iprot.ReadMessageEnd() result := AuroraAdminSnapshotResult{} - var retval *Response +var retval *Response + var err2 error 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(ctx, "snapshot", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) + oprot.WriteMessageBegin("snapshot", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() oprot.Flush(ctx) - return true, thrift.WrapTException(err2) + return true, err2 } else { result.Success = retval +} + if err2 = oprot.WriteMessageBegin("snapshot", thrift.REPLY, seqId); err2 != nil { + err = err2 } - tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "snapshot", thrift.REPLY, seqId); err2 != nil { - err = thrift.WrapTException(err2) + if err2 = result.Write(oprot); 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.WriteMessageEnd(); err == nil && err2 != nil { + err = err2 } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + err = err2 } if err != nil { return @@ -29054,72 +26085,41 @@ type auroraAdminProcessorTriggerExplicitTaskReconciliation struct { func (p *auroraAdminProcessorTriggerExplicitTaskReconciliation) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := AuroraAdminTriggerExplicitTaskReconciliationArgs{} - 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) + 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() oprot.Flush(ctx) - 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) + return false, err } + iprot.ReadMessageEnd() result := AuroraAdminTriggerExplicitTaskReconciliationResult{} - var retval *Response +var retval *Response + var err2 error 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(ctx, "triggerExplicitTaskReconciliation", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) + oprot.WriteMessageBegin("triggerExplicitTaskReconciliation", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() oprot.Flush(ctx) - return true, thrift.WrapTException(err2) + return true, err2 } else { result.Success = retval +} + if err2 = oprot.WriteMessageBegin("triggerExplicitTaskReconciliation", thrift.REPLY, seqId); err2 != nil { + err = err2 } - tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "triggerExplicitTaskReconciliation", thrift.REPLY, seqId); err2 != nil { - err = thrift.WrapTException(err2) + if err2 = result.Write(oprot); 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.WriteMessageEnd(); err == nil && err2 != nil { + err = err2 } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + err = err2 } if err != nil { return @@ -29133,72 +26133,41 @@ type auroraAdminProcessorTriggerImplicitTaskReconciliation struct { func (p *auroraAdminProcessorTriggerImplicitTaskReconciliation) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := AuroraAdminTriggerImplicitTaskReconciliationArgs{} - 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) + 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() oprot.Flush(ctx) - 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) + return false, err } + iprot.ReadMessageEnd() result := AuroraAdminTriggerImplicitTaskReconciliationResult{} - var retval *Response +var retval *Response + var err2 error 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(ctx, "triggerImplicitTaskReconciliation", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) + oprot.WriteMessageBegin("triggerImplicitTaskReconciliation", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() oprot.Flush(ctx) - return true, thrift.WrapTException(err2) + return true, err2 } else { result.Success = retval +} + if err2 = oprot.WriteMessageBegin("triggerImplicitTaskReconciliation", thrift.REPLY, seqId); err2 != nil { + err = err2 } - tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "triggerImplicitTaskReconciliation", thrift.REPLY, seqId); err2 != nil { - err = thrift.WrapTException(err2) + if err2 = result.Write(oprot); 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.WriteMessageEnd(); err == nil && err2 != nil { + err = err2 } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + err = err2 } if err != nil { return @@ -29212,72 +26181,41 @@ type auroraAdminProcessorPruneTasks struct { func (p *auroraAdminProcessorPruneTasks) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := AuroraAdminPruneTasksArgs{} - 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) + 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() oprot.Flush(ctx) - 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) + return false, err } + iprot.ReadMessageEnd() result := AuroraAdminPruneTasksResult{} - var retval *Response +var retval *Response + var err2 error 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(ctx, "pruneTasks", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) + oprot.WriteMessageBegin("pruneTasks", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() oprot.Flush(ctx) - return true, thrift.WrapTException(err2) + return true, err2 } else { result.Success = retval +} + if err2 = oprot.WriteMessageBegin("pruneTasks", thrift.REPLY, seqId); err2 != nil { + err = err2 } - tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "pruneTasks", thrift.REPLY, seqId); err2 != nil { - err = thrift.WrapTException(err2) + if err2 = result.Write(oprot); 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.WriteMessageEnd(); err == nil && err2 != nil { + err = err2 } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + err = err2 } if err != nil { return @@ -29315,14 +26253,14 @@ func (p *AuroraAdminSetQuotaArgs) IsSetQuota() bool { return p.Quota != nil } -func (p *AuroraAdminSetQuotaArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *AuroraAdminSetQuotaArgs) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -29330,41 +26268,41 @@ func (p *AuroraAdminSetQuotaArgs) Read(ctx context.Context, iprot thrift.TProtoc switch fieldId { case 1: if fieldTypeId == thrift.STRING { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField2(ctx, iprot); err != nil { + if err := p.ReadField2(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminSetQuotaArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *AuroraAdminSetQuotaArgs) ReadField1(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.OwnerRole = v @@ -29372,45 +26310,45 @@ func (p *AuroraAdminSetQuotaArgs) ReadField1(ctx context.Context, iprot thrift. return nil } -func (p *AuroraAdminSetQuotaArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { +func (p *AuroraAdminSetQuotaArgs) ReadField2(iprot thrift.TProtocol) error { p.Quota = &ResourceAggregate{} - if err := p.Quota.Read(ctx, iprot); err != nil { + if err := p.Quota.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Quota), err) } return nil } -func (p *AuroraAdminSetQuotaArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "setQuota_args"); err != nil { +func (p *AuroraAdminSetQuotaArgs) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("setQuota_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } - if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField2(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraAdminSetQuotaArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "ownerRole", thrift.STRING, 1); err != nil { +func (p *AuroraAdminSetQuotaArgs) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("ownerRole", thrift.STRING, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:ownerRole: ", p), err) } - if err := oprot.WriteString(ctx, string(p.OwnerRole)); err != nil { + if err := oprot.WriteString(string(p.OwnerRole)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.ownerRole (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:ownerRole: ", p), err) } return err } -func (p *AuroraAdminSetQuotaArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "quota", thrift.STRUCT, 2); err != nil { +func (p *AuroraAdminSetQuotaArgs) writeField2(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Quota.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Quota), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:quota: ", p), err) } return err } @@ -29443,14 +26381,14 @@ func (p *AuroraAdminSetQuotaResult) IsSetSuccess() bool { return p.Success != nil } -func (p *AuroraAdminSetQuotaResult) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *AuroraAdminSetQuotaResult) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -29458,58 +26396,58 @@ func (p *AuroraAdminSetQuotaResult) Read(ctx context.Context, iprot thrift.TProt switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(ctx, iprot); err != nil { + if err := p.ReadField0(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminSetQuotaResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { +func (p *AuroraAdminSetQuotaResult) ReadField0(iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(ctx, iprot); err != nil { + if err := p.Success.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *AuroraAdminSetQuotaResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "setQuota_result"); err != nil { +func (p *AuroraAdminSetQuotaResult) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("setQuota_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(ctx, oprot); err != nil { return err } + if err := p.writeField0(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraAdminSetQuotaResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *AuroraAdminSetQuotaResult) writeField0(oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Success.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err @@ -29542,14 +26480,14 @@ func (p *AuroraAdminForceTaskStateArgs) GetTaskId() string { func (p *AuroraAdminForceTaskStateArgs) GetStatus() ScheduleStatus { return p.Status } -func (p *AuroraAdminForceTaskStateArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *AuroraAdminForceTaskStateArgs) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -29557,41 +26495,41 @@ func (p *AuroraAdminForceTaskStateArgs) Read(ctx context.Context, iprot thrift.T switch fieldId { case 1: if fieldTypeId == thrift.STRING { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.I32 { - if err := p.ReadField2(ctx, iprot); err != nil { + if err := p.ReadField2(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminForceTaskStateArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *AuroraAdminForceTaskStateArgs) ReadField1(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.TaskId = v @@ -29599,8 +26537,8 @@ func (p *AuroraAdminForceTaskStateArgs) ReadField1(ctx context.Context, iprot t return nil } -func (p *AuroraAdminForceTaskStateArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(ctx); err != nil { +func (p *AuroraAdminForceTaskStateArgs) ReadField2(iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { temp := ScheduleStatus(v) @@ -29609,36 +26547,36 @@ func (p *AuroraAdminForceTaskStateArgs) ReadField2(ctx context.Context, iprot t return nil } -func (p *AuroraAdminForceTaskStateArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "forceTaskState_args"); err != nil { +func (p *AuroraAdminForceTaskStateArgs) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("forceTaskState_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } - if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField2(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraAdminForceTaskStateArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "taskId", thrift.STRING, 1); err != nil { +func (p *AuroraAdminForceTaskStateArgs) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("taskId", thrift.STRING, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:taskId: ", p), err) } - if err := oprot.WriteString(ctx, string(p.TaskId)); err != nil { + if err := oprot.WriteString(string(p.TaskId)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.taskId (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:taskId: ", p), err) } return err } -func (p *AuroraAdminForceTaskStateArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "status", thrift.I32, 2); err != nil { +func (p *AuroraAdminForceTaskStateArgs) writeField2(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("status", thrift.I32, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:status: ", p), err) } - if err := oprot.WriteI32(ctx, int32(p.Status)); err != nil { + if err := oprot.WriteI32(int32(p.Status)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.status (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:status: ", p), err) } return err } @@ -29671,14 +26609,14 @@ func (p *AuroraAdminForceTaskStateResult) IsSetSuccess() bool { return p.Success != nil } -func (p *AuroraAdminForceTaskStateResult) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *AuroraAdminForceTaskStateResult) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -29686,58 +26624,58 @@ func (p *AuroraAdminForceTaskStateResult) Read(ctx context.Context, iprot thrift switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(ctx, iprot); err != nil { + if err := p.ReadField0(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminForceTaskStateResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { +func (p *AuroraAdminForceTaskStateResult) ReadField0(iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(ctx, iprot); err != nil { + if err := p.Success.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *AuroraAdminForceTaskStateResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "forceTaskState_result"); err != nil { +func (p *AuroraAdminForceTaskStateResult) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("forceTaskState_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(ctx, oprot); err != nil { return err } + if err := p.writeField0(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraAdminForceTaskStateResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *AuroraAdminForceTaskStateResult) writeField0(oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Success.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err @@ -29757,39 +26695,39 @@ func NewAuroraAdminPerformBackupArgs() *AuroraAdminPerformBackupArgs { return &AuroraAdminPerformBackupArgs{} } -func (p *AuroraAdminPerformBackupArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *AuroraAdminPerformBackupArgs) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() 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(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminPerformBackupArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "performBackup_args"); err != nil { +func (p *AuroraAdminPerformBackupArgs) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("performBackup_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } @@ -29822,14 +26760,14 @@ func (p *AuroraAdminPerformBackupResult) IsSetSuccess() bool { return p.Success != nil } -func (p *AuroraAdminPerformBackupResult) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *AuroraAdminPerformBackupResult) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -29837,58 +26775,58 @@ func (p *AuroraAdminPerformBackupResult) Read(ctx context.Context, iprot thrift. switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(ctx, iprot); err != nil { + if err := p.ReadField0(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminPerformBackupResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { +func (p *AuroraAdminPerformBackupResult) ReadField0(iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(ctx, iprot); err != nil { + if err := p.Success.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *AuroraAdminPerformBackupResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "performBackup_result"); err != nil { +func (p *AuroraAdminPerformBackupResult) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("performBackup_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(ctx, oprot); err != nil { return err } + if err := p.writeField0(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraAdminPerformBackupResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *AuroraAdminPerformBackupResult) writeField0(oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Success.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err @@ -29908,39 +26846,39 @@ func NewAuroraAdminListBackupsArgs() *AuroraAdminListBackupsArgs { return &AuroraAdminListBackupsArgs{} } -func (p *AuroraAdminListBackupsArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *AuroraAdminListBackupsArgs) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() 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(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminListBackupsArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "listBackups_args"); err != nil { +func (p *AuroraAdminListBackupsArgs) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("listBackups_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } @@ -29973,14 +26911,14 @@ func (p *AuroraAdminListBackupsResult) IsSetSuccess() bool { return p.Success != nil } -func (p *AuroraAdminListBackupsResult) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *AuroraAdminListBackupsResult) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -29988,58 +26926,58 @@ func (p *AuroraAdminListBackupsResult) Read(ctx context.Context, iprot thrift.TP switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(ctx, iprot); err != nil { + if err := p.ReadField0(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminListBackupsResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { +func (p *AuroraAdminListBackupsResult) ReadField0(iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(ctx, iprot); err != nil { + if err := p.Success.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *AuroraAdminListBackupsResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "listBackups_result"); err != nil { +func (p *AuroraAdminListBackupsResult) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("listBackups_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(ctx, oprot); err != nil { return err } + if err := p.writeField0(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraAdminListBackupsResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *AuroraAdminListBackupsResult) writeField0(oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Success.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err @@ -30066,14 +27004,14 @@ func NewAuroraAdminStageRecoveryArgs() *AuroraAdminStageRecoveryArgs { func (p *AuroraAdminStageRecoveryArgs) GetBackupId() string { return p.BackupId } -func (p *AuroraAdminStageRecoveryArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *AuroraAdminStageRecoveryArgs) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -30081,31 +27019,31 @@ func (p *AuroraAdminStageRecoveryArgs) Read(ctx context.Context, iprot thrift.TP switch fieldId { case 1: if fieldTypeId == thrift.STRING { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminStageRecoveryArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *AuroraAdminStageRecoveryArgs) ReadField1(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { p.BackupId = v @@ -30113,25 +27051,25 @@ func (p *AuroraAdminStageRecoveryArgs) ReadField1(ctx context.Context, iprot th return nil } -func (p *AuroraAdminStageRecoveryArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "stageRecovery_args"); err != nil { +func (p *AuroraAdminStageRecoveryArgs) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("stageRecovery_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraAdminStageRecoveryArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "backupId", thrift.STRING, 1); err != nil { +func (p *AuroraAdminStageRecoveryArgs) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("backupId", thrift.STRING, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:backupId: ", p), err) } - if err := oprot.WriteString(ctx, string(p.BackupId)); err != nil { + if err := oprot.WriteString(string(p.BackupId)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.backupId (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:backupId: ", p), err) } return err } @@ -30164,14 +27102,14 @@ func (p *AuroraAdminStageRecoveryResult) IsSetSuccess() bool { return p.Success != nil } -func (p *AuroraAdminStageRecoveryResult) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *AuroraAdminStageRecoveryResult) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -30179,58 +27117,58 @@ func (p *AuroraAdminStageRecoveryResult) Read(ctx context.Context, iprot thrift. switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(ctx, iprot); err != nil { + if err := p.ReadField0(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminStageRecoveryResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { +func (p *AuroraAdminStageRecoveryResult) ReadField0(iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(ctx, iprot); err != nil { + if err := p.Success.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *AuroraAdminStageRecoveryResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "stageRecovery_result"); err != nil { +func (p *AuroraAdminStageRecoveryResult) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("stageRecovery_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(ctx, oprot); err != nil { return err } + if err := p.writeField0(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraAdminStageRecoveryResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *AuroraAdminStageRecoveryResult) writeField0(oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Success.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err @@ -30264,14 +27202,14 @@ func (p *AuroraAdminQueryRecoveryArgs) IsSetQuery() bool { return p.Query != nil } -func (p *AuroraAdminQueryRecoveryArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *AuroraAdminQueryRecoveryArgs) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -30279,57 +27217,57 @@ func (p *AuroraAdminQueryRecoveryArgs) Read(ctx context.Context, iprot thrift.TP switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminQueryRecoveryArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { +func (p *AuroraAdminQueryRecoveryArgs) ReadField1(iprot thrift.TProtocol) error { p.Query = &TaskQuery{} - if err := p.Query.Read(ctx, iprot); err != nil { + if err := p.Query.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Query), err) } return nil } -func (p *AuroraAdminQueryRecoveryArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "queryRecovery_args"); err != nil { +func (p *AuroraAdminQueryRecoveryArgs) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("queryRecovery_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraAdminQueryRecoveryArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "query", thrift.STRUCT, 1); err != nil { +func (p *AuroraAdminQueryRecoveryArgs) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Query.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Query), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:query: ", p), err) } return err } @@ -30362,14 +27300,14 @@ func (p *AuroraAdminQueryRecoveryResult) IsSetSuccess() bool { return p.Success != nil } -func (p *AuroraAdminQueryRecoveryResult) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *AuroraAdminQueryRecoveryResult) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -30377,58 +27315,58 @@ func (p *AuroraAdminQueryRecoveryResult) Read(ctx context.Context, iprot thrift. switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(ctx, iprot); err != nil { + if err := p.ReadField0(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminQueryRecoveryResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { +func (p *AuroraAdminQueryRecoveryResult) ReadField0(iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(ctx, iprot); err != nil { + if err := p.Success.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *AuroraAdminQueryRecoveryResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "queryRecovery_result"); err != nil { +func (p *AuroraAdminQueryRecoveryResult) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("queryRecovery_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(ctx, oprot); err != nil { return err } + if err := p.writeField0(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraAdminQueryRecoveryResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *AuroraAdminQueryRecoveryResult) writeField0(oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Success.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err @@ -30462,14 +27400,14 @@ func (p *AuroraAdminDeleteRecoveryTasksArgs) IsSetQuery() bool { return p.Query != nil } -func (p *AuroraAdminDeleteRecoveryTasksArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *AuroraAdminDeleteRecoveryTasksArgs) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -30477,57 +27415,57 @@ func (p *AuroraAdminDeleteRecoveryTasksArgs) Read(ctx context.Context, iprot thr switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminDeleteRecoveryTasksArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { +func (p *AuroraAdminDeleteRecoveryTasksArgs) ReadField1(iprot thrift.TProtocol) error { p.Query = &TaskQuery{} - if err := p.Query.Read(ctx, iprot); err != nil { + if err := p.Query.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Query), err) } return nil } -func (p *AuroraAdminDeleteRecoveryTasksArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "deleteRecoveryTasks_args"); err != nil { +func (p *AuroraAdminDeleteRecoveryTasksArgs) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("deleteRecoveryTasks_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraAdminDeleteRecoveryTasksArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "query", thrift.STRUCT, 1); err != nil { +func (p *AuroraAdminDeleteRecoveryTasksArgs) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Query.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Query), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:query: ", p), err) } return err } @@ -30560,14 +27498,14 @@ func (p *AuroraAdminDeleteRecoveryTasksResult) IsSetSuccess() bool { return p.Success != nil } -func (p *AuroraAdminDeleteRecoveryTasksResult) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *AuroraAdminDeleteRecoveryTasksResult) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -30575,58 +27513,58 @@ func (p *AuroraAdminDeleteRecoveryTasksResult) Read(ctx context.Context, iprot t switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(ctx, iprot); err != nil { + if err := p.ReadField0(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminDeleteRecoveryTasksResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { +func (p *AuroraAdminDeleteRecoveryTasksResult) ReadField0(iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(ctx, iprot); err != nil { + if err := p.Success.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *AuroraAdminDeleteRecoveryTasksResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "deleteRecoveryTasks_result"); err != nil { +func (p *AuroraAdminDeleteRecoveryTasksResult) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("deleteRecoveryTasks_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(ctx, oprot); err != nil { return err } + if err := p.writeField0(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraAdminDeleteRecoveryTasksResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *AuroraAdminDeleteRecoveryTasksResult) writeField0(oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Success.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err @@ -30646,39 +27584,39 @@ func NewAuroraAdminCommitRecoveryArgs() *AuroraAdminCommitRecoveryArgs { return &AuroraAdminCommitRecoveryArgs{} } -func (p *AuroraAdminCommitRecoveryArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *AuroraAdminCommitRecoveryArgs) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() 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(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminCommitRecoveryArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "commitRecovery_args"); err != nil { +func (p *AuroraAdminCommitRecoveryArgs) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("commitRecovery_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } @@ -30711,14 +27649,14 @@ func (p *AuroraAdminCommitRecoveryResult) IsSetSuccess() bool { return p.Success != nil } -func (p *AuroraAdminCommitRecoveryResult) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *AuroraAdminCommitRecoveryResult) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -30726,58 +27664,58 @@ func (p *AuroraAdminCommitRecoveryResult) Read(ctx context.Context, iprot thrift switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(ctx, iprot); err != nil { + if err := p.ReadField0(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminCommitRecoveryResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { +func (p *AuroraAdminCommitRecoveryResult) ReadField0(iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(ctx, iprot); err != nil { + if err := p.Success.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *AuroraAdminCommitRecoveryResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "commitRecovery_result"); err != nil { +func (p *AuroraAdminCommitRecoveryResult) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("commitRecovery_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(ctx, oprot); err != nil { return err } + if err := p.writeField0(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraAdminCommitRecoveryResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *AuroraAdminCommitRecoveryResult) writeField0(oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Success.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err @@ -30797,39 +27735,39 @@ func NewAuroraAdminUnloadRecoveryArgs() *AuroraAdminUnloadRecoveryArgs { return &AuroraAdminUnloadRecoveryArgs{} } -func (p *AuroraAdminUnloadRecoveryArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *AuroraAdminUnloadRecoveryArgs) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() 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(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminUnloadRecoveryArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "unloadRecovery_args"); err != nil { +func (p *AuroraAdminUnloadRecoveryArgs) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("unloadRecovery_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } @@ -30862,14 +27800,14 @@ func (p *AuroraAdminUnloadRecoveryResult) IsSetSuccess() bool { return p.Success != nil } -func (p *AuroraAdminUnloadRecoveryResult) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *AuroraAdminUnloadRecoveryResult) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -30877,58 +27815,58 @@ func (p *AuroraAdminUnloadRecoveryResult) Read(ctx context.Context, iprot thrift switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(ctx, iprot); err != nil { + if err := p.ReadField0(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminUnloadRecoveryResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { +func (p *AuroraAdminUnloadRecoveryResult) ReadField0(iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(ctx, iprot); err != nil { + if err := p.Success.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *AuroraAdminUnloadRecoveryResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "unloadRecovery_result"); err != nil { +func (p *AuroraAdminUnloadRecoveryResult) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("unloadRecovery_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(ctx, oprot); err != nil { return err } + if err := p.writeField0(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraAdminUnloadRecoveryResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *AuroraAdminUnloadRecoveryResult) writeField0(oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Success.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err @@ -30962,14 +27900,14 @@ func (p *AuroraAdminStartMaintenanceArgs) IsSetHosts() bool { return p.Hosts != nil } -func (p *AuroraAdminStartMaintenanceArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *AuroraAdminStartMaintenanceArgs) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -30977,57 +27915,57 @@ func (p *AuroraAdminStartMaintenanceArgs) Read(ctx context.Context, iprot thrift switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminStartMaintenanceArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { +func (p *AuroraAdminStartMaintenanceArgs) ReadField1(iprot thrift.TProtocol) error { p.Hosts = &Hosts{} - if err := p.Hosts.Read(ctx, iprot); err != nil { + if err := p.Hosts.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Hosts), err) } return nil } -func (p *AuroraAdminStartMaintenanceArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "startMaintenance_args"); err != nil { +func (p *AuroraAdminStartMaintenanceArgs) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("startMaintenance_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraAdminStartMaintenanceArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "hosts", thrift.STRUCT, 1); err != nil { +func (p *AuroraAdminStartMaintenanceArgs) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Hosts.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Hosts), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:hosts: ", p), err) } return err } @@ -31060,14 +27998,14 @@ func (p *AuroraAdminStartMaintenanceResult) IsSetSuccess() bool { return p.Success != nil } -func (p *AuroraAdminStartMaintenanceResult) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *AuroraAdminStartMaintenanceResult) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -31075,58 +28013,58 @@ func (p *AuroraAdminStartMaintenanceResult) Read(ctx context.Context, iprot thri switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(ctx, iprot); err != nil { + if err := p.ReadField0(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminStartMaintenanceResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { +func (p *AuroraAdminStartMaintenanceResult) ReadField0(iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(ctx, iprot); err != nil { + if err := p.Success.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *AuroraAdminStartMaintenanceResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "startMaintenance_result"); err != nil { +func (p *AuroraAdminStartMaintenanceResult) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("startMaintenance_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(ctx, oprot); err != nil { return err } + if err := p.writeField0(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraAdminStartMaintenanceResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *AuroraAdminStartMaintenanceResult) writeField0(oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Success.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err @@ -31160,14 +28098,14 @@ func (p *AuroraAdminDrainHostsArgs) IsSetHosts() bool { return p.Hosts != nil } -func (p *AuroraAdminDrainHostsArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *AuroraAdminDrainHostsArgs) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -31175,57 +28113,57 @@ func (p *AuroraAdminDrainHostsArgs) Read(ctx context.Context, iprot thrift.TProt switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminDrainHostsArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { +func (p *AuroraAdminDrainHostsArgs) ReadField1(iprot thrift.TProtocol) error { p.Hosts = &Hosts{} - if err := p.Hosts.Read(ctx, iprot); err != nil { + if err := p.Hosts.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Hosts), err) } return nil } -func (p *AuroraAdminDrainHostsArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "drainHosts_args"); err != nil { +func (p *AuroraAdminDrainHostsArgs) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("drainHosts_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraAdminDrainHostsArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "hosts", thrift.STRUCT, 1); err != nil { +func (p *AuroraAdminDrainHostsArgs) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Hosts.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Hosts), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:hosts: ", p), err) } return err } @@ -31258,14 +28196,14 @@ func (p *AuroraAdminDrainHostsResult) IsSetSuccess() bool { return p.Success != nil } -func (p *AuroraAdminDrainHostsResult) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *AuroraAdminDrainHostsResult) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -31273,58 +28211,58 @@ func (p *AuroraAdminDrainHostsResult) Read(ctx context.Context, iprot thrift.TPr switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(ctx, iprot); err != nil { + if err := p.ReadField0(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminDrainHostsResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { +func (p *AuroraAdminDrainHostsResult) ReadField0(iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(ctx, iprot); err != nil { + if err := p.Success.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *AuroraAdminDrainHostsResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "drainHosts_result"); err != nil { +func (p *AuroraAdminDrainHostsResult) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("drainHosts_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(ctx, oprot); err != nil { return err } + if err := p.writeField0(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraAdminDrainHostsResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *AuroraAdminDrainHostsResult) writeField0(oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Success.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err @@ -31358,14 +28296,14 @@ func (p *AuroraAdminMaintenanceStatusArgs) IsSetHosts() bool { return p.Hosts != nil } -func (p *AuroraAdminMaintenanceStatusArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *AuroraAdminMaintenanceStatusArgs) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -31373,57 +28311,57 @@ func (p *AuroraAdminMaintenanceStatusArgs) Read(ctx context.Context, iprot thrif switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminMaintenanceStatusArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { +func (p *AuroraAdminMaintenanceStatusArgs) ReadField1(iprot thrift.TProtocol) error { p.Hosts = &Hosts{} - if err := p.Hosts.Read(ctx, iprot); err != nil { + if err := p.Hosts.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Hosts), err) } return nil } -func (p *AuroraAdminMaintenanceStatusArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "maintenanceStatus_args"); err != nil { +func (p *AuroraAdminMaintenanceStatusArgs) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("maintenanceStatus_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraAdminMaintenanceStatusArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "hosts", thrift.STRUCT, 1); err != nil { +func (p *AuroraAdminMaintenanceStatusArgs) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Hosts.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Hosts), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:hosts: ", p), err) } return err } @@ -31456,14 +28394,14 @@ func (p *AuroraAdminMaintenanceStatusResult) IsSetSuccess() bool { return p.Success != nil } -func (p *AuroraAdminMaintenanceStatusResult) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *AuroraAdminMaintenanceStatusResult) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -31471,58 +28409,58 @@ func (p *AuroraAdminMaintenanceStatusResult) Read(ctx context.Context, iprot thr switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(ctx, iprot); err != nil { + if err := p.ReadField0(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminMaintenanceStatusResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { +func (p *AuroraAdminMaintenanceStatusResult) ReadField0(iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(ctx, iprot); err != nil { + if err := p.Success.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *AuroraAdminMaintenanceStatusResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "maintenanceStatus_result"); err != nil { +func (p *AuroraAdminMaintenanceStatusResult) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("maintenanceStatus_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(ctx, oprot); err != nil { return err } + if err := p.writeField0(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraAdminMaintenanceStatusResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *AuroraAdminMaintenanceStatusResult) writeField0(oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Success.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err @@ -31556,14 +28494,14 @@ func (p *AuroraAdminEndMaintenanceArgs) IsSetHosts() bool { return p.Hosts != nil } -func (p *AuroraAdminEndMaintenanceArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *AuroraAdminEndMaintenanceArgs) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -31571,57 +28509,57 @@ func (p *AuroraAdminEndMaintenanceArgs) Read(ctx context.Context, iprot thrift.T switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminEndMaintenanceArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { +func (p *AuroraAdminEndMaintenanceArgs) ReadField1(iprot thrift.TProtocol) error { p.Hosts = &Hosts{} - if err := p.Hosts.Read(ctx, iprot); err != nil { + if err := p.Hosts.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Hosts), err) } return nil } -func (p *AuroraAdminEndMaintenanceArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "endMaintenance_args"); err != nil { +func (p *AuroraAdminEndMaintenanceArgs) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("endMaintenance_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraAdminEndMaintenanceArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "hosts", thrift.STRUCT, 1); err != nil { +func (p *AuroraAdminEndMaintenanceArgs) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Hosts.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Hosts), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:hosts: ", p), err) } return err } @@ -31654,14 +28592,14 @@ func (p *AuroraAdminEndMaintenanceResult) IsSetSuccess() bool { return p.Success != nil } -func (p *AuroraAdminEndMaintenanceResult) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *AuroraAdminEndMaintenanceResult) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -31669,58 +28607,58 @@ func (p *AuroraAdminEndMaintenanceResult) Read(ctx context.Context, iprot thrift switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(ctx, iprot); err != nil { + if err := p.ReadField0(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminEndMaintenanceResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { +func (p *AuroraAdminEndMaintenanceResult) ReadField0(iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(ctx, iprot); err != nil { + if err := p.Success.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *AuroraAdminEndMaintenanceResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "endMaintenance_result"); err != nil { +func (p *AuroraAdminEndMaintenanceResult) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("endMaintenance_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(ctx, oprot); err != nil { return err } + if err := p.writeField0(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraAdminEndMaintenanceResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *AuroraAdminEndMaintenanceResult) writeField0(oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Success.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err @@ -31773,14 +28711,14 @@ func (p *AuroraAdminSlaDrainHostsArgs) IsSetDefaultSlaPolicy() bool { return p.DefaultSlaPolicy != nil } -func (p *AuroraAdminSlaDrainHostsArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *AuroraAdminSlaDrainHostsArgs) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -31788,67 +28726,67 @@ func (p *AuroraAdminSlaDrainHostsArgs) Read(ctx context.Context, iprot thrift.TP switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 2: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField2(ctx, iprot); err != nil { + if err := p.ReadField2(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } case 3: if fieldTypeId == thrift.I64 { - if err := p.ReadField3(ctx, iprot); err != nil { + if err := p.ReadField3(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminSlaDrainHostsArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { +func (p *AuroraAdminSlaDrainHostsArgs) ReadField1(iprot thrift.TProtocol) error { p.Hosts = &Hosts{} - if err := p.Hosts.Read(ctx, iprot); err != nil { + if err := p.Hosts.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Hosts), err) } return nil } -func (p *AuroraAdminSlaDrainHostsArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { +func (p *AuroraAdminSlaDrainHostsArgs) ReadField2(iprot thrift.TProtocol) error { p.DefaultSlaPolicy = &SlaPolicy{} - if err := p.DefaultSlaPolicy.Read(ctx, iprot); err != nil { + if err := p.DefaultSlaPolicy.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.DefaultSlaPolicy), err) } return nil } -func (p *AuroraAdminSlaDrainHostsArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI64(ctx); err != nil { +func (p *AuroraAdminSlaDrainHostsArgs) ReadField3(iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(); err != nil { return thrift.PrependError("error reading field 3: ", err) } else { p.TimeoutSecs = v @@ -31856,49 +28794,49 @@ func (p *AuroraAdminSlaDrainHostsArgs) ReadField3(ctx context.Context, iprot th return nil } -func (p *AuroraAdminSlaDrainHostsArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "slaDrainHosts_args"); err != nil { +func (p *AuroraAdminSlaDrainHostsArgs) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("slaDrainHosts_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != 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.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 := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraAdminSlaDrainHostsArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "hosts", thrift.STRUCT, 1); err != nil { +func (p *AuroraAdminSlaDrainHostsArgs) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Hosts.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Hosts), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:hosts: ", p), err) } return err } -func (p *AuroraAdminSlaDrainHostsArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "defaultSlaPolicy", thrift.STRUCT, 2); err != nil { +func (p *AuroraAdminSlaDrainHostsArgs) writeField2(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.DefaultSlaPolicy.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.DefaultSlaPolicy), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:defaultSlaPolicy: ", p), err) } return err } -func (p *AuroraAdminSlaDrainHostsArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "timeoutSecs", thrift.I64, 3); err != nil { +func (p *AuroraAdminSlaDrainHostsArgs) writeField3(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("timeoutSecs", thrift.I64, 3); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:timeoutSecs: ", p), err) } - if err := oprot.WriteI64(ctx, int64(p.TimeoutSecs)); err != nil { + if err := oprot.WriteI64(int64(p.TimeoutSecs)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.timeoutSecs (3) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 3:timeoutSecs: ", p), err) } return err } @@ -31931,14 +28869,14 @@ func (p *AuroraAdminSlaDrainHostsResult) IsSetSuccess() bool { return p.Success != nil } -func (p *AuroraAdminSlaDrainHostsResult) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *AuroraAdminSlaDrainHostsResult) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -31946,58 +28884,58 @@ func (p *AuroraAdminSlaDrainHostsResult) Read(ctx context.Context, iprot thrift. switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(ctx, iprot); err != nil { + if err := p.ReadField0(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminSlaDrainHostsResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { +func (p *AuroraAdminSlaDrainHostsResult) ReadField0(iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(ctx, iprot); err != nil { + if err := p.Success.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *AuroraAdminSlaDrainHostsResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "slaDrainHosts_result"); err != nil { +func (p *AuroraAdminSlaDrainHostsResult) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("slaDrainHosts_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(ctx, oprot); err != nil { return err } + if err := p.writeField0(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraAdminSlaDrainHostsResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *AuroraAdminSlaDrainHostsResult) writeField0(oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Success.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err @@ -32017,39 +28955,39 @@ func NewAuroraAdminSnapshotArgs() *AuroraAdminSnapshotArgs { return &AuroraAdminSnapshotArgs{} } -func (p *AuroraAdminSnapshotArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *AuroraAdminSnapshotArgs) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() 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(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminSnapshotArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "snapshot_args"); err != nil { +func (p *AuroraAdminSnapshotArgs) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("snapshot_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } @@ -32082,14 +29020,14 @@ func (p *AuroraAdminSnapshotResult) IsSetSuccess() bool { return p.Success != nil } -func (p *AuroraAdminSnapshotResult) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *AuroraAdminSnapshotResult) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -32097,58 +29035,58 @@ func (p *AuroraAdminSnapshotResult) Read(ctx context.Context, iprot thrift.TProt switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(ctx, iprot); err != nil { + if err := p.ReadField0(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminSnapshotResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { +func (p *AuroraAdminSnapshotResult) ReadField0(iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(ctx, iprot); err != nil { + if err := p.Success.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *AuroraAdminSnapshotResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "snapshot_result"); err != nil { +func (p *AuroraAdminSnapshotResult) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("snapshot_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(ctx, oprot); err != nil { return err } + if err := p.writeField0(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraAdminSnapshotResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *AuroraAdminSnapshotResult) writeField0(oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Success.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err @@ -32182,14 +29120,14 @@ func (p *AuroraAdminTriggerExplicitTaskReconciliationArgs) IsSetSettings() bool return p.Settings != nil } -func (p *AuroraAdminTriggerExplicitTaskReconciliationArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *AuroraAdminTriggerExplicitTaskReconciliationArgs) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -32197,57 +29135,57 @@ func (p *AuroraAdminTriggerExplicitTaskReconciliationArgs) Read(ctx context.Cont switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminTriggerExplicitTaskReconciliationArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { +func (p *AuroraAdminTriggerExplicitTaskReconciliationArgs) ReadField1(iprot thrift.TProtocol) error { p.Settings = &ExplicitReconciliationSettings{} - if err := p.Settings.Read(ctx, iprot); err != nil { + if err := p.Settings.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Settings), err) } return nil } -func (p *AuroraAdminTriggerExplicitTaskReconciliationArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "triggerExplicitTaskReconciliation_args"); err != nil { +func (p *AuroraAdminTriggerExplicitTaskReconciliationArgs) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("triggerExplicitTaskReconciliation_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraAdminTriggerExplicitTaskReconciliationArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "settings", thrift.STRUCT, 1); err != nil { +func (p *AuroraAdminTriggerExplicitTaskReconciliationArgs) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Settings.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Settings), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:settings: ", p), err) } return err } @@ -32280,14 +29218,14 @@ func (p *AuroraAdminTriggerExplicitTaskReconciliationResult) IsSetSuccess() bool return p.Success != nil } -func (p *AuroraAdminTriggerExplicitTaskReconciliationResult) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *AuroraAdminTriggerExplicitTaskReconciliationResult) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -32295,58 +29233,58 @@ func (p *AuroraAdminTriggerExplicitTaskReconciliationResult) Read(ctx context.Co switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(ctx, iprot); err != nil { + if err := p.ReadField0(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminTriggerExplicitTaskReconciliationResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { +func (p *AuroraAdminTriggerExplicitTaskReconciliationResult) ReadField0(iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(ctx, iprot); err != nil { + if err := p.Success.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *AuroraAdminTriggerExplicitTaskReconciliationResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "triggerExplicitTaskReconciliation_result"); err != nil { +func (p *AuroraAdminTriggerExplicitTaskReconciliationResult) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("triggerExplicitTaskReconciliation_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(ctx, oprot); err != nil { return err } + if err := p.writeField0(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraAdminTriggerExplicitTaskReconciliationResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *AuroraAdminTriggerExplicitTaskReconciliationResult) writeField0(oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Success.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err @@ -32366,39 +29304,39 @@ func NewAuroraAdminTriggerImplicitTaskReconciliationArgs() *AuroraAdminTriggerIm return &AuroraAdminTriggerImplicitTaskReconciliationArgs{} } -func (p *AuroraAdminTriggerImplicitTaskReconciliationArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *AuroraAdminTriggerImplicitTaskReconciliationArgs) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() 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(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminTriggerImplicitTaskReconciliationArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "triggerImplicitTaskReconciliation_args"); err != nil { +func (p *AuroraAdminTriggerImplicitTaskReconciliationArgs) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("triggerImplicitTaskReconciliation_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } @@ -32431,14 +29369,14 @@ func (p *AuroraAdminTriggerImplicitTaskReconciliationResult) IsSetSuccess() bool return p.Success != nil } -func (p *AuroraAdminTriggerImplicitTaskReconciliationResult) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *AuroraAdminTriggerImplicitTaskReconciliationResult) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -32446,58 +29384,58 @@ func (p *AuroraAdminTriggerImplicitTaskReconciliationResult) Read(ctx context.Co switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(ctx, iprot); err != nil { + if err := p.ReadField0(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminTriggerImplicitTaskReconciliationResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { +func (p *AuroraAdminTriggerImplicitTaskReconciliationResult) ReadField0(iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(ctx, iprot); err != nil { + if err := p.Success.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *AuroraAdminTriggerImplicitTaskReconciliationResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "triggerImplicitTaskReconciliation_result"); err != nil { +func (p *AuroraAdminTriggerImplicitTaskReconciliationResult) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("triggerImplicitTaskReconciliation_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(ctx, oprot); err != nil { return err } + if err := p.writeField0(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraAdminTriggerImplicitTaskReconciliationResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *AuroraAdminTriggerImplicitTaskReconciliationResult) writeField0(oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Success.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err @@ -32531,14 +29469,14 @@ func (p *AuroraAdminPruneTasksArgs) IsSetQuery() bool { return p.Query != nil } -func (p *AuroraAdminPruneTasksArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *AuroraAdminPruneTasksArgs) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -32546,57 +29484,57 @@ func (p *AuroraAdminPruneTasksArgs) Read(ctx context.Context, iprot thrift.TProt switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField1(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminPruneTasksArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { +func (p *AuroraAdminPruneTasksArgs) ReadField1(iprot thrift.TProtocol) error { p.Query = &TaskQuery{} - if err := p.Query.Read(ctx, iprot); err != nil { + if err := p.Query.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Query), err) } return nil } -func (p *AuroraAdminPruneTasksArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "pruneTasks_args"); err != nil { +func (p *AuroraAdminPruneTasksArgs) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("pruneTasks_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField1(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraAdminPruneTasksArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "query", thrift.STRUCT, 1); err != nil { +func (p *AuroraAdminPruneTasksArgs) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Query.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Query), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:query: ", p), err) } return err } @@ -32629,14 +29567,14 @@ func (p *AuroraAdminPruneTasksResult) IsSetSuccess() bool { return p.Success != nil } -func (p *AuroraAdminPruneTasksResult) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { +func (p *AuroraAdminPruneTasksResult) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } @@ -32644,58 +29582,58 @@ func (p *AuroraAdminPruneTasksResult) Read(ctx context.Context, iprot thrift.TPr switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField0(ctx, iprot); err != nil { + if err := p.ReadField0(iprot); err != nil { return err } } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + if err := iprot.Skip(fieldTypeId); err != nil { return err } } - if err := iprot.ReadFieldEnd(ctx); err != nil { + if err := iprot.ReadFieldEnd(); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { + if err := iprot.ReadStructEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } return nil } -func (p *AuroraAdminPruneTasksResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { +func (p *AuroraAdminPruneTasksResult) ReadField0(iprot thrift.TProtocol) error { p.Success = &Response{} - if err := p.Success.Read(ctx, iprot); err != nil { + if err := p.Success.Read(iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *AuroraAdminPruneTasksResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "pruneTasks_result"); err != nil { +func (p *AuroraAdminPruneTasksResult) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("pruneTasks_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField0(ctx, oprot); err != nil { return err } + if err := p.writeField0(oprot); err != nil { return err } } - if err := oprot.WriteFieldStop(ctx); err != nil { + if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { + if err := oprot.WriteStructEnd(); err != nil { return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *AuroraAdminPruneTasksResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *AuroraAdminPruneTasksResult) writeField0(oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin("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(ctx, oprot); err != nil { + if err := p.Success.Write(oprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { + if err := oprot.WriteFieldEnd(); 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 d2d4441..2cd7eaf 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,22 +1,22 @@ -// Code generated by Thrift Compiler (0.14.0). DO NOT EDIT. +// Autogenerated by Thrift Compiler (0.12.0) +// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING package main import ( - "context" - "flag" - "fmt" - "math" - "net" - "net/url" - "os" - "strconv" - "strings" - "github.com/apache/thrift/lib/go/thrift" - "apache/aurora" + "context" + "flag" + "fmt" + "math" + "net" + "net/url" + "os" + "strconv" + "strings" + "github.com/apache/thrift/lib/go/thrift" + "apache/aurora" ) -var _ = aurora.GoUnusedProtection__ func Usage() { fmt.Fprintln(os.Stderr, "Usage of ", os.Args[0], " [-h host:port] [-u url] [-f[ramed]] function [arg1 [arg2...]]:") @@ -195,19 +195,19 @@ func main() { } argvalue0 := flag.Arg(1) value0 := argvalue0 - arg405 := flag.Arg(2) - mbTrans406 := thrift.NewTMemoryBufferLen(len(arg405)) - defer mbTrans406.Close() - _, err407 := mbTrans406.WriteString(arg405) - if err407 != nil { + arg355 := flag.Arg(2) + mbTrans356 := thrift.NewTMemoryBufferLen(len(arg355)) + defer mbTrans356.Close() + _, err357 := mbTrans356.WriteString(arg355) + if err357 != nil { Usage() return } - factory408 := thrift.NewTJSONProtocolFactory() - jsProt409 := factory408.GetProtocol(mbTrans406) + factory358 := thrift.NewTJSONProtocolFactory() + jsProt359 := factory358.GetProtocol(mbTrans356) argvalue1 := aurora.NewResourceAggregate() - err410 := argvalue1.Read(context.Background(), jsProt409) - if err410 != nil { + err360 := argvalue1.Read(jsProt359) + if err360 != nil { Usage() return } @@ -263,19 +263,19 @@ func main() { fmt.Fprintln(os.Stderr, "QueryRecovery requires 1 args") flag.Usage() } - arg413 := flag.Arg(1) - mbTrans414 := thrift.NewTMemoryBufferLen(len(arg413)) - defer mbTrans414.Close() - _, err415 := mbTrans414.WriteString(arg413) - if err415 != nil { + arg363 := flag.Arg(1) + mbTrans364 := thrift.NewTMemoryBufferLen(len(arg363)) + defer mbTrans364.Close() + _, err365 := mbTrans364.WriteString(arg363) + if err365 != nil { Usage() return } - factory416 := thrift.NewTJSONProtocolFactory() - jsProt417 := factory416.GetProtocol(mbTrans414) + factory366 := thrift.NewTJSONProtocolFactory() + jsProt367 := factory366.GetProtocol(mbTrans364) argvalue0 := aurora.NewTaskQuery() - err418 := argvalue0.Read(context.Background(), jsProt417) - if err418 != nil { + err368 := argvalue0.Read(jsProt367) + if err368 != nil { Usage() return } @@ -288,19 +288,19 @@ func main() { fmt.Fprintln(os.Stderr, "DeleteRecoveryTasks requires 1 args") flag.Usage() } - arg419 := flag.Arg(1) - mbTrans420 := thrift.NewTMemoryBufferLen(len(arg419)) - defer mbTrans420.Close() - _, err421 := mbTrans420.WriteString(arg419) - if err421 != nil { + arg369 := flag.Arg(1) + mbTrans370 := thrift.NewTMemoryBufferLen(len(arg369)) + defer mbTrans370.Close() + _, err371 := mbTrans370.WriteString(arg369) + if err371 != nil { Usage() return } - factory422 := thrift.NewTJSONProtocolFactory() - jsProt423 := factory422.GetProtocol(mbTrans420) + factory372 := thrift.NewTJSONProtocolFactory() + jsProt373 := factory372.GetProtocol(mbTrans370) argvalue0 := aurora.NewTaskQuery() - err424 := argvalue0.Read(context.Background(), jsProt423) - if err424 != nil { + err374 := argvalue0.Read(jsProt373) + if err374 != nil { Usage() return } @@ -329,19 +329,19 @@ func main() { fmt.Fprintln(os.Stderr, "StartMaintenance requires 1 args") flag.Usage() } - arg425 := flag.Arg(1) - mbTrans426 := thrift.NewTMemoryBufferLen(len(arg425)) - defer mbTrans426.Close() - _, err427 := mbTrans426.WriteString(arg425) - if err427 != nil { + arg375 := flag.Arg(1) + mbTrans376 := thrift.NewTMemoryBufferLen(len(arg375)) + defer mbTrans376.Close() + _, err377 := mbTrans376.WriteString(arg375) + if err377 != nil { Usage() return } - factory428 := thrift.NewTJSONProtocolFactory() - jsProt429 := factory428.GetProtocol(mbTrans426) + factory378 := thrift.NewTJSONProtocolFactory() + jsProt379 := factory378.GetProtocol(mbTrans376) argvalue0 := aurora.NewHosts() - err430 := argvalue0.Read(context.Background(), jsProt429) - if err430 != nil { + err380 := argvalue0.Read(jsProt379) + if err380 != nil { Usage() return } @@ -354,19 +354,19 @@ func main() { fmt.Fprintln(os.Stderr, "DrainHosts requires 1 args") flag.Usage() } - arg431 := flag.Arg(1) - mbTrans432 := thrift.NewTMemoryBufferLen(len(arg431)) - defer mbTrans432.Close() - _, err433 := mbTrans432.WriteString(arg431) - if err433 != nil { + arg381 := flag.Arg(1) + mbTrans382 := thrift.NewTMemoryBufferLen(len(arg381)) + defer mbTrans382.Close() + _, err383 := mbTrans382.WriteString(arg381) + if err383 != nil { Usage() return } - factory434 := thrift.NewTJSONProtocolFactory() - jsProt435 := factory434.GetProtocol(mbTrans432) + factory384 := thrift.NewTJSONProtocolFactory() + jsProt385 := factory384.GetProtocol(mbTrans382) argvalue0 := aurora.NewHosts() - err436 := argvalue0.Read(context.Background(), jsProt435) - if err436 != nil { + err386 := argvalue0.Read(jsProt385) + if err386 != nil { Usage() return } @@ -379,19 +379,19 @@ func main() { fmt.Fprintln(os.Stderr, "MaintenanceStatus requires 1 args") flag.Usage() } - arg437 := flag.Arg(1) - mbTrans438 := thrift.NewTMemoryBufferLen(len(arg437)) - defer mbTrans438.Close() - _, err439 := mbTrans438.WriteString(arg437) - if err439 != nil { + arg387 := flag.Arg(1) + mbTrans388 := thrift.NewTMemoryBufferLen(len(arg387)) + defer mbTrans388.Close() + _, err389 := mbTrans388.WriteString(arg387) + if err389 != nil { Usage() return } - factory440 := thrift.NewTJSONProtocolFactory() - jsProt441 := factory440.GetProtocol(mbTrans438) + factory390 := thrift.NewTJSONProtocolFactory() + jsProt391 := factory390.GetProtocol(mbTrans388) argvalue0 := aurora.NewHosts() - err442 := argvalue0.Read(context.Background(), jsProt441) - if err442 != nil { + err392 := argvalue0.Read(jsProt391) + if err392 != nil { Usage() return } @@ -404,19 +404,19 @@ func main() { fmt.Fprintln(os.Stderr, "EndMaintenance requires 1 args") flag.Usage() } - arg443 := flag.Arg(1) - mbTrans444 := thrift.NewTMemoryBufferLen(len(arg443)) - defer mbTrans444.Close() - _, err445 := mbTrans444.WriteString(arg443) - if err445 != nil { + arg393 := flag.Arg(1) + mbTrans394 := thrift.NewTMemoryBufferLen(len(arg393)) + defer mbTrans394.Close() + _, err395 := mbTrans394.WriteString(arg393) + if err395 != nil { Usage() return } - factory446 := thrift.NewTJSONProtocolFactory() - jsProt447 := factory446.GetProtocol(mbTrans444) + factory396 := thrift.NewTJSONProtocolFactory() + jsProt397 := factory396.GetProtocol(mbTrans394) argvalue0 := aurora.NewHosts() - err448 := argvalue0.Read(context.Background(), jsProt447) - if err448 != nil { + err398 := argvalue0.Read(jsProt397) + if err398 != nil { Usage() return } @@ -429,42 +429,42 @@ func main() { fmt.Fprintln(os.Stderr, "SlaDrainHosts requires 3 args") flag.Usage() } - arg449 := flag.Arg(1) - mbTrans450 := thrift.NewTMemoryBufferLen(len(arg449)) - defer mbTrans450.Close() - _, err451 := mbTrans450.WriteString(arg449) - if err451 != nil { + arg399 := flag.Arg(1) + mbTrans400 := thrift.NewTMemoryBufferLen(len(arg399)) + defer mbTrans400.Close() + _, err401 := mbTrans400.WriteString(arg399) + if err401 != nil { Usage() return } - factory452 := thrift.NewTJSONProtocolFactory() - jsProt453 := factory452.GetProtocol(mbTrans450) + factory402 := thrift.NewTJSONProtocolFactory() + jsProt403 := factory402.GetProtocol(mbTrans400) argvalue0 := aurora.NewHosts() - err454 := argvalue0.Read(context.Background(), jsProt453) - if err454 != nil { + err404 := argvalue0.Read(jsProt403) + if err404 != nil { Usage() return } value0 := argvalue0 - arg455 := flag.Arg(2) - mbTrans456 := thrift.NewTMemoryBufferLen(len(arg455)) - defer mbTrans456.Close() - _, err457 := mbTrans456.WriteString(arg455) - if err457 != nil { + arg405 := flag.Arg(2) + mbTrans406 := thrift.NewTMemoryBufferLen(len(arg405)) + defer mbTrans406.Close() + _, err407 := mbTrans406.WriteString(arg405) + if err407 != nil { Usage() return } - factory458 := thrift.NewTJSONProtocolFactory() - jsProt459 := factory458.GetProtocol(mbTrans456) + factory408 := thrift.NewTJSONProtocolFactory() + jsProt409 := factory408.GetProtocol(mbTrans406) argvalue1 := aurora.NewSlaPolicy() - err460 := argvalue1.Read(context.Background(), jsProt459) - if err460 != nil { + err410 := argvalue1.Read(jsProt409) + if err410 != nil { Usage() return } value1 := argvalue1 - argvalue2, err461 := (strconv.ParseInt(flag.Arg(3), 10, 64)) - if err461 != nil { + argvalue2, err411 := (strconv.ParseInt(flag.Arg(3), 10, 64)) + if err411 != nil { Usage() return } @@ -485,19 +485,19 @@ func main() { fmt.Fprintln(os.Stderr, "TriggerExplicitTaskReconciliation requires 1 args") flag.Usage() } - arg462 := flag.Arg(1) - mbTrans463 := thrift.NewTMemoryBufferLen(len(arg462)) - defer mbTrans463.Close() - _, err464 := mbTrans463.WriteString(arg462) - if err464 != nil { + arg412 := flag.Arg(1) + mbTrans413 := thrift.NewTMemoryBufferLen(len(arg412)) + defer mbTrans413.Close() + _, err414 := mbTrans413.WriteString(arg412) + if err414 != nil { Usage() return } - factory465 := thrift.NewTJSONProtocolFactory() - jsProt466 := factory465.GetProtocol(mbTrans463) + factory415 := thrift.NewTJSONProtocolFactory() + jsProt416 := factory415.GetProtocol(mbTrans413) argvalue0 := aurora.NewExplicitReconciliationSettings() - err467 := argvalue0.Read(context.Background(), jsProt466) - if err467 != nil { + err417 := argvalue0.Read(jsProt416) + if err417 != nil { Usage() return } @@ -518,19 +518,19 @@ func main() { fmt.Fprintln(os.Stderr, "PruneTasks requires 1 args") flag.Usage() } - arg468 := flag.Arg(1) - mbTrans469 := thrift.NewTMemoryBufferLen(len(arg468)) - defer mbTrans469.Close() - _, err470 := mbTrans469.WriteString(arg468) - if err470 != nil { + arg418 := flag.Arg(1) + mbTrans419 := thrift.NewTMemoryBufferLen(len(arg418)) + defer mbTrans419.Close() + _, err420 := mbTrans419.WriteString(arg418) + if err420 != nil { Usage() return } - factory471 := thrift.NewTJSONProtocolFactory() - jsProt472 := factory471.GetProtocol(mbTrans469) + factory421 := thrift.NewTJSONProtocolFactory() + jsProt422 := factory421.GetProtocol(mbTrans419) argvalue0 := aurora.NewTaskQuery() - err473 := argvalue0.Read(context.Background(), jsProt472) - if err473 != nil { + err423 := argvalue0.Read(jsProt422) + if err423 != nil { Usage() return } @@ -543,19 +543,19 @@ func main() { fmt.Fprintln(os.Stderr, "CreateJob requires 1 args") flag.Usage() } - arg474 := flag.Arg(1) - mbTrans475 := thrift.NewTMemoryBufferLen(len(arg474)) - defer mbTrans475.Close() - _, err476 := mbTrans475.WriteString(arg474) - if err476 != nil { + arg424 := flag.Arg(1) + mbTrans425 := thrift.NewTMemoryBufferLen(len(arg424)) + defer mbTrans425.Close() + _, err426 := mbTrans425.WriteString(arg424) + if err426 != nil { Usage() return } - factory477 := thrift.NewTJSONProtocolFactory() - jsProt478 := factory477.GetProtocol(mbTrans475) + factory427 := thrift.NewTJSONProtocolFactory() + jsProt428 := factory427.GetProtocol(mbTrans425) argvalue0 := aurora.NewJobConfiguration() - err479 := argvalue0.Read(context.Background(), jsProt478) - if err479 != nil { + err429 := argvalue0.Read(jsProt428) + if err429 != nil { Usage() return } @@ -568,19 +568,19 @@ func main() { fmt.Fprintln(os.Stderr, "ScheduleCronJob requires 1 args") flag.Usage() } - arg480 := flag.Arg(1) - mbTrans481 := thrift.NewTMemoryBufferLen(len(arg480)) - defer mbTrans481.Close() - _, err482 := mbTrans481.WriteString(arg480) - if err482 != nil { + arg430 := flag.Arg(1) + mbTrans431 := thrift.NewTMemoryBufferLen(len(arg430)) + defer mbTrans431.Close() + _, err432 := mbTrans431.WriteString(arg430) + if err432 != nil { Usage() return } - factory483 := thrift.NewTJSONProtocolFactory() - jsProt484 := factory483.GetProtocol(mbTrans481) + factory433 := thrift.NewTJSONProtocolFactory() + jsProt434 := factory433.GetProtocol(mbTrans431) argvalue0 := aurora.NewJobConfiguration() - err485 := argvalue0.Read(context.Background(), jsProt484) - if err485 != nil { + err435 := argvalue0.Read(jsProt434) + if err435 != nil { Usage() return } @@ -593,19 +593,19 @@ func main() { fmt.Fprintln(os.Stderr, "DescheduleCronJob requires 1 args") flag.Usage() } - arg486 := flag.Arg(1) - mbTrans487 := thrift.NewTMemoryBufferLen(len(arg486)) - defer mbTrans487.Close() - _, err488 := mbTrans487.WriteString(arg486) - if err488 != nil { + arg436 := flag.Arg(1) + mbTrans437 := thrift.NewTMemoryBufferLen(len(arg436)) + defer mbTrans437.Close() + _, err438 := mbTrans437.WriteString(arg436) + if err438 != nil { Usage() return } - factory489 := thrift.NewTJSONProtocolFactory() - jsProt490 := factory489.GetProtocol(mbTrans487) + factory439 := thrift.NewTJSONProtocolFactory() + jsProt440 := factory439.GetProtocol(mbTrans437) argvalue0 := aurora.NewJobKey() - err491 := argvalue0.Read(context.Background(), jsProt490) - if err491 != nil { + err441 := argvalue0.Read(jsProt440) + if err441 != nil { Usage() return } @@ -618,19 +618,19 @@ func main() { fmt.Fprintln(os.Stderr, "StartCronJob requires 1 args") flag.Usage() } - arg492 := flag.Arg(1) - mbTrans493 := thrift.NewTMemoryBufferLen(len(arg492)) - defer mbTrans493.Close() - _, err494 := mbTrans493.WriteString(arg492) - if err494 != nil { + arg442 := flag.Arg(1) + mbTrans443 := thrift.NewTMemoryBufferLen(len(arg442)) + defer mbTrans443.Close() + _, err444 := mbTrans443.WriteString(arg442) + if err444 != nil { Usage() return } - factory495 := thrift.NewTJSONProtocolFactory() - jsProt496 := factory495.GetProtocol(mbTrans493) + factory445 := thrift.NewTJSONProtocolFactory() + jsProt446 := factory445.GetProtocol(mbTrans443) argvalue0 := aurora.NewJobKey() - err497 := argvalue0.Read(context.Background(), jsProt496) - if err497 != nil { + err447 := argvalue0.Read(jsProt446) + if err447 != nil { Usage() return } @@ -643,36 +643,36 @@ func main() { fmt.Fprintln(os.Stderr, "RestartShards requires 2 args") flag.Usage() } - arg498 := flag.Arg(1) - mbTrans499 := thrift.NewTMemoryBufferLen(len(arg498)) - defer mbTrans499.Close() - _, err500 := mbTrans499.WriteString(arg498) - if err500 != nil { + arg448 := flag.Arg(1) + mbTrans449 := thrift.NewTMemoryBufferLen(len(arg448)) + defer mbTrans449.Close() + _, err450 := mbTrans449.WriteString(arg448) + if err450 != nil { Usage() return } - factory501 := thrift.NewTJSONProtocolFactory() - jsProt502 := factory501.GetProtocol(mbTrans499) + factory451 := thrift.NewTJSONProtocolFactory() + jsProt452 := factory451.GetProtocol(mbTrans449) argvalue0 := aurora.NewJobKey() - err503 := argvalue0.Read(context.Background(), jsProt502) - if err503 != nil { + err453 := argvalue0.Read(jsProt452) + if err453 != nil { Usage() return } value0 := argvalue0 - arg504 := flag.Arg(2) - mbTrans505 := thrift.NewTMemoryBufferLen(len(arg504)) - defer mbTrans505.Close() - _, err506 := mbTrans505.WriteString(arg504) - if err506 != nil { + arg454 := flag.Arg(2) + mbTrans455 := thrift.NewTMemoryBufferLen(len(arg454)) + defer mbTrans455.Close() + _, err456 := mbTrans455.WriteString(arg454) + if err456 != nil { Usage() return } - factory507 := thrift.NewTJSONProtocolFactory() - jsProt508 := factory507.GetProtocol(mbTrans505) - containerStruct1 := aurora.NewAuroraSchedulerManagerRestartShardsArgs() - err509 := containerStruct1.ReadField2(context.Background(), jsProt508) - if err509 != nil { + factory457 := thrift.NewTJSONProtocolFactory() + jsProt458 := factory457.GetProtocol(mbTrans455) + containerStruct1 := aurora.NewAuroraAdminRestartShardsArgs() + err459 := containerStruct1.ReadField2(jsProt458) + if err459 != nil { Usage() return } @@ -686,36 +686,36 @@ func main() { fmt.Fprintln(os.Stderr, "KillTasks requires 3 args") flag.Usage() } - arg510 := flag.Arg(1) - mbTrans511 := thrift.NewTMemoryBufferLen(len(arg510)) - defer mbTrans511.Close() - _, err512 := mbTrans511.WriteString(arg510) - if err512 != nil { + arg460 := flag.Arg(1) + mbTrans461 := thrift.NewTMemoryBufferLen(len(arg460)) + defer mbTrans461.Close() + _, err462 := mbTrans461.WriteString(arg460) + if err462 != nil { Usage() return } - factory513 := thrift.NewTJSONProtocolFactory() - jsProt514 := factory513.GetProtocol(mbTrans511) + factory463 := thrift.NewTJSONProtocolFactory() + jsProt464 := factory463.GetProtocol(mbTrans461) argvalue0 := aurora.NewJobKey() - err515 := argvalue0.Read(context.Background(), jsProt514) - if err515 != nil { + err465 := argvalue0.Read(jsProt464) + if err465 != nil { Usage() return } value0 := argvalue0 - arg516 := flag.Arg(2) - mbTrans517 := thrift.NewTMemoryBufferLen(len(arg516)) - defer mbTrans517.Close() - _, err518 := mbTrans517.WriteString(arg516) - if err518 != nil { + arg466 := flag.Arg(2) + mbTrans467 := thrift.NewTMemoryBufferLen(len(arg466)) + defer mbTrans467.Close() + _, err468 := mbTrans467.WriteString(arg466) + if err468 != nil { Usage() return } - factory519 := thrift.NewTJSONProtocolFactory() - jsProt520 := factory519.GetProtocol(mbTrans517) - containerStruct1 := aurora.NewAuroraSchedulerManagerKillTasksArgs() - err521 := containerStruct1.ReadField2(context.Background(), jsProt520) - if err521 != nil { + factory469 := thrift.NewTJSONProtocolFactory() + jsProt470 := factory469.GetProtocol(mbTrans467) + containerStruct1 := aurora.NewAuroraAdminKillTasksArgs() + err471 := containerStruct1.ReadField2(jsProt470) + if err471 != nil { Usage() return } @@ -731,25 +731,25 @@ func main() { fmt.Fprintln(os.Stderr, "AddInstances requires 2 args") flag.Usage() } - arg523 := flag.Arg(1) - mbTrans524 := thrift.NewTMemoryBufferLen(len(arg523)) - defer mbTrans524.Close() - _, err525 := mbTrans524.WriteString(arg523) - if err525 != nil { + arg473 := flag.Arg(1) + mbTrans474 := thrift.NewTMemoryBufferLen(len(arg473)) + defer mbTrans474.Close() + _, err475 := mbTrans474.WriteString(arg473) + if err475 != nil { Usage() return } - factory526 := thrift.NewTJSONProtocolFactory() - jsProt527 := factory526.GetProtocol(mbTrans524) + factory476 := thrift.NewTJSONProtocolFactory() + jsProt477 := factory476.GetProtocol(mbTrans474) argvalue0 := aurora.NewInstanceKey() - err528 := argvalue0.Read(context.Background(), jsProt527) - if err528 != nil { + err478 := argvalue0.Read(jsProt477) + if err478 != nil { Usage() return } value0 := argvalue0 - tmp1, err529 := (strconv.Atoi(flag.Arg(2))) - if err529 != nil { + tmp1, err479 := (strconv.Atoi(flag.Arg(2))) + if err479 != nil { Usage() return } @@ -763,19 +763,19 @@ func main() { fmt.Fprintln(os.Stderr, "ReplaceCronTemplate requires 1 args") flag.Usage() } - arg530 := flag.Arg(1) - mbTrans531 := thrift.NewTMemoryBufferLen(len(arg530)) - defer mbTrans531.Close() - _, err532 := mbTrans531.WriteString(arg530) - if err532 != nil { + arg480 := flag.Arg(1) + mbTrans481 := thrift.NewTMemoryBufferLen(len(arg480)) + defer mbTrans481.Close() + _, err482 := mbTrans481.WriteString(arg480) + if err482 != nil { Usage() return } - factory533 := thrift.NewTJSONProtocolFactory() - jsProt534 := factory533.GetProtocol(mbTrans531) + factory483 := thrift.NewTJSONProtocolFactory() + jsProt484 := factory483.GetProtocol(mbTrans481) argvalue0 := aurora.NewJobConfiguration() - err535 := argvalue0.Read(context.Background(), jsProt534) - if err535 != nil { + err485 := argvalue0.Read(jsProt484) + if err485 != nil { Usage() return } @@ -788,19 +788,19 @@ func main() { fmt.Fprintln(os.Stderr, "StartJobUpdate requires 2 args") flag.Usage() } - arg536 := flag.Arg(1) - mbTrans537 := thrift.NewTMemoryBufferLen(len(arg536)) - defer mbTrans537.Close() - _, err538 := mbTrans537.WriteString(arg536) - if err538 != nil { + arg486 := flag.Arg(1) + mbTrans487 := thrift.NewTMemoryBufferLen(len(arg486)) + defer mbTrans487.Close() + _, err488 := mbTrans487.WriteString(arg486) + if err488 != nil { Usage() return } - factory539 := thrift.NewTJSONProtocolFactory() - jsProt540 := factory539.GetProtocol(mbTrans537) + factory489 := thrift.NewTJSONProtocolFactory() + jsProt490 := factory489.GetProtocol(mbTrans487) argvalue0 := aurora.NewJobUpdateRequest() - err541 := argvalue0.Read(context.Background(), jsProt540) - if err541 != nil { + err491 := argvalue0.Read(jsProt490) + if err491 != nil { Usage() return } @@ -815,19 +815,19 @@ func main() { fmt.Fprintln(os.Stderr, "PauseJobUpdate requires 2 args") flag.Usage() } - arg543 := flag.Arg(1) - mbTrans544 := thrift.NewTMemoryBufferLen(len(arg543)) - defer mbTrans544.Close() - _, err545 := mbTrans544.WriteString(arg543) - if err545 != nil { + arg493 := flag.Arg(1) + mbTrans494 := thrift.NewTMemoryBufferLen(len(arg493)) + defer mbTrans494.Close() + _, err495 := mbTrans494.WriteString(arg493) + if err495 != nil { Usage() return } - factory546 := thrift.NewTJSONProtocolFactory() - jsProt547 := factory546.GetProtocol(mbTrans544) + factory496 := thrift.NewTJSONProtocolFactory() + jsProt497 := factory496.GetProtocol(mbTrans494) argvalue0 := aurora.NewJobUpdateKey() - err548 := argvalue0.Read(context.Background(), jsProt547) - if err548 != nil { + err498 := argvalue0.Read(jsProt497) + if err498 != nil { Usage() return } @@ -842,19 +842,19 @@ func main() { fmt.Fprintln(os.Stderr, "ResumeJobUpdate requires 2 args") flag.Usage() } - arg550 := flag.Arg(1) - mbTrans551 := thrift.NewTMemoryBufferLen(len(arg550)) - defer mbTrans551.Close() - _, err552 := mbTrans551.WriteString(arg550) - if err552 != nil { + arg500 := flag.Arg(1) + mbTrans501 := thrift.NewTMemoryBufferLen(len(arg500)) + defer mbTrans501.Close() + _, err502 := mbTrans501.WriteString(arg500) + if err502 != nil { Usage() return } - factory553 := thrift.NewTJSONProtocolFactory() - jsProt554 := factory553.GetProtocol(mbTrans551) + factory503 := thrift.NewTJSONProtocolFactory() + jsProt504 := factory503.GetProtocol(mbTrans501) argvalue0 := aurora.NewJobUpdateKey() - err555 := argvalue0.Read(context.Background(), jsProt554) - if err555 != nil { + err505 := argvalue0.Read(jsProt504) + if err505 != nil { Usage() return } @@ -869,19 +869,19 @@ func main() { fmt.Fprintln(os.Stderr, "AbortJobUpdate requires 2 args") flag.Usage() } - arg557 := flag.Arg(1) - mbTrans558 := thrift.NewTMemoryBufferLen(len(arg557)) - defer mbTrans558.Close() - _, err559 := mbTrans558.WriteString(arg557) - if err559 != nil { + arg507 := flag.Arg(1) + mbTrans508 := thrift.NewTMemoryBufferLen(len(arg507)) + defer mbTrans508.Close() + _, err509 := mbTrans508.WriteString(arg507) + if err509 != nil { Usage() return } - factory560 := thrift.NewTJSONProtocolFactory() - jsProt561 := factory560.GetProtocol(mbTrans558) + factory510 := thrift.NewTJSONProtocolFactory() + jsProt511 := factory510.GetProtocol(mbTrans508) argvalue0 := aurora.NewJobUpdateKey() - err562 := argvalue0.Read(context.Background(), jsProt561) - if err562 != nil { + err512 := argvalue0.Read(jsProt511) + if err512 != nil { Usage() return } @@ -896,19 +896,19 @@ func main() { fmt.Fprintln(os.Stderr, "RollbackJobUpdate requires 2 args") flag.Usage() } - arg564 := flag.Arg(1) - mbTrans565 := thrift.NewTMemoryBufferLen(len(arg564)) - defer mbTrans565.Close() - _, err566 := mbTrans565.WriteString(arg564) - if err566 != nil { + arg514 := flag.Arg(1) + mbTrans515 := thrift.NewTMemoryBufferLen(len(arg514)) + defer mbTrans515.Close() + _, err516 := mbTrans515.WriteString(arg514) + if err516 != nil { Usage() return } - factory567 := thrift.NewTJSONProtocolFactory() - jsProt568 := factory567.GetProtocol(mbTrans565) + factory517 := thrift.NewTJSONProtocolFactory() + jsProt518 := factory517.GetProtocol(mbTrans515) argvalue0 := aurora.NewJobUpdateKey() - err569 := argvalue0.Read(context.Background(), jsProt568) - if err569 != nil { + err519 := argvalue0.Read(jsProt518) + if err519 != nil { Usage() return } @@ -923,19 +923,19 @@ func main() { fmt.Fprintln(os.Stderr, "PulseJobUpdate requires 1 args") flag.Usage() } - arg571 := flag.Arg(1) - mbTrans572 := thrift.NewTMemoryBufferLen(len(arg571)) - defer mbTrans572.Close() - _, err573 := mbTrans572.WriteString(arg571) - if err573 != nil { + arg521 := flag.Arg(1) + mbTrans522 := thrift.NewTMemoryBufferLen(len(arg521)) + defer mbTrans522.Close() + _, err523 := mbTrans522.WriteString(arg521) + if err523 != nil { Usage() return } - factory574 := thrift.NewTJSONProtocolFactory() - jsProt575 := factory574.GetProtocol(mbTrans572) + factory524 := thrift.NewTJSONProtocolFactory() + jsProt525 := factory524.GetProtocol(mbTrans522) argvalue0 := aurora.NewJobUpdateKey() - err576 := argvalue0.Read(context.Background(), jsProt575) - if err576 != nil { + err526 := argvalue0.Read(jsProt525) + if err526 != nil { Usage() return } @@ -966,19 +966,19 @@ func main() { fmt.Fprintln(os.Stderr, "GetTasksStatus requires 1 args") flag.Usage() } - arg578 := flag.Arg(1) - mbTrans579 := thrift.NewTMemoryBufferLen(len(arg578)) - defer mbTrans579.Close() - _, err580 := mbTrans579.WriteString(arg578) - if err580 != nil { + arg528 := flag.Arg(1) + mbTrans529 := thrift.NewTMemoryBufferLen(len(arg528)) + defer mbTrans529.Close() + _, err530 := mbTrans529.WriteString(arg528) + if err530 != nil { Usage() return } - factory581 := thrift.NewTJSONProtocolFactory() - jsProt582 := factory581.GetProtocol(mbTrans579) + factory531 := thrift.NewTJSONProtocolFactory() + jsProt532 := factory531.GetProtocol(mbTrans529) argvalue0 := aurora.NewTaskQuery() - err583 := argvalue0.Read(context.Background(), jsProt582) - if err583 != nil { + err533 := argvalue0.Read(jsProt532) + if err533 != nil { Usage() return } @@ -991,19 +991,19 @@ func main() { fmt.Fprintln(os.Stderr, "GetTasksWithoutConfigs requires 1 args") flag.Usage() } - arg584 := flag.Arg(1) - mbTrans585 := thrift.NewTMemoryBufferLen(len(arg584)) - defer mbTrans585.Close() - _, err586 := mbTrans585.WriteString(arg584) - if err586 != nil { + arg534 := flag.Arg(1) + mbTrans535 := thrift.NewTMemoryBufferLen(len(arg534)) + defer mbTrans535.Close() + _, err536 := mbTrans535.WriteString(arg534) + if err536 != nil { Usage() return } - factory587 := thrift.NewTJSONProtocolFactory() - jsProt588 := factory587.GetProtocol(mbTrans585) + factory537 := thrift.NewTJSONProtocolFactory() + jsProt538 := factory537.GetProtocol(mbTrans535) argvalue0 := aurora.NewTaskQuery() - err589 := argvalue0.Read(context.Background(), jsProt588) - if err589 != nil { + err539 := argvalue0.Read(jsProt538) + if err539 != nil { Usage() return } @@ -1016,19 +1016,19 @@ func main() { fmt.Fprintln(os.Stderr, "GetPendingReason requires 1 args") flag.Usage() } - arg590 := flag.Arg(1) - mbTrans591 := thrift.NewTMemoryBufferLen(len(arg590)) - defer mbTrans591.Close() - _, err592 := mbTrans591.WriteString(arg590) - if err592 != nil { + arg540 := flag.Arg(1) + mbTrans541 := thrift.NewTMemoryBufferLen(len(arg540)) + defer mbTrans541.Close() + _, err542 := mbTrans541.WriteString(arg540) + if err542 != nil { Usage() return } - factory593 := thrift.NewTJSONProtocolFactory() - jsProt594 := factory593.GetProtocol(mbTrans591) + factory543 := thrift.NewTJSONProtocolFactory() + jsProt544 := factory543.GetProtocol(mbTrans541) argvalue0 := aurora.NewTaskQuery() - err595 := argvalue0.Read(context.Background(), jsProt594) - if err595 != nil { + err545 := argvalue0.Read(jsProt544) + if err545 != nil { Usage() return } @@ -1041,19 +1041,19 @@ func main() { fmt.Fprintln(os.Stderr, "GetConfigSummary requires 1 args") flag.Usage() } - arg596 := flag.Arg(1) - mbTrans597 := thrift.NewTMemoryBufferLen(len(arg596)) - defer mbTrans597.Close() - _, err598 := mbTrans597.WriteString(arg596) - if err598 != nil { + arg546 := flag.Arg(1) + mbTrans547 := thrift.NewTMemoryBufferLen(len(arg546)) + defer mbTrans547.Close() + _, err548 := mbTrans547.WriteString(arg546) + if err548 != nil { Usage() return } - factory599 := thrift.NewTJSONProtocolFactory() - jsProt600 := factory599.GetProtocol(mbTrans597) + factory549 := thrift.NewTJSONProtocolFactory() + jsProt550 := factory549.GetProtocol(mbTrans547) argvalue0 := aurora.NewJobKey() - err601 := argvalue0.Read(context.Background(), jsProt600) - if err601 != nil { + err551 := argvalue0.Read(jsProt550) + if err551 != nil { Usage() return } @@ -1086,19 +1086,19 @@ func main() { fmt.Fprintln(os.Stderr, "PopulateJobConfig requires 1 args") flag.Usage() } - arg604 := flag.Arg(1) - mbTrans605 := thrift.NewTMemoryBufferLen(len(arg604)) - defer mbTrans605.Close() - _, err606 := mbTrans605.WriteString(arg604) - if err606 != nil { + arg554 := flag.Arg(1) + mbTrans555 := thrift.NewTMemoryBufferLen(len(arg554)) + defer mbTrans555.Close() + _, err556 := mbTrans555.WriteString(arg554) + if err556 != nil { Usage() return } - factory607 := thrift.NewTJSONProtocolFactory() - jsProt608 := factory607.GetProtocol(mbTrans605) + factory557 := thrift.NewTJSONProtocolFactory() + jsProt558 := factory557.GetProtocol(mbTrans555) argvalue0 := aurora.NewJobConfiguration() - err609 := argvalue0.Read(context.Background(), jsProt608) - if err609 != nil { + err559 := argvalue0.Read(jsProt558) + if err559 != nil { Usage() return } @@ -1111,19 +1111,19 @@ func main() { fmt.Fprintln(os.Stderr, "GetJobUpdateSummaries requires 1 args") flag.Usage() } - arg610 := flag.Arg(1) - mbTrans611 := thrift.NewTMemoryBufferLen(len(arg610)) - defer mbTrans611.Close() - _, err612 := mbTrans611.WriteString(arg610) - if err612 != nil { + arg560 := flag.Arg(1) + mbTrans561 := thrift.NewTMemoryBufferLen(len(arg560)) + defer mbTrans561.Close() + _, err562 := mbTrans561.WriteString(arg560) + if err562 != nil { Usage() return } - factory613 := thrift.NewTJSONProtocolFactory() - jsProt614 := factory613.GetProtocol(mbTrans611) + factory563 := thrift.NewTJSONProtocolFactory() + jsProt564 := factory563.GetProtocol(mbTrans561) argvalue0 := aurora.NewJobUpdateQuery() - err615 := argvalue0.Read(context.Background(), jsProt614) - if err615 != nil { + err565 := argvalue0.Read(jsProt564) + if err565 != nil { Usage() return } @@ -1136,19 +1136,19 @@ func main() { fmt.Fprintln(os.Stderr, "GetJobUpdateDetails requires 1 args") flag.Usage() } - arg616 := flag.Arg(1) - mbTrans617 := thrift.NewTMemoryBufferLen(len(arg616)) - defer mbTrans617.Close() - _, err618 := mbTrans617.WriteString(arg616) - if err618 != nil { + arg566 := flag.Arg(1) + mbTrans567 := thrift.NewTMemoryBufferLen(len(arg566)) + defer mbTrans567.Close() + _, err568 := mbTrans567.WriteString(arg566) + if err568 != nil { Usage() return } - factory619 := thrift.NewTJSONProtocolFactory() - jsProt620 := factory619.GetProtocol(mbTrans617) + factory569 := thrift.NewTJSONProtocolFactory() + jsProt570 := factory569.GetProtocol(mbTrans567) argvalue0 := aurora.NewJobUpdateQuery() - err621 := argvalue0.Read(context.Background(), jsProt620) - if err621 != nil { + err571 := argvalue0.Read(jsProt570) + if err571 != nil { Usage() return } @@ -1161,19 +1161,19 @@ func main() { fmt.Fprintln(os.Stderr, "GetJobUpdateDiff requires 1 args") flag.Usage() } - arg622 := flag.Arg(1) - mbTrans623 := thrift.NewTMemoryBufferLen(len(arg622)) - defer mbTrans623.Close() - _, err624 := mbTrans623.WriteString(arg622) - if err624 != nil { + arg572 := flag.Arg(1) + mbTrans573 := thrift.NewTMemoryBufferLen(len(arg572)) + defer mbTrans573.Close() + _, err574 := mbTrans573.WriteString(arg572) + if err574 != nil { Usage() return } - factory625 := thrift.NewTJSONProtocolFactory() - jsProt626 := factory625.GetProtocol(mbTrans623) + factory575 := thrift.NewTJSONProtocolFactory() + jsProt576 := factory575.GetProtocol(mbTrans573) argvalue0 := aurora.NewJobUpdateRequest() - err627 := argvalue0.Read(context.Background(), jsProt626) - if err627 != nil { + err577 := argvalue0.Read(jsProt576) + if err577 != 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 b4715d5..273892c 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,22 +1,22 @@ -// Code generated by Thrift Compiler (0.14.0). DO NOT EDIT. +// Autogenerated by Thrift Compiler (0.12.0) +// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING package main import ( - "context" - "flag" - "fmt" - "math" - "net" - "net/url" - "os" - "strconv" - "strings" - "github.com/apache/thrift/lib/go/thrift" - "apache/aurora" + "context" + "flag" + "fmt" + "math" + "net" + "net/url" + "os" + "strconv" + "strings" + "github.com/apache/thrift/lib/go/thrift" + "apache/aurora" ) -var _ = aurora.GoUnusedProtection__ func Usage() { fmt.Fprintln(os.Stderr, "Usage of ", os.Args[0], " [-h host:port] [-u url] [-f[ramed]] function [arg1 [arg2...]]:") @@ -175,19 +175,19 @@ func main() { fmt.Fprintln(os.Stderr, "CreateJob requires 1 args") flag.Usage() } - arg213 := flag.Arg(1) - mbTrans214 := thrift.NewTMemoryBufferLen(len(arg213)) - defer mbTrans214.Close() - _, err215 := mbTrans214.WriteString(arg213) - if err215 != nil { + arg163 := flag.Arg(1) + mbTrans164 := thrift.NewTMemoryBufferLen(len(arg163)) + defer mbTrans164.Close() + _, err165 := mbTrans164.WriteString(arg163) + if err165 != nil { Usage() return } - factory216 := thrift.NewTJSONProtocolFactory() - jsProt217 := factory216.GetProtocol(mbTrans214) + factory166 := thrift.NewTJSONProtocolFactory() + jsProt167 := factory166.GetProtocol(mbTrans164) argvalue0 := aurora.NewJobConfiguration() - err218 := argvalue0.Read(context.Background(), jsProt217) - if err218 != nil { + err168 := argvalue0.Read(jsProt167) + if err168 != nil { Usage() return } @@ -200,19 +200,19 @@ func main() { fmt.Fprintln(os.Stderr, "ScheduleCronJob requires 1 args") flag.Usage() } - arg219 := flag.Arg(1) - mbTrans220 := thrift.NewTMemoryBufferLen(len(arg219)) - defer mbTrans220.Close() - _, err221 := mbTrans220.WriteString(arg219) - if err221 != nil { + arg169 := flag.Arg(1) + mbTrans170 := thrift.NewTMemoryBufferLen(len(arg169)) + defer mbTrans170.Close() + _, err171 := mbTrans170.WriteString(arg169) + if err171 != nil { Usage() return } - factory222 := thrift.NewTJSONProtocolFactory() - jsProt223 := factory222.GetProtocol(mbTrans220) + factory172 := thrift.NewTJSONProtocolFactory() + jsProt173 := factory172.GetProtocol(mbTrans170) argvalue0 := aurora.NewJobConfiguration() - err224 := argvalue0.Read(context.Background(), jsProt223) - if err224 != nil { + err174 := argvalue0.Read(jsProt173) + if err174 != nil { Usage() return } @@ -225,19 +225,19 @@ func main() { fmt.Fprintln(os.Stderr, "DescheduleCronJob requires 1 args") flag.Usage() } - arg225 := flag.Arg(1) - mbTrans226 := thrift.NewTMemoryBufferLen(len(arg225)) - defer mbTrans226.Close() - _, err227 := mbTrans226.WriteString(arg225) - if err227 != nil { + arg175 := flag.Arg(1) + mbTrans176 := thrift.NewTMemoryBufferLen(len(arg175)) + defer mbTrans176.Close() + _, err177 := mbTrans176.WriteString(arg175) + if err177 != nil { Usage() return } - factory228 := thrift.NewTJSONProtocolFactory() - jsProt229 := factory228.GetProtocol(mbTrans226) + factory178 := thrift.NewTJSONProtocolFactory() + jsProt179 := factory178.GetProtocol(mbTrans176) argvalue0 := aurora.NewJobKey() - err230 := argvalue0.Read(context.Background(), jsProt229) - if err230 != nil { + err180 := argvalue0.Read(jsProt179) + if err180 != nil { Usage() return } @@ -250,19 +250,19 @@ func main() { fmt.Fprintln(os.Stderr, "StartCronJob requires 1 args") flag.Usage() } - arg231 := flag.Arg(1) - mbTrans232 := thrift.NewTMemoryBufferLen(len(arg231)) - defer mbTrans232.Close() - _, err233 := mbTrans232.WriteString(arg231) - if err233 != nil { + arg181 := flag.Arg(1) + mbTrans182 := thrift.NewTMemoryBufferLen(len(arg181)) + defer mbTrans182.Close() + _, err183 := mbTrans182.WriteString(arg181) + if err183 != nil { Usage() return } - factory234 := thrift.NewTJSONProtocolFactory() - jsProt235 := factory234.GetProtocol(mbTrans232) + factory184 := thrift.NewTJSONProtocolFactory() + jsProt185 := factory184.GetProtocol(mbTrans182) argvalue0 := aurora.NewJobKey() - err236 := argvalue0.Read(context.Background(), jsProt235) - if err236 != nil { + err186 := argvalue0.Read(jsProt185) + if err186 != nil { Usage() return } @@ -275,36 +275,36 @@ func main() { fmt.Fprintln(os.Stderr, "RestartShards requires 2 args") flag.Usage() } - arg237 := flag.Arg(1) - mbTrans238 := thrift.NewTMemoryBufferLen(len(arg237)) - defer mbTrans238.Close() - _, err239 := mbTrans238.WriteString(arg237) - if err239 != nil { + arg187 := flag.Arg(1) + mbTrans188 := thrift.NewTMemoryBufferLen(len(arg187)) + defer mbTrans188.Close() + _, err189 := mbTrans188.WriteString(arg187) + if err189 != nil { Usage() return } - factory240 := thrift.NewTJSONProtocolFactory() - jsProt241 := factory240.GetProtocol(mbTrans238) + factory190 := thrift.NewTJSONProtocolFactory() + jsProt191 := factory190.GetProtocol(mbTrans188) argvalue0 := aurora.NewJobKey() - err242 := argvalue0.Read(context.Background(), jsProt241) - if err242 != nil { + err192 := argvalue0.Read(jsProt191) + if err192 != nil { Usage() return } value0 := argvalue0 - arg243 := flag.Arg(2) - mbTrans244 := thrift.NewTMemoryBufferLen(len(arg243)) - defer mbTrans244.Close() - _, err245 := mbTrans244.WriteString(arg243) - if err245 != nil { + arg193 := flag.Arg(2) + mbTrans194 := thrift.NewTMemoryBufferLen(len(arg193)) + defer mbTrans194.Close() + _, err195 := mbTrans194.WriteString(arg193) + if err195 != nil { Usage() return } - factory246 := thrift.NewTJSONProtocolFactory() - jsProt247 := factory246.GetProtocol(mbTrans244) + factory196 := thrift.NewTJSONProtocolFactory() + jsProt197 := factory196.GetProtocol(mbTrans194) containerStruct1 := aurora.NewAuroraSchedulerManagerRestartShardsArgs() - err248 := containerStruct1.ReadField2(context.Background(), jsProt247) - if err248 != nil { + err198 := containerStruct1.ReadField2(jsProt197) + if err198 != nil { Usage() return } @@ -318,36 +318,36 @@ func main() { fmt.Fprintln(os.Stderr, "KillTasks requires 3 args") flag.Usage() } - arg249 := flag.Arg(1) - mbTrans250 := thrift.NewTMemoryBufferLen(len(arg249)) - defer mbTrans250.Close() - _, err251 := mbTrans250.WriteString(arg249) - if err251 != nil { + arg199 := flag.Arg(1) + mbTrans200 := thrift.NewTMemoryBufferLen(len(arg199)) + defer mbTrans200.Close() + _, err201 := mbTrans200.WriteString(arg199) + if err201 != nil { Usage() return } - factory252 := thrift.NewTJSONProtocolFactory() - jsProt253 := factory252.GetProtocol(mbTrans250) + factory202 := thrift.NewTJSONProtocolFactory() + jsProt203 := factory202.GetProtocol(mbTrans200) argvalue0 := aurora.NewJobKey() - err254 := argvalue0.Read(context.Background(), jsProt253) - if err254 != nil { + err204 := argvalue0.Read(jsProt203) + if err204 != nil { Usage() return } value0 := argvalue0 - arg255 := flag.Arg(2) - mbTrans256 := thrift.NewTMemoryBufferLen(len(arg255)) - defer mbTrans256.Close() - _, err257 := mbTrans256.WriteString(arg255) - if err257 != nil { + arg205 := flag.Arg(2) + mbTrans206 := thrift.NewTMemoryBufferLen(len(arg205)) + defer mbTrans206.Close() + _, err207 := mbTrans206.WriteString(arg205) + if err207 != nil { Usage() return } - factory258 := thrift.NewTJSONProtocolFactory() - jsProt259 := factory258.GetProtocol(mbTrans256) + factory208 := thrift.NewTJSONProtocolFactory() + jsProt209 := factory208.GetProtocol(mbTrans206) containerStruct1 := aurora.NewAuroraSchedulerManagerKillTasksArgs() - err260 := containerStruct1.ReadField2(context.Background(), jsProt259) - if err260 != nil { + err210 := containerStruct1.ReadField2(jsProt209) + if err210 != nil { Usage() return } @@ -363,25 +363,25 @@ func main() { fmt.Fprintln(os.Stderr, "AddInstances requires 2 args") flag.Usage() } - arg262 := flag.Arg(1) - mbTrans263 := thrift.NewTMemoryBufferLen(len(arg262)) - defer mbTrans263.Close() - _, err264 := mbTrans263.WriteString(arg262) - if err264 != nil { + arg212 := flag.Arg(1) + mbTrans213 := thrift.NewTMemoryBufferLen(len(arg212)) + defer mbTrans213.Close() + _, err214 := mbTrans213.WriteString(arg212) + if err214 != nil { Usage() return } - factory265 := thrift.NewTJSONProtocolFactory() - jsProt266 := factory265.GetProtocol(mbTrans263) + factory215 := thrift.NewTJSONProtocolFactory() + jsProt216 := factory215.GetProtocol(mbTrans213) argvalue0 := aurora.NewInstanceKey() - err267 := argvalue0.Read(context.Background(), jsProt266) - if err267 != nil { + err217 := argvalue0.Read(jsProt216) + if err217 != nil { Usage() return } value0 := argvalue0 - tmp1, err268 := (strconv.Atoi(flag.Arg(2))) - if err268 != nil { + tmp1, err218 := (strconv.Atoi(flag.Arg(2))) + if err218 != nil { Usage() return } @@ -395,19 +395,19 @@ func main() { fmt.Fprintln(os.Stderr, "ReplaceCronTemplate requires 1 args") flag.Usage() } - arg269 := flag.Arg(1) - mbTrans270 := thrift.NewTMemoryBufferLen(len(arg269)) - defer mbTrans270.Close() - _, err271 := mbTrans270.WriteString(arg269) - if err271 != nil { + arg219 := flag.Arg(1) + mbTrans220 := thrift.NewTMemoryBufferLen(len(arg219)) + defer mbTrans220.Close() + _, err221 := mbTrans220.WriteString(arg219) + if err221 != nil { Usage() return } - factory272 := thrift.NewTJSONProtocolFactory() - jsProt273 := factory272.GetProtocol(mbTrans270) + factory222 := thrift.NewTJSONProtocolFactory() + jsProt223 := factory222.GetProtocol(mbTrans220) argvalue0 := aurora.NewJobConfiguration() - err274 := argvalue0.Read(context.Background(), jsProt273) - if err274 != nil { + err224 := argvalue0.Read(jsProt223) + if err224 != nil { Usage() return } @@ -420,19 +420,19 @@ func main() { fmt.Fprintln(os.Stderr, "StartJobUpdate requires 2 args") flag.Usage() } - arg275 := flag.Arg(1) - mbTrans276 := thrift.NewTMemoryBufferLen(len(arg275)) - defer mbTrans276.Close() - _, err277 := mbTrans276.WriteString(arg275) - if err277 != nil { + arg225 := flag.Arg(1) + mbTrans226 := thrift.NewTMemoryBufferLen(len(arg225)) + defer mbTrans226.Close() + _, err227 := mbTrans226.WriteString(arg225) + if err227 != nil { Usage() return } - factory278 := thrift.NewTJSONProtocolFactory() - jsProt279 := factory278.GetProtocol(mbTrans276) + factory228 := thrift.NewTJSONProtocolFactory() + jsProt229 := factory228.GetProtocol(mbTrans226) argvalue0 := aurora.NewJobUpdateRequest() - err280 := argvalue0.Read(context.Background(), jsProt279) - if err280 != nil { + err230 := argvalue0.Read(jsProt229) + if err230 != nil { Usage() return } @@ -447,19 +447,19 @@ func main() { fmt.Fprintln(os.Stderr, "PauseJobUpdate requires 2 args") flag.Usage() } - arg282 := flag.Arg(1) - mbTrans283 := thrift.NewTMemoryBufferLen(len(arg282)) - defer mbTrans283.Close() - _, err284 := mbTrans283.WriteString(arg282) - if err284 != nil { + arg232 := flag.Arg(1) + mbTrans233 := thrift.NewTMemoryBufferLen(len(arg232)) + defer mbTrans233.Close() + _, err234 := mbTrans233.WriteString(arg232) + if err234 != nil { Usage() return } - factory285 := thrift.NewTJSONProtocolFactory() - jsProt286 := factory285.GetProtocol(mbTrans283) + factory235 := thrift.NewTJSONProtocolFactory() + jsProt236 := factory235.GetProtocol(mbTrans233) argvalue0 := aurora.NewJobUpdateKey() - err287 := argvalue0.Read(context.Background(), jsProt286) - if err287 != nil { + err237 := argvalue0.Read(jsProt236) + if err237 != nil { Usage() return } @@ -474,19 +474,19 @@ func main() { fmt.Fprintln(os.Stderr, "ResumeJobUpdate requires 2 args") flag.Usage() } - arg289 := flag.Arg(1) - mbTrans290 := thrift.NewTMemoryBufferLen(len(arg289)) - defer mbTrans290.Close() - _, err291 := mbTrans290.WriteString(arg289) - if err291 != nil { + arg239 := flag.Arg(1) + mbTrans240 := thrift.NewTMemoryBufferLen(len(arg239)) + defer mbTrans240.Close() + _, err241 := mbTrans240.WriteString(arg239) + if err241 != nil { Usage() return } - factory292 := thrift.NewTJSONProtocolFactory() - jsProt293 := factory292.GetProtocol(mbTrans290) + factory242 := thrift.NewTJSONProtocolFactory() + jsProt243 := factory242.GetProtocol(mbTrans240) argvalue0 := aurora.NewJobUpdateKey() - err294 := argvalue0.Read(context.Background(), jsProt293) - if err294 != nil { + err244 := argvalue0.Read(jsProt243) + if err244 != nil { Usage() return } @@ -501,19 +501,19 @@ func main() { fmt.Fprintln(os.Stderr, "AbortJobUpdate requires 2 args") flag.Usage() } - arg296 := flag.Arg(1) - mbTrans297 := thrift.NewTMemoryBufferLen(len(arg296)) - defer mbTrans297.Close() - _, err298 := mbTrans297.WriteString(arg296) - if err298 != nil { + arg246 := flag.Arg(1) + mbTrans247 := thrift.NewTMemoryBufferLen(len(arg246)) + defer mbTrans247.Close() + _, err248 := mbTrans247.WriteString(arg246) + if err248 != nil { Usage() return } - factory299 := thrift.NewTJSONProtocolFactory() - jsProt300 := factory299.GetProtocol(mbTrans297) + factory249 := thrift.NewTJSONProtocolFactory() + jsProt250 := factory249.GetProtocol(mbTrans247) argvalue0 := aurora.NewJobUpdateKey() - err301 := argvalue0.Read(context.Background(), jsProt300) - if err301 != nil { + err251 := argvalue0.Read(jsProt250) + if err251 != nil { Usage() return } @@ -528,19 +528,19 @@ func main() { fmt.Fprintln(os.Stderr, "RollbackJobUpdate requires 2 args") flag.Usage() } - arg303 := flag.Arg(1) - mbTrans304 := thrift.NewTMemoryBufferLen(len(arg303)) - defer mbTrans304.Close() - _, err305 := mbTrans304.WriteString(arg303) - if err305 != nil { + arg253 := flag.Arg(1) + mbTrans254 := thrift.NewTMemoryBufferLen(len(arg253)) + defer mbTrans254.Close() + _, err255 := mbTrans254.WriteString(arg253) + if err255 != nil { Usage() return } - factory306 := thrift.NewTJSONProtocolFactory() - jsProt307 := factory306.GetProtocol(mbTrans304) + factory256 := thrift.NewTJSONProtocolFactory() + jsProt257 := factory256.GetProtocol(mbTrans254) argvalue0 := aurora.NewJobUpdateKey() - err308 := argvalue0.Read(context.Background(), jsProt307) - if err308 != nil { + err258 := argvalue0.Read(jsProt257) + if err258 != nil { Usage() return } @@ -555,19 +555,19 @@ func main() { fmt.Fprintln(os.Stderr, "PulseJobUpdate requires 1 args") flag.Usage() } - arg310 := flag.Arg(1) - mbTrans311 := thrift.NewTMemoryBufferLen(len(arg310)) - defer mbTrans311.Close() - _, err312 := mbTrans311.WriteString(arg310) - if err312 != nil { + arg260 := flag.Arg(1) + mbTrans261 := thrift.NewTMemoryBufferLen(len(arg260)) + defer mbTrans261.Close() + _, err262 := mbTrans261.WriteString(arg260) + if err262 != nil { Usage() return } - factory313 := thrift.NewTJSONProtocolFactory() - jsProt314 := factory313.GetProtocol(mbTrans311) + factory263 := thrift.NewTJSONProtocolFactory() + jsProt264 := factory263.GetProtocol(mbTrans261) argvalue0 := aurora.NewJobUpdateKey() - err315 := argvalue0.Read(context.Background(), jsProt314) - if err315 != nil { + err265 := argvalue0.Read(jsProt264) + if err265 != nil { Usage() return } @@ -598,19 +598,19 @@ func main() { fmt.Fprintln(os.Stderr, "GetTasksStatus requires 1 args") flag.Usage() } - arg317 := flag.Arg(1) - mbTrans318 := thrift.NewTMemoryBufferLen(len(arg317)) - defer mbTrans318.Close() - _, err319 := mbTrans318.WriteString(arg317) - if err319 != nil { + arg267 := flag.Arg(1) + mbTrans268 := thrift.NewTMemoryBufferLen(len(arg267)) + defer mbTrans268.Close() + _, err269 := mbTrans268.WriteString(arg267) + if err269 != nil { Usage() return } - factory320 := thrift.NewTJSONProtocolFactory() - jsProt321 := factory320.GetProtocol(mbTrans318) + factory270 := thrift.NewTJSONProtocolFactory() + jsProt271 := factory270.GetProtocol(mbTrans268) argvalue0 := aurora.NewTaskQuery() - err322 := argvalue0.Read(context.Background(), jsProt321) - if err322 != nil { + err272 := argvalue0.Read(jsProt271) + if err272 != nil { Usage() return } @@ -623,19 +623,19 @@ func main() { fmt.Fprintln(os.Stderr, "GetTasksWithoutConfigs requires 1 args") flag.Usage() } - arg323 := flag.Arg(1) - mbTrans324 := thrift.NewTMemoryBufferLen(len(arg323)) - defer mbTrans324.Close() - _, err325 := mbTrans324.WriteString(arg323) - if err325 != nil { + arg273 := flag.Arg(1) + mbTrans274 := thrift.NewTMemoryBufferLen(len(arg273)) + defer mbTrans274.Close() + _, err275 := mbTrans274.WriteString(arg273) + if err275 != nil { Usage() return } - factory326 := thrift.NewTJSONProtocolFactory() - jsProt327 := factory326.GetProtocol(mbTrans324) + factory276 := thrift.NewTJSONProtocolFactory() + jsProt277 := factory276.GetProtocol(mbTrans274) argvalue0 := aurora.NewTaskQuery() - err328 := argvalue0.Read(context.Background(), jsProt327) - if err328 != nil { + err278 := argvalue0.Read(jsProt277) + if err278 != nil { Usage() return } @@ -648,19 +648,19 @@ func main() { fmt.Fprintln(os.Stderr, "GetPendingReason requires 1 args") flag.Usage() } - arg329 := flag.Arg(1) - mbTrans330 := thrift.NewTMemoryBufferLen(len(arg329)) - defer mbTrans330.Close() - _, err331 := mbTrans330.WriteString(arg329) - if err331 != nil { + arg279 := flag.Arg(1) + mbTrans280 := thrift.NewTMemoryBufferLen(len(arg279)) + defer mbTrans280.Close() + _, err281 := mbTrans280.WriteString(arg279) + if err281 != nil { Usage() return } - factory332 := thrift.NewTJSONProtocolFactory() - jsProt333 := factory332.GetProtocol(mbTrans330) + factory282 := thrift.NewTJSONProtocolFactory() + jsProt283 := factory282.GetProtocol(mbTrans280) argvalue0 := aurora.NewTaskQuery() - err334 := argvalue0.Read(context.Background(), jsProt333) - if err334 != nil { + err284 := argvalue0.Read(jsProt283) + if err284 != nil { Usage() return } @@ -673,19 +673,19 @@ func main() { fmt.Fprintln(os.Stderr, "GetConfigSummary requires 1 args") flag.Usage() } - arg335 := flag.Arg(1) - mbTrans336 := thrift.NewTMemoryBufferLen(len(arg335)) - defer mbTrans336.Close() - _, err337 := mbTrans336.WriteString(arg335) - if err337 != nil { + arg285 := flag.Arg(1) + mbTrans286 := thrift.NewTMemoryBufferLen(len(arg285)) + defer mbTrans286.Close() + _, err287 := mbTrans286.WriteString(arg285) + if err287 != nil { Usage() return } - factory338 := thrift.NewTJSONProtocolFactory() - jsProt339 := factory338.GetProtocol(mbTrans336) + factory288 := thrift.NewTJSONProtocolFactory() + jsProt289 := factory288.GetProtocol(mbTrans286) argvalue0 := aurora.NewJobKey() - err340 := argvalue0.Read(context.Background(), jsProt339) - if err340 != nil { + err290 := argvalue0.Read(jsProt289) + if err290 != nil { Usage() return } @@ -718,19 +718,19 @@ func main() { fmt.Fprintln(os.Stderr, "PopulateJobConfig requires 1 args") flag.Usage() } - arg343 := flag.Arg(1) - mbTrans344 := thrift.NewTMemoryBufferLen(len(arg343)) - defer mbTrans344.Close() - _, err345 := mbTrans344.WriteString(arg343) - if err345 != nil { + arg293 := flag.Arg(1) + mbTrans294 := thrift.NewTMemoryBufferLen(len(arg293)) + defer mbTrans294.Close() + _, err295 := mbTrans294.WriteString(arg293) + if err295 != nil { Usage() return } - factory346 := thrift.NewTJSONProtocolFactory() - jsProt347 := factory346.GetProtocol(mbTrans344) + factory296 := thrift.NewTJSONProtocolFactory() + jsProt297 := factory296.GetProtocol(mbTrans294) argvalue0 := aurora.NewJobConfiguration() - err348 := argvalue0.Read(context.Background(), jsProt347) - if err348 != nil { + err298 := argvalue0.Read(jsProt297) + if err298 != nil { Usage() return } @@ -743,19 +743,19 @@ func main() { fmt.Fprintln(os.Stderr, "GetJobUpdateSummaries requires 1 args") flag.Usage() } - arg349 := flag.Arg(1) - mbTrans350 := thrift.NewTMemoryBufferLen(len(arg349)) - defer mbTrans350.Close() - _, err351 := mbTrans350.WriteString(arg349) - if err351 != nil { + arg299 := flag.Arg(1) + mbTrans300 := thrift.NewTMemoryBufferLen(len(arg299)) + defer mbTrans300.Close() + _, err301 := mbTrans300.WriteString(arg299) + if err301 != nil { Usage() return } - factory352 := thrift.NewTJSONProtocolFactory() - jsProt353 := factory352.GetProtocol(mbTrans350) + factory302 := thrift.NewTJSONProtocolFactory() + jsProt303 := factory302.GetProtocol(mbTrans300) argvalue0 := aurora.NewJobUpdateQuery() - err354 := argvalue0.Read(context.Background(), jsProt353) - if err354 != nil { + err304 := argvalue0.Read(jsProt303) + if err304 != nil { Usage() return } @@ -768,19 +768,19 @@ func main() { fmt.Fprintln(os.Stderr, "GetJobUpdateDetails requires 1 args") flag.Usage() } - arg355 := flag.Arg(1) - mbTrans356 := thrift.NewTMemoryBufferLen(len(arg355)) - defer mbTrans356.Close() - _, err357 := mbTrans356.WriteString(arg355) - if err357 != nil { + arg305 := flag.Arg(1) + mbTrans306 := thrift.NewTMemoryBufferLen(len(arg305)) + defer mbTrans306.Close() + _, err307 := mbTrans306.WriteString(arg305) + if err307 != nil { Usage() return } - factory358 := thrift.NewTJSONProtocolFactory() - jsProt359 := factory358.GetProtocol(mbTrans356) + factory308 := thrift.NewTJSONProtocolFactory() + jsProt309 := factory308.GetProtocol(mbTrans306) argvalue0 := aurora.NewJobUpdateQuery() - err360 := argvalue0.Read(context.Background(), jsProt359) - if err360 != nil { + err310 := argvalue0.Read(jsProt309) + if err310 != nil { Usage() return } @@ -793,19 +793,19 @@ func main() { fmt.Fprintln(os.Stderr, "GetJobUpdateDiff requires 1 args") flag.Usage() } - arg361 := flag.Arg(1) - mbTrans362 := thrift.NewTMemoryBufferLen(len(arg361)) - defer mbTrans362.Close() - _, err363 := mbTrans362.WriteString(arg361) - if err363 != nil { + arg311 := flag.Arg(1) + mbTrans312 := thrift.NewTMemoryBufferLen(len(arg311)) + defer mbTrans312.Close() + _, err313 := mbTrans312.WriteString(arg311) + if err313 != nil { Usage() return } - factory364 := thrift.NewTJSONProtocolFactory() - jsProt365 := factory364.GetProtocol(mbTrans362) + factory314 := thrift.NewTJSONProtocolFactory() + jsProt315 := factory314.GetProtocol(mbTrans312) argvalue0 := aurora.NewJobUpdateRequest() - err366 := argvalue0.Read(context.Background(), jsProt365) - if err366 != nil { + err316 := argvalue0.Read(jsProt315) + if err316 != 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 e802328..16f7db5 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,22 +1,22 @@ -// Code generated by Thrift Compiler (0.14.0). DO NOT EDIT. +// Autogenerated by Thrift Compiler (0.12.0) +// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING package main import ( - "context" - "flag" - "fmt" - "math" - "net" - "net/url" - "os" - "strconv" - "strings" - "github.com/apache/thrift/lib/go/thrift" - "apache/aurora" + "context" + "flag" + "fmt" + "math" + "net" + "net/url" + "os" + "strconv" + "strings" + "github.com/apache/thrift/lib/go/thrift" + "apache/aurora" ) -var _ = aurora.GoUnusedProtection__ func Usage() { fmt.Fprintln(os.Stderr, "Usage of ", os.Args[0], " [-h host:port] [-u url] [-f[ramed]] function [arg1 [arg2...]]:") @@ -179,19 +179,19 @@ func main() { fmt.Fprintln(os.Stderr, "GetTasksStatus requires 1 args") flag.Usage() } - arg132 := flag.Arg(1) - mbTrans133 := thrift.NewTMemoryBufferLen(len(arg132)) - defer mbTrans133.Close() - _, err134 := mbTrans133.WriteString(arg132) - if err134 != nil { + arg82 := flag.Arg(1) + mbTrans83 := thrift.NewTMemoryBufferLen(len(arg82)) + defer mbTrans83.Close() + _, err84 := mbTrans83.WriteString(arg82) + if err84 != nil { Usage() return } - factory135 := thrift.NewTJSONProtocolFactory() - jsProt136 := factory135.GetProtocol(mbTrans133) + factory85 := thrift.NewTJSONProtocolFactory() + jsProt86 := factory85.GetProtocol(mbTrans83) argvalue0 := aurora.NewTaskQuery() - err137 := argvalue0.Read(context.Background(), jsProt136) - if err137 != nil { + err87 := argvalue0.Read(jsProt86) + if err87 != nil { Usage() return } @@ -204,19 +204,19 @@ func main() { fmt.Fprintln(os.Stderr, "GetTasksWithoutConfigs requires 1 args") flag.Usage() } - arg138 := flag.Arg(1) - mbTrans139 := thrift.NewTMemoryBufferLen(len(arg138)) - defer mbTrans139.Close() - _, err140 := mbTrans139.WriteString(arg138) - if err140 != nil { + arg88 := flag.Arg(1) + mbTrans89 := thrift.NewTMemoryBufferLen(len(arg88)) + defer mbTrans89.Close() + _, err90 := mbTrans89.WriteString(arg88) + if err90 != nil { Usage() return } - factory141 := thrift.NewTJSONProtocolFactory() - jsProt142 := factory141.GetProtocol(mbTrans139) + factory91 := thrift.NewTJSONProtocolFactory() + jsProt92 := factory91.GetProtocol(mbTrans89) argvalue0 := aurora.NewTaskQuery() - err143 := argvalue0.Read(context.Background(), jsProt142) - if err143 != nil { + err93 := argvalue0.Read(jsProt92) + if err93 != nil { Usage() return } @@ -229,19 +229,19 @@ func main() { fmt.Fprintln(os.Stderr, "GetPendingReason requires 1 args") flag.Usage() } - arg144 := flag.Arg(1) - mbTrans145 := thrift.NewTMemoryBufferLen(len(arg144)) - defer mbTrans145.Close() - _, err146 := mbTrans145.WriteString(arg144) - if err146 != nil { + arg94 := flag.Arg(1) + mbTrans95 := thrift.NewTMemoryBufferLen(len(arg94)) + defer mbTrans95.Close() + _, err96 := mbTrans95.WriteString(arg94) + if err96 != nil { Usage() return } - factory147 := thrift.NewTJSONProtocolFactory() - jsProt148 := factory147.GetProtocol(mbTrans145) + factory97 := thrift.NewTJSONProtocolFactory() + jsProt98 := factory97.GetProtocol(mbTrans95) argvalue0 := aurora.NewTaskQuery() - err149 := argvalue0.Read(context.Background(), jsProt148) - if err149 != nil { + err99 := argvalue0.Read(jsProt98) + if err99 != nil { Usage() return } @@ -254,19 +254,19 @@ func main() { fmt.Fprintln(os.Stderr, "GetConfigSummary requires 1 args") flag.Usage() } - arg150 := flag.Arg(1) - mbTrans151 := thrift.NewTMemoryBufferLen(len(arg150)) - defer mbTrans151.Close() - _, err152 := mbTrans151.WriteString(arg150) - if err152 != nil { + arg100 := flag.Arg(1) + mbTrans101 := thrift.NewTMemoryBufferLen(len(arg100)) + defer mbTrans101.Close() + _, err102 := mbTrans101.WriteString(arg100) + if err102 != nil { Usage() return } - factory153 := thrift.NewTJSONProtocolFactory() - jsProt154 := factory153.GetProtocol(mbTrans151) + factory103 := thrift.NewTJSONProtocolFactory() + jsProt104 := factory103.GetProtocol(mbTrans101) argvalue0 := aurora.NewJobKey() - err155 := argvalue0.Read(context.Background(), jsProt154) - if err155 != nil { + err105 := argvalue0.Read(jsProt104) + if err105 != nil { Usage() return } @@ -299,19 +299,19 @@ func main() { fmt.Fprintln(os.Stderr, "PopulateJobConfig requires 1 args") flag.Usage() } - arg158 := flag.Arg(1) - mbTrans159 := thrift.NewTMemoryBufferLen(len(arg158)) - defer mbTrans159.Close() - _, err160 := mbTrans159.WriteString(arg158) - if err160 != nil { + arg108 := flag.Arg(1) + mbTrans109 := thrift.NewTMemoryBufferLen(len(arg108)) + defer mbTrans109.Close() + _, err110 := mbTrans109.WriteString(arg108) + if err110 != nil { Usage() return } - factory161 := thrift.NewTJSONProtocolFactory() - jsProt162 := factory161.GetProtocol(mbTrans159) + factory111 := thrift.NewTJSONProtocolFactory() + jsProt112 := factory111.GetProtocol(mbTrans109) argvalue0 := aurora.NewJobConfiguration() - err163 := argvalue0.Read(context.Background(), jsProt162) - if err163 != nil { + err113 := argvalue0.Read(jsProt112) + if err113 != nil { Usage() return } @@ -324,19 +324,19 @@ func main() { fmt.Fprintln(os.Stderr, "GetJobUpdateSummaries requires 1 args") flag.Usage() } - arg164 := flag.Arg(1) - mbTrans165 := thrift.NewTMemoryBufferLen(len(arg164)) - defer mbTrans165.Close() - _, err166 := mbTrans165.WriteString(arg164) - if err166 != nil { + arg114 := flag.Arg(1) + mbTrans115 := thrift.NewTMemoryBufferLen(len(arg114)) + defer mbTrans115.Close() + _, err116 := mbTrans115.WriteString(arg114) + if err116 != nil { Usage() return } - factory167 := thrift.NewTJSONProtocolFactory() - jsProt168 := factory167.GetProtocol(mbTrans165) + factory117 := thrift.NewTJSONProtocolFactory() + jsProt118 := factory117.GetProtocol(mbTrans115) argvalue0 := aurora.NewJobUpdateQuery() - err169 := argvalue0.Read(context.Background(), jsProt168) - if err169 != nil { + err119 := argvalue0.Read(jsProt118) + if err119 != nil { Usage() return } @@ -349,19 +349,19 @@ func main() { fmt.Fprintln(os.Stderr, "GetJobUpdateDetails requires 1 args") flag.Usage() } - arg170 := flag.Arg(1) - mbTrans171 := thrift.NewTMemoryBufferLen(len(arg170)) - defer mbTrans171.Close() - _, err172 := mbTrans171.WriteString(arg170) - if err172 != nil { + arg120 := flag.Arg(1) + mbTrans121 := thrift.NewTMemoryBufferLen(len(arg120)) + defer mbTrans121.Close() + _, err122 := mbTrans121.WriteString(arg120) + if err122 != nil { Usage() return } - factory173 := thrift.NewTJSONProtocolFactory() - jsProt174 := factory173.GetProtocol(mbTrans171) + factory123 := thrift.NewTJSONProtocolFactory() + jsProt124 := factory123.GetProtocol(mbTrans121) argvalue0 := aurora.NewJobUpdateQuery() - err175 := argvalue0.Read(context.Background(), jsProt174) - if err175 != nil { + err125 := argvalue0.Read(jsProt124) + if err125 != nil { Usage() return } @@ -374,19 +374,19 @@ func main() { fmt.Fprintln(os.Stderr, "GetJobUpdateDiff requires 1 args") flag.Usage() } - arg176 := flag.Arg(1) - mbTrans177 := thrift.NewTMemoryBufferLen(len(arg176)) - defer mbTrans177.Close() - _, err178 := mbTrans177.WriteString(arg176) - if err178 != nil { + arg126 := flag.Arg(1) + mbTrans127 := thrift.NewTMemoryBufferLen(len(arg126)) + defer mbTrans127.Close() + _, err128 := mbTrans127.WriteString(arg126) + if err128 != nil { Usage() return } - factory179 := thrift.NewTJSONProtocolFactory() - jsProt180 := factory179.GetProtocol(mbTrans177) + factory129 := thrift.NewTJSONProtocolFactory() + jsProt130 := factory129.GetProtocol(mbTrans127) argvalue0 := aurora.NewJobUpdateRequest() - err181 := argvalue0.Read(context.Background(), jsProt180) - if err181 != nil { + err131 := argvalue0.Read(jsProt130) + if err131 != nil { Usage() return } diff --git a/generateBindings.sh b/generateBindings.sh index 8cb5b9d..9ff0205 100755 --- a/generateBindings.sh +++ b/generateBindings.sh @@ -1,6 +1,6 @@ #! /bin/bash -THRIFT_VER=0.14.0 +THRIFT_VER=0.12.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 9497185..2990ef2 100644 --- a/go.mod +++ b/go.mod @@ -1,12 +1,12 @@ module github.com/paypal/gorealis -go 1.13 +go 1.12 require ( - 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 // indirect + github.com/apache/thrift v0.12.0 + github.com/davecgh/go-spew v1.1.0 + github.com/pkg/errors v0.0.0-20171216070316-e881fd58d78e + github.com/pmezard/go-difflib v1.0.0 github.com/samuel/go-zookeeper v0.0.0-20171117190445-471cd4e61d7a - github.com/stretchr/testify v1.7.0 + github.com/stretchr/testify v1.2.0 ) diff --git a/go.sum b/go.sum index f3f5eb6..45e1c27 100644 --- a/go.sum +++ b/go.sum @@ -1,30 +1,9 @@ -github.com/apache/thrift v0.13.0 h1:5hryIiq9gtn+MiLVn0wP37kb/uTeRZgN08WoCsAhIhI= -github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= -github.com/apache/thrift v0.14.0 h1:vqZ2DP42i8th2OsgCcYZkirtbzvpZEFx53LiWDJXIAs= -github.com/apache/thrift v0.14.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= -github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= +github.com/apache/thrift v0.12.0 h1:pODnxUFNcjP9UTLZGTdeh+j16A8lJbRvD3rOtrk/7bs= +github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/pkg/errors v0.0.0-20171216070316-e881fd58d78e h1:+RHxT/gm0O3UF7nLJbdNzAmULvCFt4XfXHWzh3XI/zs= github.com/pkg/errors v0.0.0-20171216070316-e881fd58d78e/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/ridv/thrift v0.12.1 h1:b80V1Oa2Mbd++jrlJZbJsIybO5/MCfbXKzd1A5v4aSo= -github.com/ridv/thrift v0.12.1/go.mod h1:yTMRF94RCZjO1fY1xt69yncvMbQCPdRL8BhbwIrjPx8= -github.com/ridv/thrift v0.13.1 h1:/8XnTRUqJJeiuqoL7mfnJQmXQa4GJn9tUCiP7+i6Y9o= -github.com/ridv/thrift v0.13.1/go.mod h1:yTMRF94RCZjO1fY1xt69yncvMbQCPdRL8BhbwIrjPx8= -github.com/ridv/thrift v0.13.2 h1:Q3Smr8poXd7VkWZPHvdJZzlQCJO+b5W37ECfoUL4qHc= -github.com/ridv/thrift v0.13.2/go.mod h1:yTMRF94RCZjO1fY1xt69yncvMbQCPdRL8BhbwIrjPx8= github.com/samuel/go-zookeeper v0.0.0-20171117190445-471cd4e61d7a h1:EYL2xz/Zdo0hyqdZMXR4lmT2O11jDLTPCEqIe/FR6W4= github.com/samuel/go-zookeeper v0.0.0-20171117190445-471cd4e61d7a/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= -github.com/stretchr/objx v0.1.0 h1:4G4v2dO3VZwixGIRoQ5Lfboy6nUhCyYzaqnIAPPhYs4= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.2.0 h1:LThGCOvhuJic9Gyd1VBCkhyUXmO8vKaBFvBsJ2k03rg= github.com/stretchr/testify v1.2.0/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/helpers.go b/helpers.go deleted file mode 100644 index 56821c1..0000000 --- a/helpers.go +++ /dev/null @@ -1,21 +0,0 @@ -package realis - -import ( - "context" - - "github.com/paypal/gorealis/gen-go/apache/aurora" -) - -func (r *realisClient) jobExists(key aurora.JobKey) (bool, error) { - resp, err := r.client.GetConfigSummary(context.TODO(), &key) - if err != nil { - return false, err - } - - return resp == nil || - resp.GetResult_() == nil || - resp.GetResult_().GetConfigSummaryResult_() == nil || - resp.GetResult_().GetConfigSummaryResult_().GetSummary() == nil || - resp.GetResponseCode() != aurora.ResponseCode_OK, - nil -} diff --git a/job.go b/job.go index 8470546..b614f95 100644 --- a/job.go +++ b/job.go @@ -62,7 +62,6 @@ type Job interface { PartitionPolicy(policy *aurora.PartitionPolicy) Job Tier(tier string) Job SlaPolicy(policy *aurora.SlaPolicy) Job - Priority(priority int32) Job } type resourceType int @@ -74,15 +73,12 @@ const ( GPU ) -const portNamePrefix = "org.apache.aurora.port." - // AuroraJob is a structure to collect all information pertaining to an Aurora job. type AuroraJob struct { - jobConfig *aurora.JobConfiguration - resources map[resourceType]*aurora.Resource - metadata map[string]*aurora.Metadata - constraints map[string]*aurora.Constraint - portCount int + jobConfig *aurora.JobConfiguration + resources map[resourceType]*aurora.Resource + metadata map[string]*aurora.Metadata + portCount int } // NewJob is used to create a Job object with everything initialized. @@ -113,11 +109,10 @@ func NewJob() Job { diskMb.DiskMb = new(int64) return &AuroraJob{ - jobConfig: jobConfig, - resources: resources, - metadata: make(map[string]*aurora.Metadata), - constraints: make(map[string]*aurora.Constraint), - portCount: 0, + jobConfig: jobConfig, + resources: resources, + metadata: make(map[string]*aurora.Metadata), + portCount: 0, } } @@ -263,12 +258,12 @@ func (j *AuroraJob) AddURIs(extract bool, cache bool, values ...string) Job { // AddLabel adds a Mesos label to the job. Note that Aurora will add the // prefix "org.apache.aurora.metadata." to the beginning of each key. func (j *AuroraJob) AddLabel(key string, value string) Job { - if _, ok := j.metadata[key]; !ok { - j.metadata[key] = &aurora.Metadata{Key: key} + if _, ok := j.metadata[key]; ok { + j.metadata[key].Value = value + } else { + j.metadata[key] = &aurora.Metadata{Key: key, Value: value} j.jobConfig.TaskConfig.Metadata = append(j.jobConfig.TaskConfig.Metadata, j.metadata[key]) } - - j.metadata[key].Value = value return j } @@ -293,7 +288,7 @@ func (j *AuroraJob) AddPorts(num int) Job { start := j.portCount j.portCount += num for i := start; i < j.portCount; i++ { - portName := portNamePrefix + strconv.Itoa(i) + portName := "org.apache.aurora.port." + strconv.Itoa(i) j.jobConfig.TaskConfig.Resources = append( j.jobConfig.TaskConfig.Resources, &aurora.Resource{NamedPort: &portName}) @@ -302,56 +297,47 @@ func (j *AuroraJob) AddPorts(num int) Job { return j } -// AddValueConstraint allows the user to add a value constrain to the job to limit which agents the job's -// tasks can be run on. If the name matches a constraint that was previously set, the previous value will be -// overwritten. In case the previous constraint attached to the name was of type limit, the constraint will be clobbered -// by this new Value constraint. +// AddValueConstraint allows the user to add a value constrain to the job to limiti which agents the job's +// tasks can be run on. // From Aurora Docs: // Add a Value constraint // name - Mesos slave attribute that the constraint is matched against. // If negated = true , treat this as a 'not' - to avoid specific values. // Values - list of values we look for in attribute name func (j *AuroraJob) AddValueConstraint(name string, negated bool, values ...string) Job { - if _, ok := j.constraints[name]; !ok { - j.constraints[name] = &aurora.Constraint{Name: name} - j.jobConfig.TaskConfig.Constraints = append(j.jobConfig.TaskConfig.Constraints, j.constraints[name]) - } - - j.constraints[name].Constraint = &aurora.TaskConstraint{ - Value: &aurora.ValueConstraint{ - Negated: negated, - Values: values, - }, - Limit: nil, - } + j.jobConfig.TaskConfig.Constraints = append(j.jobConfig.TaskConfig.Constraints, + &aurora.Constraint{ + Name: name, + Constraint: &aurora.TaskConstraint{ + Value: &aurora.ValueConstraint{ + Negated: negated, + Values: values, + }, + Limit: nil, + }, + }) return j } // AddLimitConstraint allows the user to limit how many tasks form the same Job are run on a single host. -// If the name matches a constraint that was previously set, the previous value will be -// overwritten. In case the previous constraint attached to the name was of type Value, the constraint will be clobbered -// by this new Limit constraint. // From Aurora Docs: // A constraint that specifies the maximum number of active tasks on a host with // a matching attribute that may be scheduled simultaneously. func (j *AuroraJob) AddLimitConstraint(name string, limit int32) Job { - if _, ok := j.constraints[name]; !ok { - j.constraints[name] = &aurora.Constraint{Name: name} - j.jobConfig.TaskConfig.Constraints = append(j.jobConfig.TaskConfig.Constraints, j.constraints[name]) - } - - j.constraints[name].Constraint = &aurora.TaskConstraint{ - Value: nil, - Limit: &aurora.LimitConstraint{Limit: limit}, - } + j.jobConfig.TaskConfig.Constraints = append(j.jobConfig.TaskConfig.Constraints, + &aurora.Constraint{ + Name: name, + Constraint: &aurora.TaskConstraint{ + Value: nil, + Limit: &aurora.LimitConstraint{Limit: limit}, + }, + }) return j } -// AddDedicatedConstraint is a convenience function that allows the user to -// add a dedicated constraint to a Job configuration. -// In case a previous dedicated constraint was set, it will be clobbered by this new value. +// AddDedicatedConstraint allows the user to add a dedicated constraint to a Job configuration. func (j *AuroraJob) AddDedicatedConstraint(role, name string) Job { j.AddValueConstraint("dedicated", false, role+"/"+name) @@ -384,8 +370,3 @@ func (j *AuroraJob) SlaPolicy(policy *aurora.SlaPolicy) Job { return j } - -func (j *AuroraJob) Priority(priority int32) Job { - j.jobConfig.TaskConfig.Priority = priority - return j -} diff --git a/monitors.go b/monitors.go index edbe4e4..575e177 100644 --- a/monitors.go +++ b/monitors.go @@ -78,11 +78,8 @@ func (m *Monitor) JobUpdateStatus(updateKey aurora.JobUpdateKey, UpdateStatuses: desiredStatuses, } summary, err := m.JobUpdateQuery(updateQ, interval, timeout) - if err != nil { - return 0, err - } - return summary[0].State.Status, nil + return summary[0].State.Status, err } // JobUpdateQuery polls the scheduler every certain amount of time to see if the query call returns any results. @@ -117,7 +114,7 @@ func (m *Monitor) JobUpdateQuery( } } -// AutoPausedUpdateMonitor is a special monitor for auto pause enabled batch updates. This monitor ensures that the update +// AutoPaused monitor is a special monitor for auto pause enabled batch updates. This monitor ensures that the update // being monitored is capable of auto pausing and has auto pausing enabled. After verifying this information, // the monitor watches for the job to enter the ROLL_FORWARD_PAUSED state and calculates the current batch // the update is in using information from the update configuration. @@ -168,8 +165,7 @@ func (m *Monitor) AutoPausedUpdateMonitor(key aurora.JobUpdateKey, interval, tim return -1, err } - if !(summary[0].State.Status == aurora.JobUpdateStatus_ROLL_FORWARD_PAUSED || - summary[0].State.Status == aurora.JobUpdateStatus_ROLLED_FORWARD) { + if summary[0].State.Status != aurora.JobUpdateStatus_ROLL_FORWARD_PAUSED { return -1, errors.Errorf("update is in a terminal state %v", summary[0].State.Status) } @@ -184,7 +180,7 @@ func (m *Monitor) AutoPausedUpdateMonitor(key aurora.JobUpdateKey, interval, tim return calculateCurrentBatch(int32(len(updatingInstances)), batchSizes), nil } -// Instances will monitor a Job until all instances enter one of the LIVE_STATES +// Monitor a Job until all instances enter one of the LIVE_STATES func (m *Monitor) Instances(key *aurora.JobKey, instances int32, interval, timeout int) (bool, error) { return m.ScheduleStatus(key, instances, LiveStates, interval, timeout) } diff --git a/realis.go b/realis.go index 0464908..8f2767d 100644 --- a/realis.go +++ b/realis.go @@ -18,11 +18,14 @@ package realis import ( "context" "crypto/tls" + "crypto/x509" "encoding/base64" "fmt" + "io/ioutil" "log" "net/http" "os" + "path/filepath" "sort" "strings" "sync" @@ -35,7 +38,7 @@ import ( "github.com/paypal/gorealis/response" ) -const version = "1.24.1" +const version = "1.21.1" // Realis is an interface that defines the various APIs that may be used to communicate with // the Apache Aurora scheduler. @@ -65,6 +68,7 @@ type Realis interface { RollbackJobUpdate(key aurora.JobUpdateKey, message string) (*aurora.Response, error) ScheduleCronJob(auroraJob Job) (*aurora.Response, error) StartJobUpdate(updateJob *UpdateJob, message string) (*aurora.Response, error) + PauseJobUpdate(key *aurora.JobUpdateKey, message string) (*aurora.Response, error) ResumeJobUpdate(key *aurora.JobUpdateKey, message string) (*aurora.Response, error) PulseJobUpdate(key *aurora.JobUpdateKey) (*aurora.Response, error) @@ -113,7 +117,6 @@ type config struct { logger *LevelLogger insecureSkipVerify bool certspath string - certExtensions map[string]struct{} clientKey, clientCert string options []ClientOption debug bool @@ -129,15 +132,6 @@ var defaultBackoff = Backoff{ Jitter: 0.1, } -var defaultSlaPolicy = aurora.SlaPolicy{ - PercentageSlaPolicy: &aurora.PercentageSlaPolicy{ - Percentage: 66, - DurationSecs: 300, - }, -} - -const defaultSlaDrainTimeoutSecs = 900 - // ClientOption is an alias for a function that modifies the realis config object type ClientOption func(*config) @@ -235,18 +229,6 @@ func ClientCerts(clientKey, clientCert string) ClientOption { } } -// CertExtensions configures gorealis to consider files with the given extensions when -// loading certificates from the cert path. -func CertExtensions(extensions ...string) ClientOption { - extensionsLookup := make(map[string]struct{}) - for _, ext := range extensions { - extensionsLookup[ext] = struct{}{} - } - return func(config *config) { - config.certExtensions = extensionsLookup - } -} - // ZookeeperOptions allows users to override default settings for connecting to Zookeeper. // See zk.go for what is possible to set as an option. func ZookeeperOptions(opts ...ZKOpt) ClientOption { @@ -329,7 +311,6 @@ func NewRealisClient(options ...ClientOption) (Realis, error) { config.timeoutms = 10000 config.backoff = defaultBackoff config.logger = &LevelLogger{logger: log.New(os.Stdout, "realis: ", log.Ltime|log.Ldate|log.LUTC)} - config.certExtensions = map[string]struct{}{".crt": {}, ".pem": {}, ".key": {}} // Save options to recreate client if a connection error happens config.options = options @@ -394,7 +375,7 @@ func NewRealisClient(options ...ClientOption) (Realis, error) { return nil, errors.New("incomplete Options -- url, cluster.json, or Zookeeper address required") } - config.logger.Println("Address obtained: ", url) + config.logger.Println("Addresss obtained: ", url) url, err = validateAuroraURL(url) if err != nil { return nil, errors.Wrap(err, "invalid Aurora url") @@ -436,8 +417,7 @@ func NewRealisClient(options ...ClientOption) (Realis, error) { adminClient: aurora.NewAuroraAdminClientFactory(config.transport, config.protoFactory), logger: LevelLogger{logger: config.logger, debug: config.debug, trace: config.trace}, lock: &sync.Mutex{}, - transport: config.transport, - }, nil + transport: config.transport}, nil } // GetDefaultClusterFromZKUrl creates a cluster object from a Zoookeper url. This is deprecated in favor of using @@ -453,6 +433,23 @@ func GetDefaultClusterFromZKUrl(zkurl string) *Cluster { } } +func createCertPool(certPath string) (*x509.CertPool, error) { + globalRootCAs := x509.NewCertPool() + caFiles, err := ioutil.ReadDir(certPath) + if err != nil { + return nil, err + } + for _, cert := range caFiles { + caPathFile := filepath.Join(certPath, cert.Name()) + caCert, err := ioutil.ReadFile(caPathFile) + if err != nil { + return nil, err + } + globalRootCAs.AppendCertsFromPEM(caCert) + } + return globalRootCAs, nil +} + // Creates a default Thrift Transport object for communications in gorealis using an HTTP Post Client func defaultTTransport(url string, timeoutMs int, config *config) (thrift.TTransport, error) { var transport http.Transport @@ -460,7 +457,7 @@ func defaultTTransport(url string, timeoutMs int, config *config) (thrift.TTrans tlsConfig := &tls.Config{InsecureSkipVerify: config.insecureSkipVerify} if config.certspath != "" { - rootCAs, err := createCertPool(config.certspath, config.certExtensions) + rootCAs, err := createCertPool(config.certspath) if err != nil { config.logger.Println("error occurred couldn't fetch certs") return nil, err @@ -494,11 +491,11 @@ func defaultTTransport(url string, timeoutMs int, config *config) (thrift.TTrans }) if err != nil { - return nil, errors.Wrap(err, "error creating transport") + return nil, errors.Wrap(err, "Error creating transport") } if err := trans.Open(); err != nil { - return nil, errors.Wrapf(err, "error opening connection to %s", url) + return nil, errors.Wrapf(err, "Error opening connection to %s", url) } return trans, nil @@ -512,10 +509,6 @@ func basicAuth(username, password string) string { func (r *realisClient) ReestablishConn() error { // Close existing connection r.logger.Println("Re-establishing Connection to Aurora") - - // This call must happen before we lock as it also uses - // the same lock from the client since close can be called - // by anyone from anywhere. r.Close() r.lock.Lock() @@ -541,17 +534,16 @@ func (r *realisClient) ReestablishConn() error { return nil } -// Close releases resources associated with the realis client. +// Releases resources associated with the realis client. func (r *realisClient) Close() { r.lock.Lock() defer r.lock.Unlock() - // The return value of Close here is ignored on purpose because there's nothing that can be done if it fails. - _ = r.transport.Close() + r.transport.Close() } -// GetInstanceIds uses a predefined set of states to retrieve a set of active jobs in the Aurora Scheduler. +// Uses predefined set of states to retrieve a set of active jobs in Apache Aurora. func (r *realisClient) GetInstanceIds(key *aurora.JobKey, states []aurora.ScheduleStatus) ([]int32, error) { taskQ := &aurora.TaskQuery{ JobKeys: []*aurora.JobKey{{Environment: key.Environment, Role: key.Role, Name: key.Name}}, @@ -564,9 +556,7 @@ func (r *realisClient) GetInstanceIds(key *aurora.JobKey, states []aurora.Schedu false, func() (*aurora.Response, error) { return r.client.GetTasksWithoutConfigs(context.TODO(), taskQ) - }, - nil, - ) + }) // If we encountered an error we couldn't recover from by retrying, return an error to the user if retryErr != nil { @@ -591,16 +581,10 @@ func (r *realisClient) GetJobUpdateSummaries(jobUpdateQuery *aurora.JobUpdateQue false, func() (*aurora.Response, error) { return r.readonlyClient.GetJobUpdateSummaries(context.TODO(), jobUpdateQuery) - }, - nil, - ) + }) if retryErr != nil { - return resp, errors.Wrap(retryErr, "error getting job update summaries from Aurora Scheduler") - } - - if resp.GetResult_() == nil || resp.GetResult_().GetGetJobUpdateSummariesResult_() == nil { - return nil, errors.New("unexpected response from scheduler") + return nil, errors.Wrap(retryErr, "error getting job update summaries from Aurora Scheduler") } return resp, nil @@ -614,9 +598,7 @@ func (r *realisClient) GetJobs(role string) (*aurora.Response, *aurora.GetJobsRe false, func() (*aurora.Response, error) { return r.readonlyClient.GetJobs(context.TODO(), role) - }, - nil, - ) + }) if retryErr != nil { return nil, result, errors.Wrap(retryErr, "error getting Jobs from Aurora Scheduler") @@ -629,7 +611,7 @@ func (r *realisClient) GetJobs(role string) (*aurora.Response, *aurora.GetJobsRe return resp, result, nil } -// KillInstances kills specific instances of a job. +// Kill specific instances of a job. func (r *realisClient) KillInstances(key *aurora.JobKey, instances ...int32) (*aurora.Response, error) { r.logger.debugPrintf("KillTasks Thrift Payload: %+v %v\n", key, instances) @@ -637,9 +619,7 @@ func (r *realisClient) KillInstances(key *aurora.JobKey, instances ...int32) (*a false, func() (*aurora.Response, error) { return r.client.KillTasks(context.TODO(), key, instances, "") - }, - nil, - ) + }) if retryErr != nil { return nil, errors.Wrap(retryErr, "error sending Kill command to Aurora Scheduler") @@ -651,7 +631,7 @@ func (r *realisClient) RealisConfig() *config { return r.config } -// KillJob kills all instances of a job. +// Sends a kill message to the scheduler for all active tasks under a job. func (r *realisClient) KillJob(key *aurora.JobKey) (*aurora.Response, error) { r.logger.debugPrintf("KillTasks Thrift Payload: %+v\n", key) @@ -661,9 +641,7 @@ func (r *realisClient) KillJob(key *aurora.JobKey) (*aurora.Response, error) { func() (*aurora.Response, error) { // Giving the KillTasks thrift call an empty set tells the Aurora scheduler to kill all active shards return r.client.KillTasks(context.TODO(), key, nil, "") - }, - nil, - ) + }) if retryErr != nil { return nil, errors.Wrap(retryErr, "error sending Kill command to Aurora Scheduler") @@ -671,7 +649,7 @@ func (r *realisClient) KillJob(key *aurora.JobKey) (*aurora.Response, error) { return resp, nil } -// CreateJob sends a create job message to the scheduler with a specific job configuration. +// Sends a create job message to the scheduler with a specific job configuration. // Although this API is able to create service jobs, it is better to use CreateService instead // as that API uses the update thrift call which has a few extra features available. // Use this API to create ad-hoc jobs. @@ -679,36 +657,19 @@ func (r *realisClient) CreateJob(auroraJob Job) (*aurora.Response, error) { r.logger.debugPrintf("CreateJob Thrift Payload: %+v\n", auroraJob.JobConfig()) - // Response is checked by the thrift retry code resp, retryErr := r.thriftCallWithRetries( false, func() (*aurora.Response, error) { return r.client.CreateJob(context.TODO(), auroraJob.JobConfig()) - }, - // On a client timeout, attempt to verify that payload made to the Scheduler by - // trying to get the config summary for the job key - func() (*aurora.Response, bool) { - exists, err := r.jobExists(*auroraJob.JobKey()) - if err != nil { - r.logger.Print("verification failed ", err) - } - - if exists { - return &aurora.Response{ResponseCode: aurora.ResponseCode_OK}, true - } - - return nil, false - }, - ) + }) if retryErr != nil { return resp, errors.Wrap(retryErr, "error sending Create command to Aurora Scheduler") } - return resp, nil } -// CreateService uses the scheduler's updating mechanism to create a job. +// This API uses an update thrift call to create the services giving a few more robust features. func (r *realisClient) CreateService( auroraJob Job, settings *aurora.JobUpdateSettings) (*aurora.Response, *aurora.StartJobUpdateResult_, error) { @@ -719,12 +680,17 @@ func (r *realisClient) CreateService( resp, err := r.StartJobUpdate(update, "") if err != nil { if IsTimeout(err) { - return nil, nil, err + return resp, nil, err } + return resp, nil, errors.Wrap(err, "unable to create service") } - return resp, resp.GetResult_().StartJobUpdateResult_, nil + if resp.GetResult_() != nil { + return resp, resp.GetResult_().GetStartJobUpdateResult_(), nil + } + + return nil, nil, errors.New("results object is nil") } func (r *realisClient) ScheduleCronJob(auroraJob Job) (*aurora.Response, error) { @@ -734,9 +700,7 @@ func (r *realisClient) ScheduleCronJob(auroraJob Job) (*aurora.Response, error) false, func() (*aurora.Response, error) { return r.client.ScheduleCronJob(context.TODO(), auroraJob.JobConfig()) - }, - nil, - ) + }) if retryErr != nil { return nil, errors.Wrap(retryErr, "error sending Cron Job Schedule message to Aurora Scheduler") @@ -752,9 +716,7 @@ func (r *realisClient) DescheduleCronJob(key *aurora.JobKey) (*aurora.Response, false, func() (*aurora.Response, error) { return r.client.DescheduleCronJob(context.TODO(), key) - }, - nil, - ) + }) if retryErr != nil { return nil, errors.Wrap(retryErr, "error sending Cron Job De-schedule message to Aurora Scheduler") @@ -772,9 +734,7 @@ func (r *realisClient) StartCronJob(key *aurora.JobKey) (*aurora.Response, error false, func() (*aurora.Response, error) { return r.client.StartCronJob(context.TODO(), key) - }, - nil, - ) + }) if retryErr != nil { return nil, errors.Wrap(retryErr, "error sending Start Cron Job message to Aurora Scheduler") @@ -783,7 +743,7 @@ func (r *realisClient) StartCronJob(key *aurora.JobKey) (*aurora.Response, error } -// RestartInstances restarts the specified instances of a Job. +// Restarts specific instances specified func (r *realisClient) RestartInstances(key *aurora.JobKey, instances ...int32) (*aurora.Response, error) { r.logger.debugPrintf("RestartShards Thrift Payload: %+v %v\n", key, instances) @@ -791,9 +751,7 @@ func (r *realisClient) RestartInstances(key *aurora.JobKey, instances ...int32) false, func() (*aurora.Response, error) { return r.client.RestartShards(context.TODO(), key, instances) - }, - nil, - ) + }) if retryErr != nil { return nil, errors.Wrap(retryErr, "error sending Restart command to Aurora Scheduler") @@ -801,12 +759,12 @@ func (r *realisClient) RestartInstances(key *aurora.JobKey, instances ...int32) return resp, nil } -// RestartJob restarts all active instances of a Job. +// Restarts all active tasks under a job configuration. func (r *realisClient) RestartJob(key *aurora.JobKey) (*aurora.Response, error) { instanceIds, err1 := r.GetInstanceIds(key, aurora.ACTIVE_STATES) if err1 != nil { - return nil, errors.Wrap(err1, "could not retrieve relevant task instance IDs") + return nil, errors.Wrap(err1, "Could not retrieve relevant task instance IDs") } r.logger.debugPrintf("RestartShards Thrift Payload: %+v %v\n", key, instanceIds) @@ -816,9 +774,7 @@ func (r *realisClient) RestartJob(key *aurora.JobKey) (*aurora.Response, error) false, func() (*aurora.Response, error) { return r.client.RestartShards(context.TODO(), key, instanceIds) - }, - nil, - ) + }) if retryErr != nil { return nil, errors.Wrap(retryErr, "error sending Restart command to Aurora Scheduler") @@ -830,7 +786,7 @@ func (r *realisClient) RestartJob(key *aurora.JobKey) (*aurora.Response, error) return nil, errors.New("No tasks in the Active state") } -// StartJobUpdate updates all instances under a job configuration. +// Update all tasks under a job configuration. Currently gorealis doesn't support for canary deployments. func (r *realisClient) StartJobUpdate(updateJob *UpdateJob, message string) (*aurora.Response, error) { r.logger.debugPrintf("StartJobUpdate Thrift Payload: %+v %v\n", updateJob, message) @@ -839,56 +795,20 @@ func (r *realisClient) StartJobUpdate(updateJob *UpdateJob, message string) (*au true, func() (*aurora.Response, error) { return r.client.StartJobUpdate(context.TODO(), updateJob.req, message) - }, - func() (*aurora.Response, bool) { - summariesResp, err := r.readonlyClient.GetJobUpdateSummaries( - context.TODO(), - &aurora.JobUpdateQuery{ - JobKey: updateJob.JobKey(), - UpdateStatuses: aurora.ACTIVE_JOB_UPDATE_STATES, - Limit: 1, - }) - - if err != nil { - r.logger.Print("verification failed ", err) - return nil, false - } - - summaries := response.JobUpdateSummaries(summariesResp) - if len(summaries) == 0 { - return nil, false - } - - return &aurora.Response{ - ResponseCode: aurora.ResponseCode_OK, - Result_: &aurora.Result_{ - StartJobUpdateResult_: &aurora.StartJobUpdateResult_{ - UpdateSummary: summaries[0], - Key: summaries[0].Key, - }, - }, - }, true - }, - ) + }) if retryErr != nil { // A timeout took place when attempting this call, attempt to recover if IsTimeout(retryErr) { - return nil, retryErr + return resp, retryErr } return resp, errors.Wrap(retryErr, "error sending StartJobUpdate command to Aurora Scheduler") } - - if resp.GetResult_() == nil { - return resp, errors.New("no result in response") - } - return resp, nil } -// AbortJobUpdate terminates a job update in the scheduler. -// It requires the updateId which can be obtained on the Aurora web UI. +// Abort Job Update on Aurora. Requires the updateId which can be obtained on the Aurora web UI. // This API is meant to be synchronous. It will attempt to wait until the update transitions to the aborted state. // However, if the job update does not transition to the ABORT state an error will be returned. func (r *realisClient) AbortJobUpdate(updateKey aurora.JobUpdateKey, message string) (*aurora.Response, error) { @@ -899,9 +819,7 @@ func (r *realisClient) AbortJobUpdate(updateKey aurora.JobUpdateKey, message str false, func() (*aurora.Response, error) { return r.client.AbortJobUpdate(context.TODO(), &updateKey, message) - }, - nil, - ) + }) if retryErr != nil { return nil, errors.Wrap(retryErr, "error sending AbortJobUpdate command to Aurora Scheduler") @@ -918,8 +836,7 @@ func (r *realisClient) AbortJobUpdate(updateKey aurora.JobUpdateKey, message str return resp, err } -// PauseJobUpdate pauses the progress of an ongoing update. -// The UpdateID value needed for this function is returned from StartJobUpdate or can be obtained from the Aurora web UI. +// Pause Job Update. UpdateID is returned from StartJobUpdate or the Aurora web UI. func (r *realisClient) PauseJobUpdate(updateKey *aurora.JobUpdateKey, message string) (*aurora.Response, error) { r.logger.debugPrintf("PauseJobUpdate Thrift Payload: %+v %v\n", updateKey, message) @@ -928,9 +845,7 @@ func (r *realisClient) PauseJobUpdate(updateKey *aurora.JobUpdateKey, message st false, func() (*aurora.Response, error) { return r.client.PauseJobUpdate(context.TODO(), updateKey, message) - }, - nil, - ) + }) if retryErr != nil { return nil, errors.Wrap(retryErr, "error sending PauseJobUpdate command to Aurora Scheduler") @@ -939,7 +854,7 @@ func (r *realisClient) PauseJobUpdate(updateKey *aurora.JobUpdateKey, message st return resp, nil } -// ResumeJobUpdate resumes a previously Paused Job update. +// Resume Paused Job Update. UpdateID is returned from StartJobUpdate or the Aurora web UI. func (r *realisClient) ResumeJobUpdate(updateKey *aurora.JobUpdateKey, message string) (*aurora.Response, error) { r.logger.debugPrintf("ResumeJobUpdate Thrift Payload: %+v %v\n", updateKey, message) @@ -948,9 +863,7 @@ func (r *realisClient) ResumeJobUpdate(updateKey *aurora.JobUpdateKey, message s false, func() (*aurora.Response, error) { return r.client.ResumeJobUpdate(context.TODO(), updateKey, message) - }, - nil, - ) + }) if retryErr != nil { return nil, errors.Wrap(retryErr, "error sending ResumeJobUpdate command to Aurora Scheduler") @@ -959,7 +872,7 @@ func (r *realisClient) ResumeJobUpdate(updateKey *aurora.JobUpdateKey, message s return resp, nil } -// PulseJobUpdate sends a pulse to an ongoing Job update. +// Pulse Job Update on Aurora. UpdateID is returned from StartJobUpdate or the Aurora web UI. func (r *realisClient) PulseJobUpdate(updateKey *aurora.JobUpdateKey) (*aurora.Response, error) { r.logger.debugPrintf("PulseJobUpdate Thrift Payload: %+v\n", updateKey) @@ -968,9 +881,7 @@ func (r *realisClient) PulseJobUpdate(updateKey *aurora.JobUpdateKey) (*aurora.R false, func() (*aurora.Response, error) { return r.client.PulseJobUpdate(context.TODO(), updateKey) - }, - nil, - ) + }) if retryErr != nil { return nil, errors.Wrap(retryErr, "error sending PulseJobUpdate command to Aurora Scheduler") @@ -979,7 +890,8 @@ func (r *realisClient) PulseJobUpdate(updateKey *aurora.JobUpdateKey) (*aurora.R return resp, nil } -// AddInstances scales up the number of instances for a Job. +// Scale up the number of instances under a job configuration using the configuration for specific +// instance to scale up. func (r *realisClient) AddInstances(instKey aurora.InstanceKey, count int32) (*aurora.Response, error) { r.logger.debugPrintf("AddInstances Thrift Payload: %+v %v\n", instKey, count) @@ -988,9 +900,7 @@ func (r *realisClient) AddInstances(instKey aurora.InstanceKey, count int32) (*a false, func() (*aurora.Response, error) { return r.client.AddInstances(context.TODO(), &instKey, count) - }, - nil, - ) + }) if retryErr != nil { return nil, errors.Wrap(retryErr, "error sending AddInstances command to Aurora Scheduler") @@ -999,15 +909,15 @@ func (r *realisClient) AddInstances(instKey aurora.InstanceKey, count int32) (*a } -// RemoveInstances scales down the number of instances for a Job. +// Scale down the number of instances under a job configuration using the configuration of a specific instance func (r *realisClient) RemoveInstances(key *aurora.JobKey, count int32) (*aurora.Response, error) { instanceIds, err := r.GetInstanceIds(key, aurora.ACTIVE_STATES) if err != nil { - return nil, errors.Wrap(err, "could not retrieve relevant instance IDs") + return nil, errors.Wrap(err, "RemoveInstances: Could not retrieve relevant instance IDs") } if len(instanceIds) < int(count) { - return nil, errors.Errorf("insufficient active instances available for killing: "+ + return nil, errors.Errorf("Insufficient active instances available for killing: "+ " Instances to be killed %d Active instances %d", count, len(instanceIds)) } @@ -1020,7 +930,7 @@ func (r *realisClient) RemoveInstances(key *aurora.JobKey, count int32) (*aurora return r.KillInstances(key, instanceIds[:count]...) } -// GetTaskStatus gets information about task including a fully hydrated task configuration object. +// Get information about task including a fully hydrated task configuration object func (r *realisClient) GetTaskStatus(query *aurora.TaskQuery) ([]*aurora.ScheduledTask, error) { r.logger.debugPrintf("GetTasksStatus Thrift Payload: %+v\n", query) @@ -1029,9 +939,7 @@ func (r *realisClient) GetTaskStatus(query *aurora.TaskQuery) ([]*aurora.Schedul false, func() (*aurora.Response, error) { return r.client.GetTasksStatus(context.TODO(), query) - }, - nil, - ) + }) if retryErr != nil { return nil, errors.Wrap(retryErr, "error querying Aurora Scheduler for task status") @@ -1040,7 +948,7 @@ func (r *realisClient) GetTaskStatus(query *aurora.TaskQuery) ([]*aurora.Schedul return response.ScheduleStatusResult(resp).GetTasks(), nil } -// GetPendingReason returns the reason why the an instance of a Job has not been scheduled. +// Get pending reason func (r *realisClient) GetPendingReason(query *aurora.TaskQuery) ([]*aurora.PendingReason, error) { r.logger.debugPrintf("GetPendingReason Thrift Payload: %+v\n", query) @@ -1049,9 +957,7 @@ func (r *realisClient) GetPendingReason(query *aurora.TaskQuery) ([]*aurora.Pend false, func() (*aurora.Response, error) { return r.client.GetPendingReason(context.TODO(), query) - }, - nil, - ) + }) if retryErr != nil { return nil, errors.Wrap(retryErr, "error querying Aurora Scheduler for pending Reasons") @@ -1066,8 +972,7 @@ func (r *realisClient) GetPendingReason(query *aurora.TaskQuery) ([]*aurora.Pend return pendingReasons, nil } -// GetTasksWithoutConfigs gets information about task including without a task configuration object. -// This is a more lightweight version of GetTaskStatus but contains less information as a result. +// Get information about task including without a task configuration object func (r *realisClient) GetTasksWithoutConfigs(query *aurora.TaskQuery) ([]*aurora.ScheduledTask, error) { r.logger.debugPrintf("GetTasksWithoutConfigs Thrift Payload: %+v\n", query) @@ -1076,9 +981,7 @@ func (r *realisClient) GetTasksWithoutConfigs(query *aurora.TaskQuery) ([]*auror false, func() (*aurora.Response, error) { return r.client.GetTasksWithoutConfigs(context.TODO(), query) - }, - nil, - ) + }) if retryErr != nil { return nil, errors.Wrap(retryErr, "error querying Aurora Scheduler for task status without configs") @@ -1088,7 +991,7 @@ func (r *realisClient) GetTasksWithoutConfigs(query *aurora.TaskQuery) ([]*auror } -// FetchTaskConfig gets the task configuration from the aurora scheduler for a job. +// Get the task configuration from the aurora scheduler for a job func (r *realisClient) FetchTaskConfig(instKey aurora.InstanceKey) (*aurora.TaskConfig, error) { taskQ := &aurora.TaskQuery{ Role: &instKey.JobKey.Role, @@ -1104,9 +1007,7 @@ func (r *realisClient) FetchTaskConfig(instKey aurora.InstanceKey) (*aurora.Task false, func() (*aurora.Response, error) { return r.client.GetTasksStatus(context.TODO(), taskQ) - }, - nil, - ) + }) if retryErr != nil { return nil, errors.Wrap(retryErr, "error querying Aurora Scheduler for task configuration") @@ -1115,7 +1016,7 @@ func (r *realisClient) FetchTaskConfig(instKey aurora.InstanceKey) (*aurora.Task tasks := response.ScheduleStatusResult(resp).GetTasks() if len(tasks) == 0 { - return nil, errors.Errorf("instance %d for jobkey %s/%s/%s doesn't exist", + return nil, errors.Errorf("Instance %d for jobkey %s/%s/%s doesn't exist", instKey.InstanceId, instKey.JobKey.Environment, instKey.JobKey.Role, @@ -1134,12 +1035,10 @@ func (r *realisClient) JobUpdateDetails(updateQuery aurora.JobUpdateQuery) (*aur false, func() (*aurora.Response, error) { return r.client.GetJobUpdateDetails(context.TODO(), &updateQuery) - }, - nil, - ) + }) if retryErr != nil { - return nil, errors.Wrap(retryErr, "unable to get job update details") + return nil, errors.Wrap(retryErr, "Unable to get job update details") } return resp, nil @@ -1153,9 +1052,7 @@ func (r *realisClient) RollbackJobUpdate(key aurora.JobUpdateKey, message string false, func() (*aurora.Response, error) { return r.client.RollbackJobUpdate(context.TODO(), &key, message) - }, - nil, - ) + }) if retryErr != nil { return nil, errors.Wrap(retryErr, "unable to roll back job update") diff --git a/realis_admin.go b/realis_admin.go index 9c58081..184ae55 100644 --- a/realis_admin.go +++ b/realis_admin.go @@ -30,9 +30,7 @@ func (r *realisClient) DrainHosts(hosts ...string) (*aurora.Response, *aurora.Dr false, func() (*aurora.Response, error) { return r.adminClient.DrainHosts(context.TODO(), drainList) - }, - nil, - ) + }) if retryErr != nil { return resp, result, errors.Wrap(retryErr, "Unable to recover connection") @@ -58,18 +56,6 @@ func (r *realisClient) SLADrainHosts( return nil, errors.New("no hosts provided to drain") } - if policy == nil || policy.CountSetFieldsSlaPolicy() == 0 { - policy = &defaultSlaPolicy - r.logger.Printf("Warning: start draining with default sla policy %v", policy) - } - - if timeout < 0 { - r.logger.Printf("Warning: timeout %d secs is invalid, draining with default timeout %d secs", - timeout, - defaultSlaDrainTimeoutSecs) - timeout = defaultSlaDrainTimeoutSecs - } - drainList := aurora.NewHosts() drainList.HostNames = hosts @@ -79,9 +65,7 @@ func (r *realisClient) SLADrainHosts( false, func() (*aurora.Response, error) { return r.adminClient.SlaDrainHosts(context.TODO(), drainList, policy, timeout) - }, - nil, - ) + }) if retryErr != nil { return result, errors.Wrap(retryErr, "Unable to recover connection") @@ -111,9 +95,7 @@ func (r *realisClient) StartMaintenance(hosts ...string) (*aurora.Response, *aur false, func() (*aurora.Response, error) { return r.adminClient.StartMaintenance(context.TODO(), hostList) - }, - nil, - ) + }) if retryErr != nil { return resp, result, errors.Wrap(retryErr, "Unable to recover connection") @@ -143,9 +125,7 @@ func (r *realisClient) EndMaintenance(hosts ...string) (*aurora.Response, *auror false, func() (*aurora.Response, error) { return r.adminClient.EndMaintenance(context.TODO(), hostList) - }, - nil, - ) + }) if retryErr != nil { return resp, result, errors.Wrap(retryErr, "Unable to recover connection") @@ -177,9 +157,7 @@ func (r *realisClient) MaintenanceStatus(hosts ...string) (*aurora.Response, *au false, func() (*aurora.Response, error) { return r.adminClient.MaintenanceStatus(context.TODO(), hostList) - }, - nil, - ) + }) if retryErr != nil { return resp, result, errors.Wrap(retryErr, "Unable to recover connection") @@ -204,9 +182,7 @@ func (r *realisClient) SetQuota(role string, cpu *float64, ramMb *int64, diskMb false, func() (*aurora.Response, error) { return r.adminClient.SetQuota(context.TODO(), role, quota) - }, - nil, - ) + }) if retryErr != nil { return resp, errors.Wrap(retryErr, "Unable to set role quota") @@ -222,9 +198,7 @@ func (r *realisClient) GetQuota(role string) (*aurora.Response, error) { false, func() (*aurora.Response, error) { return r.adminClient.GetQuota(context.TODO(), role) - }, - nil, - ) + }) if retryErr != nil { return resp, errors.Wrap(retryErr, "Unable to get role quota") @@ -239,9 +213,7 @@ func (r *realisClient) Snapshot() error { false, func() (*aurora.Response, error) { return r.adminClient.Snapshot(context.TODO()) - }, - nil, - ) + }) if retryErr != nil { return errors.Wrap(retryErr, "Unable to recover connection") @@ -257,9 +229,7 @@ func (r *realisClient) PerformBackup() error { false, func() (*aurora.Response, error) { return r.adminClient.PerformBackup(context.TODO()) - }, - nil, - ) + }) if retryErr != nil { return errors.Wrap(retryErr, "Unable to recover connection") @@ -274,9 +244,7 @@ func (r *realisClient) ForceImplicitTaskReconciliation() error { false, func() (*aurora.Response, error) { return r.adminClient.TriggerImplicitTaskReconciliation(context.TODO()) - }, - nil, - ) + }) if retryErr != nil { return errors.Wrap(retryErr, "Unable to recover connection") @@ -297,9 +265,7 @@ func (r *realisClient) ForceExplicitTaskReconciliation(batchSize *int32) error { _, retryErr := r.thriftCallWithRetries(false, func() (*aurora.Response, error) { return r.adminClient.TriggerExplicitTaskReconciliation(context.TODO(), settings) - }, - nil, - ) + }) if retryErr != nil { return errors.Wrap(retryErr, "Unable to recover connection") diff --git a/realis_e2e_test.go b/realis_e2e_test.go index 78d8f0e..999f2b9 100644 --- a/realis_e2e_test.go +++ b/realis_e2e_test.go @@ -306,40 +306,6 @@ func TestRealisClient_CreateJob_Thermos(t *testing.T) { _, err = r.KillJob(job.JobKey()) assert.NoError(t, err) }) - - t.Run("Duplicate_constraints", func(t *testing.T) { - job.Name("thermos_duplicate_constraints"). - AddValueConstraint("zone", false, "east", "west"). - AddValueConstraint("zone", false, "east"). - AddValueConstraint("zone", true, "west") - - _, err := r.CreateJob(job) - require.NoError(t, err) - - success, err := monitor.Instances(job.JobKey(), 2, 1, 50) - assert.True(t, success) - assert.NoError(t, err) - - _, err = r.KillJob(job.JobKey()) - assert.NoError(t, err) - }) - - t.Run("Overwrite_constraints", func(t *testing.T) { - job.Name("thermos_overwrite_constraints"). - AddLimitConstraint("zone", 1). - AddValueConstraint("zone", true, "west", "east"). - AddLimitConstraint("zone", 2) - - _, err := r.CreateJob(job) - require.NoError(t, err) - - success, err := monitor.Instances(job.JobKey(), 2, 1, 50) - assert.True(t, success) - assert.NoError(t, err) - - _, err = r.KillJob(job.JobKey()) - assert.NoError(t, err) - }) } // Test configuring an executor that doesn't exist for CreateJob API @@ -539,7 +505,7 @@ func TestRealisClient_CreateService(t *testing.T) { timeoutClient, err := realis.NewRealisClient( realis.SchedulerUrl(auroraURL), realis.BasicAuth("aurora", "secret"), - realis.TimeoutMS(5), + realis.TimeoutMS(10), ) require.NoError(t, err) defer timeoutClient.Close() @@ -750,53 +716,6 @@ func TestRealisClient_SLADrainHosts(t *testing.T) { 5, 10) assert.NoError(t, err) - - // slaDrainHosts goes with default policy if no policy is specified - _, err = r.SLADrainHosts(nil, 30, hosts...) - require.NoError(t, err, "unable to drain host with SLA policy") - - // Monitor change to DRAINING and DRAINED mode - hostResults, err = monitor.HostMaintenance( - hosts, - []aurora.MaintenanceMode{aurora.MaintenanceMode_DRAINED, aurora.MaintenanceMode_DRAINING}, - 1, - 50) - assert.NoError(t, err) - assert.Equal(t, map[string]bool{"localhost": true}, hostResults) - - _, _, err = r.EndMaintenance(hosts...) - require.NoError(t, err) - - // Monitor change to DRAINING and DRAINED mode - _, err = monitor.HostMaintenance( - hosts, - []aurora.MaintenanceMode{aurora.MaintenanceMode_NONE}, - 5, - 10) - assert.NoError(t, err) - - _, err = r.SLADrainHosts(&aurora.SlaPolicy{}, 30, hosts...) - require.NoError(t, err, "unable to drain host with SLA policy") - - // Monitor change to DRAINING and DRAINED mode - hostResults, err = monitor.HostMaintenance( - hosts, - []aurora.MaintenanceMode{aurora.MaintenanceMode_DRAINED, aurora.MaintenanceMode_DRAINING}, - 1, - 50) - assert.NoError(t, err) - assert.Equal(t, map[string]bool{"localhost": true}, hostResults) - - _, _, err = r.EndMaintenance(hosts...) - require.NoError(t, err) - - // Monitor change to DRAINING and DRAINED mode - _, err = monitor.HostMaintenance( - hosts, - []aurora.MaintenanceMode{aurora.MaintenanceMode_NONE}, - 5, - 10) - assert.NoError(t, err) } // Test multiple go routines using a single connection @@ -1106,10 +1025,8 @@ func TestRealisClient_BatchAwareAutoPause(t *testing.T) { assert.Equal(t, i, curStep) - if i != len(updateGroups)-1 { - _, err = r.ResumeJobUpdate(&key, "auto resuming test") - require.NoError(t, err) - } + _, err = r.ResumeJobUpdate(&key, "auto resuming test") + require.NoError(t, err) } _, err = r.KillJob(job.JobKey()) diff --git a/response/response.go b/response/response.go index 4a67ca0..b77348d 100644 --- a/response/response.go +++ b/response/response.go @@ -36,10 +36,6 @@ func ScheduleStatusResult(resp *aurora.Response) *aurora.ScheduleStatusResult_ { } func JobUpdateSummaries(resp *aurora.Response) []*aurora.JobUpdateSummary { - if resp.GetResult_() == nil || resp.GetResult_().GetGetJobUpdateSummariesResult_() == nil { - return nil - } - return resp.GetResult_().GetGetJobUpdateSummariesResult_().GetUpdateSummaries() } diff --git a/retry.go b/retry.go index eefcf2a..77b02d5 100644 --- a/retry.go +++ b/retry.go @@ -114,19 +114,10 @@ func ExponentialBackoff(backoff Backoff, logger logger, condition ConditionFunc) type auroraThriftCall func() (resp *aurora.Response, err error) -// verifyOntimeout defines the type of function that will be used to verify whether a Thirft call to the Scheduler -// made it to the scheduler or not. In general, these types of functions will have to interact with the scheduler -// through the very same Thrift API which previously encountered a time out from the client. -// This means that the functions themselves should be kept to a minimum number of Thrift calls. -// It should also be noted that this is a best effort mechanism and -// is likely to fail for the same reasons that the original call failed. -type verifyOnTimeout func() (*aurora.Response, bool) - // Duplicates the functionality of ExponentialBackoff but is specifically targeted towards ThriftCalls. func (r *realisClient) thriftCallWithRetries( returnOnTimeout bool, - thriftCall auroraThriftCall, - verifyOnTimeout verifyOnTimeout) (*aurora.Response, error) { + thriftCall auroraThriftCall) (*aurora.Response, error) { var resp *aurora.Response var clientErr error @@ -146,7 +137,7 @@ func (r *realisClient) thriftCallWithRetries( } r.logger.Printf( - "A retryable error occurred during thrift call, backing off for %v before retry %v", + "A retryable error occurred during thrift call, backing off for %v before retry %v\n", adjusted, curStep) @@ -163,25 +154,45 @@ func (r *realisClient) thriftCallWithRetries( resp, clientErr = thriftCall() - r.logger.tracePrintf("Aurora Thrift Call ended resp: %v clientErr: %v", resp, clientErr) + r.logger.tracePrintf("Aurora Thrift Call ended resp: %v clientErr: %v\n", resp, clientErr) }() - // Check if our thrift call is returning an error. + // Check if our thrift call is returning an error. This is a retryable event as we don't know + // if it was caused by network issues. if clientErr != nil { + // Print out the error to the user - r.logger.Printf("Client Error: %v", clientErr) + r.logger.Printf("Client Error: %v\n", clientErr) - temporary, timedout := isConnectionError(clientErr) - if !temporary && r.RealisConfig().failOnPermanentErrors { - return nil, errors.Wrap(clientErr, "permanent connection error") - } + // Determine if error is a temporary URL error by going up the stack + e, ok := clientErr.(thrift.TTransportException) + if ok { + r.logger.debugPrint("Encountered a transport exception") - // There exists a corner case where thrift payload was received by Aurora but - // connection timed out before Aurora was able to reply. - // Users can take special action on a timeout by using IsTimedout and reacting accordingly - // if they have configured the client to return on a timeout. - if timedout && returnOnTimeout { - return resp, newTimedoutError(errors.New("client connection closed before server answer")) + e, ok := e.Err().(*url.Error) + if ok { + + // EOF error occurs when the server closes the read buffer of the client. This is common + // when the server is overloaded and should be retried. All other errors that are permanent + // will not be retried. + if e.Err != io.EOF && !e.Temporary() && r.RealisConfig().failOnPermanentErrors { + return nil, errors.Wrap(clientErr, "permanent connection error") + } + + // Corner case where thrift payload was received by Aurora but connection timedout before Aurora was + // able to reply. In this case we will return whatever response was received and a TimedOut behaving + // error. Users can take special action on a timeout by using IsTimedout and reacting accordingly. + if e.Timeout() { + timeouts++ + r.logger.debugPrintf( + "Client closed connection (timedout) %d times before server responded, "+ + "consider increasing connection timeout", + timeouts) + if returnOnTimeout { + return resp, newTimedoutError(errors.New("client connection closed before server answer")) + } + } + } } // In the future, reestablish connection should be able to check if it is actually possible @@ -191,71 +202,48 @@ func (r *realisClient) thriftCallWithRetries( if reestablishErr != nil { r.logger.debugPrintf("error re-establishing connection ", reestablishErr) } + } else { - // If users did not opt for a return on timeout in order to react to a timedout error, - // attempt to verify that the call made it to the scheduler after the connection was re-established. - if timedout { - timeouts++ - r.logger.debugPrintf( - "Client closed connection %d times before server responded, "+ - "consider increasing connection timeout", - timeouts) - - // Allow caller to provide a function which checks if the original call was successful before - // it timed out. - if verifyOnTimeout != nil { - if verifyResp, ok := verifyOnTimeout(); ok { - r.logger.Print("verified that the call went through successfully after a client timeout") - // Response here might be different than the original as it is no longer constructed - // by the scheduler but mimicked. - // This is OK since the scheduler is very unlikely to change responses at this point in its - // development cycle but we must be careful to not return an incorrectly constructed response. - return verifyResp, nil - } - } + // If there was no client error, but the response is nil, something went wrong. + // Ideally, we'll never encounter this but we're placing a safeguard here. + if resp == nil { + return nil, errors.New("response from aurora is nil") } - // Retry the thrift payload - continue - } + // Check Response Code from thrift and make a decision to continue retrying or not. + switch responseCode := resp.GetResponseCode(); responseCode { - // If there was no client error, but the response is nil, something went wrong. - // Ideally, we'll never encounter this but we're placing a safeguard here. - if resp == nil { - return nil, errors.New("response from aurora is nil") - } + // If the thrift call succeeded, stop retrying + case aurora.ResponseCode_OK: + return resp, nil - // Check Response Code from thrift and make a decision to continue retrying or not. - switch responseCode := resp.GetResponseCode(); responseCode { + // If the response code is transient, continue retrying + case aurora.ResponseCode_ERROR_TRANSIENT: + r.logger.Println("Aurora replied with Transient error code, retrying") + continue - // If the thrift call succeeded, stop retrying - case aurora.ResponseCode_OK: - return resp, nil + // Failure scenarios, these indicate a bad payload or a bad config. Stop retrying. + case aurora.ResponseCode_INVALID_REQUEST, + aurora.ResponseCode_ERROR, + aurora.ResponseCode_AUTH_FAILED, + aurora.ResponseCode_JOB_UPDATING_ERROR: + r.logger.Printf("Terminal Response Code %v from Aurora, won't retry\n", resp.GetResponseCode().String()) + return resp, errors.New(response.CombineMessage(resp)) - // If the response code is transient, continue retrying - case aurora.ResponseCode_ERROR_TRANSIENT: - r.logger.Println("Aurora replied with Transient error code, retrying") - continue - - // Failure scenarios, these indicate a bad payload or a bad config. Stop retrying. - case aurora.ResponseCode_INVALID_REQUEST, - aurora.ResponseCode_ERROR, - aurora.ResponseCode_AUTH_FAILED, - aurora.ResponseCode_JOB_UPDATING_ERROR: - r.logger.Printf("Terminal Response Code %v from Aurora, won't retry\n", resp.GetResponseCode().String()) - return resp, errors.New(response.CombineMessage(resp)) - - // The only case that should fall down to here is a WARNING response code. - // It is currently not used as a response in the scheduler so it is unknown how to handle it. - default: - r.logger.debugPrintf("unhandled response code %v received from Aurora\n", responseCode) - return nil, errors.Errorf("unhandled response code from Aurora %v", responseCode.String()) + // The only case that should fall down to here is a WARNING response code. + // It is currently not used as a response in the scheduler so it is unknown how to handle it. + default: + r.logger.debugPrintf("unhandled response code %v received from Aurora\n", responseCode) + return nil, errors.Errorf("unhandled response code from Aurora %v", responseCode.String()) + } } } + r.logger.debugPrintf("it took %v retries to complete this operation\n", curStep) + if curStep > 1 { - r.config.logger.Printf("this thrift call was retried %d time(s)", curStep) + r.config.logger.Printf("retried this thrift call %d time(s)", curStep) } // Provide more information to the user wherever possible. @@ -265,30 +253,3 @@ func (r *realisClient) thriftCallWithRetries( return nil, newRetryError(errors.New("ran out of retries"), curStep) } - -// isConnectionError processes the error received by the client. -// The return values indicate weather this was determined to be a temporary error -// and weather it was determined to be a timeout error -func isConnectionError(err error) (bool, bool) { - - // Determine if error is a temporary URL error by going up the stack - transportException, ok := err.(thrift.TTransportException) - if !ok { - return false, false - } - - urlError, ok := transportException.Err().(*url.Error) - if !ok { - return false, false - } - - // EOF error occurs when the server closes the read buffer of the client. This is common - // when the server is overloaded and we consider it temporary. - // All other which are not temporary as per the member function Temporary(), - // are considered not temporary (permanent). - if urlError.Err != io.EOF && !urlError.Temporary() { - return false, false - } - - return true, urlError.Timeout() -} diff --git a/runTestsMac.sh b/runTestsMac.sh index 6a09931..d60d85f 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 -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 $@ +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 $@ diff --git a/util.go b/util.go index 4307d1c..989f8e8 100644 --- a/util.go +++ b/util.go @@ -1,11 +1,7 @@ package realis import ( - "crypto/x509" - "io/ioutil" "net/url" - "os" - "path/filepath" "strings" "github.com/paypal/gorealis/gen-go/apache/aurora" @@ -29,7 +25,7 @@ var TerminalStates = make(map[aurora.ScheduleStatus]bool) // ActiveJobUpdateStates - States a Job Update may be in where it is considered active. var ActiveJobUpdateStates = make(map[aurora.JobUpdateStatus]bool) -// TerminalUpdateStates returns a slice containing all the terminal states an update may be in. +// TerminalJobUpdateStates returns a slice containing all the terminal states an update may end up in. // This is a function in order to avoid having a slice that can be accidentally mutated. func TerminalUpdateStates() []aurora.JobUpdateStatus { return []aurora.JobUpdateStatus{ @@ -69,49 +65,6 @@ func init() { } } -// createCertPool will attempt to load certificates into a certificate pool from a given directory. -// Only files with an extension contained in the extension map are considered. -// This function ignores any files that cannot be read successfully or cannot be added to the certPool -// successfully. -func createCertPool(path string, extensions map[string]struct{}) (*x509.CertPool, error) { - _, err := os.Stat(path) - if err != nil { - return nil, errors.Wrap(err, "unable to load certificates") - } - - caFiles, err := ioutil.ReadDir(path) - if err != nil { - return nil, err - } - - certPool := x509.NewCertPool() - loadedCerts := 0 - for _, cert := range caFiles { - // Skip directories - if cert.IsDir() { - continue - } - - // Skip any files that do not contain the right extension - if _, ok := extensions[filepath.Ext(cert.Name())]; !ok { - continue - } - - pem, err := ioutil.ReadFile(filepath.Join(path, cert.Name())) - if err != nil { - continue - } - - if certPool.AppendCertsFromPEM(pem) { - loadedCerts++ - } - } - if loadedCerts == 0 { - return nil, errors.New("no certificates were able to be successfully loaded") - } - return certPool, nil -} - func validateAuroraURL(location string) (string, error) { // If no protocol defined, assume http @@ -139,7 +92,7 @@ func validateAuroraURL(location string) (string, error) { return "", errors.Errorf("only protocols http and https are supported %v\n", u.Scheme) } - // This could theoretically be elsewhere but we'll be strict for the sake of simplicity + // This could theoretically be elsewhwere but we'll be strict for the sake of simplicty if u.Path != apiPath { return "", errors.Errorf("expected /api path %v\n", u.Path) } diff --git a/util_test.go b/util_test.go index 2906c42..b8341b2 100644 --- a/util_test.go +++ b/util_test.go @@ -100,15 +100,3 @@ func TestCurrentBatchCalculator(t *testing.T) { assert.Equal(t, 0, curBatch) }) } - -func TestCertPoolCreator(t *testing.T) { - extensions := map[string]struct{}{".crt": {}} - - _, err := createCertPool("examples/certs", extensions) - assert.NoError(t, err) - - t.Run("badDir", func(t *testing.T) { - _, err := createCertPool("idontexist", extensions) - assert.Error(t, err) - }) -}